C++  1.4.6
CloudBackend Software Development Kit - SDK API for C++
Object.h
1 /*
2  Copyright © CloudBackend AB 2020 - 2022..
3 */
4 
5 #ifndef INCLUDE_CBE_OBJECT_H_
6 #define INCLUDE_CBE_OBJECT_H_
7 
8 #include <string>
9 
10 #include "CBE/Item.h"
11 #include "CBE/Stream.h"
12 #include "CBE/Types.h"
13 #include "CBE/Protocols/TransferEventProtocol.h"
14 
15 namespace CBE
16 {
17 
18 class Object : virtual public CBE::Item
19 {
20 public:
27  virtual void move(CBE::container_id_t destinationContainerId, CBE::ItemDelegatePtr delegate);
28 
36  virtual void rename(const std::string &name, CBE::ItemDelegatePtr delegate);
37 
43  virtual void remove(CBE::ItemDelegatePtr delegate);
44 
50  virtual void download(const std::string &path, CBE::TransferDownloadDelegatePtr delegate);
51 
59  virtual void download(CBE::TransferDownloadDelegatePtr delegate);
60 
67  virtual void downloadStream(const std::string &path, CBE::Stream stream, CBE::TransferDownloadDelegatePtr delegate);
68 
74  virtual void updateKeyValues(CBE::ItemDelegatePtr delegate, std::map<std::string, std::pair<std::string, bool>> metadata = metadata_type());
75 
80  virtual void getStreams(CBE::ItemDelegatePtr delegate);
81 
85  virtual std::vector<CBE::Stream> streams() const;
86 
90  virtual std::string getMimeType() const;
91 
95  virtual uint64_t length() const;
96 
100  virtual CBE::object_t getObjectType() const;
101 
105  virtual std::map<std::string, std::pair<std::string, bool>> keyValues();
106 
115  virtual void setACL(std::map<CBE::user_id_t, CBE::permission_status_t> ACL, CBE::ShareDelegatePtr delegate);
116 
122  virtual void getACL(CBE::ShareDelegatePtr delegate);
123 
134  virtual void share(user_id_t toUserGroup, std::string description, CBE::ShareDelegatePtr delegate);
135 
142  virtual void unShare(uint64_t shareId, CBE::ShareDelegatePtr delegate);
143 
144  //url to item
145  std::string url();
146 
147 private:
148 };
149 } // namespace CBE
150 // namespace CBE
151 
152 #endif // INCLUDE_CBE_OBJECT_H_
CBE::Object::move
virtual void move(CBE::container_id_t destinationContainerId, CBE::ItemDelegatePtr delegate)
CBE::Object::share
virtual void share(user_id_t toUserGroup, std::string description, CBE::ShareDelegatePtr delegate)
CBE::Object::download
virtual void download(const std::string &path, CBE::TransferDownloadDelegatePtr delegate)
CBE::Item::path
virtual std::string path() const
Returns the path if it is available.
CBE::Object::getObjectType
virtual CBE::object_t getObjectType() const
CBE::Object::keyValues
virtual std::map< std::string, std::pair< std::string, bool > > keyValues()
CBE::Object::getACL
virtual void getACL(CBE::ShareDelegatePtr delegate)
CBE::Object::remove
virtual void remove(CBE::ItemDelegatePtr delegate)
CBE::Object::rename
virtual void rename(const std::string &name, CBE::ItemDelegatePtr delegate)
CBE::Object::getStreams
virtual void getStreams(CBE::ItemDelegatePtr delegate)
CBE::Object
Definition: Object.h:18
CBE::Object::setACL
virtual void setACL(std::map< CBE::user_id_t, CBE::permission_status_t > ACL, CBE::ShareDelegatePtr delegate)
CBE::Item::name
virtual std::string name() const
Returns the name (title) of the item.
CBE::Object::unShare
virtual void unShare(uint64_t shareId, CBE::ShareDelegatePtr delegate)
CBE::Item
Definition: Item.h:23
CBE::Object::getMimeType
virtual std::string getMimeType() const
CBE::Item::description
virtual std::string description() const
Get a description of the item if it is available.
CBE::Stream
Definition: Stream.h:13
CBE::Object::length
virtual uint64_t length() const
CBE::Object::updateKeyValues
virtual void updateKeyValues(CBE::ItemDelegatePtr delegate, std::map< std::string, std::pair< std::string, bool >> metadata=metadata_type())
CBE::Object::downloadStream
virtual void downloadStream(const std::string &path, CBE::Stream stream, CBE::TransferDownloadDelegatePtr delegate)
CBE::Object::streams
virtual std::vector< CBE::Stream > streams() const