14 #include "iotcs_storage_object.h"
15 #include <Exception.hpp>
120 virtual const std::string&
getName()
const = 0;
169 virtual const std::string&
getName()
const;
176 virtual const std::string&
getType()
const;
198 virtual time_t
getDate()
const;
258 virtual void setCustomMetadata(
const std::string& key,
const std::string& value)
throw (std::invalid_argument);
293 virtual const std::string&
getURI();
294 #ifndef IOTCS_DOXYGEN
298 iotcs_storage_object_handle c_handler()
const;
301 std::string *outPath;
304 std::string *encoding;
iotdcl::ExternalObject represents the value of a URI type in a device model.
virtual const std::string & getName() const =0
Get the name of the attribute, action, or format that this event is associated with.
virtual const std::string & getOutputPath() const
Get the output path.
VirtualDevice for a device-client adds methods to handle write-only and executable actions...
virtual void setOutputPath(const std::string &outputPath)
Set the output path for downloading content from the storage cloud.
virtual ~SyncEvent()
Destructor.
Definition: StorageObject.hpp:131
virtual const std::string & getName() const
Get the the name of this object in the storage cloud.
The content is not in sync with the storage cloud because it has not yet been uploaded or download...
Definition: StorageObject.hpp:90
Common exception.
Definition: Exception.hpp:34
The content is in sync with the storage cloud.
Definition: StorageObject.hpp:78
virtual long getLength() const
Get the length of the content in bytes.
virtual StorageObject * getSource() const =0
Get the iotdcl::StorageObject} that is the source of this event.
virtual ~StorageObject()
Destructor.
virtual const std::string & getInputPath() const
Get the input path.
An event passed to the setOnSync(SyncCallback) SyncCallback when content referred to by an attribute ...
Definition: StorageObject.hpp:105
virtual void setCustomMetadata(const std::string &key, const std::string &value)
Sets the metadata for the StorageObject.
virtual void sync()
Notify the library to sync content with the storage cloud.
virtual void setOnSync(const SyncCallback *callback)
Set a iotdcl::SyncCallback that is invoked when the content referred to by this StorageObject is sync...
virtual time_t getDate() const
Get the date and time the content was created or last modified in cloud storage.
Definition: VirtualDevice.hpp:38
virtual ~SyncCallback()
Desctructor.
Definition: StorageObject.hpp:154
virtual const std::string & getURI()
Get the URI value.
The content is not in sync with the storage cloud, but a sync is pending.
Definition: StorageObject.hpp:96
virtual void onSync(const SyncEvent< VirtualDevice > &event) const =0
Callback for receiving an event when content referred to by an attribute value has been successfully ...
Definition: ExternalObject.hpp:21
The content is not in sync with the storage cloud because the upload or download failed.
Definition: StorageObject.hpp:84
A syncCallback interface for receiving an event when content referred to by an attribute value has be...
Definition: StorageObject.hpp:141
virtual const std::string & getType() const
Get the mime-type of the content.
virtual const std::string & getEncoding() const
Get the compression scheme of the content.
virtual SyncStatus getSyncStatus() const
Get the status of whether or not the content is in sync with the storage cloud.
virtual void setInputPath(const std::string &inputPath)
Set the input path for uploading content to the storage cloud.
virtual V * getVirtualDevice() const =0
Get the virtual device that is the source of the event.
Definition: StorageObject.hpp:158
SyncStatus
The status of whether or not the content is in sync with the storage cloud.
Definition: StorageObject.hpp:73