| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- //
- // RASingleton.h
- // Apex And Drivers
- //
- // Created by Jack on 2018/6/6.
- // Copyright © 2018年 USAI. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- typedef enum {
- RABackgroundReportTypeNone = 0, ///<没有设置
- RABackgroundReportTypeReject = 1, ///< 拒绝
- RABackgroundReportTypeAlwaysAsk = 2, ///< 每次询问
- RABackgroundReportTypeAllow = 3 ///< 同意
-
- } RABackgroundReportType;
- @class CLLocation;
- @interface RASingleton : NSObject
- + (instancetype)sharedInstance;
- @property (nonatomic,copy,readonly) NSString *user;
- @property (nonatomic,copy,readonly) NSString *password;
- @property (nonatomic,strong) CLLocation *currentLocation;
- @property (nonatomic,strong) CLLocation *lastLocation;
- @property (nonatomic,strong) NSString *lastLocationDateTime;
- @property (nonatomic,copy,readonly) NSString *secretKey;
- @property (nonatomic,copy,readonly) NSString *encryptUser;
- @property (nonatomic,copy,readonly) NSString *encryptPassword;
- @property (nonatomic,copy) NSString *notificationToken;
- @property (nonatomic,assign) BOOL requiredBackgroundLocation;
- @property (nonatomic,strong) NSOperationQueue *networkQueue;
- @property (nonatomic,assign) RABackgroundReportType backgroundReportType;///<后台位置报告权限类型
- @property (nonatomic,copy) NSString *firstName;
- @property (nonatomic,assign) BOOL savePassword;
- @property (nonatomic,assign) BOOL offline;
- - (void)saveUserInfo;
- - (NSString *)savedUser;
- - (NSString *)savedPassword;
- - (void)loginUser:(NSString *)user password:(NSString *)password firstName:(NSString *)firstName;
- - (BOOL)autoLogin;
- - (void)logout;
- - (void)loadSavedReuqiredLocation;
- - (NSString *)encryptString:(NSString *)str;
- - (NSString *)decryptString:(NSString *)str;
- - (void)writeLog:(NSString *)log;
- - (void)saveLogs;
- - (void)changePassword:(NSString *)password;
- @end
|