RASingleton.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // RASingleton.h
  3. // Apex And Drivers
  4. //
  5. // Created by Jack on 2018/6/6.
  6. // Copyright © 2018年 USAI. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @class CLLocation;
  10. @interface RASingleton : NSObject
  11. + (instancetype)sharedInstance;
  12. @property (nonatomic,copy,readonly) NSString *user;
  13. @property (nonatomic,copy,readonly) NSString *password;
  14. @property (nonatomic,strong) CLLocation *currentLocation;
  15. @property (nonatomic,copy,readonly) NSString *secretKey;
  16. @property (nonatomic,copy,readonly) NSString *encryptUser;
  17. @property (nonatomic,copy,readonly) NSString *encryptPassword;
  18. @property (nonatomic,copy) NSString *notificationToken;
  19. @property (nonatomic,assign) BOOL requiredLocation;
  20. - (void)saveUserInfo;
  21. - (NSString *)savedUser;
  22. - (NSString *)savedPassword;
  23. - (void)loginUser:(NSString *)user password:(NSString *)password;
  24. - (BOOL)autoLogin;
  25. - (void)logout;
  26. - (void)loadSavedReuqiredLocation;
  27. - (NSString *)encryptString:(NSString *)str;
  28. - (NSString *)decryptString:(NSString *)str;
  29. @end