Main Page | Modules | Class List | File List | Class Members | File Members

# Functions
[Remote Algorithm Execution Service]

Functions of the service. More...

## Functions
GSRESULT | RemoteAlgorithm_Initialise (const GSchar *szGameName)
| Initialises the resources required by the service.
GSRESULT | RemoteAlgorithm_Uninitialise ()
| Releases the resources acquired by the service.
GSRESULT | RemoteAlgorithm_Engine (GSuint uiMaxPostingDelay=500, GSuint uiMaxOperationalDelay=800)
| Runs the service.
GSRESULT | RemoteAlgorithm_Execute (GSuint uiAlgoId, const RAE_VALUE *pInput, GSuint uiNumInput, const RemoteAlgorithm_OutputCB fOutput, const GSvoid *pData, GSuint &uiRequestId)
| Requests the execution of an algorithm.

## Detailed Description

There functions are that need to be used in order to access the service

## Function Documentation

GSRESULT RemoteAlgorithm_Engine | ( | GSuint | uiMaxPostingDelay = 500,
|  | GSuint | uiMaxOperationalDelay = 800
| ) |

  | Description: This function keeps the service alive by process the outgoing request and the incoming replies. It is important that this function be called regularly to insure proper working of the service. This function can only be called after having called RemoteAlgorithm_Initialise(). Parameters:
  uiMaxPostingDelay | Maximum time (in millisec) to spend reading messages
  uiMaxOperationalDelay | Maximum time (in millisec) to spend processing read messages (the others will be put in a queue)
  Returns: Result code of the operation Return values:
  GSS_OK | There was no error
  GSE_NOTINITIALIZED | The service needs to be initialised

GSRESULT RemoteAlgorithm_Execute | ( | GSuint | uiAlgoId,
|  | const RAE_VALUE * | pInput,
|  | GSuint | uiNumInput,
|  | const RemoteAlgorithm_OutputCB | fOutput,
|  | const GSvoid * | pData,
|  | GSuint & | uiRequestId
| ) |

  | Description: This function sends the request to execute the target algorithm. The call to this function is asynchronous. The result of the algorithm will be sent to the callback passed as an argument. This function can only be called after having called RemoteAlgorithm_Initialise(). You also need to be logged in to ubi.com (LoginSend_LoginRouter()) for this function to work. Callbacks: RemoteAlgorithm_OutputCB<br> Parameters:
  uiAlgoId | The target algorithm identifier
  pInput | An array of values to pass as input to the target algorithm
  uiNumInput | The number of values in the input array
  fOutput | The function to call once the output is ready
  pData | Custom data to send back to the callback function
  uiRequestId | [OUTPUT] The request identifier when the call succeed
  Returns: Result code of the operation Return values:
  GSS_OK | There was no error
  GSE_NOTINITIALIZED | The service needs to be initialised
  GSE_UNEXPECTED | The user is not logged in to ubi.com

GSRESULT RemoteAlgorithm_Initialise | ( | const GSchar * | szGameName | ) |

  | Description: This function initialises the resources that will be required to use the remote algorithm execution service. It takes as input the game identifier character string supplied to the developers by ubi.com. This function can only be called after having called GSClientLibrary_Initialize(). Parameters:
  szGameName | The game identifier (i.e. ugly name)
  Returns: Result code of the operation Return values:
  GSS_OK | The service is ready to be used
  GSE_ALREADYINITIALIZED | The library was already initialised
  GSE_UNEXPECTED | The client library was not initialised

GSRESULT RemoteAlgorithm_Uninitialise | ( |  | ) |

  | Description: This function releases the resources that were acquired during the initialisation. This function has no effect if RemoveAlgorithm_Initialise() has not been called before. Returns: Result code of the operation Return values:
  GSS_OK | No possible error could occur

Ubi.com GameService SDK - ©UbiSoft Entertainment 2002
GameService development team