// // ApplicationModel.h // FirstLink // // Created by unicode on 14-9-28. // Copyright (c) 2014年 FirstLink. All rights reserved. // #import typedef NS_ENUM(NSInteger, ApplicationMode) { ApplicationModeVisitor, ApplicationModeLogin, }; typedef NS_OPTIONS(NSUInteger, UserShareAuthority) { UserShareAuthorityNone = 0, UserShareAuthorityScan = 1 << 0, UserShareAuthorityPublic = 1 << 1, }; @class User; @interface FKUserManager : NSObject @property (nonatomic, assign) ApplicationMode applicationMode; + (FKUserManager *)sharedManager; /** * 返回用户信息 * * @return */ - (User*)user; - (BOOL)saveUser:(User*)user; /** * 用户是否登录 * * @return */ + (BOOL)isUserLogin; - (BOOL)clearUser; /** * 退出本地登录状体,删除本地用户信息(如token,用户名等) * * @return */ - (BOOL)localLogout; /** * 退出服务器登录,服务端清除用户登录信息 * * @param success 成功回调 * @param failure 失败回调 */ + (void)remoteLogout:(void (^)(MSGHeader *header, id responseObject))success failure:(void (^)(MSGHeader *header, NSError *error))failure; @end