VLCWatchMessage.h 1.33 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
//
//  VLCWatchMessage.h
//  VLC for iOS
//
//  Created by Tobias Conradi on 02.05.15.
//  Copyright (c) 2015 VideoLAN. All rights reserved.
//

#import <Foundation/Foundation.h>

11 12
NS_ASSUME_NONNULL_BEGIN

13 14 15 16 17 18
extern NSString *const VLCWatchMessageNameGetNowPlayingInfo;
extern NSString *const VLCWatchMessageNamePlayPause;
extern NSString *const VLCWatchMessageNameSkipForward;
extern NSString *const VLCWatchMessageNameSkipBackward;
extern NSString *const VLCWatchMessageNamePlayFile;
extern NSString *const VLCWatchMessageNameSetVolume;
19
extern NSString *const VLCWatchMessageNameNotification;
20
extern NSString *const VLCWatchMessageNameRequestThumbnail;
21
extern NSString *const VLCWatchMessageNameRequestDB;
22 23

extern NSString *const VLCWatchMessageKeyURIRepresentation;
24 25 26

@interface VLCWatchMessage : NSObject
@property (nonatomic, readonly) NSString *name;
27
@property (nonatomic, readonly, nullable) id<NSObject,NSCoding> payload;
28 29 30

@property (nonatomic, readonly) NSDictionary *dictionaryRepresentation;

31
- (instancetype)initWithName:(NSString *)name payload:(nullable id<NSObject,NSCoding>)payload;
32 33
- (instancetype)initWithDictionary:(NSDictionary *)dictionary;

34
+ (NSDictionary *)messageDictionaryForName:(NSString *)name payload:(nullable id<NSObject,NSCoding>)payload;
35 36 37
+ (NSDictionary *)messageDictionaryForName:(NSString *)name;

@end
38 39

NS_ASSUME_NONNULL_END