Files
FC1/Ubisoft.com/GSServices/sdks/gs-sdk-base/doc-api/group__group7__1.html
romkazvo 34d6c5d489 123
2023-08-07 19:29:24 +08:00

257 lines
12 KiB
HTML

<HTML>
<HEAD>
<TITLE>Ubi.com GameService SDK</TITLE>
<LINK href="./gs-sdk-doc.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY >
<!-- Generated by Doxygen 1.3.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>Functions<br>
<small>
[<a class="el" href="group__group7.html">Remote Algorithm Execution Service</a>]</small>
</h1>Functions of the service.
<a href="#_details">More...</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>GSRESULT&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__group7__1.html#a0">RemoteAlgorithm_Initialise</a> (const GSchar *szGameName)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialises the resources required by the service. </em> <a href="#a0"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>GSRESULT&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__group7__1.html#a1">RemoteAlgorithm_Uninitialise</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Releases the resources acquired by the service. </em> <a href="#a1"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>GSRESULT&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__group7__1.html#a2">RemoteAlgorithm_Engine</a> (GSuint uiMaxPostingDelay=500, GSuint uiMaxOperationalDelay=800)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Runs the service. </em> <a href="#a2"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>GSRESULT&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__group7__1.html#a3">RemoteAlgorithm_Execute</a> (GSuint uiAlgoId, const <a class="el" href="structRAE__VALUE.html">RAE_VALUE</a> *pInput, GSuint uiNumInput, const <a class="el" href="GSRemoteAlgorithmCB_8h.html#a0">RemoteAlgorithm_OutputCB</a> fOutput, const GSvoid *pData, GSuint &amp;uiRequestId)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Requests the execution of an algorithm. </em> <a href="#a3"></a><em><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
There functions are that need to be used in order to access the service <hr><h2>Function Documentation</h2>
<a class="anchor" name="a2" doxytag="GSClientLibrary.h::RemoteAlgorithm_Engine" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> GSRESULT RemoteAlgorithm_Engine </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">GSuint&nbsp;</td>
<td class="mdname" nowrap> <em>uiMaxPostingDelay</em> = 500, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>GSuint&nbsp;</td>
<td class="mdname" nowrap> <em>uiMaxOperationalDelay</em> = 800</td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
<dl compact><dt><b>Description:</b></dt><dd>This function keeps the service alive by process the outgoing request and the incoming replies.</dd></dl>
It is important that this function be called regularly to insure proper working of the service.<p>
This function can only be called after having called <a class="el" href="group__group7__1.html#a0">RemoteAlgorithm_Initialise()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>uiMaxPostingDelay</em>&nbsp;</td><td>Maximum time (in millisec) to spend reading messages </td></tr>
<tr><td valign=top><em>uiMaxOperationalDelay</em>&nbsp;</td><td>Maximum time (in millisec) to spend processing read messages (the others will be put in a queue)</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Result code of the operation </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>GSS_OK</em>&nbsp;</td><td>There was no error </td></tr>
<tr><td valign=top><em>GSE_NOTINITIALIZED</em>&nbsp;</td><td>The service needs to be initialised </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="a3" doxytag="GSClientLibrary.h::RemoteAlgorithm_Execute" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> GSRESULT RemoteAlgorithm_Execute </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">GSuint&nbsp;</td>
<td class="mdname" nowrap> <em>uiAlgoId</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const <a class="el" href="structRAE__VALUE.html">RAE_VALUE</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>pInput</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>GSuint&nbsp;</td>
<td class="mdname" nowrap> <em>uiNumInput</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const <a class="el" href="GSRemoteAlgorithmCB_8h.html#a0">RemoteAlgorithm_OutputCB</a>&nbsp;</td>
<td class="mdname" nowrap> <em>fOutput</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const GSvoid *&nbsp;</td>
<td class="mdname" nowrap> <em>pData</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>GSuint &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>uiRequestId</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
<dl compact><dt><b>Description:</b></dt><dd>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.</dd></dl>
This function can only be called after having called <a class="el" href="group__group7__1.html#a0">RemoteAlgorithm_Initialise()</a>. You also need to be logged in to ubi.com (<a class="el" href="group__group1__1.html#a3">LoginSend_LoginRouter()</a>) for this function to work.<p>
<dl compact><dt><b>Callbacks:</b></dt><dd><a class="el" href="group__group__RAECB.html#a0">RemoteAlgorithm_OutputCB&lt;br&gt;</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>uiAlgoId</em>&nbsp;</td><td>The target algorithm identifier </td></tr>
<tr><td valign=top><em>pInput</em>&nbsp;</td><td>An array of values to pass as input to the target algorithm </td></tr>
<tr><td valign=top><em>uiNumInput</em>&nbsp;</td><td>The number of values in the input array </td></tr>
<tr><td valign=top><em>fOutput</em>&nbsp;</td><td>The function to call once the output is ready </td></tr>
<tr><td valign=top><em>pData</em>&nbsp;</td><td>Custom data to send back to the callback function </td></tr>
<tr><td valign=top><em>uiRequestId</em>&nbsp;</td><td>[OUTPUT] The request identifier when the call succeed</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Result code of the operation </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>GSS_OK</em>&nbsp;</td><td>There was no error </td></tr>
<tr><td valign=top><em>GSE_NOTINITIALIZED</em>&nbsp;</td><td>The service needs to be initialised </td></tr>
<tr><td valign=top><em>GSE_UNEXPECTED</em>&nbsp;</td><td>The user is not logged in to ubi.com </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="a0" doxytag="GSClientLibrary.h::RemoteAlgorithm_Initialise" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> GSRESULT RemoteAlgorithm_Initialise </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const GSchar *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>szGameName</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
<dl compact><dt><b>Description:</b></dt><dd>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.</dd></dl>
This function can only be called after having called <a class="el" href="GSClientLibrary_8h.html#a0">GSClientLibrary_Initialize()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>szGameName</em>&nbsp;</td><td>The game identifier (i.e. ugly name)</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Result code of the operation </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>GSS_OK</em>&nbsp;</td><td>The service is ready to be used </td></tr>
<tr><td valign=top><em>GSE_ALREADYINITIALIZED</em>&nbsp;</td><td>The library was already initialised </td></tr>
<tr><td valign=top><em>GSE_UNEXPECTED</em>&nbsp;</td><td>The client library was not initialised </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="a1" doxytag="GSClientLibrary.h::RemoteAlgorithm_Uninitialise" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> GSRESULT RemoteAlgorithm_Uninitialise </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
<dl compact><dt><b>Description:</b></dt><dd>This function releases the resources that were acquired during the initialisation.</dd></dl>
This function has no effect if RemoveAlgorithm_Initialise() has not been called before.<p>
<dl compact><dt><b>Returns:</b></dt><dd>Result code of the operation </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>GSS_OK</em>&nbsp;</td><td>No possible error could occur </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<hr>
<p align="right">
<i>Ubi.com GameService SDK - &copy;UbiSoft Entertainment 2002 </i><br>
<i><a href="mailto:gsdevteam@ubisoft.com">GameService development team</a></i>
</p>
</body>
</html>