LOHWManager.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #import <Cocoa/Cocoa.h>
00037 @class LOHWBridge;
00038
00039 #define LOHWManagerDidUpdatePatch @"LOHWManagerDidUpdatePatch"
00040 #define LOHWManagerBridgePluggedNotification @"LOHWManagerBridgePluggedNotification"
00041 #define LOHWManagerBridgeUnpluggedNotification @"LOHWManagerBridgeUnpluggedNotification"
00042
00043 #define LOHWManagerUnidentifiedPlugNotification @"LOHWManagerUnidentifiedPlugNotification"
00044 #define LOHWManagerUnidentifiedUnplugNotification @"LOHWManagerUnidentifiedUnplugNotification"
00045
00046
00054 @interface LOHWManager : NSObject
00055 {
00056 NSDictionary *knownDevices;
00057 NSMutableDictionary *unknownDevices;
00058
00059 NSMutableArray *pluggedIdentifiers;
00060
00061 NSMutableArray *universes;
00062 NSMutableArray *bridges;
00063
00064 IONotificationPortRef notifyPort;
00065 io_iterator_t usbIterator;
00066 }
00067
00068
00078 + (LOHWManager *)defaultManager;
00079
00080
00086 - (unsigned)count;
00087
00088
00103 - (void)autopatch;
00104
00105
00118 - (void)patchFromXML:(NSXMLElement *)XMLElement;
00119
00120
00134 - (LOHWBridge *)bridgeForUniverse:(unsigned char)universe addingDummy:(BOOL)flag;
00135
00136
00145 - (LOHWBridge *)bridgeForIdentifier:(NSString *)identifier;
00146
00147
00156 - (LOHWBridge *)bridgeForIdentifier:(NSString *)identifier andPatch:(BOOL)flag;
00157
00158
00166 - (unsigned char)universeForBridge:(LOHWBridge *)bridge;
00167
00168
00184 - (void)patchBridge:(LOHWBridge *)bridge toUniverse:(unsigned char)universe;
00185
00186
00192 - (void)moveUniversesAtIndexs:(NSIndexSet *)indexes toIndex:(unsigned)index;
00193
00194
00201 - (void)removeUniverseAtIndex:(unsigned)index;
00202
00203
00209 - (void)closeAll;
00210
00211
00221 - (NSArray *)identifers;
00222
00223
00239 - (NSXMLElement *)XML;
00240
00241
00250 - (void)setBlackout:(BOOL)state;
00251
00252
00263 - (NSArray *)unpatchedBridgeIdentifiers;
00264
00265
00273 - (NSArray *)patchedBridgeIdentifiers;
00274
00275
00281 - (void)setSleeping:(BOOL)flag;
00282
00283
00293 - (NSDictionary *)knownDevices;
00294
00295
00303 - (void)setKnownDevices:(NSDictionary *)devices;
00304
00305
00312 - (NSDictionary *)unknownDevices;
00313
00314
00315 #pragma mark Deprecated Functions
00316
00328 - (LOHWBridge *)bridgeWithSerial:(NSString *)serial;
00329
00330 @end
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354