Murl::ICloudRecord Interface Referenceabstract

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.

Enumerator
STATUS_IDLE 

The record is idle.

STATUS_READY 

The record is ready to set/get key/values.

STATUS_LOADING 

The record is loading.

STATUS_SAVING 

The record is saving.

STATUS_DELETING 

The record is deleting.

STATUS_ERROR 

The record has an error.

Member Function Documentation

◆ GetStatus()

virtual Status Murl::ICloudRecord::GetStatus ( ) const
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()

virtual Bool Murl::ICloudRecord::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()

virtual Bool Murl::ICloudRecord::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()

virtual Bool Murl::ICloudRecord::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()

virtual Bool Murl::ICloudRecord::KeyExists ( const String key) const
pure virtual

Check if a key exists.

Parameters
keyThe 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()

virtual Bool Murl::ICloudRecord::DeleteKey ( const String key)
pure virtual

Delete a key.

Parameters
keyThe key name string.
Returns
true if successful, false if the record status is not ICloudRecord::STATUS_READY.

◆ GetStringValue()

virtual Bool Murl::ICloudRecord::GetStringValue ( const String key,
String value 
) const
pure virtual

Get a string value by a key.

Parameters
keyThe key name string.
valueThe string return value.
Returns
true if successful, false if the key does not exist or the record status is not ICloudRecord::STATUS_READY.

◆ SetStringValue()

virtual Bool Murl::ICloudRecord::SetStringValue ( const String key,
const String value 
)
pure virtual

Set a string value for a key.

Parameters
keyThe key name string.
valueThe string value to set.
Returns
true if successful, false if the record status is not ICloudRecord::STATUS_READY.

◆ GetDoubleValue()

virtual Bool Murl::ICloudRecord::GetDoubleValue ( const String key,
Double value 
) const
pure virtual

Get a double value by a key.

Parameters
keyThe key name string.
valueThe double return value.
Returns
true if successful, false if the key does not exist or the record status is not ICloudRecord::STATUS_READY.

◆ SetDoubleValue()

virtual Bool Murl::ICloudRecord::SetDoubleValue ( const String key,
Double  value 
)
pure virtual

Set a double value for a key.

Parameters
keyThe key name string.
valueThe double value to set.
Returns
true if successful, false if the record status is not ICloudRecord::STATUS_READY.

◆ GetIntValue()

virtual Bool Murl::ICloudRecord::GetIntValue ( const String key,
SInt64 value 
) const
pure virtual

Get an integer value by a key.

Parameters
keyThe key name string.
valueThe integer return value.
Returns
true if successful, false if the key does not exist or the record status is not ICloudRecord::STATUS_READY.

◆ SetIntValue()

virtual Bool Murl::ICloudRecord::SetIntValue ( const String key,
SInt64  value 
)
pure virtual

Set an integer value for a key.

Parameters
keyThe key name string.
valueThe integer value to set.
Returns
true if successful, false if the record status is not ICloudRecord::STATUS_READY.

◆ GetDataValue()

virtual Bool Murl::ICloudRecord::GetDataValue ( const String key,
Data value 
) const
pure virtual

Get a data value by a key.

Parameters
keyThe key name string.
valueThe data return value.
Returns
true if successful, false if the key does not exist or the record status is not ICloudRecord::STATUS_READY.

◆ SetDataValue()

virtual Bool Murl::ICloudRecord::SetDataValue ( const String key,
const Data value 
)
pure virtual

Set a data value for a key.

Parameters
keyThe key name string.
valueThe 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


Copyright © 2011-2024 Spraylight GmbH.