13 #ifndef NECBAAS_NBUSER_H 
   14 #define NECBAAS_NBUSER_H 
   22 #include "necbaas/internal/nb_user_entity.h" 
   46     explicit NbUser(
const std::shared_ptr<NbService> &service);
 
   67                                               const std::string &password, 
int timeout = kRestTimeoutDefault);
 
   82                                            const std::string &password, 
int timeout = kRestTimeoutDefault);
 
   92     static NbResult<NbUser> Logout(
const std::shared_ptr<NbService> &service, 
int timeout = kRestTimeoutDefault);
 
  103     static bool IsLoggedIn(
const std::shared_ptr<NbService> &service);
 
  121     static const std::string 
GetSessionToken(
const std::shared_ptr<NbService> &service);
 
  173     const std::string &
GetEmail() 
const;
 
  185     std::vector<std::string> 
GetGroups() 
const;
 
  208     std::shared_ptr<NbService> service_; 
 
  209     NbUserEntity user_entity_;           
 
  220     static NbResult<NbUser> Login(
const std::shared_ptr<NbService> &service, 
const std::string &username,
 
  221                                   const std::string &email, 
const std::string &password, 
int timeout);
 
  229     static void SetCurrentUser(
const std::shared_ptr<NbService> &service, 
NbJsonObject json);
 
  232 #endif  // NECBAAS_NBUSER_H 
static std::string ExportCurrentLogin(const std::shared_ptr< NbService > &service)
ログインユーザのExport. 
static NbUser GetCurrentUser(const std::shared_ptr< NbService > &service)
ログインユーザ情報取得. 
const std::string & GetEmail() const 
E-mail取得. 
std::tm GetCreatedTime() const 
ユーザ作成日時取得. 
static NbResultCode ImportCurrentLogin(const std::shared_ptr< NbService > &service, const std::string &import)
ログインユーザのImport. 
ユーザクラス. 
Definition: nb_user.h:33
REST API処理結果クラス. 
Definition: nb_result.h:32
static std::time_t GetSessionTokenExpiration(const std::shared_ptr< NbService > &service)
ログイン有効期限取得. 
Jsonオブジェクト. 
Definition: nb_json_object.h:34
const NbJsonObject & GetOptions() const 
オプション取得. 
std::vector< std::string > GetGroups() const 
所属グループ取得. 
static NbResult< NbUser > Logout(const std::shared_ptr< NbService > &service, int timeout=kRestTimeoutDefault)
ログアウト. 
NbResultCode
処理結果コード. 
Definition: nb_result_code.h:21
static const std::string GetSessionToken(const std::shared_ptr< NbService > &service)
セッショントークン取得. 
const std::string & GetUserId() const 
ユーザID取得. 
static NbResult< NbUser > LoginWithUsername(const std::shared_ptr< NbService > &service, const std::string &username, const std::string &password, int timeout=kRestTimeoutDefault)
ログイン(ユーザ名). 
static bool IsLoggedIn(const std::shared_ptr< NbService > &service)
ログイン状態確認. 
const std::string & GetUserName() const 
ユーザ名取得. 
static NbResult< NbUser > LoginWithEmail(const std::shared_ptr< NbService > &service, const std::string &email, const std::string &password, int timeout=kRestTimeoutDefault)
ログイン(E-mail). 
std::tm GetUpdatedTime() const 
ユーザ更新日時取得. 
void SetUserEntity(const NbUserEntity &entity)
[内部処理用]