5 #ifndef INCLUDE_CBE_CLOUDBACKEND_H_
6 #define INCLUDE_CBE_CLOUDBACKEND_H_
9 #include "cbe/delegate/CreateAccountDelegate.h"
10 #include "cbe/delegate/Error.h"
11 #include "cbe/delegate/CloudBackendListenerDelegate.h"
12 #include "cbe/delegate/LogInDelegate.h"
13 #include "cbe/delegate/QueryJoinDelegate.h"
14 #include "cbe/delegate/QueryDelegate.h"
16 #include "cbe/util/Context.h"
17 #include "cbe/util/ErrorInfo.h"
18 #include "cbe/util/Exception.h"
19 #include "cbe/util/Optional.h"
26 using CloudBackendPtr = std::shared_ptr<CBI::CloudBackend>;
27 class AccountEventProtocol;
28 using AccountDelegatePtr = std::shared_ptr<AccountEventProtocol>;
40 class SubscribeManager;
91 const std::string& password,
92 const std::string& tenant,
93 const std::string& client,
96 #ifndef DOXYGEN_SHOULD_SKIP_THIS
108 const std::string& password,
109 const std::string& tenant,
128 const std::string& password,
129 const std::string& tenant,
130 const std::string& client,
149 const std::string& password,
150 const std::string& tenant,
151 const std::string& client,
152 const std::string& host,
160 using LogInException = delegate::LogInDelegate::Exception;
180 const std::string& password,
181 const std::string& tenant,
182 const std::string& client);
184 #ifndef DOXYGEN_SHOULD_SKIP_THIS
199 const std::string& password,
200 const std::string& tenant);
221 const std::string& password,
222 const std::string& tenant,
223 const std::string& client,
243 const std::string& password,
244 const std::string& tenant,
245 const std::string& client,
246 const std::string& host);
284 const std::string& password,
285 const std::string& tenant,
286 const std::string& client,
289 #ifndef DOXYGEN_SHOULD_SKIP_THIS
314 const std::string& password,
315 const std::string& tenant,
344 const std::string& password,
345 const std::string& tenant,
346 const std::string& client,
375 const std::string& password,
376 const std::string& tenant,
377 const std::string& client,
378 const std::string& host,
410 const std::string& password,
411 const std::string& email,
412 const std::string& firstName,
413 const std::string& lastName,
414 const std::string& tenant,
415 const std::string& client,
421 using CreateAccountException = delegate::CreateAccountDelegate::Exception;
440 const std::string& password,
441 const std::string& email,
442 const std::string& firstName,
443 const std::string& lastName,
444 const std::string& tenant,
445 const std::string& client);
472 const std::string& password,
473 const std::string& email,
474 const std::string& firstName,
475 const std::string& lastName,
476 const std::string& tenant,
477 const std::string& client,
478 CreateAccountError& error);
489 std::shared_ptr<delegate::CloudBackendListenerDelegate>;
656 using QueryException = delegate::QueryDelegate::Exception;
723 QueryJoinError& error);
741 QueryJoinError& error);
816 using SearchException = delegate::QueryDelegate::Exception;
956 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1091 explicit operator bool()
const;
1094 std::shared_ptr<Impl> pImpl{};
1100 CBI::CloudBackend& getCbiPeer()
const;
Login account information.
Definition: Account.h:26
The session that holds the connection with the cloud.
Definition: CloudBackend.h:47
delegate::LogInDelegatePtr LogInDelegatePtr
Definition: CloudBackend.h:55
static cbe::CloudBackend logIn(const std::string &username, const std::string &password, const std::string &tenant, const std::string &client, LogInDelegatePtr delegate)
Logs in to the CloudBackend service.
delegate::QueryJoinDelegatePtr QueryJoinDelegatePtr
Definition: CloudBackend.h:619
cbe::QueryChainExt query(ContainerId containerId, Filter filter, QueryJoinDelegatePtr queryJoinDelegate)
Join multiple tables using filter (where).
static cbe::Container castContainer(cbe::Item item)
Casts an item to a container.
cbe::PublishManager publishManager()
Gets the publish manager.
delegate::CreateAccountDelegatePtr CreateAccountDelegatePtr
Definition: CloudBackend.h:389
void terminate()
Terminates the CloudBackend service.
cbe::QueryChain queryWithPath(std::string relativePath, cbe::ContainerId queryRoot, QueryDelegatePtr delegate)
Queries items of a container with a given path.
cbe::SubscribeManager subscribeManager()
Gets the subscribe manager.
void removeListener(ListenerHandle handle)
Delete a specific listener.
cbe::ShareManager shareManager()
Gets the share manager.
cbe::GroupManager groupManager()
Gets the group manager.
cbe::QueryChain query(ContainerId containerId, Filter filter, QueryDelegatePtr queryDelegate)
Select Item's of a container (table) with a filter (where).
cbe::QueryChain queryWithPath(std::string relativePath, QueryDelegatePtr delegate)
Queries items of a container with a given path relative the home root container.
bool clearCache()
Clear the local cache.
ListenerHandle addListener(CloudBackendListenerDelegatePtr listener)
Listen for changes to specific items.
static cbe::UserId createAccount(const std::string &username, const std::string &password, const std::string &email, const std::string &firstName, const std::string &lastName, const std::string &tenant, const std::string &client, CreateAccountDelegatePtr delegate)
Creates a user account.
std::shared_ptr< delegate::CloudBackendListenerDelegate > CloudBackendListenerDelegatePtr
Definition: CloudBackend.h:489
static cbe::Object castObject(cbe::Item item)
Casts an item to an object.
std::uint64_t ListenerHandle
Handle identifying a registered Listener.
Definition: CloudBackend.h:493
cbe::Account account()
Returns an account object with information on the user.
cbe::QueryResult search(std::string tags, cbe::ContainerId containerId, QueryDelegatePtr delegate)
Select Object's with specified key/values.
delegate::QueryDelegatePtr QueryDelegatePtr
Definition: CloudBackend.h:531
cbe::QueryChain query(ContainerId containerId, QueryDelegatePtr queryDelegate)
Select Item's of a container (table).
cbe::QueryResult search(cbe::Filter filter, cbe::ContainerId containerId, QueryDelegatePtr delegate)
Select Object's with specified key/values using filter.
CloudBackend(cbe::DefaultCtor)
Default constructor.
std::string version() const
Returns the version number of the SDK.
cbe::QueryChainExt query(ContainerId containerId, QueryJoinDelegatePtr queryJoinDelegate)
Join multiple tables.
A collection of Item, can also represent a table or folder.
Definition: Container.h:63
Use to select Item that meets specific criterias when doing a query.
Definition: Filter.h:40
For managing the groups.
Definition: GroupManager.h:30
A set made up of Container and Object.
Definition: Item.h:36
Holder of a set of data, can represent a table row.
Definition: Object.h:64
Managing the list of web shares.
Definition: PublishManager.h:21
Extension of class QueryChain.
Definition: QueryChain.h:150
To do a search for Object combining more than one Container table.
Definition: QueryChain.h:32
resultset of data retrieved.
Definition: QueryResult.h:51
Managing Shares.
Definition: ShareManager.h:27
For managing subscriptions.
Definition: SubscribeManager.h:30
QueryDelegate::ErrorInfo ErrorInfo
Definition: QueryJoinDelegate.h:47
Class template Optional manages an optional contained value - i.e., a value that is either present or...
Definition: Optional.h:20
std::shared_ptr< LogInDelegate > LogInDelegatePtr
Definition: LogInDelegate.h:76
std::shared_ptr< QueryJoinDelegate > QueryJoinDelegatePtr
Definition: QueryJoinDelegate.h:76
std::shared_ptr< QueryDelegate > QueryDelegatePtr
Definition: QueryDelegate.h:100
std::shared_ptr< CreateAccountDelegate > CreateAccountDelegatePtr
Definition: CreateAccountDelegate.h:66
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
Definition: CreateAccountDelegate.h:44
Definition: LogInDelegate.h:45
Definition: QueryDelegate.h:61