C++  1.4.6
CloudBackend Software Development Kit - SDK API for C++
Public Member Functions | List of all members
CBE::Object Class Reference
Inheritance diagram for CBE::Object:
Inheritance graph
[legend]
Collaboration diagram for CBE::Object:
Collaboration graph
[legend]

Public Member Functions

virtual void move (CBE::container_id_t destinationContainerId, CBE::ItemDelegatePtr delegate)
 
virtual void rename (const std::string &name, CBE::ItemDelegatePtr delegate)
 
virtual void remove (CBE::ItemDelegatePtr delegate)
 
virtual void download (const std::string &path, CBE::TransferDownloadDelegatePtr delegate)
 
virtual void download (CBE::TransferDownloadDelegatePtr delegate)
 
virtual void downloadStream (const std::string &path, CBE::Stream stream, CBE::TransferDownloadDelegatePtr delegate)
 
virtual void updateKeyValues (CBE::ItemDelegatePtr delegate, std::map< std::string, std::pair< std::string, bool >> metadata=metadata_type())
 
virtual void getStreams (CBE::ItemDelegatePtr delegate)
 
virtual std::vector< CBE::Streamstreams () const
 
virtual std::string getMimeType () const
 
virtual uint64_t length () const
 
virtual CBE::object_t getObjectType () const
 
virtual std::map< std::string, std::pair< std::string, bool > > keyValues ()
 
virtual void setACL (std::map< CBE::user_id_t, CBE::permission_status_t > ACL, 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)
 
std::string url ()
 
- Public Member Functions inherited from CBE::Item
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 ()
 

Member Function Documentation

◆ move()

virtual void CBE::Object::move ( CBE::container_id_t  destinationContainerId,
CBE::ItemDelegatePtr  delegate 
)
virtual

Move object to either a container or the root container:

Parameters
destinationContainerIdis the numeric destination container Id.
delegateis a shared pointer to the an ItemEventProtocol that the user has implemented. The pointer is defined in Types.h.

◆ rename()

virtual void CBE::Object::rename ( const std::string &  name,
CBE::ItemDelegatePtr  delegate 
)
virtual

Rename object:

Parameters
namestring name of the object.
delegateis a shared pointer to an ItemEventProtocol that the user has implemented. The pointer is defined in Types.h.

◆ remove()

virtual void CBE::Object::remove ( CBE::ItemDelegatePtr  delegate)
virtual

Remove the object from cloud and local cache.

Parameters
delegateis a shared pointer to an ItemEventProtocol that the user has implemented. The pointer is defined in Types.h.

◆ download() [1/2]

virtual void CBE::Object::download ( const std::string &  path,
CBE::TransferDownloadDelegatePtr  delegate 
)
virtual

Download object with path from a container to local:

Parameters
pathto where it will be downloaded.
delegateis a shared pointer to a TransferEventProtocol that the user has implemented. The pointer is defined in Types.h.

◆ download() [2/2]

virtual void CBE::Object::download ( CBE::TransferDownloadDelegatePtr  delegate)
virtual

Download object with binary data from contair and passes it to the delegate.
This is data is on the heap and you are responsible for calling delete on it, though we may change it to a shared pointer in the future.

Parameters
delegateis a shared pointer to a TransferEventProtocol that the user has implemented. The pointer is defined in Types.h.

◆ downloadStream()

virtual void CBE::Object::downloadStream ( const std::string &  path,
CBE::Stream  stream,
CBE::TransferDownloadDelegatePtr  delegate 
)
virtual

Downloads the stream # with stream id, to a path of the your choice. To get which streams are added on a object use getStream.

Parameters
pathSelects which path you want to download the stream to.
streamIdGet which stream you want by first calling getStream and then choose which one to download.
delegateis a shared pointer to a TransferEventProtocol that the user has implemented. The pointer is defined in Types.h.

◆ updateKeyValues()

virtual void CBE::Object::updateKeyValues ( CBE::ItemDelegatePtr  delegate,
std::map< std::string, std::pair< std::string, bool >>  metadata = metadata_type() 
)
virtual

Adds keyValue data to the existing object, if data has the same name it will be overwritten else itt will add to the existing keyValue on the object.

Parameters
delegateis 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 keyValue (key), the associated value of that key and if it is indexed or not

◆ getStreams()

virtual void CBE::Object::getStreams ( CBE::ItemDelegatePtr  delegate)
virtual

Returns the streams attached to the Object, use object->_streams after this call to use the streams e.g in downloadStream.

Parameters
delegateis a shared pointer to a ItemEventProtocol that the user has implemented. The pointer is defined in Types.h.

◆ streams()

virtual std::vector<CBE::Stream> CBE::Object::streams ( ) const
virtual

Returns the currently loaded stream / streams attached to the object. (NB if getStreams has not been called then streams() will return NULL).

◆ getMimeType()

virtual std::string CBE::Object::getMimeType ( ) const
virtual

Returns the mime type of the object e.g xml/text or jpg e.t.c

◆ length()

virtual uint64_t CBE::Object::length ( ) const
virtual

Returns the binary length/size of the object.

◆ getObjectType()

virtual CBE::object_t CBE::Object::getObjectType ( ) const
virtual

Returns the Object type currently Other | GroupInvite | ShareInvite

◆ keyValues()

virtual std::map<std::string, std::pair<std::string, bool> > CBE::Object::keyValues ( )
virtual

Returns all the keyValues

◆ setACL()

virtual void CBE::Object::setACL ( std::map< CBE::user_id_t, CBE::permission_status_t >  ACL,
CBE::ShareDelegatePtr  delegate 
)
virtual

set the Access control list for the object.

Parameters
ACLis 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.
delegateis 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.

◆ getACL()

virtual void CBE::Object::getACL ( CBE::ShareDelegatePtr  delegate)
virtual

get the Access Control List for the Object.

Parameters
delegateis 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.

◆ share()

virtual void CBE::Object::share ( user_id_t  toUserGroup,
std::string  description,
CBE::ShareDelegatePtr  delegate 
)
virtual

Share Object to a user. Notifies the user that a share has occured so that the user can check what permissions they have been given. Shareing gives read permissions as of right now but might change in the future.

Parameters
toUserGrouptakes a user id or group id (lastly named is for the future) and share to.
descriptionnames the specific share between you and the user/group.
delegateis 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.

◆ unShare()

virtual void CBE::Object::unShare ( uint64_t  shareId,
CBE::ShareDelegatePtr  delegate 
)
virtual

unShare the object 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.

Parameters
shareIdis as mentioned the unique id for a share between the owner and other user/group.
delegateis 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.

The documentation for this class was generated from the following file: