![]() |
C++
1.4.6
CloudBackend Software Development Kit - SDK API for C++
|
Public Member Functions | |
virtual ContainerPtr | create (const std::string &name, CBE::ItemDelegatePtr delegate) |
virtual void | move (CBE::container_id_t destinationId, CBE::ItemDelegatePtr delegate) |
virtual void | rename (const std::string &name, CBE::ItemDelegatePtr delegate) |
virtual void | remove (CBE::ItemDelegatePtr delegate) |
virtual CBE::ObjectPtr | createObject (std::string name, CBE::ItemDelegatePtr delegate, metadata_type metadata=metadata_type()) |
virtual CBE::ObjectPtr | upload (const std::string &name, const std::string &path, CBE::TransferUploadDelegatePtr delegate) |
virtual CBE::ObjectPtr | upload (const std::string &name, uint64_t length, char *byteData, CBE::TransferUploadDelegatePtr delegate) |
virtual QueryChainPtr | query (CBE::ItemDelegatePtr delegate) |
virtual QueryChainPtr | query (CBE::Filter filter, CBE::ItemDelegatePtr delegate) |
virtual CBE::QueryChainPtr | queryWithPath (std::string relativePath, CBE::ItemDelegatePtr delegate) |
virtual QueryResultPtr | search (std::string tags, CBE::ItemDelegatePtr delegate) |
virtual QueryResultPtr | search (CBE::Filter filter, CBE::ItemDelegatePtr delegate) |
virtual void | setACL (std::map< CBE::user_id_t, CBE::permission_status_t > toUserPermissions, CBE::ShareDelegatePtr delegate) |
virtual void | getACL (CBE::ShareDelegatePtr delegate) |
virtual void | share (user_id_t toUserGroup, std::string description, CBE::ShareDelegatePtr delegate) |
virtual void | unShare (uint64_t shareId, CBE::ShareDelegatePtr delegate) |
![]() | |
virtual std::map< uint64_t, std::vector< CBE::ShareData > > | getShareIds () const |
virtual CBE::share_id_t | getShareFromUserId (user_id_t userId) |
virtual CBE::user_id_t | getUserFromShareId (user_id_t shareId) |
virtual std::string | aclTag () const |
virtual std::string | description () const |
virtual CBE::item_id_t | id () const |
virtual CBE::container_id_t | parentId () const |
virtual CBE::container_id_t | oldParentId () const |
virtual std::string | name () const |
virtual std::string | path () const |
virtual CBE::user_id_t | ownerId () const |
virtual CBE::container_id_t | driveId () const |
virtual std::string | username () const |
virtual bool | idLoaded () const |
virtual bool | dataLoaded () const |
virtual CBE::date_t | created () const |
virtual CBE::date_t | updated () const |
virtual CBE::date_t | deleted () const |
virtual CBE::item_t | type () const |
virtual bool | operator< (const CBE::Item &other) const |
std::map< uint64_t, CBE::permission_status_t > | ACLMap () const |
virtual | ~Item () |
Protected Types | |
typedef std::map< std::string, std::pair< std::string, bool > > | metadata_type |
Protected Member Functions | |
Container () | |
|
virtual |
Create's a container Inside this containerto be used for adding objects.
name | for the container. |
delegate | is a shared pointer to an ItemEventProtocol that the user has implemented. The pointer is defined in Types.h. |
|
virtual |
Move is used to move container whith its content to user specified location ex other container or to root container.
destinationId | id of the container to which it should be moved to. |
delegate | is a shared pointer to an ItemEventProtocol that the user has implemented. The pointer is defined in Types.h. |
|
virtual |
Rename the container.
name | is the new name. |
delegate | is a shared pointer to an ItemEventProtocol that the user has implemented. The pointer is defined in Types.h. |
|
virtual |
Removes/deletes the container and all its content.
delegate | is a shared pointer to an ItemEventProtocol that the user has implemented. The pointer is defined in Types.h. |
|
virtual |
Creates an object with indexed tags or indexed tags + non indexed tags.
name | of the new object. |
delegate | is a shared pointer to an ItemEventProtocol that the user has implemented. The pointer is defined in Types.h. |
metadata | (Optional) Metadata is a map with the tag (key), the value of that tag and if it is indexed or not. |
|
virtual |
Upload object to container with path, the object is instantly returned with a temporary id. Once the response from the server is called back the object gets updated with the correct unique object id:
name | of the file to upload and will be the name of the object |
path | is the path to the local directory, ending with a / |
delegate | is a shared pointer to an TransferEventProtocol that the user has implemented. The pointer is defined in Types.h. |
|
virtual |
Upload object to container with binary data.
name | the name of the object to hold the data |
length | size in Bytes in memory to be uploaded |
byteData | char pointer to an array in memory containing the data |
delegate | is a shared pointer to an TransferEventProtocol that the user has implemented. The pointer is defined in Types.h. |
|
virtual |
Call to get a list of items in the container. Implement onQueryLoaded to from CBE::ItemDelegatePtrto recieve the callback.
delegate | is a shared pointer to the class in which you implement CBE::ItemDelegate. CBE::ItemDelegate is defined in Types.h and is a shared pointer to an ItemEventProtocol. |
|
virtual |
Call to get a list of items in the contianer. Implement onQueryLoaded to from CBE::ItemDelegatePtrto recieve the callback.
filter | is a CBE::Filter on which you can set how you want data selected in the call. |
delegate | is a shared pointer to the class in which you implement CBE::ItemDelegate, which is defined in Types.h and is a shared pointer to an ItemEventProtocol. |
|
virtual |
Queries the container with a given relative path, returns container with objects. E.g.: /Documents/Pictures will return objects and subContainers for Pictures. Note! .. or . options are not available, top down Paths in the container tree are available.
relativePath | is a relative path to the sub container, e.g. /Documents/Pictures. |
delegate | is a shared pointer to the class in which you implement CBE::ItemEventProtocol to recieve the callback on function completion. |
|
virtual |
Search the whole container for tags related to Objects in the container structure. E.g.: Key = Name, Value Contract/Object/Song => Name:Contract1.
Search handles tags in combination of conjunctions of keys and/or key values seperated by |. E.g.: Name:*|Country:Sweden|Country:Norway, this would search for objects with key Name but any value and where key Country is either Sweden or Norway.
tags | is a string of key tags or key:value pairs that are seperated by |. |
delegate | is the callback pointer to when the API returns from either cache or Server. |
|
virtual |
Search the whole container for tags related to Objects in the container structure. E.g.: Key = Name, Value Contract/Object/Song => Name:Contract1.
Search handles tags in combination / conjunction of keys and/or key values seperated by |. E.g.: Name:*|Country:Sweden|Country:Norway, this would search for objects with key Name but any value and where key Country is either Sweden or Norway.
filter | is a CBE::Filter on which you can set how you want data to be ordered when searching, remember to set the queryString to be keys/tags or key:value pairs that are seperated by |. |
delegate | is the callback pointer to when the API returns from either cache or Server. |
|
virtual |
set the Access control list for the container. For containers set does set the whole container tree, so all its sub items as well. Remeber this is set and not update so everytime you set all ids that should be there should be added.
toUserPermissions | is a std::map of uint64_t and signed int (userId and permission), simply setting the permission you want to a valid user id that you want. CBE::permission_status_t is defined in Types.h. |
delegate | is a shared pointer to the class in wich you implement CBE::ShareDelegate, which is defined in Types.h and is a shared pointer to an ShareEventProtocol. |
|
virtual |
get the Access Control List for the Container.
delegate | is a shared pointer to the class in which you implement CBE::ShareDelegate, which is defined in Types.h and is a shared pointer to an ShareEventProtocol. |
|
virtual |
Shares a container and its content to a user.
This provides the user the ability to access what has been shared to them via the listAvailableShares command.
To allow users to view and change shared information see ACLs. Note: At present Shareing the container gives the user read permissions for the container and all its sub-items, this might change in the future.
toUserGroup | takes a user id or group id to share to. |
description | names the specific share between you and the user/group. |
delegate | is a shared pointer to the class in wich you implement CBE::ShareDelegate, which is defined in Types.h and is a shared pointer to a ShareEventProtocol. |
|
virtual |
unShare the container to a specific shareId created when sharing. Each share is unique between user/group and the one sharing. This is represented with a unique share id.
shareId | is as mentioned the unique id for a share between the owner and other user/group. |
delegate | is a shared pointer to the class in wich you implement CBE::ShareDelegate. which is defined in Types.h and is a shared pointer to a ShareEventProtocol, |