Misc#

Enumerations#

OmniClientResult

The primary result code returned by the asynchronous functions.

Functions#

struct OmniIDLCPPInitializerReactor * omniClientGetReactor()

Get access to the reactor.

char const * omniClientGetResultString(OmniClientResult result)

Retrieve a human readable string from a result.

void omniClientSetAlias(char const *src, char const *dst)

Redirect a URL to a different location.

void omniClientStop(OmniClientRequestId requestId)

Stop an active request.

void omniClientWait(OmniClientRequestId requestId)

Wait for a request to complete.

bool omniClientWaitFor(OmniClientRequestId requestId, uint64_t milliseconds)

Wait for a request to complete, but with a timeout.

Typedefs#

OmniClientRequestId

Request Id returned from all the asynchronous functions.

Variables#

const OmniClientRequestId kInvalidRequestId

This is returned if you call an asynchronous function after calling omniClientShutdown .

Enumerations#

enum OmniClientResult#

The primary result code returned by the asynchronous functions.

Values:

enumerator eOmniClientResult_Ok#

The operation was successful.

enumerator eOmniClientResult_OkLatest#

Returned only by omniClientLiveRead and indicates that you have the latest version.

enumerator eOmniClientResult_OkNotYetFound#

Returned only by omniClientStatSubscribe and omniClientResolveSubscribe functions to indicate that the file wasn’t found, but it is being monitored.

A different error (for example eOmniClientResult_ErrorNotFound) indicates that Subscribe could not monitor the file.

enumerator eOmniClientResult_Error#

An unknown error occurred while processing the request.

enumerator eOmniClientResult_ErrorConnection#

The request failed because the connection to the server was lost (or could not be established in the first place)

enumerator eOmniClientResult_ErrorNotSupported#

The requested operation is not supported by the server or provider.

enumerator eOmniClientResult_ErrorAccessDenied#

You don’t have access to perform the requested operation.

enumerator eOmniClientResult_ErrorNotFound#

The operation failed because the specified thing does not exist.

enumerator eOmniClientResult_ErrorBadVersion#

This is no longer used.

enumerator eOmniClientResult_ErrorAlreadyExists#

You tried to copy or move over a thing that already exists and behavior was not OVERWRITE.

enumerator eOmniClientResult_ErrorSourceIsDest#

Tried to omniClientCopy or omniClientMove a thing to itself or a child of itself.

enumerator eOmniClientResult_ErrorAccessLost#

Returned by omniClientListSubscribe and omniClientLiveRead when the thing you were subscribed to was either deleted or the ACLs were changed so you no longer have access to it.

enumerator eOmniClientResult_ErrorLocked#

Returned by omniClientWriteFile when the file you are trying to write is locked by another client.

enumerator eOmniClientResult_ErrorBadRequest#

Returned by HTTP providers when server receives a malformed HTTP request.

enumerator eOmniClientResult_FolderNotEmpty#

Returned if a non-empty folder is passed to omniClientObliterate or omniClientDeleteSingle.

enumerator eOmniClientResult_ErrorWrongType#

Returned when trying to perform an operation on an item that doesn’t support it. For example, passing a directory to omniClientCopyFile.

enumerator eOmniClientResult_ErrorUnsupportedVersion#

This version is not yet supported.

enumerator Count_eOmniClientResult#

Functions#

struct OmniIDLCPPInitializerReactor *omniClientGetReactor()#

Get access to the reactor.

Use idl.cpp reactor.h and reactor.hh for the types definitions.

Returns:

A pointer to the reactor instance

char const *omniClientGetResultString(OmniClientResult result)#

Retrieve a human readable string from a result.

Parameters:

result – The result code to get the string for

Returns:

A human-readable string for the result code

void omniClientSetAlias(char const *src, char const *dst)#

Redirect a URL to a different location.

For example omniClientSetAlias(“home:”, “C:\Users\myname") Call it with dst=null to remove an alias

Parameters:
  • src – The source URL pattern to alias

  • dst – The destination URL to redirect to, or nullptr to remove the alias

void omniClientStop(OmniClientRequestId requestId)#

Stop an active request.

Your callback will not be called after this function returns. If a callback is in process omniClientStop will wait to return until the callback completes.

Warning

Don’t hold mutexes that may also be used by any functions called by callbacks of requestId as this can lead to deadlocks.

Parameters:

requestId – The request ID to stop

void omniClientWait(OmniClientRequestId requestId)#

Wait for a request to complete.

For subscription requests (like omniClientListSubscribe or omniClientJoinChannel) this will return after the initial message is received

Parameters:

requestId – The request ID to wait for

bool omniClientWaitFor(
OmniClientRequestId requestId,
uint64_t milliseconds,
)#

Wait for a request to complete, but with a timeout.

Same as omniClientWait, but with a timeout in milliseconds

Parameters:
  • requestId – The request ID to wait for

  • milliseconds – The timeout in milliseconds

Returns:

false if the wait timed out before the request finished

Typedefs#

typedef uint64_t OmniClientRequestId#

Request Id returned from all the asynchronous functions.

Variables#

static const OmniClientRequestId kInvalidRequestId = 0#

This is returned if you call an asynchronous function after calling omniClientShutdown.