SDK  2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
Account.h
1 /*
2  Copyright © CloudBackend AB 2020-2023.
3  */
4 
5 #ifndef INCLUDE_CBE_ACCOUNT_H_
6 #define INCLUDE_CBE_ACCOUNT_H_
7 
8 #include <string>
9 #include <vector>
10 #include <map>
11 
12 #include "cbe/Types.h"
13 #include "cbe/Container.h"
14 #include "cbe/Database.h"
15 
16 namespace CBI {
17 class Account;
18 using AccountPtr = std::shared_ptr<CBI::Account>;
19 } // namespace CBI
20 
21 namespace cbe
22 {
26 class Account {
27 public:
33 
39  std::string username() const;
40 
46  std::string password() const;
47 
53  std::string source() const;
54 
60  std::string client() const;
61 
67  std::string firstName() const;
68 
73  std::string lastName() const;
74 
81 
92 
102 
109 
116 
126  ~Account();
127 
140  explicit operator bool() const;
141 private:
142  struct Impl;
143  std::shared_ptr<Impl> pImpl{};
144 
145 
146  friend class CloudBackend;
147  Account(CBI::AccountPtr cbiPeerPtr);
151  CBI::Account& getCbiPeer() const;
152 }; // class Account
153 
154 } // namespace cbe
155 
156 #endif // INCLUDE_CBE_ACCOUNT_H_
Login account information.
Definition: Account.h:26
cbe::DataBases databases() const
Returns the Databases available.
std::string lastName() const
Returns the surname of the user.
cbe::ContainerId libContainerId() const
Returns the library ContainerId.
cbe::DatabaseId rootDatabase() const
Returns the DatabaseId for home://.
std::string source() const
Returns the tenant name of the account.
std::string firstName() const
Returns the given name of the user.
cbe::ContainerId tenantContainerId() const
Returns the tenant ContainerId.
cbe::Container rootContainer() const
Returns the rootContainer for the account.
std::string client() const
Returns the client of the account.
cbe::UserId userId() const
Returns the account id of the user.
std::string username() const
Returns the username of the account.
Account(cbe::DefaultCtor)
Default constructor.
std::string password() const
Returns the password of the account.
The session that holds the connection with the cloud.
Definition: CloudBackend.h:47
A collection of Item, can also represent a table or folder.
Definition: Container.h:63
Root namespace for the CloudBackend SDK API.
Definition: Account.h:22
std::uint64_t UserId
Uniquely identifies the CBE user number.
Definition: Types.h:126
std::uint64_t ContainerId
Unique Id of a cbe::Container.
Definition: Types.h:60
DefaultCtor
Default constructor marker.
Definition: Types.h:204
std::uint64_t DatabaseId
The id of a Database.
Definition: Types.h:64
std::map< std::string, cbe::Database > DataBases
Databases available for the account.
Definition: Types.h:396