Agora C++ API Reference for All Platforms

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
agora::base::ISyncClient Class Referenceabstract

`#include <NGIAgoraSyncClient.h>`

Inherits agora::RefCountInterface.

Inherited by agora::base::ISyncClientEx.

## Public Member Functions
virtual int32_t | registerSyncClientObserver (ISyncClientObserver *observer, void(*safeDeleter)(ISyncClientObserver *)=OPTIONAL_NULLPTR, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | unregisterSyncClientObserver (ISyncClientObserver *observer)=0
virtual int32_t | login (const char *token, const char *channelName, user_id_t userId, syncClientCallback callback, void *userData, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | queryDoc (const char *database, const char *coll, const char *range_start, const char *range_end, int64_t limits, bool doc_only, bool count_only, queryDocCallback callback, void *userData, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | logout (aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | renewToken (const char *token, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | connectDatabase (const char *database, dataBaseOpCallback callback, void *userData, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | disconnectDatabase (const char *database, dataBaseOpCallback callback, void *userData, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | createCollection (const char *database, const char *collection, const char **readable, int readSize, collectionOpCallback callback, void *userData, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | deleteCollection (const char *database, const char *collection, collectionOpCallback callback, void *userData, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | subscribe (const char *database, const char *collection, util::AString &snapshotJson)=0
virtual int32_t | unsubscribe (const char *database, const char *collection, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | addReadable (const char *database, const char *coll, const char *readable, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | removeReadable (const char *database, const char *coll, const char *readable, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | putDoc (const char *database, const char *collection, const char *docName, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | deleteDoc (const char *database, const char *collection, const char *docName, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | getDocs (const char *database, const char *collection, util::AString *docNames, uint32_t docSize)=0
virtual int32_t | putDocValue (const char *database, const char *collection, const char *docName, const char *jsonValue, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | updateDocValue (const char *database, const char *collection, const char *docName, const char *path, const char *jsonValue, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | deleteDocValue (const char *database, const char *collection, const char *docName, const char *path, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | deleteDocValues (const char *database, const char *collection, const char *docName, const char **path, uint32_t pathSize, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int32_t | getDocValue (const char *database, const char *collection, const char *docName, util::AString &jsonValue)=0
virtual int32_t | hasPath (const char *database, const char *collection, const char *docName, const char *path, bool &result)=0
virtual int32_t | keepAliveDoc (const char *database, const char *collection, const char *docName, uint32_t ttl, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual bool | isOpPermission (const char *database, const char *collection, const char *docName, OP_Privilege op)=0
virtual int32_t | shakehand (aosl_ref_t ares=AOSL_REF_INVALID)=0
Public Member Functions inherited from agora::RefCountInterface
virtual void | AddRef () const =0
virtual RefCountReleaseStatus | Release () const =0
virtual bool | HasOneRef () const =0

## Protected Member Functions
virtual | ~ISyncClient ()
Protected Member Functions inherited from agora::RefCountInterface
virtual | ~RefCountInterface ()

## Constructor & Destructor Documentation

## ◆ ~ISyncClient()

virtual agora::base::ISyncClient::~ISyncClient | ( |  | ) |
| inline protected virtual

## Member Function Documentation

## ◆ registerSyncClientObserver()

virtual int32_t agora::base::ISyncClient::registerSyncClientObserver | ( | ISyncClientObserver * | observer,
|  | void(* | safeDeleter )(ISyncClientObserver *) = OPTIONAL_NULLPTR,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ unregisterSyncClientObserver()

virtual int32_t agora::base::ISyncClient::unregisterSyncClientObserver | ( | ISyncClientObserver * | observer | ) |
| pure virtual

## ◆ login()

virtual int32_t agora::base::ISyncClient::login | ( | const char * | token,
|  | const char * | channelName,
|  | user_id_t | userId,
|  | syncClientCallback | callback,
|  | void * | userData,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ queryDoc()

virtual int32_t agora::base::ISyncClient::queryDoc | ( | const char * | database,
|  | const char * | coll,
|  | const char * | range_start,
|  | const char * | range_end,
|  | int64_t | limits,
|  | bool | doc_only,
|  | bool | count_only,
|  | queryDocCallback | callback,
|  | void * | userData,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ logout()

virtual int32_t agora::base::ISyncClient::logout | ( | aosl_ref_t | ares = AOSL_REF_INVALID | ) |
| pure virtual

## ◆ renewToken()

virtual int32_t agora::base::ISyncClient::renewToken | ( | const char * | token,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ connectDatabase()

virtual int32_t agora::base::ISyncClient::connectDatabase | ( | const char * | database,
|  | dataBaseOpCallback | callback,
|  | void * | userData,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ disconnectDatabase()

virtual int32_t agora::base::ISyncClient::disconnectDatabase | ( | const char * | database,
|  | dataBaseOpCallback | callback,
|  | void * | userData,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ createCollection()

virtual int32_t agora::base::ISyncClient::createCollection | ( | const char * | database,
|  | const char * | collection,
|  | const char ** | readable,
|  | int | readSize,
|  | collectionOpCallback | callback,
|  | void * | userData,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ deleteCollection()

virtual int32_t agora::base::ISyncClient::deleteCollection | ( | const char * | database,
|  | const char * | collection,
|  | collectionOpCallback | callback,
|  | void * | userData,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ subscribe()

virtual int32_t agora::base::ISyncClient::subscribe | ( | const char * | database,
|  | const char * | collection,
|  | util::AString & | snapshotJson )
| pure virtual

## ◆ unsubscribe()

virtual int32_t agora::base::ISyncClient::unsubscribe | ( | const char * | database,
|  | const char * | collection,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ addReadable()

virtual int32_t agora::base::ISyncClient::addReadable | ( | const char * | database,
|  | const char * | coll,
|  | const char * | readable,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ removeReadable()

virtual int32_t agora::base::ISyncClient::removeReadable | ( | const char * | database,
|  | const char * | coll,
|  | const char * | readable,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ putDoc()

virtual int32_t agora::base::ISyncClient::putDoc | ( | const char * | database,
|  | const char * | collection,
|  | const char * | docName,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ deleteDoc()

virtual int32_t agora::base::ISyncClient::deleteDoc | ( | const char * | database,
|  | const char * | collection,
|  | const char * | docName,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ getDocs()

virtual int32_t agora::base::ISyncClient::getDocs | ( | const char * | database,
|  | const char * | collection,
|  | util::AString * | docNames,
|  | uint32_t | docSize )
| pure virtual

## ◆ putDocValue()

virtual int32_t agora::base::ISyncClient::putDocValue | ( | const char * | database,
|  | const char * | collection,
|  | const char * | docName,
|  | const char * | jsonValue,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ updateDocValue()

virtual int32_t agora::base::ISyncClient::updateDocValue | ( | const char * | database,
|  | const char * | collection,
|  | const char * | docName,
|  | const char * | path,
|  | const char * | jsonValue,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ deleteDocValue()

virtual int32_t agora::base::ISyncClient::deleteDocValue | ( | const char * | database,
|  | const char * | collection,
|  | const char * | docName,
|  | const char * | path,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ deleteDocValues()

virtual int32_t agora::base::ISyncClient::deleteDocValues | ( | const char * | database,
|  | const char * | collection,
|  | const char * | docName,
|  | const char ** | path,
|  | uint32_t | pathSize,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ getDocValue()

virtual int32_t agora::base::ISyncClient::getDocValue | ( | const char * | database,
|  | const char * | collection,
|  | const char * | docName,
|  | util::AString & | jsonValue )
| pure virtual

## ◆ hasPath()

virtual int32_t agora::base::ISyncClient::hasPath | ( | const char * | database,
|  | const char * | collection,
|  | const char * | docName,
|  | const char * | path,
|  | bool & | result )
| pure virtual

## ◆ keepAliveDoc()

virtual int32_t agora::base::ISyncClient::keepAliveDoc | ( | const char * | database,
|  | const char * | collection,
|  | const char * | docName,
|  | uint32_t | ttl,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

## ◆ isOpPermission()

virtual bool agora::base::ISyncClient::isOpPermission | ( | const char * | database,
|  | const char * | collection,
|  | const char * | docName,
|  | OP_Privilege | op )
| pure virtual

## ◆ shakehand()

virtual int32_t agora::base::ISyncClient::shakehand | ( | aosl_ref_t | ares = AOSL_REF_INVALID | ) |
| pure virtual