-
Notifications
You must be signed in to change notification settings - Fork 76
/
LFXNetworkContext+Private.h
59 lines (36 loc) · 1.73 KB
/
LFXNetworkContext+Private.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
// LFXNetworkContext+Private.h
// LIFX SDK
//
// Created by Nick Forge on 14/03/2014.
// Copyright (c) 2014 LIFX Labs. All rights reserved.
//
#import "LFXNetworkContext.h"
@class LFXTransportManager, LFXTaggedLightCollection, LFXLight, LFXRoutingTable, LFXMessageRateManager, LFXMessage;
@interface LFXNetworkContext (Private)
@property (nonatomic, readonly) LFXTransportManager *transportManager;
@property (nonatomic, readonly) LFXMessageRateManager *messageRateManager;
@property (nonatomic, readonly) LFXRoutingTable *routingTable;
- (void)logEverything;
// For subclasses
- (instancetype)initWithClient:(LFXClient *)client;
+ (Class)transportManagerClass;
// Removes all cached lights, light collections, and resets the routing table
- (void)resetAllCaches;
// Message Routing
- (void)sendMessage:(LFXMessage *)message;
// Tag Management
- (void)addLight:(LFXLight *)light toTaggedLightCollection:(LFXTaggedLightCollection *)taggedLightCollection;
- (void)removeLight:(LFXLight *)light fromTaggedLightCollection:(LFXTaggedLightCollection *)taggedLightCollection;
// Will return NO if there's already a tag with that name
- (BOOL)renameTaggedLightCollection:(LFXTaggedLightCollection *)collection withNewTag:(NSString *)newTag;
// Light Handling
- (void)scanNetworkForLightStates;
// Synchronized Updates
// To do synchronized updates, e.g. to change the color on different lights simultaneously, either call the appropriate
// LFXLight/LFXLightCollection methods between calls to -beginSynchronizedUpdates and -commitSynchronizedUpdates, or call
// -performSynchronizedUpdates: and call them in the block
- (void)beginSynchronizedUpdates;
- (void)commitSynchronizedUpdates;
- (void)performSynchronizedUpdates:(void(^)())block;
@end