5 #ifndef INCLUDE_CBE_CONTAINER_H_
6 #define INCLUDE_CBE_CONTAINER_H_
9 #include "cbe/delegate/container/MoveDelegate.h"
10 #include "cbe/delegate/container/RenameDelegate.h"
11 #include "cbe/delegate/container/RemoveDelegate.h"
12 #include "cbe/delegate/AclDelegate.h"
13 #include "cbe/delegate/CreateContainerDelegate.h"
14 #include "cbe/delegate/CreateObjectDelegate.h"
15 #include "cbe/delegate/Error.h"
16 #include "cbe/delegate/PublishDelegate.h"
17 #include "cbe/delegate/PublishSuccess.h"
18 #include "cbe/delegate/ShareDelegate.h"
19 #include "cbe/delegate/UnPublishDelegate.h"
20 #include "cbe/delegate/UnShareDelegate.h"
21 #include "cbe/delegate/UnSubscribeDelegate.h"
22 #include "cbe/delegate/UploadDelegate.h"
23 #include "cbe/delegate/QueryDelegate.h"
24 #include "cbe/delegate/QueryJoinDelegate.h"
27 #include "cbe/delegate/ProgressEventFn.h"
30 #include "cbe/util/Context.h"
31 #include "cbe/util/ErrorInfo.h"
32 #include "cbe/util/Exception.h"
33 #include "cbe/util/Optional.h"
36 #include "cbe/Object.h"
37 #include "cbe/Types.h"
41 using ContainerPtr = std::shared_ptr<CBI::Container>;
42 class ItemEventProtocol;
43 using ItemDelegatePtr = std::shared_ptr<ItemEventProtocol>;
85 using CreateContainerException = delegate::CreateContainerDelegate::Exception;
131 const std::string&
name,
132 CreateContainerError& error);
156 using MoveException = delegate::container::MoveDelegate::Exception;
226 using RenameException = delegate::container::RenameDelegate::Exception;
294 using RemoveException = delegate::container::RemoveDelegate::Exception;
380 using CreateObjectException = delegate::CreateObjectDelegate::Exception;
429 CreateObjectError& error);
481 const std::string&
path,
494 std::uint64_t length,
495 const char* byteData,
510 using UploadException = delegate::UploadDelegate::Exception;
542 const std::string& filePath,
553 const std::string& filePath);
573 const std::string&
name,
574 const std::string&
path,
585 const std::string&
name,
586 const std::string&
path);
606 const std::string&
name,
607 std::uint64_t length,
608 const char* byteData,
618 const std::string&
name,
619 std::uint64_t length,
620 const char* byteData);
669 const std::string& filePath,
680 const std::string& filePath,
704 const std::string&
name,
705 const std::string&
path,
717 const std::string&
name,
718 const std::string&
path,
737 const std::string&
name,
738 std::uint64_t length,
739 const char* byteData,
751 const std::string&
name,
752 std::uint64_t length,
753 const char* byteData,
811 using QueryException = delegate::QueryDelegate::Exception;
822 cbe::QueryChainSync
query();
846 cbe::QueryChainSync
query(QueryJoinError& error);
856 QueryJoinError& error);
887 using queryWithPathException = delegate::QueryDelegate::Exception;
933 std::string relativePath,
934 queryWithPathError& error);
965 using SearchException = delegate::QueryDelegate::Exception;
1011 SearchError& error);
1079 SearchError& error);
1108 using SetAclException = delegate::AclDelegate::Exception;
1155 SetAclError& error);
1177 using GetAclException = delegate::AclDelegate::Exception;
1252 using ShareException = delegate::ShareDelegate::Exception;
1327 using UnShareException = delegate::UnShareDelegate::Exception;
1374 UnShareError& error);
1400 std::string password,
1407 using PublishException = delegate::PublishDelegate::Exception;
1426 std::string password);
1462 std::string password,
1463 PublishError& error);
1494 using UnPublishException = delegate::UnPublishDelegate::Exception;
1540 UnPublishError& error);
1566 using UnSubscribeException = delegate::UnSubscribeDelegate::Exception;
1612 UnSubscribeError& error);
1618 Impl& getImpl()
const;
1627 Container(CBI::ContainerPtr cbiPeerPtr);
1629 CBI::ContainerPtr getCbiPeerPtr()
const;
Login account information.
Definition: Account.h:26
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
delegate::AclDelegatePtr GetAclDelegatePtr
Definition: Container.h:1163
delegate::AclDelegatePtr SetAclDelegatePtr
Definition: Container.h:1087
delegate::CreateObjectDelegatePtr CreateObjectDelegatePtr
Definition: Container.h:348
void getAcl(GetAclDelegatePtr delegate)
Retrieves its ACL map.
void unShare(cbe::ShareId shareId, UnShareDelegatePtr delegate)
Revoke a previous share.
cbe::QueryChainExt query(Filter filter, delegate::QueryJoinDelegatePtr delegate)
Select list of objects using filter, for join.
cbe::QueryChain query(Filter filter, QueryDelegatePtr delegate)
Select list of objects using filter.
cbe::Object upload(const std::string &name, const std::string &path, UploadDelegatePtr delegate)
Create an object in current container by uploading a file.
delegate::container::RenameDelegatePtr RenameDelegatePtr
Definition: Container.h:211
delegate::container::RemoveDelegatePtr RemoveDelegatePtr
Definition: Container.h:280
delegate::UnPublishDelegatePtr UnPublishDelegatePtr
Definition: Container.h:1472
cbe::Object createObject(std::string name, cbe::KeyValues keyValues, CreateObjectDelegatePtr delegate)
Create a new object.
void rename(const std::string &name, RenameDelegatePtr delegate)
Change the name of the container.
void unSubscribe(UnSubscribeDelegatePtr delegate)
UnSubscribes from this container.
std::shared_ptr< delegate::UnShareDelegate > UnShareDelegatePtr
Definition: Container.h:1309
void setAcl(cbe::AclMap aclMap, SetAclDelegatePtr delegate)
set ACL.
cbe::QueryResult search(cbe::Filter filter, QueryDelegatePtr delegate)
Search using filter.
delegate::ShareDelegatePtr ShareDelegatePtr
Definition: Container.h:1230
void unPublish(UnPublishDelegatePtr delegate)
UnPublishes this container.
cbe::QueryChain query(QueryDelegatePtr queryDelegate)
Select list of objects.
cbe::QueryChainExt query(delegate::QueryJoinDelegatePtr delegate)
Select list of objects, for join.
cbe::QueryResult search(std::string tags, QueryDelegatePtr delegate)
Search by tags.
cbe::Object upload(const std::string &name, std::uint64_t length, const char *byteData, UploadDelegatePtr delegate)
Upload from local memory to an object.
void remove(RemoveDelegatePtr delegate)
Delete the container.
void publish(cbe::PublishAccess security, cbe::PublishVisibility privacy, std::string description, std::string password, PublishDelegatePtr delegate)
Publishes a container and its content to any user.
delegate::container::MoveDelegatePtr MoveDelegatePtr
Definition: Container.h:140
delegate::PublishDelegatePtr PublishDelegatePtr
Definition: Container.h:1382
void share(cbe::UserId toUserGroup, std::string description, ShareDelegatePtr delegate)
Make accessible by other user.
delegate::CreateContainerDelegatePtr CreateContainerDelegatePtr
Definition: Container.h:70
cbe::Container createContainer(const std::string &name, CreateContainerDelegatePtr delegate)
Create a container.
delegate::UnSubscribeDelegatePtr UnSubscribeDelegatePtr
Definition: Container.h:1548
std::shared_ptr< delegate::QueryJoinDelegate > QueryJoinDelegatePtr
Definition: Container.h:788
delegate::UploadDelegatePtr UploadDelegatePtr
Definition: Container.h:441
cbe::Object upload(const std::string &filePath, UploadDelegatePtr delegate)
Upload object to container with file given by filePath.
cbe::QueryChain queryWithPath(std::string relativePath, QueryDelegatePtr delegate)
Select list of objects in hierarchy.
void move(cbe::ContainerId dstId, MoveDelegatePtr delegate)
Move a container to a different parent.
cbe::Object createObject(std::string name, CreateObjectDelegatePtr delegate)
delegate::QueryDelegatePtr QueryDelegatePtr
Definition: Container.h:762
A database.
Definition: Database.h:27
Use to select Item that meets specific criterias when doing a query.
Definition: Filter.h:40
A group of members.
Definition: Group.h:42
A set made up of Container and Object.
Definition: Item.h:36
std::string description() const
Holder of a set of data, can represent a table row.
Definition: Object.h:64
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
Definition: AclDelegate.h:22
Convenience type that bundles the parameter passed to method cbe::delegate::ShareDelegate::onShareSuc...
Definition: PublishSuccess.h:14
QueryDelegate::ErrorInfo ErrorInfo
Definition: QueryJoinDelegate.h:47
Definition: ShareDelegate.h:20
Convenience type that bundles the parameter passed to method cbe::delegate::ShareDelegate::onShareSuc...
Definition: ShareDelegate.h:77
Convenience type that bundles all parameters passed to method cbe::delegate::UnPublishDelegate::onUnP...
Definition: UnPublishDelegate.h:77
Definition: UnShareDelegate.h:20
Convenience type that bundles the parameter passed to method cbe::delegate::ShareDelegate::onShareSuc...
Definition: UnShareDelegate.h:73
Convenience type that bundles all parameters passed to method cbe::delegate::UnSubscribeDelegate::onU...
Definition: UnSubscribeDelegate.h:76
Convenience type that bundles all parameters passed to method cbe::delegate::container::RemoveDelegat...
Definition: RemoveDelegate.h:74
Class template Optional manages an optional contained value - i.e., a value that is either present or...
Definition: Optional.h:20
std::shared_ptr< RemoveDelegate > RemoveDelegatePtr
Definition: RemoveDelegate.h:67
std::shared_ptr< RenameDelegate > RenameDelegatePtr
Definition: RenameDelegate.h:64
std::shared_ptr< MoveDelegate > MoveDelegatePtr
Definition: MoveDelegate.h:64
std::function< void(const ChunkTransferred &)> ProgressEventFn
Callback interface function that the CloudBackend SDK uses to indicate the progress of an upload/down...
Definition: ProgressEventFn.h:19
std::shared_ptr< UnPublishDelegate > UnPublishDelegatePtr
Definition: UnPublishDelegate.h:70
std::shared_ptr< ShareDelegate > ShareDelegatePtr
Definition: ShareDelegate.h:70
std::shared_ptr< PublishDelegate > PublishDelegatePtr
Definition: PublishDelegate.h:66
std::shared_ptr< CreateContainerDelegate > CreateContainerDelegatePtr
Definition: CreateContainerDelegate.h:67
std::shared_ptr< QueryJoinDelegate > QueryJoinDelegatePtr
Definition: QueryJoinDelegate.h:76
std::shared_ptr< AclDelegate > AclDelegatePtr
Definition: AclDelegate.h:68
std::shared_ptr< QueryDelegate > QueryDelegatePtr
Definition: QueryDelegate.h:100
std::shared_ptr< CreateObjectDelegate > CreateObjectDelegatePtr
Definition: CreateObjectDelegate.h:63
std::shared_ptr< UploadDelegate > UploadDelegatePtr
Definition: UploadDelegate.h:83
std::shared_ptr< UnSubscribeDelegate > UnSubscribeDelegatePtr
Definition: UnSubscribeDelegate.h:69
Root namespace for the CloudBackend SDK API.
Definition: Account.h:22
std::map< cbe::AclGroupId, std::pair< cbe::Permissions, AclScope > > AclMap
ACL map (Access Control List) relating to users and groups.
Definition: Types.h:390
std::uint64_t ShareId
Uniquely identifies a sharing of a cbe::Container or cbe::Object.
Definition: Types.h:113
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
PublishVisibility
Definition: Types.h:357
PublishAccess
Definition: Types.h:342
std::map< std::string, std::pair< std::string, bool > > KeyValues
Map with key/value pairs, a.k.a. metadata.
Definition: Types.h:417
Definition: AclDelegate.h:41
Definition: CreateContainerDelegate.h:41
Definition: CreateObjectDelegate.h:41
Definition: PublishDelegate.h:38
Definition: QueryDelegate.h:61
Definition: ShareDelegate.h:42
Definition: UnPublishDelegate.h:42
Definition: UnShareDelegate.h:38
Definition: UnSubscribeDelegate.h:41
Definition: UploadDelegate.h:57
Definition: MoveDelegate.h:43
Definition: RemoveDelegate.h:44
Definition: RenameDelegate.h:43