The ICloudRecord interface. More...
#include "murl_i_cloud_record.h"
Inherited by Murl::Platform::Foundation::CloudRecord.
Public Types | |
enum | Status { STATUS_IDLE , STATUS_READY , STATUS_LOADING , STATUS_SAVING , STATUS_DELETING , STATUS_ERROR } |
Enumeration of the record states. More... | |
Public Member Functions | |
virtual Status | GetStatus () const =0 |
Get the cloud record status. More... | |
virtual Bool | LoadRecord ()=0 |
Load the record. More... | |
virtual Bool | SaveRecord ()=0 |
Save the record. More... | |
virtual Bool | DeleteRecord ()=0 |
Delete the record. More... | |
virtual Bool | KeyExists (const String &key) const =0 |
Check if a key exists. More... | |
virtual Bool | DeleteKey (const String &key)=0 |
Delete a key. More... | |
virtual Bool | GetStringValue (const String &key, String &value) const =0 |
Get a string value by a key. More... | |
virtual Bool | SetStringValue (const String &key, const String &value)=0 |
Set a string value for a key. More... | |
virtual Bool | GetDoubleValue (const String &key, Double &value) const =0 |
Get a double value by a key. More... | |
virtual Bool | SetDoubleValue (const String &key, Double value)=0 |
Set a double value for a key. More... | |
virtual Bool | GetIntValue (const String &key, SInt64 &value) const =0 |
Get an integer value by a key. More... | |
virtual Bool | SetIntValue (const String &key, SInt64 value)=0 |
Set an integer value for a key. More... | |
virtual Bool | GetDataValue (const String &key, Data &value) const =0 |
Get a data value by a key. More... | |
virtual Bool | SetDataValue (const String &key, const Data &value)=0 |
Set a data value for a key. More... | |
Detailed Description
The ICloudRecord interface.
ICloud records can be created by the ICloudControl interface.
Member Enumeration Documentation
◆ Status
Enumeration of the record states.
Use GetStatus() to get the current status.
Member Function Documentation
◆ GetStatus()
|
pure virtual |
Get the cloud record status.
LoadRecord(), SaveRecord() and DeleteRecord() operation works asynchronously, the application can check the current status to operate correctly.
- Returns
- The cloud record status.
◆ LoadRecord()
|
pure virtual |
Load the record.
After creating an ICloudRecord object or deleting a record, the status is ICloudRecord::STATUS_IDLE. First of all this method must be called to get the record ready. If the status is ICloudRecord::STATUS_ERROR this method can be called to re-load the record.
When start loading, the status changes to ICloudRecord::STATUS_LOADING immediately. When the loading is finished, the status changes to ICloudRecord::STATUS_READY. In case of any error the status changes to ICloudRecord::STATUS_ERROR.
- Returns
- true if loading was started, false if the record is ready or a load / save / delete operation is running.
◆ SaveRecord()
|
pure virtual |
Save the record.
When start saving, the status changes to ICloudRecord::STATUS_SAVING immediately. When the saving is finished, the status changes to ICloudRecord::STATUS_READY. In case of any error the status changes to ICloudRecord::STATUS_ERROR.
- Returns
- true if saving was started, false if the record status is not ready.
◆ DeleteRecord()
|
pure virtual |
Delete the record.
When start deleting, the status changes to ICloudRecord::STATUS_DELETING immediately. When the deletion is finished, the status changes to ICloudRecord::STATUS_IDLE.
In case of any error the status changes to ICloudRecord::STATUS_ERROR.
- Returns
- true if deletion was started, false if the record status is not ready.
◆ KeyExists()
Check if a key exists.
- Parameters
-
key The key name string.
- Returns
- true if the key exists, false if the key does not exist or the record status is not ICloudRecord::STATUS_READY.
◆ DeleteKey()
Delete a key.
- Parameters
-
key The key name string.
- Returns
- true if successful, false if the record status is not ICloudRecord::STATUS_READY.
◆ GetStringValue()
|
pure virtual |
Get a string value by a key.
- Parameters
-
key The key name string. value The string return value.
- Returns
- true if successful, false if the key does not exist or the record status is not ICloudRecord::STATUS_READY.
◆ SetStringValue()
|
pure virtual |
Set a string value for a key.
- Parameters
-
key The key name string. value The string value to set.
- Returns
- true if successful, false if the record status is not ICloudRecord::STATUS_READY.
◆ GetDoubleValue()
|
pure virtual |
Get a double value by a key.
- Parameters
-
key The key name string. value The double return value.
- Returns
- true if successful, false if the key does not exist or the record status is not ICloudRecord::STATUS_READY.
◆ SetDoubleValue()
Set a double value for a key.
- Parameters
-
key The key name string. value The double value to set.
- Returns
- true if successful, false if the record status is not ICloudRecord::STATUS_READY.
◆ GetIntValue()
|
pure virtual |
Get an integer value by a key.
- Parameters
-
key The key name string. value The integer return value.
- Returns
- true if successful, false if the key does not exist or the record status is not ICloudRecord::STATUS_READY.
◆ SetIntValue()
Set an integer value for a key.
- Parameters
-
key The key name string. value The integer value to set.
- Returns
- true if successful, false if the record status is not ICloudRecord::STATUS_READY.
◆ GetDataValue()
|
pure virtual |
Get a data value by a key.
- Parameters
-
key The key name string. value The data return value.
- Returns
- true if successful, false if the key does not exist or the record status is not ICloudRecord::STATUS_READY.
◆ SetDataValue()
|
pure virtual |
Set a data value for a key.
- Parameters
-
key The key name string. value The data value to set.
- Returns
- true if successful, false if the record status is not ICloudRecord::STATUS_READY.
The documentation for this interface was generated from the following file:
- murl_i_cloud_record.h