This commit is contained in:
2020-04-04 17:19:13 +02:00
parent 2cb0a7449a
commit f36bfab5aa
78 changed files with 4370 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Querying the library version</title><link rel="stylesheet" href="ts3doc.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="TeamSpeak 3 Client SDK Developer Manual"><link rel="up" href="index.html" title="TeamSpeak 3 Client SDK Developer Manual"><link rel="prev" href="ar01s05.html" title="Initializing"><link rel="next" href="ar01s07.html" title="Shutting down"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><img id="logo" src="images/logo.png"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Querying the library version</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s05.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center"><EFBFBD></th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s07.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="queryversion"></a>Querying the library version</h2></div></div></div><p>The complete Client Lib version string can be queried with</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_getClientLibVersion</b>(</code></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>char** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835435083504"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the clientlib version string, encoded in UTF-8.</p></li></ul></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left">Caution</th></tr><tr><td align="left" valign="top"><p>The result string must be released using <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>. If an error has occured, the result string is uninitialized and must not be released.</p></td></tr></table></div><div class="literallayout"><p><br>
</p></div><p>To get only the version number, which is a part of the complete version string, as numeric value:
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_getClientLibVersionNumber</b>(</code></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
<a class="indexterm" name="idm44835435076416"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the numeric clientlib version.</p></li></ul></div><p>Both functions return <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>.</p><div class="literallayout"><p><br>
</p></div><p>An example using <code class="function">ts3client_getClientLibVersion</code>:
</p><pre class="programlisting">unsigned int error;
char* version;
error = ts3client_getClientLibVersion(&amp;version);
if(error != ERROR_ok) {
printf("Error querying clientlib version: %d\n", error);
return;
}
printf("Client library version: %s\n", version); /* Print version */
ts3client_freeMemory(version); /* Release string */</pre><p>Example using <code class="function">ts3client_getClientLibVersionNumber</code>:
</p><pre class="programlisting">unsigned int error;
uint64 version;
error = ts3client_getClientLibVersionNumber(&amp;version);
if(error != ERROR_ok) {
printf("Error querying clientlib version number: %d\n", error);
return;
}
printf("Client library version number: %ld\n", version); /* Print version */</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s05.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><EFBFBD></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s07.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Initializing<EFBFBD></td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"><EFBFBD>Shutting down</td></tr></table></div></body></html>