Folders#

Functions#

void omniClientBypassListCache(bool bypass)

Bypass the internal cache for list requests.

OmniClientRequestId omniClientCreateFolder(char const *url, void *userData, OmniClientCreateFolderCallback callback)

Create a folder.

OmniClientRequestId omniClientList(char const *url, void *userData, OmniClientListCallback callback)

Retrieve contents of a folder. This function is equivalent to omniClientList2 with eOmniClientListIncludeOption_DefaultNotDeleted.

OmniClientRequestId omniClientList2(char const *url, OmniClientListIncludeOption includeOption, void *userData, OmniClientListCallback callback)

Retrieve contents of a folder.

OmniClientRequestId omniClientListSubscribe(char const *url, void *userData, OmniClientListCallback callback, OmniClientListSubscribeCallback subscribeCallback)

Subscribe to change notifications for a url. This function is equivalent to omniClientListSubscribe2 with eOmniClientListIncludeOption_DefaultNotDeleted.

OmniClientRequestId omniClientListSubscribe2(char const *url, OmniClientListIncludeOption includeOption, void *userData, OmniClientListCallback callback, OmniClientListSubscribeCallback subscribeCallback)

Subscribe to change notifications for a url.

Typedefs#

OmniClientCreateFolderCallback

This is called with the result of omniClientCreateFolder .

OmniClientListCallback

This is called with the results of omniClientList and omniClientListSubscribe .

OmniClientListSubscribeCallback

This is called any time an item you've subscribed to with omniClientListSubscribe changes.

Functions#

void omniClientBypassListCache(bool bypass)#

Bypass the internal cache for list requests.

Typically any time a folder is listed, or any time an item in a folder is stat’d, we establish a subscription to keep our cache up-to-date If you are going to be performing a lot of lists on many different folders, these subscriptions can add up. If you are not listing the same folders over and over again, the cache can end up doing more harm than good. In this case, you can call this function with (true) and future list requests will go directly to the server, bypassing the cache.

Parameters:

bypass – True to bypass the cache, false to use the cache

OmniClientRequestId omniClientCreateFolder(
char const *url,
void *userData,
OmniClientCreateFolderCallback callback,
)#

Create a folder.

Returns eOmniClientResult_ErrorAlreadyExists if the URL already exists (note that it may not actually be a folder!)

Note

If this function is called after omniClientShutdown, kInvalidRequestId will be returned, and the callback will not be called.

Parameters:
  • url – The URL where the folder should be created

  • userData – User data passed to the callback

  • callback – The callback function to register

Returns:

A request ID that can be used with omniClientStop

OmniClientRequestId omniClientList(
char const *url,
void *userData,
OmniClientListCallback callback,
)#

Retrieve contents of a folder. This function is equivalent to omniClientList2 with eOmniClientListIncludeOption_DefaultNotDeleted.

Note

If this function is called after omniClientShutdown, kInvalidRequestId will be returned, and the callback will not be called.

Parameters:
  • url – The URL of the folder to list

  • userData – User data passed to the callback

  • callback – The callback function to register

Returns:

A request ID that can be used with omniClientStop

OmniClientRequestId omniClientList2(
char const *url,
OmniClientListIncludeOption includeOption,
void *userData,
OmniClientListCallback callback,
)#

Retrieve contents of a folder.

Note

If this function is called after omniClientShutdown, kInvalidRequestId will be returned, and the callback will not be called.

Parameters:
  • url – The URL of the folder to list

  • includeOption – Controls whether deleted items are included in the results

  • userData – User data passed to the callback

  • callback – The callback function to register

Returns:

A request ID that can be used with omniClientStop

OmniClientRequestId omniClientListSubscribe(
char const *url,
void *userData,
OmniClientListCallback callback,
OmniClientListSubscribeCallback subscribeCallback,
)#

Subscribe to change notifications for a url. This function is equivalent to omniClientListSubscribe2 with eOmniClientListIncludeOption_DefaultNotDeleted.

‘callback’ is called once with the initial list then ‘subscribeCallback’ may be called multiple times after that as items change

Note

If this function is called after omniClientShutdown, kInvalidRequestId will be returned, and the callback will not be called.

Parameters:
  • url – The URL of the folder to subscribe to

  • userData – User data passed to the callbacks

  • callback – The callback function for the initial list result

  • subscribeCallback – The callback function for subscription updates

Returns:

A request ID that can be used with omniClientStop

OmniClientRequestId omniClientListSubscribe2(
char const *url,
OmniClientListIncludeOption includeOption,
void *userData,
OmniClientListCallback callback,
OmniClientListSubscribeCallback subscribeCallback,
)#

Subscribe to change notifications for a url.

‘callback’ is called once with the initial list then ‘subscribeCallback’ may be called multiple times after that as items change

Note

If this function is called after omniClientShutdown, kInvalidRequestId will be returned, and the callback will not be called.

Parameters:
  • url – The URL of the folder to subscribe to

  • includeOption – Controls whether deleted items are included in the results

  • userData – User data passed to the callbacks

  • callback – The callback function for the initial list result

  • subscribeCallback – The callback function for subscription updates

Returns:

A request ID that can be used with omniClientStop

Typedefs#

typedef void (*OmniClientCreateFolderCallback)(void *userData, OmniClientResult result)#

This is called with the result of omniClientCreateFolder.

typedef void (*OmniClientListCallback)(void *userData, OmniClientResult result, uint32_t numEntries, struct OmniClientListEntry const *entries)#

This is called with the results of omniClientList and omniClientListSubscribe.

typedef void (*OmniClientListSubscribeCallback)(void *userData, OmniClientResult result, OmniClientListEvent listEvent, struct OmniClientListEntry const *entry)#

This is called any time an item you’ve subscribed to with omniClientListSubscribe changes.