| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- //
- // RASingleton.h
- // Apex And Drivers
- //
- // Created by Jack on 2018/6/6.
- // Copyright © 2018年 USAI. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- #import "AESCrypt.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,copy,readonly) NSArray *companylist;
- @property (nonatomic,assign) int companyid;
- //@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)login:(NSString *)user password:(NSString *)password firstName:(NSString *)firstName companyList:(NSArray*) companylist;
- - (void)changePassword:(NSString *)newpassword ;
- - (BOOL)autoLogin;
- - (void)logout;
- - (void)loadSavedReuqiredLocation;
- - (NSString *)encryptString:(NSString *)str;
- - (NSString *)decryptString:(NSString *)str;
- - (void)writeLog:(NSString *)log;
- - (void)saveLogs;
- @end
|