ServiceCom.h 842 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // ServiceCom.h
  3. // ZeroTier One
  4. //
  5. // Created by Grant Limberg on 8/4/16.
  6. // Copyright © 2016 ZeroTier, Inc. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @class NodeStatus;
  10. @class Network;
  11. @interface ServiceCom : NSObject
  12. {
  13. NSString *baseURL;
  14. NSURLSession *session;
  15. BOOL _isQuitting;
  16. }
  17. + (ServiceCom*)sharedInstance;
  18. - (id)init;
  19. - (void)getNetworklist:(void (^)(NSArray<Network*>*))completionHandler error:(NSError* __autoreleasing *)error;
  20. - (void)getNodeStatus:(void (^)(NodeStatus*))completionHandler error:(NSError*__autoreleasing*)error;
  21. - (void)joinNetwork:(NSString*)networkId allowManaged:(BOOL)allowManaged allowGlobal:(BOOL)allowGlobal allowDefault:(BOOL)allowDefault error:(NSError*__autoreleasing*)error;
  22. - (void)leaveNetwork:(NSString*)networkId error:(NSError*__autoreleasing*)error;
  23. @end