| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- //
- // 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, ///< 拒绝
- RABackgroundReportTypeAlways = 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,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 requiredLocation;
- @property (nonatomic,strong) NSOperationQueue *networkQueue;
- @property (nonatomic,assign) RABackgroundReportType backgroundReportType;///<后台位置报告权限类型
- - (void)saveUserInfo;
- - (NSString *)savedUser;
- - (NSString *)savedPassword;
- - (void)loginUser:(NSString *)user password:(NSString *)password;
- - (BOOL)autoLogin;
- - (void)logout;
- - (void)loadSavedReuqiredLocation;
- - (NSString *)encryptString:(NSString *)str;
- - (NSString *)decryptString:(NSString *)str;
- - (void)writeLog:(NSString *)log;
- - (void)saveLogs;
- @end
|