![]() |
Murl Engine API
Version 2018.3
|
The ICloudControl interface. More...
#include <murl_i_cloud_control.h>
The ICloudControl interface.
The cloud control must be enabled during IApp::Configure() by setting IEngineConfiguration::SetCloudControlEnable().
On iOS/OSX/tvOS this control follows the iCloud guides:
An app has access to both a public and private database in each container. The public database is for storing user and app data that is shared between all instances of the app. By default, all users can read the public database, but they need to enter iCloud credentials to write to the public database. There’s a private database for each user of your app, but the app only has access to the private database of the current user. The user has to enter iCloud credentials for the app to read and write to the private database.
Public Types | |
enum | AccountStatus { ACCOUNT_UNKNOWN, ACCOUNT_NOT_AUTHENTICATED, ACCOUNT_AUTHENTICATED } |
The account states. More... | |
enum | KeyValueStatus { KEYVALUE_STATUS_IDLE, KEYVALUE_STATUS_INITIAL_SYNC, KEYVALUE_STATUS_SERVER_CHANGE, KEYVALUE_STATUS_QUOTA_VIOLATION } |
The key-value store states. More... | |
Public Member Functions | |
virtual AccountStatus | GetAccountStatus ()=0 |
Get the user's cloud account status. More... | |
virtual IPreferencesControl * | GetKeyValueStore ()=0 |
Get the key-value store preference control. More... | |
virtual KeyValueStatus | GetKeyValueStatus () const =0 |
Get the key-value store status. More... | |
virtual const StringArray & | GetChangedKeys () const =0 |
Get the key-value store changed keys. More... | |
virtual Bool | ClearKeyValueStatus ()=0 |
Clear the key-value store status. More... | |
virtual ICloudRecord * | OpenPrivateRecord (const String &recordName, const String &recordType)=0 |
Open a record in the private database from the default container with a given record type name. More... | |
virtual ICloudRecord * | OpenPrivateRecord (const String &recordName, const String &recordType, const String &containerName)=0 |
Open a record in the private database from a specified container with a given record type name. More... | |
virtual ICloudRecord * | OpenPublicRecord (const String &recordName, const String &recordType)=0 |
Open a record in the public database from the default container with a given record type name. More... | |
virtual ICloudRecord * | OpenPublicRecord (const String &recordName, const String &recordType, const String &containerName)=0 |
Open a record in the public database from a specified container with a given record type name. More... | |
virtual Bool | CloseRecord (ICloudRecord *&record, Bool autoSave=false)=0 |
Close a record. More... | |
![]() | |
virtual const String & | GetName () const =0 |
Get the controlable's name. More... | |
virtual void | FrameUpdate ()=0 |
Is executed in the platform thread context each frame tick. | |
virtual void | LogicUpdate ()=0 |
Is executed in the logic thread context each logic tick. | |
virtual void | ConfigChanged (const IAppConfiguration *appConfig)=0 |
Notification of changed configuration. More... | |
The account states.
Enumerator | |
---|---|
ACCOUNT_UNKNOWN | Unknown account status, call GetAccountStatus() again next tick. |
ACCOUNT_NOT_AUTHENTICATED | The user is not authenticated. |
ACCOUNT_AUTHENTICATED | The user is authenticated. |
The key-value store states.
|
pure virtual |
Get the user's cloud account status.
On iOS/OSX/tvOS follow the iCloud guides:
Before saving records, verify that the user is signed in to their iCloud account. If the user is not signed in, present an alert instructing the user how to enter their iCloud credentials and enable iCloud Drive.
|
pure virtual |
Get the key-value store preference control.
|
pure virtual |
Get the key-value store status.
If the status changes to KeyValueStatus::KEYVALUE_STATUS_INITIAL_SYNC or KeyValueStatus::KEYVALUE_STATUS_SERVER_CHANGE the changed keys can be evaluated by GetChangedKeys(). To receive further changes, the status must be cleared by calling ClearKeyValueStatus().
|
pure virtual |
Get the key-value store changed keys.
|
pure virtual |
Clear the key-value store status.
Set the key-value store status to KeyValueStatus::KEYVALUE_STATUS_IDLE and clears the changed keys.
|
pure virtual |
Open a record in the private database from the default container with a given record type name.
recordName | The record name. |
recordType | The record type name. |
|
pure virtual |
Open a record in the private database from a specified container with a given record type name.
recordName | The record name. |
recordType | The record type name. |
containerName | The container name. |
|
pure virtual |
Open a record in the public database from the default container with a given record type name.
recordName | The record name. |
recordType | The record type name. |
|
pure virtual |
Open a record in the public database from a specified container with a given record type name.
recordName | The record name. |
recordType | The record type name. |
containerName | The container name. |
|
pure virtual |
Close a record.
record | A reference to the record object to destroy. After destruction the pointer is set to null. |
autoSave | If true the record's ICloudRecord::SaveRecord() method is executed before closing the record. |