DataManager.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. //
  2. // DataManager.h
  3. // Artimenring
  4. //
  5. // Created by BaH Cy on 2/11/15.
  6. // Copyright (c) 2015 BaH Cy. All rights reserved.
  7. //
  8. #import <FBSDKLoginKit/FBSDKLoginKit.h>
  9. #import <JCSDKOC/JCSDKOC.h>
  10. #import "SKInCallViewController.h"
  11. typedef enum BindOptions{
  12. BO_ADD,
  13. BO_REBIND,
  14. BO_FROMLOGIN,
  15. } BindOptions;
  16. @protocol DataManagerDelegate <NSObject>
  17. - (void)onBindAlready;
  18. - (void)onRefreshChildsDevices;
  19. - (void)onChangeChild:(NSInteger)index;
  20. - (void)onReceiveLocation:(BaseCoordinatesModel*)model;
  21. - (void)onReceiveNewChat;
  22. - (void)onReceiveNewNotification:(BOOL)status;
  23. - (void)onReceiveUpdateChat:(SessionMessageModel*)model;
  24. - (void)onRefreshTabBarBadge:(NSInteger)count;
  25. - (void)onReceiveWeather;
  26. - (void)onSocketStatusChange;
  27. @end
  28. @interface MutableDelegateObject : NSObject
  29. @property(nonatomic, weak) id<DataManagerDelegate> delegate;
  30. @end
  31. @interface DataManager : NSObject
  32. + (DataManager *)shared;
  33. @property(nonatomic, strong) LogInModel* loginModel;
  34. @property(nonatomic, strong) ChildModel* mSelectChildModel;
  35. @property(nonatomic, strong) NSMutableArray* mChildList;
  36. @property(nonatomic, strong) NSMutableArray* mSessionList;
  37. @property(nonatomic, strong) NSMutableArray *mPushRecordArray; /** 推送历史 */
  38. @property(nonatomic, strong) NSTimer* mChildsDevicesTimer;
  39. @property(nonatomic, assign) BOOL isNewNotification;
  40. @property(nonatomic, assign) BindOptions bindOptions;
  41. @property(nonatomic, strong) NSMutableArray<MutableDelegateObject*> *delegateObjects;
  42. @property(nonatomic, strong) NSMutableDictionary* mAddressMap;
  43. - (BOOL)isLogin;
  44. - (void)logout;
  45. /** 设置根控制器 */
  46. - (void)showTabBarController;
  47. - (void)showSKLoginViewController;
  48. - (void)showSKSelectAreaViewController;
  49. - (void)showBindViewController;
  50. - (BOOL)isRootTabBarController;
  51. - (id)getFBSDKLoginManager;
  52. - (void)setFBSDKLoginManager:(id)manager;
  53. @end