VLCWatchMessage.h 1.27 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 21 22
extern NSString *const VLCWatchMessageNameRequestThumbnail;

extern NSString *const VLCWatchMessageKeyURIRepresentation;
23 24 25

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

@property (nonatomic, readonly) NSDictionary *dictionaryRepresentation;

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

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

@end
37 38

NS_ASSUME_NONNULL_END