init
143
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
# ---> C++
|
||||
# Prerequisites
|
||||
*.d
|
||||
@@ -31,4 +32,146 @@
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
=======
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# ASP.NET Scaffolding
|
||||
ScaffoldingReadMe.txt
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
8
docs/client.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0; URL=client_html/index.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>You will be automatically forwarded to the Client SDK manual.<br>Click on the link below if your browser does not support forwarding.</p>
|
||||
<p><a href="client_html/index.html">Client SDK manual</a></p>
|
||||
</body>
|
||||
|
||||
BIN
docs/client.pdf
Normal file
1
docs/client_html/ar01s01.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Introduction</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="index.html" title="TeamSpeak 3 Client SDK Developer Manual"><link rel="next" href="ar01s02.html" title="System requirements"></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">Introduction</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.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="ar01s02.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="intro"></a>Introduction</h2></div></div></div><p>TeamSpeak 3 is a scalable Voice-Over-IP application consisting of client and server software. TeamSpeak is generally regarded as the leading VoIP system offering a superior voice quality, scalability and usability.</p><p>The cross-platform Software Development Kit allows the easy integration of the TeamSpeak client and server technology into own applications.</p><p>Tis document provides an introduction to client-side programming with the TeamSpeak 3 SDK, the so-called Client Lib. This library encapsulates client-side functionality while keeping the user interface separated and modular.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.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="ar01s02.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">TeamSpeak 3 Client SDK Developer Manual<61></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>System requirements</td></tr></table></div></body></html>
|
||||
1
docs/client_html/ar01s02.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>System requirements</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="ar01s01.html" title="Introduction"><link rel="next" href="ar01s03.html" title="Overview of header files"></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">System requirements</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s01.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="ar01s03.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="sysreqs"></a>System requirements</h2></div></div></div><p>For developing third-party clients with the TeamSpeak 3 Client Lib the following system requirements<a class="indexterm" name="idm44835435168896"></a> apply:</p><div class="itemizedlist"><ul type="disc"><li><p>Windows</p><p>Windows 7, 8, 8.1 (32- and 64-bit)<a class="indexterm" name="idm44835435167104"></a></p></li><li><p>Mac OS X</p><p>Mac OS X 10.6 and above<a class="indexterm" name="idm44835435165568"></a></p></li><li><p>Linux</p><p>Any recent Linux distribution with libstdc++ 6 (32- and 64-bit)<a class="indexterm" name="idm44835435164032"></a></p></li></ul></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left">Important</th></tr><tr><td align="left" valign="top"><p>The calling convention used in the functions exported by the shared TeamSpeak 3 SDK libaries is <span class="emphasis"><em>cdecl</em></span>. You must not use another calling convention, like stdcall on Windows, when declaring function pointers to the TeamSpeak 3 SDK libraries. Otherwise stack corruption at runtime may occur.</p></td></tr></table></div><a class="indexterm" name="idm44835435162160"></a></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s01.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="ar01s03.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Introduction<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>Overview of header files</td></tr></table></div></body></html>
|
||||
1
docs/client_html/ar01s03.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Overview of header files</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="ar01s02.html" title="System requirements"><link rel="next" href="ar01s04.html" title="Calling Client Lib functions"></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">Overview of header files</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s02.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="ar01s04.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="headers"></a>Overview of header files</h2></div></div></div><p>The following header files are deployed to SDK developers:<a class="indexterm" name="idm44835435160624"></a></p><div class="itemizedlist"><ul type="disc"><li><p><code class="filename">clientlib.h</code></p><p>Declares the function prototypes and callbacks for the communication between Client Lib and Client UI. While the Client UI makes function calls into the Client Lib using the declared prototypes, the Client Lib calls the Client UI via callbacks.</p></li><li><p><code class="filename">clientlib_publicdefinitions.h</code></p><p>Defines various enums and structs used by the Client UI and Client Lib. These definitions are used by the functions and callbacks declared in <code class="filename">clientlib.h</code></p></li><li><p><code class="filename">public_definitions.h</code></p><p>Defines various enums and structs used by both client- and server-side.</p></li><li><p><code class="filename">public_sdk_definitions.h</code></p><p>Enum definitions for filetransfer support.</p></li><li><p><code class="filename">public_errors.h</code></p><p>Defines the error codes<a class="indexterm" name="idm44835435152272"></a> returned by every Client Lib function and <code class="function">onServerErrorEvent</code>. Error codes are organized in several groups. The first byte of the error code defines the error group, the second the count within the group.</p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s02.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="ar01s04.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">System requirements<74></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>Calling Client Lib functions</td></tr></table></div></body></html>
|
||||
21
docs/client_html/ar01s04.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Calling Client Lib functions</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="ar01s03.html" title="Overview of header files"><link rel="next" href="ar01s05.html" title="Initializing"></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">Calling Client Lib functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s03.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="ar01s05.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="calling"></a>Calling Client Lib functions</h2></div></div></div><p>Client Lib functions follow a common pattern. They always return an error code or <em class="structfield"><code>ERROR_ok</code></em> on success. If there is a result variable, it is always the last variable in the functions parameters list.</p><pre class="programlisting">ERROR ts3client_FUNCNAME(arg1, arg2, ..., &result);</pre><p>Result variables should <span class="emphasis"><em>only</em></span> be accessed if the function returned <em class="structfield"><code>ERROR_ok</code></em>. Otherwise the state of the result variable is undefined.</p><p>In those cases where the result variable is a basic type (int, float etc.), the memory for the result variable has to be declared by the caller. Simply pass the address of the variable to the Client Lib function.</p><pre class="programlisting">int result;
|
||||
|
||||
if(ts3client_XXX(arg1, arg2, ..., &result) == ERROR_ok) {
|
||||
/* Use result variable */
|
||||
} else {
|
||||
/* Handle error, result variable is undefined */
|
||||
}</pre><p>If the result variable is a pointer type (C strings, arrays etc.), the memory is allocated by the Client Lib function. In that case, the caller has to release the allocated memory later by using <code class="function">ts3client_freeMemory</code>. It is important to <span class="emphasis"><em>only</em></span> access and release the memory if the function returned <em class="structfield"><code>ERROR_ok</code></em>. Should the function return an error, the result variable is uninitialized, so freeing or accessing it could crash the application.</p><pre class="programlisting">char* result;
|
||||
|
||||
if(ts3client_XXX(arg1, arg2, ..., &result) == ERROR_ok) {
|
||||
/* Use result variable */
|
||||
ts3client_freeMemory(result); /* Release result variable */
|
||||
} else {
|
||||
/* Handle error, result variable is undefined. Do not access or release it. */
|
||||
}</pre><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>Client Lib functions are <span class="emphasis"><em>thread-safe</em></span>. It is possible to access the Client Lib from several threads at the same time.</p></td></tr></table></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="callingReturnCode"></a>Return code</h3></div></div></div><a class="indexterm" name="idm44835435141872"></a><a class="indexterm" name="idm44835435141360"></a><p>Client Lib functions that interact with the server take an additional parameter <em class="parameter"><code>returnCode</code></em>, which can be used to find out which action results in a later server error. If you pass a custom string as return code, the <code class="function">onServerErrorEvent</code> callback will receive the same custom string in its <em class="parameter"><code>returnCode</code></em> parameter. If no error occured, <code class="function">onServerErrorEvent</code> will indicate success py passing the error code <em class="structfield"><code>ERROR_ok</code></em>.</p><p>Pass NULL as <em class="parameter"><code>returnCode</code></em> if you do not need the feature. In this case, if no error occurs <code class="function">onServerErrorEvent</code> will <span class="emphasis"><em>not</em></span> be called.</p><p>An example, request moving a client:</p><pre class="programlisting">ts3client_requestClientMove(scHandlerID, clientID, newChannelID, password, "MyClientMoveReturnCode");</pre><p>If an error occurs, the <code class="function">onServerErrorEvent</code> callback is called:</p><pre class="programlisting">void my_onServerErrorEvent(uint64 serverConnectionHandlerID, const char* errorMessage,
|
||||
unsigned int error, const char* returnCode, const char* extraMessage) {
|
||||
if(strcmp(returnCode, "MyClientMoveReturnCode")) == 0) {
|
||||
/* We know this error is the reaction to above called function as we got the same returnCode */
|
||||
if(error == ERROR_ok) {
|
||||
/* Success */
|
||||
}
|
||||
}</pre></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s03.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="ar01s05.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Overview of header files<65></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>Initializing</td></tr></table></div></body></html>
|
||||
33
docs/client_html/ar01s05.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Initializing</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="ar01s04.html" title="Calling Client Lib functions"><link rel="next" href="ar01s06.html" title="Querying the library version"></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">Initializing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s04.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="ar01s06.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="initializing"></a>Initializing</h2></div></div></div><p>When starting the client, initialize the Client Lib with a call to
|
||||
</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_initClientLib</b>(</code></td><td><var class="pdparam">functionPointers</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">functionRarePointers</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">usedLogTypes</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">logFileFolder</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">resourcesFolder</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>const struct ClientUIFunctions* <var class="pdparam">functionPointers</var></code>;<br><code>const struct ClientUIFunctionsRare* <var class="pdparam">functionRarePointers</var></code>;<br><code>int <var class="pdparam">usedLogTypes</var></code>;<br><code>const char* <var class="pdparam">logFileFolder</var></code>;<br><code>const char* <var class="pdparam">resourcesFolder</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835435211392"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>functionPointers</code></em></p><p>Callback function pointers. See <a class="link" href="ar01s05.html#callback" title="The callback mechanism">below</a>.</p></li><li><p><em class="parameter"><code>functionRarePointers</code></em></p><p>Unused by SDK, pass NULL.</p></li><li><p><em class="parameter"><code>usedLogTypes</code></em></p><p>Defines the log output types. The Client Lib can output log messages (called by <a class="link" href="ar01s12.html" title="Logging"><code class="function">ts3client_logMessage</code></a>) to a file (located in the <code class="filename">logs</code> directory relative to the client executable), to stdout or to user defined callbacks. If user callbacks are activated, the <a class="link" href="ar01s12.html#userlogging" title="User-defined logging"><code class="function">onUserLoggingMessageEvent</code></a> event needs to be implemented.</p><p>Available values are defined by the enum <span class="structname">LogTypes</span> (see <code class="filename">public_definitions.h</code>):</p><a class="indexterm" name="idm44835435108544"></a><pre class="programlisting">enum LogTypes {
|
||||
LogType_NONE = 0x0000,
|
||||
LogType_FILE = 0x0001,
|
||||
LogType_CONSOLE = 0x0002,
|
||||
LogType_USERLOGGING = 0x0004,
|
||||
LogType_NO_NETLOGGING = 0x0008,
|
||||
LogType_DATABASE = 0x0010,
|
||||
};</pre><p>Multiple log types can be combined with a binary OR. If only <em class="structfield"><code>LogType_NONE</code></em> is used, local logging is disabled.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>Logging to console can slow down the application on Windows. Hence we do not recommend to log to the console on Windows other than in debug builds.</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p><em class="structfield"><code>LogType_NO_NETLOGGING</code></em> is no longer used. Previously this controlled if the Client Lib would send warning, error and critical log entries to a webserver for analysis. As netlogging does not occur anymore, this flag has no effect anymore.</p><p>LogType_DATABASE has no effect in the Client Lib, this is only used by the server.</p></td></tr></table></div></li><li><p><em class="parameter"><code>logFileFolder</code></em></p><p>If file logging is used, this defines the location where the logs are written to. Pass NULL for the default behaviour, which is to use a folder called <code class="filename">logs</code> in the current working directory.</p><p><em class="parameter"><code>resourcesFolder</code></em></p><p>Resource path pointing to the directory where the soundbackends folder is located. Required so your application finds the sound backend shared libraries. This should usually point to the root or bin directory of your application, depending where the soundbackends directory is located.</p></li></ul></div><p>Returns <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="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>This function must not be called more than once.</p></td></tr></table></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="callback"></a>The callback mechanism</h3></div></div></div><p>The communication from Client Lib to Client UI takes place using callbacks<a class="indexterm" name="idm44835435096608"></a>. The Client UI has to define a series of function pointers using the struct <span class="structname">ClientUIFunctions</span> (see <code class="filename">clientlib.h</code>). These callbacks are used to forward any incoming server actions to the Client UI for further processing.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>All the clientlib callbacks are asynchronous, except for the sound callbacks which allow to directly manipulate the sound buffer.</p></td></tr></table></div><p>A callback example in C:</p><pre class="programlisting">static void my_onConnectStatusChangeEvent_Callback(uint64 serverConnectionHandlerID,
|
||||
int newStatus,
|
||||
int errorNumber) {
|
||||
/* Implementation */
|
||||
}</pre><p>C++ developers can also use static member functions for the callbacks.</p><p>Before calling <code class="function">ts3client_initClientLib</code>, create an instance of struct ClientUIFunctions, initialize all function pointers with NULL and assign the structs function pointers to your callback functions:
|
||||
</p><pre class="programlisting">unsigned int error;
|
||||
|
||||
/* Create struct */
|
||||
ClientUIFunctions clUIFuncs;
|
||||
|
||||
/* Initialize all function pointers with NULL */
|
||||
memset(&clUIFuncs, 0, sizeof(struct ClientUIFunctions));
|
||||
|
||||
/* Assign those function pointers you implemented */
|
||||
clUIFuncs.onConnectStatusChangeEvent = my_onConnectStatusChangeEvent_Callback;
|
||||
clUIFuncs.onNewChannelEvent = my_onNewChannelEvent_Callback;
|
||||
(...)
|
||||
|
||||
/* Initialize client lib with callback function pointers */
|
||||
error = ts3client_initClientLib(&clUIFuncs, NULL, LogType_FILE | LogType_CONSOLE);
|
||||
if(error != ERROR_ok) {
|
||||
printf("Error initializing clientlib: %d\n", error);
|
||||
(...)
|
||||
}</pre><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left">Important</th></tr><tr><td align="left" valign="top"><p>As long as you initialize unimplemented callbacks with NULL, the Client Lib won't attempt to call those function pointers. However, if you leave unimplemented callbacks undefined, the Client Lib will crash when trying to calling them.</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>All callbacks used in the SDK are found in the struct <span class="structname">ClientUIFunctions</span> (see <code class="filename">public_definitions.h</code>). Callbacks bundled in the struct <span class="structname">ClientUIFunctionsRare</span> are not used by the SDK. These callbacks were split in a separate structs to avoid polluting the SDK headers with code used only internally.</p></td></tr></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s04.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="ar01s06.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Calling Client Lib functions<6E></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>Querying the library version</td></tr></table></div></body></html>
|
||||
22
docs/client_html/ar01s06.html
Normal 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(&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(&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>
|
||||
3
docs/client_html/ar01s07.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Shutting down</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="ar01s06.html" title="Querying the library version"><link rel="next" href="ar01s08.html" title="Managing server connection handlers"></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">Shutting down</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s06.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="ar01s08.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="shutdown"></a>Shutting down</h2></div></div></div><p>Before exiting the client application, the Client Lib should be shut down 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_destroyClientLib</b>(</code></td><td><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835435065456"></a></p><p>Returns <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><p>Make sure to call this function <span class="emphasis"><em>after</em></span> disconnecting from any TeamSpeak 3 servers. Any call to Client Lib functions after shutting down has undefined results.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s06.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="ar01s08.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Querying the library version<6F></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>Managing server connection handlers</td></tr></table></div></body></html>
|
||||
5
docs/client_html/ar01s08.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Managing server connection handlers</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="ar01s07.html" title="Shutting down"><link rel="next" href="ar01s09.html" title="Connecting to a server"></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">Managing server connection handlers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s07.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="ar01s09.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="connecthandler"></a>Managing server connection handlers</h2></div></div></div><p>Before connecting to a TeamSpeak 3 server, a new server connection handler needs to be spawned. Each handler is identified by a unique ID (usually called <em class="parameter"><code>serverConnectionHandlerID</code></em>). With one server connection handler a connection can be established and dropped multiple times, so for simply reconnecting to the same or another server no new handler needs to be spawned but existing ones can be reused. However, for using multiple connections simultaneously a new handler has to be spawned for each connection.</p><a class="indexterm" name="idm44835435059952"></a><p>To create a new server connection handler and receive its ID, call
|
||||
</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_spawnNewServerConnectionHandler</b>(</code></td><td><var class="pdparam">port</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>int <var class="pdparam">port</var></code>;<br><code>uint64* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835435056304"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>port</code></em></p><p>Port the client should bind on. Specify zero to let the operating system chose any free port. In most cases passing zero is the best choice.</p><p>If <em class="parameter"><code>port</code></em> is specified, the function return value should be checked for <em class="structfield"><code>ERROR_unable_to_bind_network_port</code></em>. Handle this error by switching to an alternative port until a "free" port is hit and the function returns <em class="structfield"><code>ERROR_ok</code></em>.</p><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>Do not specify a non-zero value for <em class="parameter"><code>port</code></em> unless you absolutely need a specific port. Passing zero is the better way in most use cases.</p></td></tr></table></div></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the server connection handler ID.</p></li></ul></div><p>To destroy a server connection handler, call
|
||||
</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_destroyServerConnectionHandler</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835435046000"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler to destroy.</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="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left">Important</th></tr><tr><td align="left" valign="top"><p>Destroying invalidates the handler ID, so it must not be used anymore afterwards. Also do not destroy a server connection handler ID from within a callback.</p></td></tr></table></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s07.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="ar01s09.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Shutting down<77></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>Connecting to a server</td></tr></table></div></body></html>
|
||||
62
docs/client_html/ar01s09.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Connecting to a server</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="ar01s08.html" title="Managing server connection handlers"><link rel="next" href="ar01s10.html" title="Disconnecting from a server"></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">Connecting to a server</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s08.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="ar01s10.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="connect"></a>Connecting to a server</h2></div></div></div><p>To connect to a server, a client application is required to request an identity from the Client Lib. This string should be requested only once and then locally stored in the applications configuration. The next time the application connects to a server, the identity should be read from the configuration and reused again.
|
||||
</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_createIdentity</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><p>
|
||||
<a class="indexterm" name="idm44835435037440"></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 identity string, encoded in UTF-8.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. If an error occured, the result string is uninitialized and must not be accessed.</p><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>Once a server connection handler has been <a class="link" href="ar01s08.html" title="Managing server connection handlers">spawned</a> and an identity is available, connect to a TeamSpeak 3 server 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_startConnection</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">identity</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">ip</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">port</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">nickname</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">defaultChannelArray</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">defaultChannelPassword</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">serverPassword</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">identity</var></code>;<br><code>const char* <var class="pdparam">ip</var></code>;<br><code>unsigned int <var class="pdparam">port</var></code>;<br><code>const char* <var class="pdparam">nickname</var></code>;<br><code>const char** <var class="pdparam">defaultChannelArray</var></code>;<br><code>const char* <var class="pdparam">defaultChannelPassword</var></code>;<br><code>const char* <var class="pdparam">serverPassword</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835435023616"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>Unique identifier for this server connection. Created with <code class="function">ts3client_spawnNewServerConnectionHandler</code></p></li><li><p><em class="parameter"><code>identity</code></em></p><p>The clients identity. This string has to be created by calling <code class="function">ts3client_createIdentity</code>. Please note an application should create the identity only once, store the string locally and reuse it for future connections.</p></li><li><p><em class="parameter"><code>ip</code></em></p><p>Hostname or IP of the TeamSpeak 3 server.</p><p>If you pass a hostname instead of an IP, the Client Lib will try to resolve it to an IP, but the function may block for an unusually long period of time while resolving is taking place. If you are relying on the function to return quickly, we recommend to resolve the hostname yourself (e.g. asynchronously) and then call <code class="function">ts3client_startConnection</code> with the IP instead of the hostname.</p></li><li><p><em class="parameter"><code>port</code></em></p><p>UDP port of the TeamSpeak 3 server, by default 9987. TeamSpeak 3 uses UDP. Support for TCP might be added in the future.</p></li><li><p><em class="parameter"><code>nickname</code></em></p><p>On login, the client attempts to take this nickname on the connected server. Note this is not necessarily the actually assigned nickname, as the server can modifiy the nickname ("gandalf_1" instead the requested "gandalf") or refuse blocked names.</p></li><li><p><em class="parameter"><code>defaultChannelArray</code></em></p><p>String array defining the path to a channel on the TeamSpeak 3 server. If the channel exists and the user has sufficient rights and supplies the correct password if required, the channel will be joined on login.</p><p>To define the path to a subchannel of arbitrary level, create an array of channel names detailing the position of the default channel (e.g. "grandparent", "parent", "mydefault", ""). The array is terminated with a empty string.</p><p>Pass NULL to join the servers default channel.</p></li><li><p><em class="parameter"><code>defaultChannelPassword</code></em></p><p>Password for the default channel. Pass an empty string if no password is required or no default channel is specified.</p></li><li><p><em class="parameter"><code>serverPassword</code></em></p><p>Password for the server. Pass an empty string if the server does not require a password.</p></li></ul></div><p>All strings need to be encoded in UTF-8 format.</p><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. When trying to connect with an invalid identity, the Client Lib will set the error <em class="structfield"><code>ERROR_client_could_not_validate_identity</code></em>.</p><div class="literallayout"><p><br>
|
||||
</p></div><p>There is an alternative convinience function to start the connection which takes a channelID as parameter for the default channel instead of a channel name string array.
|
||||
</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_startConnectionWithChannelID</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">identity</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">ip</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">port</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">nickname</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">defaultChannelId</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">defaultChannelPassword</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">serverPassword</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">identity</var></code>;<br><code>const char* <var class="pdparam">ip</var></code>;<br><code>unsigned int <var class="pdparam">port</var></code>;<br><code>const char* <var class="pdparam">nickname</var></code>;<br><code>uint64 <var class="pdparam">defaultChannelId</var></code>;<br><code>const char* <var class="pdparam">defaultChannelPassword</var></code>;<br><code>const char* <var class="pdparam">serverPassword</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434996048"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>Unique identifier for this server connection. Created with <code class="function">ts3client_spawnNewServerConnectionHandler</code></p></li><li><p><em class="parameter"><code>identity</code></em></p><p>The clients identity. This string has to be created by calling <code class="function">ts3client_createIdentity</code>. Please note an application should create the identity only once, store the string locally and reuse it for future connections.</p></li><li><p><em class="parameter"><code>ip</code></em></p><p>Hostname or IP of the TeamSpeak 3 server.</p><p>If you pass a hostname instead of an IP, the Client Lib will try to resolve it to an IP, but the function may block for an unusually long period of time while resolving is taking place. If you are relying on the function to return quickly, we recommend to resolve the hostname yourself (e.g. asynchronously) and then call <code class="function">ts3client_startConnection</code> with the IP instead of the hostname.</p></li><li><p><em class="parameter"><code>port</code></em></p><p>UDP port of the TeamSpeak 3 server, by default 9987. TeamSpeak 3 uses UDP. Support for TCP might be added in the future.</p></li><li><p><em class="parameter"><code>nickname</code></em></p><p>On login, the client attempts to take this nickname on the connected server. Note this is not necessarily the actually assigned nickname, as the server can modifiy the nickname ("gandalf_1" instead the requested "gandalf") or refuse blocked names.</p></li><li><p><em class="parameter"><code>defaultChannelID</code></em></p><p>Specifies ID of the channel on the TeamSpeak server we want to connect to. This is an alternative way to define the channel by ID instead of channel path as in <code class="function">ts3client_startConnection</code>. If the specified channel does no longer exist or if the channel password is incorrect, the user will be connected to the default channel of the TeamSpeak server.</p></li><li><p><em class="parameter"><code>defaultChannelPassword</code></em></p><p>Password for the default channel. Pass an empty string if no password is required or no default channel is specified.</p></li><li><p><em class="parameter"><code>serverPassword</code></em></p><p>Password for the server. Pass an empty string if the server does not require a password.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
<EFBFBD><EFBFBD></p></div><p>Example code to request a connection to a TeamSpeak 3 server:</p><pre class="programlisting">unsigned int error;
|
||||
uint64 scHandlerID;
|
||||
char* identity;
|
||||
|
||||
error = ts3client_spawnNewServerConnectionHandler(&scHandlerID);
|
||||
if(error != ERROR_ok) {
|
||||
printf("Error spawning server conection handler: %d\n", error);
|
||||
return;
|
||||
}
|
||||
|
||||
error = ts3client_createIdentity(&identity); /* Application should store and reuse the identity */
|
||||
if(error != ERROR_ok) {
|
||||
printf("Error creating identity: %d\n", error);
|
||||
return;
|
||||
}
|
||||
|
||||
error = ts3client_startConnection(scHandlerID,
|
||||
identity
|
||||
"my-teamspeak-server.com",
|
||||
9987,
|
||||
"Gandalf",
|
||||
NULL, // Join servers default channel
|
||||
"", // Empty default channel password
|
||||
"secret"); // Server password
|
||||
if(error != ERROR_ok) {
|
||||
(...)
|
||||
}
|
||||
ts3client_freeMemory(identity); /* Don't need this anymore */</pre><div class="literallayout"><p><br>
|
||||
</p></div><p>After calling <code class="function">ts3client_startConnection</code>, the client will be informed of the connection status changes by the callback</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onConnectStatusChangeEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">newStatus</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">errorNumber</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>int <var class="pdparam">newStatus</var></code>;<br><code>int <var class="pdparam">errorNumber</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434970288"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>newStatus</code></em></p><p>The new connect state as defined by the enum <span class="structname">ConnectStatus</span><a class="indexterm" name="idm44835434967632"></a>:</p><a name="connectstatus"></a><pre class="programlisting">enum ConnectStatus {
|
||||
STATUS_DISCONNECTED = 0, //There is no activity to the server, this is the default value
|
||||
STATUS_CONNECTING, //We are trying to connect, we haven't got a clientID yet, we
|
||||
//haven't been accepted by the server
|
||||
STATUS_CONNECTED, //The server has accepted us, we can talk and hear and we got a
|
||||
//clientID, but we don't have the channels and clients yet, we
|
||||
//can get server infos (welcome msg etc.)
|
||||
STATUS_CONNECTION_ESTABLISHING,//we are CONNECTED and we are visible
|
||||
STATUS_CONNECTION_ESTABLISHED, //we are CONNECTED and we have the client and channels available
|
||||
};</pre></li><li><p><em class="parameter"><code>errorNumber</code></em></p><p>Should be <em class="structfield"><code>ERROR_ok</code></em> (zero) when connecting</p></li></ul></div><p>
|
||||
While connecting, the states will switch through the values <em class="structfield"><code>STATUS_CONNECTING</code></em>, <em class="structfield"><code>STATUS_CONNECTED</code></em> and <em class="structfield"><code>STATUS_CONNECTION_ESTABLISHED</code></em>. Once the state <em class="structfield"><code>STATUS_CONNECTED</code></em> has been reached, there the server welcome message is available, which can be queried by the client:</p><div class="itemizedlist"><ul type="disc"><li><p>Welcome message<a class="indexterm" name="idm44835434959920"></a></p><p>Query the server variable <em class="structfield"><code>VIRTUALSERVER_WELCOMEMESSAGE</code></em> for the message text using the function <a class="link" href="ar01s22s03.html#getservervarasstring"><code class="function">ts3client_getServerVariableAsString</code></a>:</p><pre class="programlisting">char* welcomeMsg;
|
||||
if(ts3client_getServerVariableAsString(serverConnectionHandlerID, VIRTUALSERVER_WELCOMEMESSAGE, &welcomeMsg)
|
||||
!= ERROR_ok) {
|
||||
printf("Error getting server welcome message: %d\n", error);
|
||||
return;
|
||||
}
|
||||
print("Welcome message: %s\n", welcomeMsg); /* Display message */
|
||||
ts3client_freeMemory(welcomeMsg); /* Release memory */</pre></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>To check if a connection to a given server connection handler is established, call:
|
||||
</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_getConnectionStatus</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>int* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434952576"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler of which the connection state is checked.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the result: 1 - Connected, 0 - Not connected.</p></li></ul></div><p>Returns <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>After the state <em class="structfield"><code>STATUS_CONNECTED</code></em> has been reached, the client is assigned an ID which identifies the client on this server.<a class="indexterm" name="idm44835434945504"></a> This ID 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_getClientID</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434942208"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which we are querying the own client ID.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the client ID. Client IDs start with the value 1.</p></li></ul></div><p>Returns <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>After connection has been established, all current channels on the server are announced to the client. This happens with delays to avoid a flood of information after connecting. The client is informed about the existance of each channel with the following event:</p><a name="onnewchannelevent"></a><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onNewChannelEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelParentID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>uint64 <var class="pdparam">channelParentID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434931408"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>The server connection handler ID.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>The ID of the announced channel.</p></li><li><p><em class="parameter"><code>channelParentID</code></em></p><p>ID of the parent channel.</p></li></ul></div><p>Channel IDs start with the value 1.</p><p>The order in which channels are announced by <code class="function">onNewChannelEvent</code> is defined by the channel order as explained in the chapter <a class="link" href="ar01s22s02s02.html" title="Channel sorting">Channel sorting</a>.</p><p>All clients currently logged to the server are announced after connecting with the callback <a class="link" href="ar01s23.html#onclientmove"><code class="function">onClientMoveEvent</code></a>.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s08.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="ar01s10.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Managing server connection handlers<72></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>Disconnecting from a server</td></tr></table></div></body></html>
|
||||
5
docs/client_html/ar01s10.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Disconnecting from a server</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="ar01s09.html" title="Connecting to a server"><link rel="next" href="ar01s11.html" title="Error handling"></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">Disconnecting from a server</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s09.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="ar01s11.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="disconnect"></a>Disconnecting from a server</h2></div></div></div><p>To disconnect from a TeamSpeak 3 server call
|
||||
</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_stopConnection</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">quitMessage</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">quitMessage</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434918256"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>The unique ID for this server connection handler.</p></li><li><p><em class="parameter"><code>quitMessage</code></em></p><p>A message like for example "leaving". The string needs to be encoded in UTF-8 format.</p></li></ul></div><p>Returns <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><p>Like with connecting, on successful disconnecting the client will receive an event:</p><div class="literallayout"><p><br>
|
||||
</p></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onConnectStatusChangeEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">newStatus</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">errorNumber</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>int <var class="pdparam">newStatus</var></code>;<br><code>int <var class="pdparam">errorNumber</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434908064"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>newStatus</code></em></p><p>Set to <em class="structfield"><code>STATUS_DISCONNECTED</code></em> as defined by the enum <a class="link" href="ar01s09.html#connectstatus"><span class="structname">ConnectStatus</span></a><a class="indexterm" name="idm44835434904672"></a>.</p></li><li><p><em class="parameter"><code>errorNumber</code></em></p><p><em class="parameter"><code>errorNumber</code></em> is expected to be <em class="structfield"><code>ERROR_ok</code></em> as response to calling <code class="function">ts3client_stopConnection</code>.</p><p>Values other than <em class="structfield"><code>ERROR_ok</code></em> occur when the connection has been lost for reasons not initiated by the user, e.g. network error, forcefully disconnected etc.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Should the server be shutdown, the follow event will be called:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onServerStopEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">shutdownMessage</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">shutdownMessage</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434896144"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>Server connection handler ID of the stopped server.</p></li><li><p><em class="parameter"><code>shutdownMessage</code></em></p><p>Message announcing the reason for the shutdown sent by the server. Has to be encoded in UTF-8 format.</p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s09.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="ar01s11.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Connecting to a server<65></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>Error handling</td></tr></table></div></body></html>
|
||||
27
docs/client_html/ar01s11.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Error handling</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="ar01s10.html" title="Disconnecting from a server"><link rel="next" href="ar01s12.html" title="Logging"></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">Error handling</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s10.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="ar01s12.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="errorhandling"></a>Error handling</h2></div></div></div><p>Each Client Lib function returns either <em class="structfield"><code>ERROR_ok</code></em> on success or an error value as defined in <code class="filename">public_errors.h</code> if the function fails.</p><p>The returned error codes are organized in groups, where the first byte defines the error group and the second the count within the group: The naming convention is ERROR_<group>_<error>, for example <em class="structfield"><code>ERROR_client_invalid_id</code></em>.</p><p>Example:</p><pre class="programlisting">unsigned int error;
|
||||
char* welcomeMsg;
|
||||
|
||||
error = ts3client_getServerVariableAsString(serverConnectionHandlerID,
|
||||
VIRTUALSERVER_WELCOMEMESSAGE,
|
||||
&welcomeMsg);
|
||||
if(error == ERROR_ok) {
|
||||
/* Use welcomeMsg... */
|
||||
ts3client_freeMemory(welcomeMsg); /* Release memory *only* if function did not return an error */
|
||||
} else {
|
||||
/* Handle error */
|
||||
/* Do not access or release welcomeMessage, the variable is undefined */
|
||||
}</pre><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left">Important</th></tr><tr><td align="left" valign="top"><p>Client Lib functions returning C-strings or arrays dynamically allocate memory which has to be freed by the caller using <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>. It is important to <span class="emphasis"><em>only</em></span> access and release the memory if the function returned <em class="structfield"><code>ERROR_ok</code></em>. Should the function return an error, the result variable is uninitialized, so freeing or accessing it could crash the application.</p></td></tr></table></div><p>See the section <a class="link" href="ar01s04.html" title="Calling Client Lib functions">Calling Client Lib functions</a> for additional notes and examples.</p><div class="literallayout"><p><br>
|
||||
</p></div><p>A printable error string for a specific error code 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_getErrorMessage</b>(</code></td><td><var class="pdparam">errorCode</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">error</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>unsigned int <var class="pdparam">errorCode</var></code>;<br><code>char** <var class="pdparam">error</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434878992"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>errorCode</code></em></p><p>The error code returned from all Client Lib functions.</p></li><li><p><em class="parameter"><code>error</code></em></p><p>Address of a variable that receives the error message string, encoded in UTF-8 format. Unless the return value of the function is not <em class="structfield"><code>ERROR_ok</code></em>, the string should be released with <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>.</p></li></ul></div><p>Example:</p><pre class="programlisting">unsigned int error;
|
||||
anyID myID;
|
||||
|
||||
error = ts3client_getClientID(scHandlerID, &myID); /* Calling some Client Lib function */
|
||||
if(error != ERROR_ok) {
|
||||
char* errorMsg;
|
||||
if(ts3client_getErrorMessage(error, &errorMsg) == ERROR_ok) { /* Query printable error */
|
||||
printf("Error querying client ID: %s\n", errorMsg);
|
||||
ts3client_freeMemory(errorMsg); /* Release memory */
|
||||
}
|
||||
}</pre><div class="literallayout"><p><br>
|
||||
</p></div><p>In addition to actively querying errors like above, error codes can be sent by the server to the client. In that case the following event is called:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onServerErrorEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">errorMessage</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">error</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">extraMessage</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">errorMessage</var></code>;<br><code>unsigned int <var class="pdparam">error</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;<br><code>const char* <var class="pdparam">extraMessage</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434866416"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>The connection handler ID of the server who sent the error event.</p></li><li><p><em class="parameter"><code>errorMessage</code></em></p><p>String containing a verbose error message, encoded in UTF-8 format.</p></li><li><p><em class="parameter"><code>error</code></em></p><p>Error code as defined in <code class="filename">public_errors.h</code>.</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>String containing the return code if it has been set by the Client Lib function call which caused this error event.</p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>.</p></li><li><p><em class="parameter"><code>extraMessage</code></em></p><p>Can contain additional information about the occured error. If no additional information is available, this parameter is an empty string.</p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s10.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="ar01s12.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Disconnecting from a server<65></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>Logging</td></tr></table></div></body></html>
|
||||
14
docs/client_html/ar01s12.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Logging</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="ar01s11.html" title="Error handling"><link rel="next" href="ar01s13.html" title="Using playback and capture modes and devices"></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">Logging</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s11.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="ar01s13.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="logging"></a>Logging</h2></div></div></div><p>The TeamSpeak 3 Client Lib offers basic logging functions:
|
||||
<a class="indexterm" name="idm44835434854160"></a>
|
||||
</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_logMessage</b>(</code></td><td><var class="pdparam">logMessage</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">severity</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channel</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">logID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>const char* <var class="pdparam">logMessage</var></code>;<br><code>LogLevel <var class="pdparam">severity</var></code>;<br><code>const char* <var class="pdparam">channel</var></code>;<br><code>uint64 <var class="pdparam">logID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434849328"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>logMessage</code></em></p><p>Text written to log.</p></li><li><p><em class="parameter"><code>severity</code></em></p><p>The level of the message, warning or error. Defined by the enum <span class="structname">LogLevel</span><a class="indexterm" name="idm44835434844928"></a> in <code class="filename">clientlib_publicdefinitions.h</code>:</p><a name="loglevelenum"></a><a class="indexterm" name="idm44835434842704"></a><pre class="programlisting">enum LogLevel {
|
||||
LogLevel_CRITICAL = 0, //these messages stop the program
|
||||
LogLevel_ERROR, //everything that is really bad, but not so bad we need to shut down
|
||||
LogLevel_WARNING, //everything that *might* be bad
|
||||
LogLevel_DEBUG, //output that might help find a problem
|
||||
LogLevel_INFO, //informational output, like "starting database version x.y.z"
|
||||
LogLevel_DEVEL //developer only output (will not be displayed in release mode)
|
||||
};</pre></li><li><p><em class="parameter"><code>channel</code></em></p><p>Custom text to categorize the message channel (i.e. "Client", "Sound").</p><p>Pass an empty string if unused.</p></li><li><p><em class="parameter"><code>logID</code></em></p><p>Server connection handler ID to identify the current server connection when using multiple connections.</p><p>Pass 0 if unused.</p></li></ul></div><p>All strings need to be encoded in UTF-8 format.</p><p>Returns <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><p>Log messages can be printed to stdout, logged to a file <code class="filename">logs/ts3client_[date]__[time].log</code> and sent to user-defined callbacks. The log output behaviour is defined when initialzing the client library with <a class="link" href="ar01s05.html" title="Initializing"><code class="function">ts3client_initClientLib</code></a>.</p><p>Unless user-defined logging is used, program execution will halt on a log message with severity <em class="structfield"><code>LogLevel_CRITICAL</code></em>.</p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="userlogging"></a>User-defined logging</h3></div></div></div><p>If user-defined logging was enabled when initialzing the Client Lib by passing <em class="structfield"><code>LogType_USERLOGGING</code></em> to the <em class="parameter"><code>usedLogTypes</code></em> parameter of <a class="link" href="ar01s05.html" title="Initializing"><code class="function">ts3client_initClientLib</code></a>, log messages will be sent to the following callback, which allows user customizable logging and handling or critical errors:</p><a class="indexterm" name="idm44835434828320"></a><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onUserLoggingMessageEvent</b>(</code></td><td><var class="pdparam">logMessage</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">logLevel</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">logChannel</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">logID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">logTime</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">completeLogString</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>const char* <var class="pdparam">logMessage</var></code>;<br><code>int <var class="pdparam">logLevel</var></code>;<br><code>const char* <var class="pdparam">logChannel</var></code>;<br><code>uint64 <var class="pdparam">logID</var></code>;<br><code>const char* <var class="pdparam">logTime</var></code>;<br><code>const char* <var class="pdparam">completeLogString</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434821776"></a><p>Most callback parameters reflect the arguments passed to the <code class="function">logMessage</code> function.</p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>logMessage</code></em></p><p>Actual log message text.</p></li><li><p><em class="parameter"><code>logLevel</code></em></p><p>Severity of log message, defined by the enum <a class="link" href="ar01s12.html#loglevelenum"><span class="structname">LogLevel</span></a>. Note that only log messages of a level higher than the one configured with <code class="function">ts3client_setLogVerbosity</code> will appear.</p></li><li><p><em class="parameter"><code>logChannel</code></em></p><p>Optional custom text to categorize the message channel.</p></li><li><p><em class="parameter"><code>logID</code></em></p><p>Server connection handler ID identifying the current server connection when using multiple connections.</p></li><li><p><em class="parameter"><code>logTime</code></em></p><p>String with date and time when the log message occured.</p></li><li><p><em class="parameter"><code>completeLogString</code></em></p><p>Provides a verbose log message including all previous parameters for convinience.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>The severity of log messages that are passed to above callback can be configured 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_setLogVerbosity</b>(</code></td><td><var class="pdparam">logVerbosity</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>enum LogLevel <var class="pdparam">logVerbosity</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434805376"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>logVerbosity</code></em></p><p>Only messages with a log level equal or higher than <em class="parameter"><code>logVerbosity</code></em> will be sent to the callback. The default value is <em class="structfield"><code>LogLevel_DEVEL</code></em>.</p><p>For example, after calling </p><pre class="programlisting">ts3client_setLogVerbosity(LogLevel_ERROR);</pre><p> only log messages of level <em class="structfield"><code>LogLevel_ERROR</code></em> and <em class="structfield"><code>LogLevel_CRITICAL</code></em> will be passed to <code class="function">onUserLoggingMessageEvent</code>.</p></li></ul></div><p>Returns <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></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s11.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="ar01s13.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Error handling<6E></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>Using playback and capture modes and devices</td></tr></table></div></body></html>
|
||||
9
docs/client_html/ar01s13.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Using playback and capture modes and devices</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="ar01s12.html" title="Logging"><link rel="next" href="ar01s13s02.html" title="Querying available modes and devices"></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">Using playback and capture modes and devices</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s12.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="ar01s13s02.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="sound"></a>Using playback and capture modes and devices</h2></div></div></div><p>The Client Lib takes care of initializing, using and releasing sound playback and capture devices. Accessing devices is handled by the sound backend shared libraries, found in the soundbackends directory in the SDK. There are different backends available on the supported operating systems: DirectSound and Windows Audio Session API on Windows, Alsa and PulseAudio on Linux, CoreAudio on Mac OS X.</p><p>All strings passed to and from the Client Lib have to be encoded in UTF-8 format.</p><a class="indexterm" name="idm44835434795104"></a><a class="indexterm" name="idm44835434794560"></a><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="initdevice"></a>Initializing modes and devices</h3></div></div></div><p>To initialize a playback and capture device for a TeamSpeak 3 server connection handler, call
|
||||
</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_openPlaybackDevice</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">modeID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">playbackDevice</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">modeID</var></code>;<br><code>const char* <var class="pdparam">playbackDevice</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434789200"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>Connection handler of the server on which you want to initialize the playback device.</p></li><li><p><em class="parameter"><code>modeID</code></em></p><p>The playback mode to use. Valid modes are returned by <a class="link" href="ar01s13s02.html" title="Querying available modes and devices"><code class="function">ts3client_getDefaultPlayBackMode</code></a> and <a class="link" href="ar01s13s02.html" title="Querying available modes and devices"><code class="function">ts3client_getPlaybackModeList</code></a>.</p><p>Passing an empty string will use the default playback mode.</p></li><li><p><em class="parameter"><code>playbackDevice</code></em></p><p>Valid parameters are:
|
||||
</p><div class="itemizedlist"><ul type="circle"><li><p>The <em class="parameter"><code>device</code></em> parameter returned by <a class="link" href="ar01s13s02.html" title="Querying available modes and devices"><code class="function">ts3client_getDefaultPlaybackDevice</code></a></p></li><li><p>One of the <em class="parameter"><code>device</code></em> parameters returned by <a class="link" href="ar01s13s02.html" title="Querying available modes and devices"><code class="function">ts3client_getPlaybackDeviceList</code></a></p></li><li><p>Empty string to initialize the default playback device.</p></li><li><p>Linux with Alsa only: Custom device name in the form of e.g. “<span class="quote">hw:1,0</span>”.</p></li></ul></div><p>
|
||||
The string needs to be encoded in UTF-8 format.
|
||||
</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. A likely error is <em class="structfield"><code>ERROR_sound_could_not_open_playback_device</code></em> if the sound backend fails to find a usable playback device.</p><div class="literallayout"><p><br>
|
||||
</p></div><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_openCaptureDevice</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">modeID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">captureDevice</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">modeID</var></code>;<br><code>const char* <var class="pdparam">captureDevice</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434767264"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>Connection handler of the server on which you want to initialize the capture device.</p></li><li><p><em class="parameter"><code>modeID</code></em></p><p>The capture mode to use. Valid modes are returned by <a class="link" href="ar01s13s02.html" title="Querying available modes and devices"><code class="function">ts3client_getDefaultCaptureMode</code></a> and <a class="link" href="ar01s13s02.html" title="Querying available modes and devices"><code class="function">ts3client_getCaptureModeList</code></a>.</p><p>Passing an empty string will use the default capture mode.</p></li><li><p><em class="parameter"><code>captureDevice</code></em></p><p>Valid parameters are:
|
||||
</p><div class="itemizedlist"><ul type="circle"><li><p>The <em class="parameter"><code>device</code></em> parameter returned by <a class="link" href="ar01s13s02.html" title="Querying available modes and devices"><code class="function">ts3client_getDefaultCaptureDevice</code></a></p></li><li><p>One of the <em class="parameter"><code>device</code></em> parameters returned by <a class="link" href="ar01s13s02.html" title="Querying available modes and devices"><code class="function">ts3client_getCaptureDeviceList</code></a></p></li><li><p>Empty string to initialize the default capture device. Encoded in UTF-8 format.</p></li><li><p>Linux with Alsa only: Custom device name in the form of e.g. “<span class="quote">hw:1,0</span>”.</p></li></ul></div><p>
|
||||
</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. Likely errors are <em class="structfield"><code>ERROR_sound_could_not_open_capture_device</code></em> if the device fails to open or <em class="structfield"><code>ERROR_sound_handler_has_device</code></em> if the device is already opened. To avoid this problem, it is recommended to close the capture device before opening it again.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s12.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="ar01s13s02.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Logging<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>Querying available modes and devices</td></tr></table></div></body></html>
|
||||
69
docs/client_html/ar01s13s02.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Querying available modes and devices</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="ar01s13.html" title="Using playback and capture modes and devices"><link rel="prev" href="ar01s13.html" title="Using playback and capture modes and devices"><link rel="next" href="ar01s13s03.html" title="Checking current modes and devices"></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 available modes and devices</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s13.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center">Using playback and capture modes and devices</th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s13s03.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="querydevice"></a>Querying available modes and devices</h3></div></div></div><p>Various playback and capture modes are available: DirectSound on all Windows platforms, Windows Audio Session API for Windows Vista and Windows 7; Alsa and PulseAudio on Linux; CoreAudio on Mac OS X.</p><p> Available device names may differ depending on the current mode.</p><p>The default playback and capture modes 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_getDefaultPlayBackMode</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><p>
|
||||
<a class="indexterm" name="idm44835434744864"></a>
|
||||
</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_getDefaultCaptureMode</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><p>
|
||||
<a class="indexterm" name="idm44835434741824"></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 default playback or capture mode. The value can be used as parameter for the functions querying and opening devices. Unless the function returns an error, the string must be released using <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>.</p></li></ul></div><p>Returns <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>All available playback and capture modes 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_getPlaybackModeList</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><p>
|
||||
<a class="indexterm" name="idm44835434733456"></a>
|
||||
</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_getCaptureModeList</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><p>
|
||||
<a class="indexterm" name="idm44835434730416"></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 a NULL-terminated array of C-strings listing available playback or capture modes.</p><p>Unless the function returns an error, the caller must release each element of the array (the C-string) and finally the complete array with <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. In case of an error, the result array is uninitialized and must not be accessed or released.</p><p>Example to query all available playback modes:</p><pre class="programlisting">char** array;
|
||||
|
||||
if(ts3client_getPlaybackModeList(&array) == ERROR_ok) {
|
||||
for(int i=0; array[i] != NULL; ++i) {
|
||||
printf("Mode: %s\n", array[i]);
|
||||
ts3client_freeMemory(array[i]); // Free C-string
|
||||
}
|
||||
ts3client_freeMemory(array); // Free the array
|
||||
}</pre><div class="literallayout"><p><br>
|
||||
</p></div><p>Playback and capture devices available for the given mode can be listed, as well as the current operating systems default. The returned device values can be used to <a class="link" href="ar01s13.html#initdevice" title="Initializing modes and devices">initialize</a> the devices.</p><p>To query the default playback and capture device, call
|
||||
</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_getDefaultPlaybackDevice</b>(</code></td><td><var class="pdparam">modeID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>const char* <var class="pdparam">modeID</var></code>;<br><code>char*** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434718048"></a>
|
||||
</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_getDefaultCaptureDevice</b>(</code></td><td><var class="pdparam">modeID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>const char* <var class="pdparam">modeID</var></code>;<br><code>char*** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434714304"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>mode</code></em></p><p>Defines the playback/capture mode to use. For different modes there might be different default devices. Valid modes are returned by <code class="function">ts3client_getDefaultPlayBackMode</code> / <code class="function">ts3client_getDefaultCaptureMode</code> and <code class="function">ts3client_getPlaybackModeList</code> / <code class="function">ts3client_getCaptureModeList</code>.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives an array of two C-strings. The first element contains the device name, the second the device ID.</p><p>Unless the function returns an error, the caller must free the two array elements and the complete array with <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. In case of an error, the result array is uninitialized and must not be released.</p><p>Example to query the default playback device:</p><pre class="programlisting">char* defaultMode;
|
||||
|
||||
/* Get default playback mode */
|
||||
if(ts3client_getDefaultPlayBackMode(&defaultMode) == ERROR_ok) {
|
||||
char** defaultPlaybackDevice;
|
||||
|
||||
/* Get default playback device */
|
||||
if(ts3client_getDefaultPlaybackDevice(defaultMode, &defaultPlaybackDevice) == ERROR_ok) {
|
||||
printf("Default playback device name: %s\n", defaultPlaybackDevice[0]); /* First element: Device name */
|
||||
printf("Default playback device ID: %s\n", defaultPlaybackDevice[1]); /* Second element: Device ID */
|
||||
|
||||
/* Release the two array elements and the array */
|
||||
ts3client_freeMemory(defaultPlaybackDevice[0]);
|
||||
ts3client_freeMemory(defaultPlaybackDevice[1]);
|
||||
ts3client_freeMemory(defaultPlaybackDevice);
|
||||
} else {
|
||||
printf("Failed to get default playback device\n");
|
||||
}
|
||||
} else {
|
||||
printf("Failed to get default playback mode\n");
|
||||
}</pre><div class="literallayout"><p><br>
|
||||
</p></div><p>To get a list of all available playback and capture devices for the specified mode, call
|
||||
</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_getPlaybackDeviceList</b>(</code></td><td><var class="pdparam">modeID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>const char* <var class="pdparam">modeID</var></code>;<br><code>char**** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434697696"></a>
|
||||
</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_getCaptureDeviceList</b>(</code></td><td><var class="pdparam">modeID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>const char* <var class="pdparam">modeID</var></code>;<br><code>char**** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434693952"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>modeID</code></em></p><p>Defines the playback/capture mode to use. For different modes there might be different device lists. Valid modes are returned by <code class="function">ts3client_getDefaultPlayBackMode</code> / <code class="function">ts3client_getDefaultCaptureMode</code> and <code class="function">ts3client_getPlaybackModeList</code> / <code class="function">ts3client_getCaptureModeList</code>.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives a NULL-terminated array <span class="returnvalue">{ { char* deviceName, char* deviceID }, { char* deviceName, char* deviceID }, ... , NULL }</span>.</p><p>Unless the function returns an error, the elements of the array and the array itself need to be freed using <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. In case of an error, the result array is uninitialized and must not be released.</p><p>Example to query all available playback devices:</p><pre class="programlisting">char* defaultMode;
|
||||
|
||||
if(ts3client_getDefaultPlayBackMode(&defaultMode) == ERROR_ok) {
|
||||
char*** array;
|
||||
|
||||
if(ts3client_getPlaybackDeviceList(defaultMode, &array) == ERROR_ok) {
|
||||
for(int i=0; array[i] != NULL; ++i) {
|
||||
printf("Playback device name: %s\n", array[i][0]); /* First element: Device name */
|
||||
printf("Playback device ID: %s\n", array[i][1]); /* Second element: Device ID */
|
||||
|
||||
/* Free element */
|
||||
ts3client_freeMemory(array[i][0]);
|
||||
ts3client_freeMemory(array[i][1]);
|
||||
ts3client_freeMemory(array[i]);
|
||||
}
|
||||
ts3client_freeMemory(array); /* Free complete array */
|
||||
} else {
|
||||
printf("Error getting playback device list\n");
|
||||
}
|
||||
} else {
|
||||
printf("Error getting default playback mode\n");
|
||||
}</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s13.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><a accesskey="u" href="ar01s13.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s13s03.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Using playback and capture modes and devices<65></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>Checking current modes and devices</td></tr></table></div></body></html>
|
||||
10
docs/client_html/ar01s13s03.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Checking current modes and devices</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="ar01s13.html" title="Using playback and capture modes and devices"><link rel="prev" href="ar01s13s02.html" title="Querying available modes and devices"><link rel="next" href="ar01s13s04.html" title="Closing devices"></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">Checking current modes and devices</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s13s02.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center">Using playback and capture modes and devices</th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s13s04.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="checkdevice"></a>Checking current modes and devices</h3></div></div></div><p>The currently used playback and capture modes for a given server connection handler can be checked 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_getCurrentPlayBackMode</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>char** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434676816"></a>
|
||||
</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_getCurrentCaptureMode</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>char** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434673056"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler for which the current playback or capture modes are queried.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the current playback or capture mode. Unless the function returns an error, the string must be released using <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>.</p></li></ul></div><p>Returns <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>Check the currently used playback and capture devices for a given server connection handler 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_getCurrentPlaybackDeviceName</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">isDefault</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>char** <var class="pdparam">result</var></code>;<br><code>int* <var class="pdparam">isDefault</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434661600"></a>
|
||||
</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_getCurrentCaptureDeviceName</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">isDefault</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>char** <var class="pdparam">result</var></code>;<br><code>int* <var class="pdparam">isDefault</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434657136"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler for which the current playback or capture devices are queried.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the current playback or capture device. Unless the function returns an error, the string must be released using <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives a flag if this device is the default playback/capture device. If this is not needed, pass NULL instead.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. If an error has occured, the result string is uninitialized and must not be released.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s13s02.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><a accesskey="u" href="ar01s13.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s13s04.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Querying available modes and devices<65></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>Closing devices</td></tr></table></div></body></html>
|
||||
23
docs/client_html/ar01s13s04.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Closing devices</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="ar01s13.html" title="Using playback and capture modes and devices"><link rel="prev" href="ar01s13s03.html" title="Checking current modes and devices"><link rel="next" href="ar01s13s05.html" title="Using custom devices"></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">Closing devices</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s13s03.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center">Using playback and capture modes and devices</th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s13s05.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="closedevice"></a>Closing devices</h3></div></div></div><p>To close the capture and playback devices for a given server connection handler:
|
||||
</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_closeCaptureDevice</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434644704"></a>
|
||||
</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_closePlaybackDevice</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434641648"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler for which the playback or capture device should be closed.</p></li></ul></div><p>Returns <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><code class="function">ts3client_closePlaybackDevice</code> will not block until all current sounds have finished playing but will shutdown the device immediately, possibly interrupting the still playing sounds. To shutdown the playback device more gracefully, use the following function:
|
||||
</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_initiateGracefulPlaybackShutdown</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434633712"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler for which the playback or capture device should be shut down.</p></li></ul></div><p>Returns <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>While <code class="function">ts3client_initiateGracefulPlaybackShutdown</code> will not block until all sounds have finished playing, too, it will notify the client when the playback device can be safely closed by sending the callback:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onPlaybackShutdownCompleteEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434625664"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the playback device has been shut down.</p></li></ul></div><p>Example code to gracefully shutdown the playback devicef:</p><pre class="programlisting">/* Instead of calling ts3client_closePlaybackDevice() directly */
|
||||
if(ts3client_initiateGracefulPlaybackShutdown(currentScHandlerID) != ERROR_ok) {
|
||||
printf("Failed to initiate graceful playback shutdown\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Event notifying the playback device has been shutdown */
|
||||
void my_onPlaybackShutdownCompleteEvent(uint64 scHandlerID) {
|
||||
/* Now we can safely close the device */
|
||||
if(ts3client_closePlaybackDevice(scHandlerID) != ERROR_ok) {
|
||||
printf("Error closing playback device\n");
|
||||
}
|
||||
}</pre><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>Devices are closed automatically when calling <a class="link" href="ar01s08.html" title="Managing server connection handlers"><code class="function">ts3client_destroyServerConnectionHandler</code></a>.</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>To change a device, close it first and then reopen it.</p></td></tr></table></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s13s03.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><a accesskey="u" href="ar01s13.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s13s05.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Checking current modes and devices<65></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>Using custom devices</td></tr></table></div></body></html>
|
||||
44
docs/client_html/ar01s13s05.html
Normal file
@@ -0,0 +1,44 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Using custom devices</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="ar01s13.html" title="Using playback and capture modes and devices"><link rel="prev" href="ar01s13s04.html" title="Closing devices"><link rel="next" href="ar01s13s06.html" title="Activating the capture device"></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">Using custom devices</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s13s04.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center">Using playback and capture modes and devices</th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s13s06.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="customdevice"></a>Using custom devices</h3></div></div></div><p>Instead of opening existing sound devices that TeamSpeak has detected, you can also use our custom capture and playback mechanism to allow you to override the way in which TeamSpeak does capture and playback. When you have opened a custom capture and playback device you must regularly supply new "captured" sound data via the <code class="function">ts3client_processCustomCaptureData</code> function and retrieve data that should be "played back" via <code class="function">ts3client_acquireCustomPlaybackData</code>. Where exactly this captured sound data comes from and where the playback data goes to is up to you, which allows a lot of cool things to be done with this mechanism.</p><p>Implementing own custom devices is for special use cases and entirely optional.</p><p>Registering a custom device announces the device ID and name to the Client Lib. Once a custom device has been registered under a device ID, the device can be opened like any standard device with <code class="function">ts3client_openCaptureDevice</code> and <code class="function">ts3client_openPlaybackDevice</code>.</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">ts3client_registerCustomDevice</b>(</code></td><td><var class="pdparam">deviceID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">deviceDisplayName</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">capFrequency</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">capChannels</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">playFrequency</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">playChannels</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>const char* <var class="pdparam">deviceID</var></code>;<br><code>const char* <var class="pdparam">deviceDisplayName</var></code>;<br><code>int <var class="pdparam">capFrequency</var></code>;<br><code>int <var class="pdparam">capChannels</var></code>;<br><code>int <var class="pdparam">playFrequency</var></code>;<br><code>int <var class="pdparam">playChannels</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434608896"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>deviceID</code></em></p><p>ID string of the custom device, under which the device can be later accessed.</p></li><li><p><em class="parameter"><code>deviceDisplayName</code></em></p><p>Displayed name of the custom device. Freely choose a name which identifies your device.</p></li><li><p><em class="parameter"><code>capFrequency</code></em></p><p>Frequency of the capture device.</p></li><li><p><em class="parameter"><code>capChannels</code></em></p><p>Number of channels of the capture device. This value depends on if the used <a class="link" href="ar01s14.html" title="Sound codecs">codec</a> is a mono or stereo codec.</p></li><li><p><em class="parameter"><code>playFrequency</code></em></p><p>Frequency of the playback device.</p></li><li><p><em class="parameter"><code>playChannels</code></em></p><p>Number of channels of the playback device.</p></li></ul></div><p>Returns <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>Unregistering a custom device will automatically close the device:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">ts3client_unregisterCustomDevice</b>(</code></td><td><var class="pdparam">deviceID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>const char* <var class="pdparam">deviceID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434592352"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>deviceID</code></em></p><p>ID string of the custom device to unregister. This is the ID under which the device was registered with <code class="function">ts3client_registerCustomDevice</code>.</p></li></ul></div><p>Returns <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>To send the captured data from your device to the Client Lib:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">ts3client_processCustomCaptureData</b>(</code></td><td><var class="pdparam">deviceID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">buffer</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">samples</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>const char* <var class="pdparam">deviceID</var></code>;<br><code>const short* <var class="pdparam">buffer</var></code>;<br><code>int <var class="pdparam">samples</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434582944"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>deviceID</code></em></p><p>ID string of the custom device. This is the ID under which the device was registered with <code class="function">ts3client_registerCustomDevice</code>.</p></li><li><p><em class="parameter"><code>buffer</code></em></p><p>Capture data buffer containing the data captured by the custom device.</p></li><li><p><em class="parameter"><code>samples</code></em></p><p>Size of the capture data buffer.</p></li></ul></div><p>Returns <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>Retrieve playback data from the Client Lib:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">ts3client_acquireCustomPlaybackData</b>(</code></td><td><var class="pdparam">deviceID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">buffer</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">samples</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>const char* <var class="pdparam">deviceID</var></code>;<br><code>const short* <var class="pdparam">buffer</var></code>;<br><code>int <var class="pdparam">samples</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434570272"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>deviceID</code></em></p><p>ID string of the custom device. This is the ID under which the device was registered with <code class="function">ts3client_registerCustomDevice</code>.</p></li><li><p><em class="parameter"><code>buffer</code></em></p><p>Buffer containing the playback data retrieved from the Client Lib.</p></li><li><p><em class="parameter"><code>samples</code></em></p><p>Size of the playback data buffer.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> if playback data is available or <em class="structfield"><code>ERROR_sound_no_data</code></em> if the Client Lib currently has no playback data.</p><p>The return value <em class="structfield"><code>ERROR_sound_no_data</code></em> can be used for performance optimisation, it means there is currently only silence (nobody is talking, no wave files being played etc.) and instead of returning a buffer full of zeroes it just notifies the user there is currently no data, which allows you to not playback any sound data for that moment, if your API supports that (potentially saving some CPU), or to just fill the sound buffer with zeroes and playback this if your sound API demands you to fill it with something for every given time.</p><div class="literallayout"><p><br>
|
||||
</p></div><p>Overview on registering and opening a custom device:</p><pre class="programlisting">/* Register a new custom sound device with specified frequency and number of channels */
|
||||
if(ts3client_registerCustomDevice("customWaveDeviceId", "Nice displayable wave device name", captureFrequency, captureChannels, playbackFrequncy, playbackChannels) != ERROR_ok) {
|
||||
printf("Failed to register custom device\n");
|
||||
}
|
||||
|
||||
/* Open capture device we created earlier */
|
||||
if(ts3client_openCaptureDevice(scHandlerID, "custom", "customWaveDeviceId") != ERROR_ok) {
|
||||
printf("Error opening capture device\n");
|
||||
}
|
||||
|
||||
/* Open playback device we created earlier */
|
||||
if(ts3client_openPlaybackDevice(scHandlerID, "custom", "customWaveDeviceId") != ERROR_ok) {
|
||||
printf("Error opening playback device\n");
|
||||
}
|
||||
|
||||
/* Main loop */
|
||||
while(!abort) {
|
||||
/* Fill captureBuffer from your custom device */
|
||||
|
||||
/* Stream your capture data to the client lib */
|
||||
if(ts3client_processCustomCaptureData("customWaveDeviceId", captureBuffer, captureBufferSize) != ERROR_ok) {
|
||||
printf("Failed to process capture data\n");
|
||||
}
|
||||
|
||||
/* Get playback data from the client lib */
|
||||
error = ts3client_acquireCustomPlaybackData("customWaveDeviceId", playbackBuffer, playbackBufferSize);
|
||||
if(error == ERROR_ok) {
|
||||
/* Playback data available, send playbackBuffer to your custom device */
|
||||
} else if(error == ERROR_sound_no_data) {
|
||||
/* Not an error. The client lib has no playback data available. Depending on your custom sound API, either
|
||||
pause playback for performance optimisation or send a buffer of zeros. */
|
||||
} else {
|
||||
printf("Failed to get playback data\n"); /* Error occured */
|
||||
}
|
||||
}
|
||||
|
||||
/* Unregister the custom device. This automatically close the device. */
|
||||
if(ts3client_unregisterCustomDevice("customaveDeviceId") != ERROR_ok) {
|
||||
printf("Failed to unregister custom device\n");
|
||||
}</pre><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>Further sample code on how to use a custom device can be found in the “<span class="quote">client_customdevice</span>” example included in the SDK.</p></td></tr></table></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s13s04.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><a accesskey="u" href="ar01s13.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s13s06.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Closing devices<65></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>Activating the capture device</td></tr></table></div></body></html>
|
||||
1
docs/client_html/ar01s13s06.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Activating the capture device</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="ar01s13.html" title="Using playback and capture modes and devices"><link rel="prev" href="ar01s13s05.html" title="Using custom devices"><link rel="next" href="ar01s14.html" title="Sound codecs"></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">Activating the capture device</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s13s05.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center">Using playback and capture modes and devices</th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s14.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="activatedevice"></a>Activating the capture device</h3></div></div></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>Using this function is only required when connecting to multiple servers.</p></td></tr></table></div><p>When connecting to multiple servers with the same client, the capture device can only be active for one server at the same time. As soon as the client connects to a new server, the Client Lib will deactivate the capture device of the previously active server. When a user wants to talk to that previous server again, the client needs to reactivate the capture device.</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_activateCaptureDevice</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434552272"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the capture device should be activated.</p></li></ul></div><p>Returns <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><p>If the capture device is already active, this function has no effect.</p><p>Opening a new capture device will automatically activate it, so calling this function is only necessary with multiple server connections and when reactivating a previously deactivated device.</p><p>If the capture device for a given server connection handler has been deactivated by the Client Lib, the flag <em class="structfield"><code>CLIENT_INPUT_HARDWARE</code></em> will be set. This can be queried with the function <a class="link" href="ar01s22.html#getclientselfvarasint"><code class="function">ts3client_getClientSelfVariableAsInt</code></a>.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s13s05.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><a accesskey="u" href="ar01s13.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s14.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Using custom devices<65></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>Sound codecs</td></tr></table></div></body></html>
|
||||
3
docs/client_html/ar01s14.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Sound codecs</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="ar01s13s06.html" title="Activating the capture device"><link rel="next" href="ar01s15.html" title="Encoder options"></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">Sound codecs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s13s06.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="ar01s15.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="codecs"></a>Sound codecs</h2></div></div></div><p>TeamSpeak 3 supports the following sound sampling rates<a class="indexterm" name="idm44835434543488"></a><a class="indexterm" name="idm44835434543072"></a>:</p><div class="itemizedlist"><ul type="disc"><li><p>Speex Narrowband (8 kHz)</p></li><li><p>Speex Wideband (16 kHz)</p></li><li><p>Speex Ultra-Wideband (32 kHz)</p></li><li><p>Celt (Mono, 48kHz)</p></li><li><p>Opus Voice (Mono, 48khz)</p></li><li><p>Opus Music (Stereo, 48khz)</p></li></ul></div><a class="indexterm" name="idm44835434538688"></a><a class="indexterm" name="idm44835434538144"></a><a class="indexterm" name="idm44835434537600"></a><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>Opus Voice is recommended for voice transmission. Speex and Celt codecs may be removed in future versions of this SDK.</p></td></tr></table></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Bandwidth usage generally depends on the used codec and the <a class="link" href="ar01s15.html" title="Encoder options">encoders</a> quality setting.</p><p>Estimated bitrates (bps) for codecs per quality:</p><div class="informaltable"><table cellspacing="0" cellpadding="8" border="1"><colgroup><col><col><col><col><col><col><col></colgroup><thead><tr><th align="center">Quality</th><th align="center">Narrowband</th><th align="center">Wideband</th><th align="center">Ultra-Wideband</th><th align="center">Celt</th><th align="center">Opus Voice</th><th align="center">Opus Music</th></tr></thead><tbody><tr><td align="center">0</td><td align="center">2,150</td><td align="center">3,950</td><td align="center">4,150</td><td align="center">32,000</td><td align="center">4,096</td><td align="center">7,200</td></tr><tr><td align="center">1</td><td align="center">3,950</td><td align="center">5,750</td><td align="center">7,550</td><td align="center">32,000</td><td align="center">8,192</td><td align="center">14,400</td></tr><tr><td align="center">2</td><td align="center">5,950</td><td align="center">7,750</td><td align="center">9,550</td><td align="center">40,000</td><td align="center">12,288</td><td align="center">21,600</td></tr><tr><td align="center">3</td><td align="center">8,000</td><td align="center">9,800</td><td align="center">11,600</td><td align="center">40,000</td><td align="center">16,384</td><td align="center">28,800</td></tr><tr><td align="center">4</td><td align="center">8,000</td><td align="center">12,800</td><td align="center">14,600</td><td align="center">40,000</td><td align="center">20,480</td><td align="center">36,000</td></tr><tr><td align="center">5</td><td align="center">11,000</td><td align="center">16,800</td><td align="center">18,600</td><td align="center">48,000</td><td align="center">24,576</td><td align="center">43,200</td></tr><tr><td align="center">6</td><td align="center">11,000</td><td align="center">20,600</td><td align="center">22,400</td><td align="center">48,000</td><td align="center">28,672</td><td align="center">50,400</td></tr><tr><td align="center">7</td><td align="center">15,000</td><td align="center">23,800</td><td align="center">25,600</td><td align="center">48,000</td><td align="center">32,768</td><td align="center">57,600</td></tr><tr><td align="center">8</td><td align="center">15,000</td><td align="center">27,800</td><td align="center">29,600</td><td align="center">48,000</td><td align="center">36,864</td><td align="center">64,800</td></tr><tr><td align="center">9</td><td align="center">18,200</td><td align="center">34,400</td><td align="center">36,200</td><td align="center">64,000</td><td align="center">40,960</td><td align="center">72,000</td></tr><tr><td align="center">10</td><td align="center">24,600</td><td align="center">42,400</td><td align="center">44,200</td><td align="center">96,000</td><td align="center">45,056</td><td align="center">79,200</td></tr></tbody></table></div><a class="indexterm" name="idm44835434472128"></a><p>Change the quality to find a good middle between voice quality and bandwidth usage. Overall the Opus codec delivers the best quality per used bandwidth.</p><p>Users need to use the same codec when talking to each others. The smallest unit of participants using the same codec is a channel. Different channels on the same TeamSpeak 3 server can use different codecs. The channel codec should be customizable by the users to allow for flexibility concerning bandwidth vs. quality concerns.</p><p>The codec can be set or changed for a given channel using the function <a class="link" href="ar01s22s02.html#setchannelvarasint"><code class="function">ts3client_setChannelVariableAsInt</code></a> by passing <em class="structfield"><code>CHANNEL_CODEC</code></em> for the properties flag:</p><pre class="programlisting">ts3client_setChannelVariableAsInt(scHandlerID, channelID, CHANNEL_CODEC, codec);</pre><p>Available values for <em class="structfield"><code>CHANNEL_CODEC</code></em> are:
|
||||
</p><div class="itemizedlist"><ul type="disc"><li><p>0 - Speex Narrowband)</p></li><li><p>1 - Speex Wideband</p></li><li><p>2 - Speex Ultra-Wideband</p></li><li><p>3 - Celt</p></li><li><p>4 - Opus Voice</p></li><li><p>5 - Opus Music</p></li></ul></div><p>For details on using the function <code class="function">ts3client_setChannelVariableAsInt</code> see the appropriate section on <a class="link" href="ar01s22s02.html" title="Channel information">changing channel data</a>.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s13s06.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="ar01s15.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Activating the capture device<63></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>Encoder options</td></tr></table></div></body></html>
|
||||
13
docs/client_html/ar01s15.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Encoder options</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="ar01s14.html" title="Sound codecs"><link rel="next" href="ar01s16.html" title="Preprocessor options"></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">Encoder options</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s14.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="ar01s16.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="encoder"></a>Encoder options</h2></div></div></div><p>Speech quality and bandwidth usage depend on the used Speex encoder. As Speex is a lossy code, the quality value controls the balance between voice quality and network traffic. Valid quality values range from 0 to 10, default is 7. The encoding quality can be configured for each channel using the <em class="structfield"><code>CHANNEL_CODEC_QUALITY</code></em> property. The currently used channel codec, codec quality and estimated average used bitrate (without overhead) can be queried with <code class="function">ts3client_getEncodeConfigValue</code>.</p><a class="indexterm" name="idm44835434459712"></a><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>Encoder options are tied to a capture device, so querying the values only makes sense after a device has been opened.</p></td></tr></table></div><p>All strings passed from the Client Lib are encoded in UTF-8 format.</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_getEncodeConfigValue</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">ident</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">ident</var></code>;<br><code>char** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434454544"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>Server connection handler ID</p></li><li><p><em class="parameter"><code>ident</code></em></p><p>String containing the queried encoder option. Available values are “<span class="quote">name</span>”, “<span class="quote">quality</span>” and “<span class="quote">bitrate</span>”.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the result string. Unless an error occured, the result string must be released using <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. If an error has occured, the result string is uninitialized and must not be released.</p><p>To adjust the channel codec quality to a value of 5, you would call:
|
||||
</p><pre class="programlisting">ts3client_setChannelVariableAsInt(scHandlerID, channelID, CHANNEL_CODEC_QUALITY, 5);</pre><p>See the chapter about <a class="link" href="ar01s22s02.html" title="Channel information">channel information</a> for details about how to set channel variables.</p><p>To query information about the current channel quality, do:
|
||||
</p><pre class="programlisting">char *name, *quality, *bitrate;
|
||||
ts3client_getEncodeConfigValue(scHandlerID, "name", &name);
|
||||
ts3client_getEncodeConfigValue(scHandlerID, "quality", &quality);
|
||||
ts3client_getEncodeConfigValue(scHandlerID, "bitrate", &bitrate);
|
||||
|
||||
printf("Name = %s, quality = %s, bitrate = %s\n", name, quality, bitrate);
|
||||
|
||||
ts3client_freeMemory(name);
|
||||
ts3client_freeMemory(quality);
|
||||
ts3client_freeMemory(bitrate);</pre><p>
|
||||
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s14.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="ar01s16.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Sound codecs<63></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>Preprocessor options</td></tr></table></div></body></html>
|
||||
9
docs/client_html/ar01s16.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Preprocessor options</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="ar01s15.html" title="Encoder options"><link rel="next" href="ar01s17.html" title="Playback options"></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">Preprocessor options</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s15.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="ar01s17.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="preproc"></a>Preprocessor options</h2></div></div></div><p>Sound input is preprocessed by the Client Lib before the data is encoded and sent to the TeamSpeak 3 server. The preprocessor<a class="indexterm" name="idm44835434440096"></a> is responsible for noise suppression, automatic gain control (AGC)<a class="indexterm" name="idm44835434439504"></a><a class="indexterm" name="idm44835434439120"></a> and voice activity detection (VAD)<a class="indexterm" name="idm44835434438608"></a><a class="indexterm" name="idm44835434438224"></a>.</p><p>The preprocessor can be controlled by setting various preprocessor flags. These flags are unique to each server connection.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>Preprocessor flags are tied to a capture device, so changing the values only makes sense after a device has been opened.</p></td></tr></table></div><p>Preprocessor flags can be queried using
|
||||
</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_getPreProcessorConfigValue</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">ident</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">ident</var></code>;<br><code>char** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434432752"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>The server connection handler ID.</p></li><li><p><em class="parameter"><code>ident</code></em></p><p>The proprocessor flag to be queried. The following keys are available:</p><div class="itemizedlist"><ul type="circle"><li><p>“<span class="quote">name</span>”</p><p>Type of the used preprocessor. Currently this returns a constant string “<span class="quote">Speex preprocessor</span>”.</p></li><li><p>“<span class="quote">denoise</span>”</p><p>Check if noise suppression is enabled. Returns “<span class="quote">true</span>” or “<span class="quote">false</span>”.</p></li><li><p>“<span class="quote">vad</span>”</p><p>Check if Voice Activity Detection is enabled. Returns “<span class="quote">true</span>” or “<span class="quote">false</span>”.</p></li><li><p>“<span class="quote">voiceactivation_level</span>”</p><p>Checks the Voice Activity Detection level in decibel. Returns a string with a numeric value, convert this to an integer.</p></li><li><p>“<span class="quote">vad_extrabuffersize</span>”</p><p>Checks Voice Activity Detection extrabuffer size. Returns a string with a numeric value.</p></li><li><p>“<span class="quote">agc</span>”</p><p>Check if Automatic Gain Control is enabled. Returns “<span class="quote">true</span>” or “<span class="quote">false</span>”.</p></li><li><p>“<span class="quote">agc_level</span>”</p><p>Checks AGC level. Returns a string with a numeric value.</p></li><li><p>“<span class="quote">agc_max_gain</span>”</p><p>Checks AGC max gain. Returns a string with a numeric value.</p></li><li><p>“<span class="quote">echo_canceling</span>”</p><p>Checks if echo canceling is enabled. Returns a string with a boolean value.</p></li></ul></div></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the result as a string encoded in UTF-8 format. If no error occured the returned string must be released using <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. If an error has occured, the result string is uninitialized and must not be released.</p><div class="literallayout"><p><br>
|
||||
</p></div><p>To configure the proprocessor use
|
||||
</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_setPreProcessorConfigValue</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">ident</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">value</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">ident</var></code>;<br><code>const char* <var class="pdparam">value</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434407216"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>The server connection handler ID.</p></li><li><p><em class="parameter"><code>ident</code></em></p><p>The preprocessor flag to be configure. The following keys can be changed:</p><div class="itemizedlist"><ul type="circle"><li><p>“<span class="quote">denoise</span>”</p><p>Enable or disable noise suppression. Value can be “<span class="quote">true</span>” or “<span class="quote">false</span>”. Enabled by default.</p></li><li><p>“<span class="quote">vad</span>”</p><p>Enable or disable Voice Activity Detection. Value can be “<span class="quote">true</span>” or “<span class="quote">false</span>”. Enabled by default.</p></li><li><p>“<span class="quote">voiceactivation_level</span>”</p><p>Voice Activity Detection level in decibel. Numeric value converted to string. A high voice activation level means you have to speak louder into the microphone in order to start transmitting.</p><p>Reasonable values range from -50 to 50. Default is 0.</p><p>To adjust the VAD level in your client, you can call <code class="function">ts3client_getPreProcessorInfoValueFloat</code> with the identifier “<span class="quote">decibel_last_period</span>” over a period of time to query the current voice input level.</p></li><li><p>“<span class="quote">vad_extrabuffersize</span>”</p><p>Voice Activity Detection extrabuffer size. Numeric value converted to string. Should be “<span class="quote">0</span>” to “<span class="quote">8</span>”, defaults to “<span class="quote">2</span>”. Lower value means faster transmission, higher value means better VAD quality but higher latency.</p></li><li><p>“<span class="quote">agc</span>”</p><p>Enable or disable Automatic Gain Control. Value can be “<span class="quote">true</span>” or “<span class="quote">false</span>”. Enabled by default.</p></li><li><p>“<span class="quote">agc_level</span>”</p><p>AGC level. Numeric value converted to string. Default is “<span class="quote">16000</span>”.</p></li><li><p>“<span class="quote">agc_max_gain</span>”</p><p>AGC max gain. Numeric value converted to string. Default is “<span class="quote">30</span>”.</p></li><li><p>“<span class="quote">echo_canceling</span>”</p><p>Enable echo canceling. Boolean value converted to string. Default is “<span class="quote">false</span>”.</p></li></ul></div></li><li><p><em class="parameter"><code>value</code></em></p><p>String value to be set for the given preprocessor identifier. In case of on/off switches, use “<span class="quote">true</span>” or “<span class="quote">false</span>”.</p></li></ul></div><p>Returns <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="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>It is not necessary to change all those values. The default values are reasonable. “<span class="quote">voiceactivation_level</span>” is often the only value that needs to be adjusted.</p></td></tr></table></div><div class="literallayout"><p><br>
|
||||
</p></div><p>The following function retrieves preprocessor information as a floating-point variable instead of a string:
|
||||
</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_getPreProcessorInfoValueFloat</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">ident</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">ident</var></code>;<br><code>float* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434377440"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>The server connection handler ID.</p></li><li><p><em class="parameter"><code>ident</code></em></p><p>The proprocessor flag to be queried. Currently the only valid identifier for this function is “<span class="quote">decibel_last_period</span>”, which can be used to adjust the VAD level as described above.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the result value as a float.</p></li></ul></div><p>Returns <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><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s15.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="ar01s17.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Encoder options<6E></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>Playback options</td></tr></table></div></body></html>
|
||||
32
docs/client_html/ar01s17.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Playback options</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="ar01s16.html" title="Preprocessor options"><link rel="next" href="ar01s18.html" title="Accessing the voice buffer"></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">Playback options</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s16.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="ar01s18.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="playbackoptions"></a>Playback options</h2></div></div></div><p>Sound output can be configured using playback options. Currently the output value can be adjusted.</p><p>Playback options can be queried:
|
||||
</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_getPlaybackConfigValueAsFloat</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">ident</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">ident</var></code>;<br><code>float* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434363760"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler for which the playback option is queried.</p></li><li><p><em class="parameter"><code>ident</code></em></p><p>Identifier of the parameter to be configured. Possible values are:
|
||||
</p><div class="itemizedlist"><ul type="circle"><li><p>“<span class="quote">volume_modifier</span>”</p><p>Modify the voice volume of other speakers. Value is in decibel, so 0 is no modification, negative values make the signal quieter and values greater than zero boost the signal louder than it is. Be careful with high positive values, as you can really cause bad audio quality due to clipping. The maximum possible Value is 30.</p><p>Zero and all negative values cannot cause clipping and distortion, and are preferred for optimal audio quality. Values greater than zero and less than +6 dB might cause moderate clipping and distortion, but should still be within acceptable bounds. Values greater than +6 dB will cause clipping and distortion that will negatively affect your audio quality. It is advised to choose lower values. Generally we recommend to not allow values higher than 15 db.</p><a class="indexterm" name="idm44835434356912"></a></li><li><p>“<span class="quote">volume_factor_wave</span>”</p><p>Adjust the volume of wave files played by <a class="link" href="ar01s19.html" title="Playing wave files"><code class="function">ts3client_playWaveFile</code></a> and <a class="link" href="ar01s19.html" title="Playing wave files"><code class="function">ts3client_playWaveFileHandle</code></a>. The value is a float defining the volume reduction in decibel. Reasonable values range from “<span class="quote">-40.0</span>” (very silent) to “<span class="quote">0.0</span>” (loudest).</p><a class="indexterm" name="idm44835434352288"></a></li></ul></div></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the playback configuration value as floating-point number.</p></li></ul></div><p>Returns <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>To change playback options, call:
|
||||
</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_setPlaybackConfigValue</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">ident</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">value</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">ident</var></code>;<br><code>const char* <var class="pdparam">value</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434343648"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler for which the playback option is queried.</p></li><li><p><em class="parameter"><code>ident</code></em></p><p>Identifier of the parameter to be configured. The values are the same as in <code class="function">ts3client_getPlaybackConfigValueAsFloat</code> above.</p></li><li><p><em class="parameter"><code>value</code></em></p><p>String with the value to set the option to, encoded in UTF-8 format.</p></li></ul></div><p>Returns <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="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>Playback options are tied to a playback device, so changing the values only makes sense after a device has been opened.</p></td></tr></table></div><p>Example code:</p><pre class="programlisting">unsigned int error;
|
||||
float value;
|
||||
|
||||
if((error = ts3client_setPlaybackConfigValue(scHandlerID, "volume_modifier", "5.5")) != ERROR_ok) {
|
||||
printf("Error setting playback config value: %d\n", error);
|
||||
return;
|
||||
}
|
||||
|
||||
if((error = ts3client_getPlaybackConfigValueAsFloat(scHandlerID, "volume_modifier", &value)) != ERROR_ok) {
|
||||
printf("Error getting playback config value: %d\n", error);
|
||||
return;
|
||||
}
|
||||
|
||||
printf("Volume modifier playback option: %f\n", value);</pre><div class="literallayout"><p><br>
|
||||
</p></div><a name="setclientvolumemodifier"></a><p>In addition to changing the global voice volume modifier of all speakers by changing the “<span class="quote">volume_modifier</span>” parameter, voice volume of individual clients can be adjusted 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_setClientVolumeModifier</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">value</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">clientID</var></code>;<br><code>float <var class="pdparam">value</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434327888"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the client volume modifier should be adjusted.</p></li><li><p><em class="parameter"><code>clientID</code></em></p><p>ID of the client whose volume modifier should be adjusted.</p></li><li><p><em class="parameter"><code>value</code></em></p><p>The new client volume modifier value as float.</p></li></ul></div><p>Returns <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><p>When calculating the volume for individual clients, both the global and client volume modifiers will be taken into account.</p><p>Client volume modifiers are valid as long as the specified client is visible. Once the client leaves visibility by joining an unsubscribed channel or disconnecting from the server, the client volume modifier will be lost. When the client enters visibility again, the modifier has to be set again by calling this function.</p><p>Example:</p><pre class="programlisting">
|
||||
unsigned int error;
|
||||
anyID clientID = 123;
|
||||
float value = 10.0f;
|
||||
|
||||
if((error = ts3client_setClientVolumeModifier(scHandlerID, clientID, value)) != ERROR_ok) {
|
||||
printf("Error setting client volume modifier: %d\n", error);
|
||||
return;
|
||||
}
|
||||
</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s16.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="ar01s18.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Preprocessor options<6E></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>Accessing the voice buffer</td></tr></table></div></body></html>
|
||||
19
docs/client_html/ar01s18.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Accessing the voice buffer</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="ar01s17.html" title="Playback options"><link rel="next" href="ar01s19.html" title="Playing wave files"></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">Accessing the voice buffer</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s17.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="ar01s19.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="voice_buffer"></a>Accessing the voice buffer</h2></div></div></div><p>The TeamSpeak Client Lib allows users to access the raw playback and capture voice data and even modify it, for example to add effects to the voice. These callbacks are also used by the TeamSpeak client for the voice recording feature.</p><p>Using these low-level callbacks is not required and should be reserved for specific needs. Most SDK applications won't need to implement these callbacks.</p><div class="literallayout"><p><br>
|
||||
</p></div><p>The following event is called when a voice packet from a client (not own client) is decoded and about to be played over your sound device, but before it is 3D positioned and mixed with other sounds. You can use this function to alter the voice data (for example when you want to do effects on it) or to simply get voice data. The TeamSpeak client uses this function to record sessions.</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onEditPlaybackVoiceDataEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">samples</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">sampleCount</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channels</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">clientID</var></code>;<br><code>short* <var class="pdparam">samples</var></code>;<br><code>int <var class="pdparam">sampleCount</var></code>;<br><code>int <var class="pdparam">channels</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434309392"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler from which the voice data was sent.</p></li><li><p><em class="parameter"><code>clientID</code></em></p><p>ID of the client whose voice data is received.</p></li><li><p><em class="parameter"><code>samples</code></em></p><p>Pointer to the voice data (signed 16 bit @ 48KHz).</p></li><li><p><em class="parameter"><code>sampleCount</code></em></p><p>Number of samples the "samples" variable points to.</p></li><li><p><em class="parameter"><code>channels</code></em></p><p>Number of channels in the sound data.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>The following event is called when a voice packet from a client (not own client) is decoded and 3D positioned and about to be played over your sound device, but before it is mixed with other sounds. You can use this function to alter/get the voice data after 3D positioning.</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onEditPostProcessVoiceDataEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">samples</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">sampleCount</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channels</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelSpeakerArray</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelFillMask</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">clientID</var></code>;<br><code>short* <var class="pdparam">samples</var></code>;<br><code>int <var class="pdparam">sampleCount</var></code>;<br><code>int <var class="pdparam">channels</var></code>;<br><code>const unsigned int* <var class="pdparam">channelSpeakerArray</var></code>;<br><code>unsigned int* <var class="pdparam">channelFillMask</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434292416"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler from which the voice data was sent.</p></li><li><p><em class="parameter"><code>clientID</code></em></p><p>ID of the client whose voice data is received.</p></li><li><p><em class="parameter"><code>samples</code></em></p><p>Pointer to the voice data (signed 16 bit @ 48KHz).</p></li><li><p><em class="parameter"><code>sampleCount</code></em></p><p>Number of samples the "samples" variable points to.</p></li><li><p><em class="parameter"><code>channels</code></em></p><p>Number of channels in the sound data.</p></li><li><p><em class="parameter"><code>channelSpeakerArray</code></em></p><p>An array with <em class="parameter"><code>channels</code></em> entries, defining the speaker each channels represents. The speaker values can be found in the <span class="structname">SPEAKER_*</span> defines within <code class="filename">public_definitions.h</code>.</p><p>For example for stereo (<em class="parameter"><code>channels</code></em> = 2), the array might look liks this:
|
||||
</p><pre class="programlisting">channelSpeakerArray[0] = SPEAKER_FRONT_LEFT
|
||||
channelSpeakerArray[1] = SPEAKER_FRONT_RIGHT</pre></li><li><p><em class="parameter"><code>channelFillMask</code></em></p><p>A pointer to a bit-mask defining which channels are filled. For efficiency reasons, not all channels need to have actual sound data in it. So before this data is used, use this bit-mask to check if the channel is actually filled. If you decide to add data to a channel that is empty, set the bit for this channel in this mask.</p></li></ul></div><p>For example, this callback reports:</p><div class="literallayout"><p>channels<EFBFBD>=<3D>6<br>
|
||||
channelSpeakerArray[0]<5D>=<3D>SPEAKER_FRONT_CENTER<br>
|
||||
channelSpeakerArray[1]<5D>=<3D>SPEAKER_LOW_FREQUENCY<br>
|
||||
channelSpeakerArray[2]<5D>=<3D>SPEAKER_BACK_LEFT<br>
|
||||
channelSpeakerArray[3]<5D>=<3D>SPEAKER_BACK_RIGHT<br>
|
||||
channelSpeakerArray[4]<5D>=<3D>SPEAKER_SIDE_LEFT<br>
|
||||
channelSpeakerArray[5]<5D>=<3D>SPEAKER_SIDE_RIGHT<48><54>//<2F>Quite<74>unusual<61>setup<br>
|
||||
*channelFillMask<73>=<3D>1</p></div><p>This means "samples" points to 6 channel data, but only the SPEAKER_FRONT_CENTER channel has data, the other channels are undefined (not necessarily 0, but undefined).</p><p>So for the first sample, samples[0] has data and samples[1], samples[2], samples[3], samples[4] and samples[5] are undefined.</p><p>If you want to add SPEAKER_BACK_RIGHT channel data you would do something like:</p><pre class="programlisting">*channelFillMask |= 1<<3; // SPEAKER_BACK_RIGHT is the 4th channel (is index 3) according to *channelSpeakerArray.
|
||||
for(int i=0; i<sampleCount; ++i){
|
||||
samples[3 + (i*channels) ] = getChannelSoundData(SPEAKER_BACK_RIGHT, i);
|
||||
}</pre><div class="literallayout"><p><br>
|
||||
</p></div><p>The following event is called when all sounds that are about to be played back for this server connection are mixed. This is the last chance to alter/get sound.</p><p>You can use this function to alter/get the sound data before playback.</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onEditMixedPlaybackVoiceDataEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">samples</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">sampleCount</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channels</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelSpeakerArray</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelFillMask</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>short* <var class="pdparam">samples</var></code>;<br><code>int <var class="pdparam">sampleCount</var></code>;<br><code>int <var class="pdparam">channels</var></code>;<br><code>const unsigned int* <var class="pdparam">channelSpeakerArray</var></code>;<br><code>unsigned int* <var class="pdparam">channelFillMask</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434265008"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler from which the voice data was sent.</p></li><li><p><em class="parameter"><code>samples</code></em></p><p>Pointer to the voice data (signed 16 bit @ 48KHz).</p></li><li><p><em class="parameter"><code>sampleCount</code></em></p><p>Number of samples the "samples" variable points to.</p></li><li><p><em class="parameter"><code>channels</code></em></p><p>Number of channels in the sound data.</p></li><li><p><em class="parameter"><code>channelSpeakerArray</code></em></p><p>An array with <em class="parameter"><code>channels</code></em> entries, defining the speaker each channels represents. The speaker values can be found in the <span class="structname">SPEAKER_*</span> defines within <code class="filename">public_definitions.h</code>.</p><p>For example for stereo (<em class="parameter"><code>channels</code></em> = 2), the array might look liks this:
|
||||
</p><pre class="programlisting">channelSpeakerArray[0] = SPEAKER_FRONT_LEFT
|
||||
channelSpeakerArray[1] = SPEAKER_FRONT_RIGHT</pre></li><li><p><em class="parameter"><code>channelFillMask</code></em></p><p>A pointer to a bit-mask of which channels are filled. For efficiency reasons, not all channels need to have actual sound data in it. So before this data is used, use this bit-mask to check if the channel is actually filled. If you decide to add data to a channel that is empty, set the bit for this channel in this mask.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>The following event is called after sound is recorded from the sound device and is preprocessed. This event can be used to get/alter recorded sound. Also it can be determined if this sound will be send, or muted. This is used by the TeamSpeak client to record sessions.</p><p>If the sound data will be send, (*edited | 2) is true. If the sound data is changed, set bit 1 (*edited |=1). If the sound should not be send, clear bit 2. (*edited &= ~2)</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onEditCapturedVoiceDataEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">samples</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">sampleCount</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channels</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">edited</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>short* <var class="pdparam">samples</var></code>;<br><code>int <var class="pdparam">sampleCount</var></code>;<br><code>int <var class="pdparam">channels</var></code>;<br><code>int* <var class="pdparam">edited</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434243328"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler from which the voice data was sent.</p></li><li><p><em class="parameter"><code>samples</code></em></p><p>Pointer to the voice data (signed 16 bit @ 48KHz).</p></li><li><p><em class="parameter"><code>sampleCount</code></em></p><p>Number of samples the "samples" variable points to.</p></li><li><p><em class="parameter"><code>channels</code></em></p><p>Number of channels in the sound data.</p></li><li><p><em class="parameter"><code>edited</code></em></p><p>When called, bit 2 indicates if the sound is about to be sent to the server.</p><p>On return, set bit 1 if the sound data was changed.</p></li></ul></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="voicerecording"></a>Voice recording</h3></div></div></div><p>When using the above callbacks to record voice, you should notify the server when recording starts or stops with the following functions:</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_startVoiceRecording</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434229792"></a><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_stopVoiceRecording</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434226736"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which voice recording should be started or stopped.</p></li></ul></div><p>Returns <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></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s17.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="ar01s19.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Playback options<6E></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>Playing wave files</td></tr></table></div></body></html>
|
||||
13
docs/client_html/ar01s19.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Playing wave files</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="ar01s18.html" title="Accessing the voice buffer"><link rel="next" href="ar01s20.html" title="3D Sound"></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">Playing wave files</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s18.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="ar01s20.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="wavefiles"></a>Playing wave files</h2></div></div></div><p>The TeamSpeak Client Lib offers support to play wave files from the local harddisk.</p><p>To play a local wave file, call
|
||||
</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_playWaveFile</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">path</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">path</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434217456"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler defining which playback device is to be used to play the sound file.</p></li><li><p><em class="parameter"><code>path</code></em></p><p>Local filepath of the sound file in WAV format to be played, encoded in UTF-8.</p></li></ul></div><p>Returns <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><p>This is the simple version of playing a sound file. It's a fire-and-forget mechanism, this function will not block.</p><div class="literallayout"><p><br>
|
||||
</p></div><p>The more complex version is to play an optionally looping sound and obtain a handle, which can be used to pause, unpause and stop the loop.
|
||||
</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_playWaveFileHandle</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">path</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">loop</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">waveHandle</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">path</var></code>;<br><code>int <var class="pdparam">loop</var></code>;<br><code>uint64* <var class="pdparam">waveHandle</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434205616"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler defining which playback device is to be used to play the sound file.</p></li><li><p><em class="parameter"><code>path</code></em></p><p>Local filepath of the sound file in WAV format to be played, encoded in UTF-8.</p></li><li><p><em class="parameter"><code>loop</code></em></p><p>If set to 1, the sound will be looping until the handle is paused or closed.</p></li><li><p><em class="parameter"><code>waveHandle</code></em></p><p>Memory address of a variable in which the handle is written. Use this handle to call <code class="function">ts3client_pauseWaveFileHandle</code> and <code class="function">ts3client_closeWaveFileHandle</code>.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. If an error occured, <em class="parameter"><code>waveHandle</code></em> is uninitialized and must not be used.</p><div class="literallayout"><p><br>
|
||||
</p></div><p>Using the handle obtained by <code class="function">ts3client_playWaveFileHandle</code>, sounds can be paused and unpaused 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_pauseWaveFileHandle</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">waveHandle</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">pause</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">waveHandle</var></code>;<br><code>int <var class="pdparam">pause</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434189568"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler defining which playback device is to be used to play the sound file.</p></li><li><p><em class="parameter"><code>waveHandle</code></em></p><p>Wave handle obtained by <code class="function">ts3client_playWaveFileHandle</code>.</p></li><li><p><em class="parameter"><code>pause</code></em></p><p>If set to 1, the sound will be paused. Set to 0 to unpause.</p></li></ul></div><p>Returns <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>Using the handle obtained by <code class="function">ts3client_playWaveFileHandle</code>, sounds can be closed 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_closeWaveFileHandle</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">waveHandle</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">waveHandle</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434177216"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler defining which playback device is to be used to play the sound file.</p></li><li><p><em class="parameter"><code>waveHandle</code></em></p><p>Wave handle obtained by <code class="function">ts3client_playWaveFileHandle</code>.</p></li></ul></div><p>Returns <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></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s18.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="ar01s20.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Accessing the voice buffer<65></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>3D Sound</td></tr></table></div></body></html>
|
||||
16
docs/client_html/ar01s20.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3D Sound</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="ar01s19.html" title="Playing wave files"><link rel="next" href="ar01s21.html" title="Query available servers, channels and clients"></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">3D Sound</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s19.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="ar01s21.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="sound3d"></a>3D Sound</h2></div></div></div><p>TeamSpeak 3 supports 3D sound to assign each speaker a unique position in 3D space. Provided are functions to modify the 3D position, velocity and orientation of own and foreign clients.</p><a class="indexterm" name="idm44835434168688"></a><p>Generally the struct <span class="structname">TS3_VECTOR</span> describes a vector in 3D space:</p><a class="indexterm" name="idm44835434167264"></a><pre class="programlisting">typedef struct {
|
||||
float x; /* X coordinate in 3D space. */
|
||||
float y; /* Y coordinate in 3D space. */
|
||||
float z; /* Z coordinate in 3D space. */
|
||||
} TS3_VECTOR;</pre><p>To set the position, velocity and orientation of the own client in 3D space, call:
|
||||
</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_systemset3DListenerAttributes</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">position</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">forward</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">up</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const TS3_VECTOR* <var class="pdparam">position</var></code>;<br><code>const TS3_VECTOR* <var class="pdparam">forward</var></code>;<br><code>const TS3_VECTOR* <var class="pdparam">up</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434161200"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the 3D sound listener attributes are to be set.</p></li><li><p><em class="parameter"><code>position</code></em></p><p>3D position of the own client.</p><p>If passing NULL, the parameter is ignored and the value not updated.</p></li><li><p><em class="parameter"><code>forward</code></em></p><p>Forward orientation of the listener. The vector must be of unit length and perpendicular to the up vector.</p><p>If passing NULL, the parameter is ignored and the value not updated.</p></li><li><p><em class="parameter"><code>up</code></em></p><p>Upward orientation of the listener. The vector must be of unit length and perpendicular to the forward vector.</p><p>If passing NULL, the parameter is ignored and the value not updated.</p></li></ul></div><p>Returns <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>To adjust 3D sound system settings use:
|
||||
</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_systemset3DSettings</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">distanceFactor</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">rolloffScale</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>float <var class="pdparam">distanceFactor</var></code>;<br><code>float <var class="pdparam">rolloffScale</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434145936"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the 3D sound system settings are to be adjusted.</p></li><li><p><em class="parameter"><code>distanceFactor</code></em></p><p>Relative distance factor. Default is 1.0 = 1 meter</p></li><li><p><em class="parameter"><code>rolloffScale</code></em></p><p>Scaling factor for 3D sound rolloff. Defines how fast sound volume will attenuate. As higher the value, as faster the sound is toned with increasing distance.</p></li></ul></div><p>Returns <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>To adjust a clients position and velocity in 3D space, call:
|
||||
</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_channelset3DAttributes</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">position</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">clientID</var></code>;<br><code>const TS3_VECTOR* <var class="pdparam">position</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434133664"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the 3D sound channel attributes are to be adjusted.</p></li><li><p><em class="parameter"><code>clientID</code></em></p><p>ID of the client to adjust.</p></li><li><p><em class="parameter"><code>position</code></em></p><p>Vector specifying the position of the given client in 3D space.</p></li></ul></div><p>Returns <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>The following event is called to calculate volume attenuation for distance in 3D positioning of clients.</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onCustom3dRolloffCalculationClientEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">distance</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">volume</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">clientID</var></code>;<br><code>float <var class="pdparam">distance</var></code>;<br><code>float* <var class="pdparam">volume</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434120624"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the volume attenuation calculation occured.</p></li><li><p><em class="parameter"><code>clientID</code></em></p><p>ID of the client which is being 3D positioned.</p></li><li><p><em class="parameter"><code>distance</code></em></p><p>The distance between the listener and the client.</p></li><li><p><em class="parameter"><code>volume</code></em></p><p>The volume which the Client Lib calculated. This can be changed in this callback.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>The following event is called to calculate volume attenuation for distance in 3D positioning of a wave file that was opened previously with <a class="link" href="ar01s19.html" title="Playing wave files"><code class="function">ts3client_playWaveFileHandle</code></a>.</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onCustom3dRolloffCalculationWaveEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">waveHandle</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">distance</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">volume</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">waveHandle</var></code>;<br><code>float <var class="pdparam">distance</var></code>;<br><code>float* <var class="pdparam">volume</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434106624"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the volume attenuation calculation occured.</p></li><li><p><em class="parameter"><code>waveHandle</code></em></p><p>Handle for the playing wave file, returned by <code class="function">ts3client_playWaveFileHandle</code>.</p></li><li><p><em class="parameter"><code>distance</code></em></p><p>The distance between the listener and the client.</p></li><li><p><em class="parameter"><code>volume</code></em></p><p>The volume which the Client Lib calculated. This can be changed in this callback.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>This method is used to 3D position a wave file that was opened previously with <a class="link" href="ar01s19.html" title="Playing wave files"><code class="function">ts3client_playWaveFileHandle</code></a>.</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_set3DWaveAttributes</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">waveHandle</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">position</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">waveHandle</var></code>;<br><code>const TS3_VECTOR* <var class="pdparam">position</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835434092960"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the volume attenuation calculation occured.</p></li><li><p><em class="parameter"><code>waveHandle</code></em></p><p>Handle for the playing wave file, returned by <code class="function">ts3client_playWaveFileHandle</code>.</p></li><li><p><em class="parameter"><code>position</code></em></p><p>The 3D position of the sound.</p></li><li><p><em class="parameter"><code>volume</code></em></p><p>The volume which the Client Lib calculated. This can be changed in this callback.</p></li></ul></div><p>Returns <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><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s19.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="ar01s21.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Playing wave files<65></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>Query available servers, channels and clients</td></tr></table></div></body></html>
|
||||
41
docs/client_html/ar01s21.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Query available servers, channels and clients</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="ar01s20.html" title="3D Sound"><link rel="next" href="ar01s22.html" title="Retrieve and store information"></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">Query available servers, channels and clients</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s20.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="ar01s22.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="clientchannellist"></a>Query available servers, channels and clients</h2></div></div></div><p>A client can connect to multiple servers. To list all currently existing server connection handlers, call:
|
||||
</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_getServerConnectionHandlerList</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="idm44835434079472"></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 a NULL-termianted array of all currently existing server connection handler IDs. Unless an error occurs, the array must be released using <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. If an error has occured, the result array is uninitialized and must not be released.</p><div class="literallayout"><p><br>
|
||||
</p></div><p>A list of all channels on the specified virtual server 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_getChannelList</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434070304"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler for which the list of channels is requested.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives a NULL-termianted array of channel IDs. Unless an error occurs, the array must be released using <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. If an error has occured, the result array is uninitialized and must not be released.</p><div class="literallayout"><p><br>
|
||||
</p></div><p>To get a list of all currently visible clients on the specified virtual server:
|
||||
</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_getClientList</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434059520"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler for which the list of clients is requested.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives a NULL-termianted array of client IDs. Unless an error occurs, the array must be released using <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. If an error has occured, the result array is uninitialized and must not be released.</p><div class="literallayout"><p><br>
|
||||
</p></div><p>To get a list of all clients in the specified channel if the channel is currently subscribed:
|
||||
</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_getChannelClientList</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>anyID** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434048016"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler for which the list of clients within the given channel is requested.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>ID of the channel whose client list is requested.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives a NULL-termianted array of client IDs. Unless an error occurs, the array must be released using <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. If an error has occured, the result array is uninitialized and must not be released.</p><div class="literallayout"><p><br>
|
||||
</p></div><p>To query the channel ID the specified client has currently joined:
|
||||
</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_getChannelOfClient</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">clientID</var></code>;<br><code>uint64* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434034848"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler for which the channel ID is requested.</p></li><li><p><em class="parameter"><code>clientID</code></em></p><p>ID of the client whose channel ID is requested.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the ID of the channel the specified client has currently joined.</p></li></ul></div><p>Returns <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>To get the parent channel of a given channel:
|
||||
</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_getParentChannelOfChannel</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>uint64* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835434022672"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler for which the parent channel of the specified channel is requested.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>ID of the channel whose parent channel ID is requested.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the ID of the parent channel of the specified channel.</p><p>If the specified channel has no parent channel, <em class="parameter"><code>result</code></em> will be set to the reserved channel ID 0.</p></li></ul></div><p>Returns <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>Example code to print a list of all channels on a virtual server:</p><pre class="programlisting">uint64* channels;
|
||||
|
||||
if(ts3client_getChannelList(serverID, &channels) == ERROR_ok) {
|
||||
for(int i=0; channels[i] != NULL; i++) {
|
||||
printf("Channel ID: %u\n", channels[i]);
|
||||
}
|
||||
ts3client_freeMemory(channels);
|
||||
}</pre><p>To print all visible clients:</p><pre class="programlisting">anyID* clients;
|
||||
|
||||
if(ts3client_getClientList(scHandlerID, &clients) == ERROR_ok) {
|
||||
for(int i=0; clients[i] != NULL; i++) {
|
||||
printf("Client ID: %u\n", clients[i]);
|
||||
}
|
||||
ts3client_freeMemory(clients);
|
||||
}</pre><p>Example to print all clients who are member of channel with ID 123:</p><pre class="programlisting">uint64 channelID = 123; /* Channel ID in this example */
|
||||
anyID *clients;
|
||||
|
||||
if(ts3client_getChannelClientList(scHandlerID, channelID) == ERROR_ok) {
|
||||
for(int i=0; clients[i] != NULL; i++) {
|
||||
printf("Client ID: %u\n", clients[i]);
|
||||
}
|
||||
ts3client_freeMemory(clients);
|
||||
}</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s20.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="ar01s22.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">3D Sound<6E></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>Retrieve and store information</td></tr></table></div></body></html>
|
||||
143
docs/client_html/ar01s22.html
Normal file
75
docs/client_html/ar01s22s02.html
Normal file
7
docs/client_html/ar01s22s02s02.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Channel sorting</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="ar01s22s02.html" title="Channel information"><link rel="prev" href="ar01s22s02.html" title="Channel information"><link rel="next" href="ar01s22s03.html" title="Server information"></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">Channel sorting</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s22s02.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center">Channel information</th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s22s03.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="channelsorting"></a>Channel sorting</h4></div></div></div><a class="indexterm" name="idm44835433637408"></a><p>The order how channels should be display in the GUI is defined by the channel variable <em class="structfield"><code>CHANNEL_ORDER</code></em>, which can be queried with <a class="link" href="ar01s22s02.html" title="Channel information"><code class="function">ts3client_getChannelVariableAsUInt64</code></a> or changed with <a class="link" href="ar01s22s02.html#setchannelvarasuint64"><code class="function">ts3client_setChannelVariableAsUInt64</code></a>.</p><p>The channel order is the ID of the predecessor channel after which the given channel should be sorted. An order of 0 means the channel is sorted on the top of its hirarchy.</p><div class="literallayout"><p>Channel_1<EFBFBD><EFBFBD>(ID<49>=<3D>1,<2C>order<65>=<3D>0)<br>
|
||||
Channel_2<EFBFBD><EFBFBD>(ID<49>=<3D>2,<2C>order<65>=<3D>1)<br>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Subchannel_1<EFBFBD><EFBFBD>(ID<49>=<3D>4,<2C>order<65>=<3D>0)<br>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Subsubchannel_1<EFBFBD><EFBFBD>(ID<49>=<3D>6,<2C>order<65>=<3D>0)<br>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Subsubchannel_2<EFBFBD><EFBFBD>(ID<49>=<3D>7,<2C>order<65>=<3D>6)<br>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Subchannel_2<EFBFBD><EFBFBD>(ID<49>=<3D>5,<2C>order<65>=<3D>4)<br>
|
||||
Channel_3<EFBFBD><EFBFBD>(ID<49>=<3D>3,<2C>order<65>=<3D>2)</p></div><p>When a new channel is created, the client is responsible to set a proper channel order. With the default value of 0 the channel will be sorted on the top of its hirarchy right after its parent channel.</p><p>When moving a channel to a new parent, the desired channel order can be passed to <a class="link" href="ar01s23s04.html" title="Moving a channel"><code class="function">ts3client_requestChannelMove</code></a>.</p><p>To move the channel to another position within the current hirarchy - the parent channel stays the same -, adjust the <em class="structfield"><code>CHANNEL_ORDER</code></em> variable with <code class="function">ts3client_setChannelVariableAsUInt64</code>.</p><p>After connecting to a TeamSpeak 3 server, the client will be informed of all channels by the <a class="link" href="ar01s09.html#onnewchannelevent"><code class="function">onNewChannelEvent</code></a> callback. The order how channels are propagated to the client by this event is:</p><div class="itemizedlist"><ul type="disc"><li><p>First the complete channel path to the default channel, which is either the servers default channel with the flag <em class="structfield"><code>CHANNEL_FLAG_DEFAULT</code></em> or the users default channel passed to <code class="function">ts3client_startConnection</code>. This ensures the channel joined on login is visible as soon as possible.</p><p>In above example, assuming the default channel is “<span class="quote">Subsubchannel_2</span>”, the channels would be announced in the following order: Channel_2, Subchannel_1, Subsubchannel_2.</p><p>After the default channel path has completely arrived, the connection status (see enum <a class="link" href="ar01s09.html#connectstatus"><span class="structname">ConnectStatus</span></a>, annouced to the client by the callback <code class="function">onConnectStatusChangeEvent</code>) changes to <em class="structfield"><code>STATUS_CONNECTION_ESTABLISHING</code></em>.</p></li><li><p>Next all other channels in the given order, where subchannels are announced right after the parent channel.</p><p>To continue the example, the remaining channels would be announced in the order of: Channel_1, Subsubchannel_1, Subchannel_2, Channel_3 (Channel_2, Subchannel_1, Subsubchannel_2 already were announced in the previous step).</p><p>When all channels have arrived, the connection status switches to <em class="structfield"><code>STATUS_CONNECTION_ESTABLISHED</code></em>.</p></li></ul></div><a class="indexterm" name="idm44835433620320"></a></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s22s02.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><a accesskey="u" href="ar01s22s02.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s22s03.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Channel information<6F></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>Server information</td></tr></table></div></body></html>
|
||||
49
docs/client_html/ar01s22s03.html
Normal file
@@ -0,0 +1,49 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Server information</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="ar01s22.html" title="Retrieve and store information"><link rel="prev" href="ar01s22s02s02.html" title="Channel sorting"><link rel="next" href="ar01s23.html" title="Interacting with the server"></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">Server information</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s22s02s02.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center">Retrieve and store information</th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s23.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="serverinfo"></a>Server information</h3></div></div></div><p>Similar to reading client and channel data, server information can be queried with</p><p>
|
||||
<a name="getservervarasint"></a>
|
||||
</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_getServerVariableAsInt</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">flag</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>VirtualServerProperties <var class="pdparam">flag</var></code>;<br><code>int* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433613520"></a>
|
||||
</p><p>
|
||||
</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_getServerVariableAsUInt64</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">flag</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>VirtualServerProperties <var class="pdparam">flag</var></code>;<br><code>uint64* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433608656"></a>
|
||||
</p><p>
|
||||
<a name="getservervarasstring"></a>
|
||||
</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_getServerVariableAsString</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">flag</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>VirtualServerProperties <var class="pdparam">flag</var></code>;<br><code>char** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433603264"></a>
|
||||
</p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the virtual server property is queried.</p></li><li><p><em class="parameter"><code>clientID</code></em></p><p>ID of the client whose property is queried.</p></li><li><p><em class="parameter"><code>flag</code></em></p><p>Virtual server propery to query, see below.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable which receives the result value as int, uint64 or string, depending on which function is used. In case of a string, memory must be released using <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>, unless an error occured.</p><p>The returned type <span class="type">uint64</span> is defined as <span class="type">__int64</span> on Windows and <span class="type">uint64_t</span> on Linux and Mac OS X. See the header <code class="filename">public_definitions.h</code>. This function is currently only used for the flag <em class="structfield"><code>VIRTUALSERVER_UPTIME</code></em>.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. For the string version: If an error has occured, the result string is uninitialized and must not be released.</p><p>The parameter <em class="parameter"><code>flag</code></em> specifies the type of queried information. It is defined by the enum <span class="structname">VirtualServerProperties</span><a class="indexterm" name="idm44835433588272"></a>:</p><pre class="programlisting">enum VirtualServerProperties {
|
||||
VIRTUALSERVER_UNIQUE_IDENTIFIER = 0, //available when connected, can be used to identify this particular
|
||||
//server installation
|
||||
VIRTUALSERVER_NAME, //available and always up-to-date when connected
|
||||
VIRTUALSERVER_WELCOMEMESSAGE, //available when connected, not updated while connected
|
||||
VIRTUALSERVER_PLATFORM, //available when connected
|
||||
VIRTUALSERVER_VERSION, //available when connected
|
||||
VIRTUALSERVER_MAXCLIENTS, //only available on request (=> requestServerVariables), stores the
|
||||
//maximum number of clients that may currently join the server
|
||||
VIRTUALSERVER_PASSWORD, //not available to clients, the server password
|
||||
VIRTUALSERVER_CLIENTS_ONLINE, //only available on request (=> requestServerVariables),
|
||||
VIRTUALSERVER_CHANNELS_ONLINE, //only available on request (=> requestServerVariables),
|
||||
VIRTUALSERVER_CREATED, //available when connected, stores the time when the server was created
|
||||
VIRTUALSERVER_UPTIME, //only available on request (=> requestServerVariables), the time
|
||||
//since the server was started
|
||||
VIRTUALSERVER_CODEC_ENCRYPTION_MODE, //available and always up-to-date when connected
|
||||
VIRTUALSERVER_ENCRYPTION_CIPHERS, //SDK only: list of ciphers that can be used for encryption
|
||||
VIRTUALSERVER_ENDMARKER,
|
||||
};</pre><div class="itemizedlist"><ul type="disc"><li><p><em class="structfield"><code>VIRTUALSERVER_UNIQUE_IDENTIFIER</code></em></p><p>Unique ID for this virtual server. Stays the same after restarting the server application. Always available when connected.</p></li><li><p><em class="structfield"><code>VIRTUALSERVER_NAME</code></em></p><p>Name of this virtual server. Always available when connected.</p></li><li><p><em class="structfield"><code>VIRTUALSERVER_WELCOMEMESSAGE</code></em></p><p>Optional welcome message sent to the client on login. This value should be queried by the client after connection has been established, it is <span class="emphasis"><em>not</em></span> updated afterwards.</p></li><li><p><em class="structfield"><code>VIRTUALSERVER_PLATFORM</code></em></p><p>Operating system used by this server. Always available when connected.</p></li><li><p><em class="structfield"><code>VIRTUALSERVER_VERSION</code></em></p><p>Application version of this server. Always available when connected.</p></li><li><p><em class="structfield"><code>VIRTUALSERVER_MAXCLIENTS</code></em></p><p>Defines maximum number of clients which may connect to this server. Needs to be requested using <code class="function">ts3client_requestServerVariables</code>.</p></li><li><p><em class="structfield"><code>VIRTUALSERVER_PASSWORD</code></em></p><p>Optional password of this server. Not available to clients.</p></li><li><p><em class="structfield"><code>VIRTUALSERVER_CLIENTS_ONLINE</code></em></p><p><em class="structfield"><code>VIRTUALSERVER_CHANNELS_ONLINE</code></em></p><p>Number of clients and channels currently on this virtual server. Needs to be requested using <code class="function">ts3client_requestServerVariables</code>.</p></li><li><p><em class="structfield"><code>VIRTUALSERVER_CREATED</code></em></p><p>Time when this virtual server was created. Always available when connected.</p></li><li><p><em class="structfield"><code>VIRTUALSERVER_UPTIME</code></em></p><p>Uptime of this virtual server. Needs to be requested using <code class="function">ts3client_requestServerVariables</code>.</p></li><li><p><em class="structfield"><code>VIRTUALSERVER_CODEC_ENCRYPTION_MODE</code></em></p><p>Defines if voice data encryption is configured per channel, globally forced on or globally forced off for this virtual server. The default behaviour is configure per channel, in this case modifying the channel property <em class="structfield"><code>CHANNEL_CODEC_IS_UNENCRYPTED</code></em> defines voice data encryption of individual channels.</p><p>Virtual server encryption mode can be set to the following parameters:
|
||||
</p><pre class="programlisting">enum CodecEncryptionMode {
|
||||
CODEC_ENCRYPTION_PER_CHANNEL = 0,
|
||||
CODEC_ENCRYPTION_FORCED_OFF,
|
||||
CODEC_ENCRYPTION_FORCED_ON,
|
||||
};</pre><p>
|
||||
</p><p>This property is always available when connected.</p><a class="indexterm" name="idm44835433565280"></a></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Example code checking the number of clients online, obviously an integer value:
|
||||
</p><pre class="programlisting">int clientsOnline;
|
||||
|
||||
if(ts3client_getServerVariableAsInt(scHandlerID, VIRTUALSERVER_CLIENTS_ONLINE, &clientsOnline) == ERROR_ok)
|
||||
printf("There are %d clients online\n", clientsOnline);</pre><div class="literallayout"><p><br>
|
||||
</p></div><p>A client can request refreshing the server information 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_requestServerVariables</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433559920"></a></p><p>The following event informs the client when the requested information is available:
|
||||
</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">onServerUpdatedEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433556528"></a></p><div class="literallayout"><p><br>
|
||||
</p></div><p>The following event notifies the client when virtual server information has been edited:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onServerEditedEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">editerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">editerName</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">editerUniqueIdentifier</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">editerID</var></code>;<br><code>const char* <var class="pdparam">editerName</var></code>;<br><code>const char* <var class="pdparam">editerUniqueIdentifier</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433550640"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler which virtual server information has been changed.</p></li><li><p><em class="parameter"><code>editerID</code></em></p><p>ID of the client who edited the information. If zero, the server is the editor.</p></li><li><p><em class="parameter"><code>editerName</code></em></p><p>Name of the client who edited the information.</p></li><li><p><em class="parameter"><code>editerUniqueIdentifier</code></em></p><p>Unique ID of the client who edited the information.</p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s22s02s02.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><a accesskey="u" href="ar01s22.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s23.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Channel sorting<6E></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>Interacting with the server</td></tr></table></div></body></html>
|
||||
27
docs/client_html/ar01s23.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Interacting with the server</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="ar01s22s03.html" title="Server information"><link rel="next" href="ar01s23s02.html" title="Creating a new channel"></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">Interacting with the server</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s22s03.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="ar01s23s02.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="interact"></a>Interacting with the server</h2></div></div></div><p>Interacting with the server means various actions, related to both channels and clients. Channels can be joined, created, edited, deleted and subscribed. Clients can use text chat with other clients, be kicked or poked and move between channels.</p><p>All strings passed to and from the Client Lib need to be encoded in UTF-8 format.</p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="joinchannel"></a>Joining a channel</h3></div></div></div><p>When a client logs on to a TeamSpeak 3 server, he will automatically join the channel with the “<span class="quote">Default</span>” flag, unless he specified another channel in <a class="link" href="ar01s09.html" title="Connecting to a server"><code class="function">ts3client_startConnection</code></a>. To have your own or another client switch to a certain channel, call
|
||||
</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_requestClientMove</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">newChannelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">password</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">clientID</var></code>;<br><code>uint64 <var class="pdparam">newChannelID</var></code>;<br><code>const char* <var class="pdparam">password</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433532944"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler ID on which this action is requested.</p></li><li><p><em class="parameter"><code>clientID</code></em></p><p>ID of the client to move.</p></li><li><p><em class="parameter"><code>newChannelID</code></em></p><p>ID of the channel the client wants to join.</p></li><li><p><em class="parameter"><code>password</code></em></p><p>An optional password, required for password-protected channels. Pass an empty string if no password is given.</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>. Pass NULL if you do not need this feature.</p></li></ul></div><p>Returns <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>If the move was successful, one the following events will be called:
|
||||
<a name="onclientmove"></a>
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onClientMoveEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">oldChannelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">newChannelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">visibility</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">moveMessage</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">clientID</var></code>;<br><code>uint64 <var class="pdparam">oldChannelID</var></code>;<br><code>uint64 <var class="pdparam">newChannelID</var></code>;<br><code>int <var class="pdparam">visibility</var></code>;<br><code>const char* <var class="pdparam">moveMessage</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433515184"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the action occured.</p></li><li><p><em class="parameter"><code>clientID</code></em></p><p>ID of the moved client.</p></li><li><p><em class="parameter"><code>oldChannelID</code></em></p><p>ID of the old channel left by the client.</p></li><li><p><em class="parameter"><code>newChannelID</code></em></p><p>ID of the new channel joined by the client.</p></li><li><p><em class="parameter"><code>visibility</code></em></p><p>Defined in the enum <span class="structname">Visibility</span><a class="indexterm" name="idm44835433505856"></a>
|
||||
<a name="visibility"></a>
|
||||
</p><pre class="programlisting">enum Visibility {
|
||||
ENTER_VISIBILITY = 0,
|
||||
RETAIN_VISIBILITY,
|
||||
LEAVE_VISIBILITY
|
||||
};</pre><p>
|
||||
</p><div class="itemizedlist"><ul type="circle"><li><p><em class="structfield"><code>ENTER_VISIBILITY</code></em></p><p>Client moved and entered visibility. Cannot happen on own client.</p></li><li><p><em class="structfield"><code>RETAIN_VISIBILITY</code></em></p><p>Client moved between two known places. Can happen on own or other client.</p></li><li><p><em class="structfield"><code>LEAVE_VISIBILITY</code></em></p><p>Client moved out of our sight. Cannot happen on own client.</p></li></ul></div></li><li><p><em class="parameter"><code>moveMessage</code></em></p><p>When a client disconnects from the server, this includes the optional message set by the disconnecting client in <a class="link" href="ar01s10.html" title="Disconnecting from a server"><code class="function">ts3client_stopConnection</code></a>.</p></li></ul></div><p>Example: Requesting to move the own client into channel ID 12 (not password-protected):</p><pre class="programlisting">ts3client_requestClientMove(scHandlerID, ts3client_getClientID(scHandlerID), 12, "", NULL);</pre><p>Now wait for the callback:</p><pre class="programlisting">
|
||||
void my_onClientMoveEvent(uint64 scHandlerID, anyID clientID,
|
||||
uint64 oldChannelID, uint64 newChannelID,
|
||||
int visibility, const char* moveMessage) {
|
||||
// scHandlerID -> Server connection handler ID, same as above when requesting
|
||||
// clientID -> Own client ID, same as above when requesting
|
||||
// oldChannelID -> ID of the channel the client has left
|
||||
// newChannelID -> 12, as requested above
|
||||
// visibility -> One of ENTER_VISIBILITY, RETAIN_VISIBILITY, LEAVE_VISIBILITY
|
||||
// moveMessage -> Optional message set by disconnecting clients
|
||||
}</pre><div class="literallayout"><p><br>
|
||||
</p></div><p>If the move was initiated by another client, instead of <code class="function">onClientMove</code> the following event is called:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onClientMoveMovedEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">oldChannelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">newChannelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">visibility</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">moverID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">moverName</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">moverUniqueIdentifier</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">moveMessage</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">clientID</var></code>;<br><code>uint64 <var class="pdparam">oldChannelID</var></code>;<br><code>uint64 <var class="pdparam">newChannelID</var></code>;<br><code>int <var class="pdparam">visibility</var></code>;<br><code>anyID <var class="pdparam">moverID</var></code>;<br><code>const char* <var class="pdparam">moverName</var></code>;<br><code>const char* <var class="pdparam">moverUniqueIdentifier</var></code>;<br><code>const char* <var class="pdparam">moveMessage</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433485072"></a></p><p>Like <code class="function">onClientMoveEvent</code> but with additional information about the client, which has initiated the move: <em class="parameter"><code>moverID</code></em> defines the ID, <em class="parameter"><code>moverName</code></em> the nickname and <em class="parameter"><code>moverUniqueIdentifier</code></em> the unique ID of the client who initiated the move. <em class="parameter"><code>moveMessage</code></em> contains a string giving the reason for the move.</p><p>If <em class="parameter"><code>oldChannelID</code></em> is <span class="returnvalue">0</span>, the client has just connected to the server. If <em class="parameter"><code>newChannelID</code></em> is <span class="returnvalue">0</span>, the client disconnected. Both values cannot be <span class="returnvalue">0</span> at the same time.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s22s03.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="ar01s23s02.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Server information<6F></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>Creating a new channel</td></tr></table></div></body></html>
|
||||
36
docs/client_html/ar01s23s02.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Creating a new channel</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="ar01s23.html" title="Interacting with the server"><link rel="prev" href="ar01s23.html" title="Interacting with the server"><link rel="next" href="ar01s23s03.html" title="Deleting a channel"></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">Creating a new channel</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s23.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center">Interacting with the server</th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s23s03.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="createchannel"></a>Creating a new channel</h3></div></div></div><p>To create a channel, set the various channel variables using <a class="link" href="ar01s22s02.html#setchannelvarasint"><code class="function">ts3client_setChannelVariableAsInt</code></a> and <a class="link" href="ar01s22s02.html#setchannelvarasstring"><code class="function">ts3client_setChannelVariableAsString</code></a>. Pass zero as the channel ID parameter.</p><p>Then flush the changes to the server by calling:
|
||||
</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_flushChannelCreation</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelParentID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelParentID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433470832"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler to which the channel changes should be flushed.</p></li><li><p><em class="parameter"><code>channelParentID</code></em></p><p>ID of the parent channel, if the new channel is to be created as subchannel. Pass zero if the channel should be created as top-level channel.</p></li></ul></div><p>Returns <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>After flushing the changes to the server, the following event will be called on successful channel creation:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onNewChannelCreatedEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelParentID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">invokerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">invokerName</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">invokerUniqueIdentifier</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>uint64 <var class="pdparam">channelParentID</var></code>;<br><code>anyID <var class="pdparam">invokerID</var></code>;<br><code>const char* <var class="pdparam">invokerName</var></code>;<br><code>const char* <var class="pdparam">invokerUniqueIdentifier</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433458080"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler where the channel was created.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>ID of the created channel. Channel IDs start with the value 1.</p></li><li><p><em class="parameter"><code>channelParentID</code></em></p><p>ID of the parent channel.</p></li><li><p><em class="parameter"><code>invokerID</code></em></p><p>ID of the client who requested the creation. If zero, the request was initiated by the server.</p></li><li><p><em class="parameter"><code>invokerName</code></em></p><p>Name of the client who requested the creation. If requested by the server, the name is empty.</p></li><li><p><em class="parameter"><code>invokerUniqueIdentifier</code></em></p><p>Unique ID of the client who requested the creation.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Example code to create a channel:</p><pre class="programlisting">#define CHECK_ERROR(x) if((error = x) != ERROR_ok) { goto on_error; }
|
||||
|
||||
int createChannel(uint64 scHandlerID, uint64 parentChannelID, const char* name, const char* topic,
|
||||
const char* description, const char* password, int codec, int codecQuality,
|
||||
int maxClients, int familyMaxClients, int order, int perm,
|
||||
int semiperm, int default) {
|
||||
unsigned int error;
|
||||
|
||||
/* Set channel data, pass 0 as channel ID */
|
||||
CHECK_ERROR(ts3client_setChannelVariableAsString(scHandlerID, 0, CHANNEL_NAME, name));
|
||||
CHECK_ERROR(ts3client_setChannelVariableAsString(scHandlerID, 0, CHANNEL_TOPIC, topic));
|
||||
CHECK_ERROR(ts3client_setChannelVariableAsString(scHandlerID, 0, CHANNEL_DESCRIPTION, desc));
|
||||
CHECK_ERROR(ts3client_setChannelVariableAsString(scHandlerID, 0, CHANNEL_PASSWORD, password));
|
||||
CHECK_ERROR(ts3client_setChannelVariableAsInt (scHandlerID, 0, CHANNEL_CODEC, codec));
|
||||
CHECK_ERROR(ts3client_setChannelVariableAsInt (scHandlerID, 0, CHANNEL_CODEC_QUALITY, codecQuality));
|
||||
CHECK_ERROR(ts3client_setChannelVariableAsInt (scHandlerID, 0, CHANNEL_MAXCLIENTS, maxClients));
|
||||
CHECK_ERROR(ts3client_setChannelVariableAsInt (scHandlerID, 0, CHANNEL_MAXFAMILYCLIENTS, familyMaxClients));
|
||||
CHECK_ERROR(ts3client_setChannelVariableAsUInt64(scHandlerID, 0, CHANNEL_ORDER, order));
|
||||
CHECK_ERROR(ts3client_setChannelVariableAsInt (scHandlerID, 0, CHANNEL_FLAG_PERMANENT, perm));
|
||||
CHECK_ERROR(ts3client_setChannelVariableAsInt (scHandlerID, 0, CHANNEL_FLAG_SEMI_PERMANENT, semiperm));
|
||||
CHECK_ERROR(ts3client_setChannelVariableAsInt (scHandlerID, 0, CHANNEL_FLAG_DEFAULT, default));
|
||||
|
||||
/* Flush changes to server */
|
||||
CHECK_ERROR(ts3client_flushChannelCreation(scHandlerID, parentChannelID));
|
||||
return 0; /* Success */
|
||||
|
||||
on_error:
|
||||
printf("Error creating channel: %d\n", error);
|
||||
return 1; /* Failure */
|
||||
}</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s23.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><a accesskey="u" href="ar01s23.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s23s03.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Interacting with the server<65></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>Deleting a channel</td></tr></table></div></body></html>
|
||||
6
docs/client_html/ar01s23s03.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Deleting a channel</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="ar01s23.html" title="Interacting with the server"><link rel="prev" href="ar01s23s02.html" title="Creating a new channel"><link rel="next" href="ar01s23s04.html" title="Moving a channel"></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">Deleting a channel</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s23s02.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center">Interacting with the server</th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s23s04.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="deletechannel"></a>Deleting a channel</h3></div></div></div><p>A channel can be removed 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_requestChannelDelete</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">force</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>int <var class="pdparam">force</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433436320"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the channel should be deleted.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>The ID of the channel to be deleted.</p></li><li><p><em class="parameter"><code>force</code></em></p><p>If 1, the channel will be deleted even when it is not empty. Clients within the deleted channel are transfered to the default channel. Any contained subchannels are removed as well.</p><p>If 0, the server will refuse to delete a channel that is not empty.</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>. Pass NULL if you do not need this feature.</p></li></ul></div><p>Returns <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>After the request has been sent to the server, the following event will be called:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onDelChannelEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">invokerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">invokerName</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">invokerUniqueIdentifier</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>anyID <var class="pdparam">invokerID</var></code>;<br><code>const char* <var class="pdparam">invokerName</var></code>;<br><code>const char* <var class="pdparam">invokerUniqueIdentifier</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433419808"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the channel was deleted.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>The ID of the deleted channel.</p></li><li><p><em class="parameter"><code>invokerID</code></em></p><p>The ID of the client who requested the deletion. If zero, the deletion was initiated by the server (for example automatic deletion of empty non-permanent channels).</p></li><li><p><em class="parameter"><code>invokerName</code></em></p><p>The name of the client who requested the deletion. Empty if requested by the server.</p></li><li><p><em class="parameter"><code>invokerUniqueIdentifier</code></em></p><p>The unique ID of the client who requested the deletion.</p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s23s02.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><a accesskey="u" href="ar01s23.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s23s04.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Creating a new channel<65></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>Moving a channel</td></tr></table></div></body></html>
|
||||
6
docs/client_html/ar01s23s04.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Moving a channel</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="ar01s23.html" title="Interacting with the server"><link rel="prev" href="ar01s23s03.html" title="Deleting a channel"><link rel="next" href="ar01s23s05.html" title="Text chat"></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">Moving a channel</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s23s03.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center">Interacting with the server</th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s23s05.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="movechannel"></a>Moving a channel</h3></div></div></div><p>To move a channel to a new parent channel, call
|
||||
</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_requestChannelMove</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">newChannelParentID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">newChannelOrder</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>uint64 <var class="pdparam">newChannelParentID</var></code>;<br><code>uint64 <var class="pdparam">newChannelOrder</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433403904"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the channel should be moved.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>ID of the channel to be moved.</p></li><li><p><em class="parameter"><code>newChannelParentID</code></em></p><p>ID of the parent channel where the moved channel is to be inserted as child. Use <em class="parameter"><code>0</code></em> to insert as top-level channel.</p></li><li><p><em class="parameter"><code>newChannelOrder</code></em></p><p>Channel order defining where the channel should be sorted under the new parent. Pass 0 to sort the channel right after the parent. See the chapter <a class="link" href="ar01s22s02s02.html" title="Channel sorting">Channel sorting</a> for details.</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>. Pass NULL if you do not need this feature.</p></li></ul></div><p>Returns <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>After sending the request, the following event will be called if the move was successful:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onChannelMoveEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">newChannelParentID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">invokerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">invokerName</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">invokerUniqueIdentifier</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>uint64 <var class="pdparam">newChannelParentID</var></code>;<br><code>anyID <var class="pdparam">invokerID</var></code>;<br><code>const char* <var class="pdparam">invokerName</var></code>;<br><code>const char* <var class="pdparam">invokerUniqueIdentifier</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433384336"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the channel was moved.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>The ID of the moved channel.</p></li><li><p><em class="parameter"><code>newChannelParentID</code></em></p><p>ID of the parent channel where the moved channel is inserted as child. <em class="parameter"><code>0</code></em> if inserted as top-level channel.</p></li><li><p><em class="parameter"><code>invokerID</code></em></p><p>The ID of the client who requested the move. If zero, the move was initiated by the server.</p></li><li><p><em class="parameter"><code>invokerName</code></em></p><p>The name of the client who requested the move. Empty if requested by the server.</p></li><li><p><em class="parameter"><code>invokerUniqueIdentifier</code></em></p><p>The unique ID of the client who requested the move.</p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s23s03.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><a accesskey="u" href="ar01s23.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s23s05.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Deleting a channel<65></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>Text chat</td></tr></table></div></body></html>
|
||||
1
docs/client_html/ar01s23s05.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Text chat</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="ar01s23.html" title="Interacting with the server"><link rel="prev" href="ar01s23s04.html" title="Moving a channel"><link rel="next" href="ar01s23s05s01.html" title="Sending"></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">Text chat</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s23s04.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center">Interacting with the server</th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s23s05s01.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="textchat"></a>Text chat</h3></div></div></div><p>In addition to voice chat, TeamSpeak 3 allows clients to communicate with text-chat. Valid targets can be a client, channel or virtual server. Depending on the target, there are three functions to send text messages and one callback to receive them.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s23s04.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><a accesskey="u" href="ar01s23.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s23s05s01.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Moving a channel<65></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>Sending</td></tr></table></div></body></html>
|
||||
15
docs/client_html/ar01s23s05s01.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Sending</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="ar01s23s05.html" title="Text chat"><link rel="prev" href="ar01s23s05.html" title="Text chat"><link rel="next" href="ar01s23s05s02.html" title="Receiving"></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">Sending</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s23s05.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center">Text chat</th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s23s05s02.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sendtextchat"></a>Sending</h4></div></div></div><p>To send a private text message to a client:
|
||||
</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_requestSendPrivateTextMsg</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">message</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">targetClientID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">message</var></code>;<br><code>anyID <var class="pdparam">targetClientID</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433365632"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>Id of the target server connection handler.</p></li><li><p><em class="parameter"><code>message</code></em></p><p>String containing the text message</p></li><li><p><em class="parameter"><code>targetClientID</code></em></p><p>Id of the target client.</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>. Pass NULL if you do not need this feature.</p></li></ul></div><p>Returns <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>To send a text message to a channel:
|
||||
</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_requestSendChannelTextMsg</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">message</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">targetChannelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">message</var></code>;<br><code>anyID <var class="pdparam">targetChannelID</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433350496"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>Id of the target server connection handler.</p></li><li><p><em class="parameter"><code>message</code></em></p><p>String containing the text message</p></li><li><p><em class="parameter"><code>targetChannelID</code></em></p><p>Id of the target channel.</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>. Pass NULL if you do not need this feature.</p></li></ul></div><p>Returns <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>To send a text message to the virtual server:
|
||||
</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_requestSendServerTextMsg</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">message</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">message</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433336048"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>Id of the target server connection handler.</p></li><li><p><em class="parameter"><code>message</code></em></p><p>String containing the text message</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>. Pass NULL if you do not need this feature.</p></li></ul></div><p>Returns <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>Example to send a text chat to a client with ID 123:</p><pre class="programlisting">const char *msg = "Hello TeamSpeak!";
|
||||
anyID targetClientID = 123;
|
||||
|
||||
if(ts3client_requestSendPrivateTextMsg(scHandlerID, msg, targetClient, NULL) != ERROR_ok) {
|
||||
/* Handle error */
|
||||
}</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s23s05.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><a accesskey="u" href="ar01s23s05.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s23s05s02.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Text chat<61></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>Receiving</td></tr></table></div></body></html>
|
||||
8
docs/client_html/ar01s23s05s02.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Receiving</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="ar01s23s05.html" title="Text chat"><link rel="prev" href="ar01s23s05s01.html" title="Sending"><link rel="next" href="ar01s23s06.html" title="Kicking clients"></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">Receiving</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s23s05s01.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center">Text chat</th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s23s06.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="rectextchat"></a>Receiving</h4></div></div></div><p>The following event will be called when a text message is received:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onTextMessageEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">targetMode</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">toID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">fromID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">fromName</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">fromUniqueIdentifier</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">message</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">targetMode</var></code>;<br><code>anyID <var class="pdparam">toID</var></code>;<br><code>anyID <var class="pdparam">fromID</var></code>;<br><code>const char* <var class="pdparam">fromName</var></code>;<br><code>const char* <var class="pdparam">fromUniqueIdentifier</var></code>;<br><code>const char* <var class="pdparam">message</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433318448"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler from which the text message was sent.</p></li><li><p><em class="parameter"><code>targetMode</code></em></p><p>Target mode of this text message. The value is defined by the enum <span class="structname">TextMessageTargetMode</span><a class="indexterm" name="idm44835433313968"></a>:</p><pre class="programlisting">enum TextMessageTargetMode {
|
||||
TextMessageTarget_CLIENT=1,
|
||||
TextMessageTarget_CHANNEL,
|
||||
TextMessageTarget_SERVER,
|
||||
TextMessageTarget_MAX
|
||||
};</pre></li><li><p><em class="parameter"><code>toID</code></em></p><p>Id of the target of the text message.</p></li><li><p><em class="parameter"><code>fromID</code></em></p><p>Id of the client who sent the text message.</p></li><li><p><em class="parameter"><code>fromName</code></em></p><p>Name of the client who sent the text message.</p></li><li><p><em class="parameter"><code>fromUniqueIdentifier</code></em></p><p>Unique ID of the client who sent the text message.</p></li><li><p><em class="parameter"><code>message</code></em></p><p>String containing the text message.</p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s23s05s01.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><a accesskey="u" href="ar01s23s05.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s23s06.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Sending<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>Kicking clients</td></tr></table></div></body></html>
|
||||
14
docs/client_html/ar01s23s06.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Kicking clients</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="ar01s23.html" title="Interacting with the server"><link rel="prev" href="ar01s23s05s02.html" title="Receiving"><link rel="next" href="ar01s23s07.html" title="Channel subscriptions"></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">Kicking clients</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s23s05s02.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center">Interacting with the server</th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s23s07.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="kick"></a>Kicking clients</h3></div></div></div><p>Clients can be forcefully removed from a channel or the whole server. To kick a client from a channel or server call:</p><p>
|
||||
</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_requestClientKickFromChannel</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">kickReason</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">clientID</var></code>;<br><code>const char* <var class="pdparam">kickReason</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433297840"></a>
|
||||
</p><p>
|
||||
</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_requestClientKickFromServer</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">kickReason</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">clientID</var></code>;<br><code>const char* <var class="pdparam">kickReason</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433292288"></a>
|
||||
</p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>Id of the target server connection.</p></li><li><p><em class="parameter"><code>clientID</code></em></p><p>The ID of the client to be kicked.</p></li><li><p><em class="parameter"><code>kickReason</code></em></p><p>A short message explaining why the client is kicked from the channel or server.</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>. Pass NULL if you do not need this feature.</p></li></ul></div><p>Returns <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>After successfully requesting a kick, one of the following events will be called:</p><p>
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onClientKickFromChannelEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">oldChannelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">newChannelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">visibility</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">kickerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">kickerName</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">kickerUniqueIdentifier</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">kickMessage</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">clientID</var></code>;<br><code>uint64 <var class="pdparam">oldChannelID</var></code>;<br><code>uint64 <var class="pdparam">newChannelID</var></code>;<br><code>int <var class="pdparam">visibility</var></code>;<br><code>anyID <var class="pdparam">kickerID</var></code>;<br><code>const char* <var class="pdparam">kickerName</var></code>;<br><code>const char* <var class="pdparam">kickerUniqueIdentifier</var></code>;<br><code>const char* <var class="pdparam">kickMessage</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433273040"></a>
|
||||
</p><p>
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onClientKickFromServerEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">oldChannelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">newChannelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">visibility</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">kickerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">kickerName</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">kickerUniqueIdentifier</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">kickMessage</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">clientID</var></code>;<br><code>uint64 <var class="pdparam">oldChannelID</var></code>;<br><code>uint64 <var class="pdparam">newChannelID</var></code>;<br><code>int <var class="pdparam">visibility</var></code>;<br><code>anyID <var class="pdparam">kickerID</var></code>;<br><code>const char* <var class="pdparam">kickerName</var></code>;<br><code>const char* <var class="pdparam">kickerUniqueIdentifier</var></code>;<br><code>const char* <var class="pdparam">kickMessage</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433263968"></a>
|
||||
</p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the client was kicked</p></li><li><p><em class="parameter"><code>clientID</code></em></p><p>ID of the kicked client.</p></li><li><p><em class="parameter"><code>oldChannelID</code></em></p><p>ID of the channel from which the client has been kicked.</p></li><li><p><em class="parameter"><code>newChannelID</code></em></p><p>ID of the channel where the kicked client was moved to.</p></li><li><p><em class="parameter"><code>visibility</code></em></p><p>Describes if the moved client enters, retains or leaves visibility. See explanation of the enum <a class="link" href="ar01s23.html#visibility"><span class="structname">Visibility</span></a><a class="indexterm" name="idm44835433253984"></a> for the function <code class="function">onClientMoveEvent</code>.</p><p>When kicked from a server, visibility can be only <em class="structfield"><code>LEAVE_VISIBILITY</code></em>.</p></li><li><p><em class="parameter"><code>kickerID</code></em></p><p>ID of the client who requested the kick.</p></li><li><p><em class="parameter"><code>kickerName</code></em></p><p>Name of the client who requested the kick.</p></li><li><p><em class="parameter"><code>kickerUniqueIdentifier</code></em></p><p>Unique ID of the client who requested the kick.</p></li><li><p><em class="parameter"><code>kickerMessage</code></em></p><p>Message giving the reason why the client has been kicked.</p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s23s05s02.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><a accesskey="u" href="ar01s23.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s23s07.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Receiving<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>Channel subscriptions</td></tr></table></div></body></html>
|
||||
28
docs/client_html/ar01s23s07.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Channel subscriptions</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="ar01s23.html" title="Interacting with the server"><link rel="prev" href="ar01s23s06.html" title="Kicking clients"><link rel="next" href="ar01s24.html" title="Muting clients locally"></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">Channel subscriptions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s23s06.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><th width="60%" align="center">Interacting with the server</th><td width="20%" align="right"><EFBFBD><a accesskey="n" href="ar01s24.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="subscribe"></a>Channel subscriptions</h3></div></div></div><p>Normally a user only sees other clients who are in the same channel. Clients joining or leaving other channels or changing status are not displayed. To offer a way to get notifications about clients in other channels, a user can subscribe to other channels. It would also be possible to always subscribe to all channels to get notifications about all clients on the server.</p><p>Subscriptions are meant to have a flexible way to balance bandwidth usage. On a crowded server limiting the number of subscribed channels is a way to reduce network traffic. Also subscriptions allow to usage “<span class="quote">private</span>” channels, whose members cannot be seen by other users.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>A client is automatically subscribed to the current channel.</p></td></tr></table></div><p>To subscribe to a list of channels (zero-terminated array of channel IDs) call:
|
||||
</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_requestChannelSubscribe</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelIDArray</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const uint64* <var class="pdparam">channelIDArray</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433237488"></a></p><p>To unsubscribe from a list of channels (zero-terminated array of channel IDs) call:
|
||||
</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_requestChannelUnsubscribe</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelIDArray</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const uint64* <var class="pdparam">channelIDArray</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433232672"></a></p><p>To subscribe to all channels on the server call:
|
||||
</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_requestChannelSubscribeAll</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433228592"></a></p><p>To unsubscribe from all channels on the server call:
|
||||
</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_requestChannelUnsubscribeAll</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433224512"></a></p><p>To check if a channel is currently subscribed, check the channel property <em class="structfield"><code>CHANNEL_FLAG_ARE_SUBSCRIBED</code></em> with <a class="link" href="ar01s22s02.html" title="Channel information"><code class="function">ts3client_getChannelVariableAsInt</code></a>:</p><pre class="programlisting">int isSubscribed;
|
||||
|
||||
if(ts3client_getChannelVariableAsInt(scHandlerID, channelID, CHANNEL_FLAG_ARE_SUBSCRIBED, &isSubscribed)
|
||||
!= ERROR_ok) {
|
||||
/* Handle error */
|
||||
}</pre><p>The following event will be sent for each successfully subscribed channel:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onChannelSubscribeEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433218016"></a></p><p>Provided for convinience, to mark the end of mulitple calls to <code class="function">onChannelSubscribeEvent</code> when subscribing to several channels, this event is called:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onChannelSubscribeFinishedEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433214144"></a></p><p>The following event will be sent for each successfully unsubscribed channel:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onChannelUnsubscribeEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433210032"></a></p><p>Similar like subscribing, this event is a convinience callback to mark the end of multiple calls to <code class="function">onChannelUnsubscribeEvent</code>:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onChannelUnsubscribeFinishedEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433206176"></a></p><p>Once a channel has been subscribed or unsubscribed, the event <code class="function">onClientMoveSubscriptionEvent</code> is sent for each client in the subscribed channel. The event is not to be confused with <code class="function">onClientMoveEvent</code>, which is called for clients actively switching channels.</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onClientMoveSubscriptionEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">oldChannelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">newChannelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">visibility</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">clientID</var></code>;<br><code>uint64 <var class="pdparam">oldChannelID</var></code>;<br><code>uint64 <var class="pdparam">newChannelID</var></code>;<br><code>int <var class="pdparam">visibility</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835433198800"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>The server connection handler ID for the server where the action occured.</p></li><li><p><em class="parameter"><code>clientID</code></em></p><p>The client ID.</p></li><li><p><em class="parameter"><code>oldChannelID</code></em></p><p>ID of the subscribed channel where the client left visibility.</p></li><li><p><em class="parameter"><code>newChannelID</code></em></p><p>ID of the subscribed channel where the client entered visibility.</p></li><li><p><em class="parameter"><code>visibility</code></em></p><p>Defined in the enum <span class="structname">Visibility</span><a class="indexterm" name="idm44835433189408"></a>
|
||||
</p><pre class="programlisting">enum Visibility {
|
||||
ENTER_VISIBILITY = 0,
|
||||
RETAIN_VISIBILITY,
|
||||
LEAVE_VISIBILITY
|
||||
};</pre><p>
|
||||
</p><div class="itemizedlist"><ul type="circle"><li><p><em class="structfield"><code>ENTER_VISIBILITY</code></em></p><p>Client entered visibility.</p></li><li><p><em class="structfield"><code>LEAVE_VISIBILITY</code></em></p><p>Client left visibility.</p></li><li><p><em class="structfield"><code>RETAIN_VISIBILITY</code></em></p><p>Does not occur with onClientMoveSubscriptionEvent.</p></li></ul></div></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s23s06.html"><img src="images/prev.png" alt="Prev"></a><EFBFBD></td><td width="20%" align="center"><a accesskey="u" href="ar01s23.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"><EFBFBD><a accesskey="n" href="ar01s24.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Kicking clients<74></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>Muting clients locally</td></tr></table></div></body></html>
|
||||
13
docs/client_html/ar01s24.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Muting clients locally</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="ar01s23s07.html" title="Channel subscriptions"><link rel="next" href="ar01s25.html" title="Custom encryption"></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">Muting clients locally</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s23s07.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="ar01s25.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="muteclients"></a>Muting clients locally</h2></div></div></div><p>Individual clients can be locally muted. This information is handled client-side only and not visibile to other clients. It mainly serves as a sort of individual "ban" or "ignore" feature, where users can decide not to listen to certain clients anymore.</p><p>When a client becomes muted, he will no longer be heard by the muter. Also the TeamSpeak 3 server will stop sending voice packets.</p><p>The mute state is not visible to the muted client nor to other clients. It is only available to the muting client by checking the <em class="structfield"><code>CLIENT_IS_MUTED</code></em> client property.</p><p>To mute one or more clients:
|
||||
</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_requestMuteClients</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientIDArray</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const anyID* <var class="pdparam">clientIDArray</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433176080"></a></p><p>To unmute one or more clients:
|
||||
</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_requestUnmuteClients</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientIDArray</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const anyID* <var class="pdparam">clientIDArray</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433171312"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handle on which the client should be locally (un)muted</p></li><li><p><em class="parameter"><code>clientIDArray</code></em></p><p>NULL-terminated array of client IDs.</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>. Pass NULL if you do not need this feature.</p></li></ul></div><p>Returns <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><p>Example to mute two clients:</p><pre class="programlisting">anyID clientIDArray[3]; // List of two clients plus terminating zero
|
||||
clientIDArray[0] = 123; // First client ID to mute
|
||||
clientIDArray[1] = 456; // Second client ID to mute
|
||||
clientIDArray[2] = 0; // Terminating zero
|
||||
|
||||
if(ts3client_requestMuteClients(scHandlerID, clientIDArray) != ERROR_ok) /* Mute clients */
|
||||
printf("Error muting clients: %d\n", error);</pre><p>To check if a client is currently muted, query the <em class="structfield"><code>CLIENT_IS_MUTED</code></em> client property:</p><pre class="programlisting">int clientIsMuted;
|
||||
if(ts3client_getClientVariableAsInt(scHandlerID, clientID, CLIENT_IS_MUTED, &clientIsMuted) != ERROR_ok)
|
||||
printf("Error querying client muted state\n);</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s23s07.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="ar01s25.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Channel subscriptions<6E></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>Custom encryption</td></tr></table></div></body></html>
|
||||
24
docs/client_html/ar01s25.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Custom encryption</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="ar01s24.html" title="Muting clients locally"><link rel="next" href="ar01s26.html" title="Custom passwords"></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">Custom encryption</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s24.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="ar01s26.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="encrypt"></a>Custom encryption</h2></div></div></div><p>As an optional feature, the TeamSpeak 3 SDK allows users to implement custom encryption and decryption for all network traffic. Custom encryption replaces the default AES encryption implemented by the TeamSpeak 3 SDK. A possible reason to apply own encryption might be to make ones TeamSpeak 3 client/server incompatible to other SDK implementations.</p><p>Custom encryption must be implemented the same way in both the client and server.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>If you do not want to use this feature, just don't implement the two encryption callbacks.</p></td></tr></table></div><p>
|
||||
To encrypt outgoing data, implement the callback:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onCustomPacketEncryptEvent</b>(</code></td><td><var class="pdparam">dataToSend</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">sizeOfData</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>char** <var class="pdparam">dataToSend</var></code>;<br><code>unsigned int* <var class="pdparam">sizeOfData</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433154080"></a>
|
||||
</p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>dataToSend</code></em></p><p>Pointer to an array with the outgoing data to be encrypted.</p><p>Apply your custom encryption to the data array. If the encrypted data is smaller than sizeOfData, write your encrypted data into the existing memory of dataToSend. If your encrypted data is larger, you need to allocate memory and redirect the pointer dataToSend. You need to take care of freeing your own allocated memory yourself. The memory allocated by the SDK, to which dataToSend is originally pointing to, must not be freed.</p></li><li><p><em class="parameter"><code>sizeOfData</code></em></p><p>Pointer to an integer value containing the size of the data array.</p></li></ul></div><p>
|
||||
</p><div class="literallayout"><p><br>
|
||||
</p></div><p>
|
||||
To decrypt incoming data, implement the callback:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onCustomPacketDecryptEvent</b>(</code></td><td><var class="pdparam">dataReceived</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">dataReceivedSize</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>char** <var class="pdparam">dataReceived</var></code>;<br><code>unsigned int* <var class="pdparam">dataReceivedSize</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433144960"></a>
|
||||
</p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>dataReceived</code></em></p><p>Pointer to an array with the received data to be decrypted.</p><p>Apply your custom decryption to the data array. If the decrypted data is smaller than dataReceivedSize, write your decrypted data into the existing memory of dataReceived. If your decrypted data is larger, you need to allocate memory and redirect the pointer dataReceived. You need to take care of freeing your own allocated memory yourself. The memory allocated by the SDK, to which dataReceived is originally pointing to, must not be freed.</p></li><li><p><em class="parameter"><code>dataReceivedSize</code></em></p><p>Pointer to an integer value containing the size of the data array.</p></li></ul></div><p>
|
||||
</p><p>Example code implementing a very simple XOR custom encryption and decryption (also see the SDK examples):</p><pre class="programlisting">void onCustomPacketEncryptEvent(char** dataToSend, unsigned int* sizeOfData) {
|
||||
unsigned int i;
|
||||
for(i = 0; i < *sizeOfData; i++) {
|
||||
(*dataToSend)[i] ^= CUSTOM_CRYPT_KEY;
|
||||
}
|
||||
}
|
||||
|
||||
void onCustomPacketDecryptEvent(char** dataReceived, unsigned int* dataReceivedSize) {
|
||||
unsigned int i;
|
||||
for(i = 0; i < *dataReceivedSize; i++) {
|
||||
(*dataReceived)[i] ^= CUSTOM_CRYPT_KEY;
|
||||
}
|
||||
}</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s24.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="ar01s26.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Muting clients locally<6C></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>Custom passwords</td></tr></table></div></body></html>
|
||||
3
docs/client_html/ar01s26.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Custom passwords</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="ar01s25.html" title="Custom encryption"><link rel="next" href="ar01s27.html" title="Other events"></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">Custom passwords</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s25.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="ar01s27.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="password"></a>Custom passwords</h2></div></div></div><p>The TeamSpeak SDK has the optional ability to do custom password handling. This makes it possible to allow people on the server (or channels) with passwords that are checked against outside datasources, like LDAP or other databases.</p><p>
|
||||
To implement custom password, both server and client need to add custom callbacks, which will be spontaneously called whenever a password check is done in TeamSpeak. The SDK developer can implement own checks to validate the password instead of using the TeamSpeak built-in mechanism.</p><div class="literallayout"><p><br>
|
||||
</p></div><p>Both Server and Client Lib can implement the following callback to encrypt a user password. This function is called in the Client Lib when a channel password is set.</p><p>This can be used to hash the password in the same way it is hashed in the outside data store. Or just copy the password to send the clear text to the server.</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onClientPasswordEncrypt</b>(</code></td><td><var class="pdparam">serverID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">plaintext</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">encryptedText</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">encryptedTextByteSize</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverID</var></code>;<br><code>const char* <var class="pdparam">plaintext</var></code>;<br><code>char* <var class="pdparam">encryptedText</var></code>;<br><code>int <var class="pdparam">encryptedTextByteSize</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><a class="indexterm" name="idm44835433129584"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverID</code></em></p><p>ID of the server the password call occured</p></li><li><p><em class="parameter"><code>plaintext</code></em></p><p>The plaintext password</p></li><li><p><em class="parameter"><code>encryptedText</code></em></p><p>Fill with your custom encrypted password. Must be a 0-terminated string with a size not larger than <em class="parameter"><code>encryptedTextByteSize</code></em>.</p></li><li><p><em class="parameter"><code>encryptedTextByteSize</code></em></p><p>Size of the buffer pointed to by <em class="parameter"><code>encryptedText</code></em>.</p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s25.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="ar01s27.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Custom encryption<6F></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>Other events</td></tr></table></div></body></html>
|
||||
19
docs/client_html/ar01s27.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Other events</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="ar01s26.html" title="Custom passwords"><link rel="next" href="ar01s28.html" title="Miscellaneous functions"></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">Other events</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s26.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="ar01s28.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="otherevents"></a>Other events</h2></div></div></div><p>When a client starts or stops talking, a talk status change event is sent by the server:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onTalkStatusChangeEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">status</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">isReceivedWhisper</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>int <var class="pdparam">status</var></code>;<br><code>int <var class="pdparam">isReceivedWhisper</var></code>;<br><code>anyID <var class="pdparam">clientID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433114912"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the event occured.</p></li><li><p><em class="parameter"><code>status</code></em></p><p>Possible return values are defined by the enum <span class="structname">TalkStatus</span>:</p><pre class="programlisting">enum TalkStatus {
|
||||
STATUS_NOT_TALKING = 0,
|
||||
STATUS_TALKING = 1,
|
||||
STATUS_TALKING_WHILE_DISABLED = 2,
|
||||
};</pre><p><em class="structfield"><code>STATUS_TALKING</code></em> and <em class="structfield"><code>STATUS_NOT_TALKING</code></em> are triggered everytime a client starts or stops talking. <em class="structfield"><code>STATUS_TALKING_WHILE_DISABLED</code></em> is triggered only if the microphone is muted. A client application might use this to implement a mechanism warning the user he is talking while not sending to the server or just ignore this value.</p></li><li><p><em class="parameter"><code>isReceivedWhisper</code></em></p><p>1 if the talk event was caused by whispering, 0 if caused by normal talking.</p></li><li><p><em class="parameter"><code>clientID</code></em></p><p>ID of the client who started or stopped talking.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>If a client drops his connection, a timeout event is announced by the server:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onClientMoveTimeoutEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">clientID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">oldChannelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">newChannelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">visibility</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">timeoutMessage</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">clientID</var></code>;<br><code>uint64 <var class="pdparam">oldChannelID</var></code>;<br><code>uint64 <var class="pdparam">newChannelID</var></code>;<br><code>int <var class="pdparam">visibility</var></code>;<br><code>const char* <var class="pdparam">timeoutMessage</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433097808"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the event occured.</p></li><li><p><em class="parameter"><code>clientID</code></em></p><p>ID of the moved client.</p></li><li><p><em class="parameter"><code>oldChannelID</code></em></p><p>ID of the channel the leaving client was previously member of.</p></li><li><p><em class="parameter"><code>newChannelID</code></em></p><p><span class="returnvalue">0</span>, as client is leaving.</p></li><li><p><em class="parameter"><code>visibility</code></em></p><p>Always <em class="structfield"><code>LEAVE_VISIBILITY</code></em>.</p></li><li><p><em class="parameter"><code>timeoutMessage</code></em></p><p>Optional message giving the reason for the timeout. UTF-8 encoded.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>When the description of a channel was edited, the following event is called:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onChannelDescriptionUpdateEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433082400"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the event occured.</p></li><li><p><em class="parameter"><code>shutdownMessage</code></em></p><p>ID of the channel with the edited description.</p></li></ul></div><p>The new description can be queried with <a class="link" href="ar01s22s02.html" title="Channel information"><code class="function">ts3client_getChannelVariableAsString(channelID, CHANNEL_DESCRIPTION)</code></a>.</p><div class="literallayout"><p><br>
|
||||
</p></div><p>The following event tells the client that the specified channel has been modified. The GUI should fetch the channel data with <a class="link" href="ar01s22s02.html" title="Channel information"><code class="function">ts3client_getChannelVariableAsInt</code></a> and <a class="link" href="ar01s22s02.html" title="Channel information"><code class="function">ts3client_getChannelVariableAsString</code></a> and update the channel display.
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onUpdateChannelEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433071104"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the event occured.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>ID of the updated channel.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>The following event is called when a channel password was modified. The GUI might remember previously entered channel passwords, so this callback announces the stored password might be invalid.
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onChannelPasswordChangedEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433062816"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the event occured.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>ID of the channel with the changed password.</p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s26.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="ar01s28.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Custom passwords<64></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>Miscellaneous functions</td></tr></table></div></body></html>
|
||||
14
docs/client_html/ar01s28.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Miscellaneous functions</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="ar01s27.html" title="Other events"><link rel="next" href="ar01s29.html" title="Filetransfer"></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">Miscellaneous functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s27.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="ar01s29.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="misc"></a>Miscellaneous functions</h2></div></div></div><a name="freememory"></a><p>Memory dynamically allocated in the Client Lib needs to be released 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_freeMemory</b>(</code></td><td><var class="pdparam">pointer</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>void* <var class="pdparam">pointer</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433054256"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>pointer</code></em></p><p>Address of the variable to be released.</p></li></ul></div><p>Example:</p><pre class="programlisting">char* version;
|
||||
|
||||
if(ts3client_getClientLibVersion(&version) == ERROR_ok) {
|
||||
printf("Version: %s\n", version);
|
||||
ts3client_freeMemory(version);
|
||||
}</pre><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left">Important</th></tr><tr><td align="left" valign="top"><p>Memory must not be released if the function, which dynamically allocated the memory, returned an error. In that case, the result is undefined and not initialized, so freeing the memory might crash the application.</p></td></tr></table></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Instead of sending the sound through the network, it can be routed directly through the playback device, so the user will get immediate audible feedback when for example configuring some sound settings.
|
||||
</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_setLocalTestMode</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">status</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>int<var class="pdparam">status</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433045664"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler for which the local test mode should be enabled or disabled.</p></li><li><p><em class="parameter"><code>status</code></em></p><p>Pass 1 to enable local test mode, 0 to disable.</p></li></ul></div><p>Returns <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><a name="emptysecs"></a>With the delayed temporary channel deletion feature, users can define after how many seconds a temporary channel will be deleted after the last client has left the channel. The delay is defined by setting the channel variable <em class="structfield"><code>CHANNEL_DELETE_DELAY</code></em>. This variable can be set and queried as described in <a class="link" href="ar01s22s02.html" title="Channel information">channel information</a>.</p><p>To query the time in seconds since the last client has left a temporary channel, call:
|
||||
</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_getChannelEmptySecs</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>int* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433033072"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the time should be queried.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>ID of the channel to query.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable that receives the time in seconds.</p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s27.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="ar01s29.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Other events<74></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>Filetransfer</td></tr></table></div></body></html>
|
||||
95
docs/client_html/ar01s29.html
Normal file
@@ -0,0 +1,95 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Filetransfer</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="ar01s28.html" title="Miscellaneous functions"><link rel="next" href="ar01s30.html" title="FAQ"></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">Filetransfer</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s28.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="ar01s30.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="filetransfer"></a>Filetransfer</h2></div></div></div><a class="indexterm" name="idm44835433025904"></a><p>The TeamSpeak SDK includes the ability to support filetransfer, like the regular TeamSpeak server and client offer. The Server can function as a file storage, which can be accessed by Clients who can up- and download files. Files are stored on the filesystem where the server is running.</p><p>In general, clients can initiate filetransfer actions like uploading or downloading a file, requesting file information (size, name, path etc.), list files in a directory and so on. The functions to call these actions are explained in detail below. In addition to the functions actively called, there are filetransfer related callbacks which are triggered when the server returned the requested information (e.g. list of files in a directory).</p><p>Each transfer is identified by a <em class="structfield"><code>transferID</code></em>, which is passed to most filetransfer functions. Transfer IDs are unique during the time of the transfer, but may be reused again some time after the previous transfer with the same ID has finished.</p><p>Files are organized on the server inside channels (identified by their <em class="structfield"><code>channelID</code></em>. The top-level directory in each channel is “<span class="quote">/</span>”. Subdirectories in each channel may exist and are defined with a path of the form “<span class="quote">/dir1/dir2</span>”. Subdirectories are optional and need to be created with <code class="function">ts3client_requestCreateDirectory</code>, the channel root directory always exists by default.</p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="ft_funcs_info"></a>Query information</h3></div></div></div><p>The following functions allow to query information about a file transfer identified by its <em class="structfield"><code>transferID</code></em>.</p><p>Query the file name of the specified transfer:
|
||||
</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_getTransferFileName</b>(</code></td><td><var class="pdparam">transferID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">transferID</var></code>;<br><code>char** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433015408"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>transferID</code></em></p><p>ID of the filetransfer we want to query.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Points to a C string containing the file name. Remember to call <code class="function">ts3client_freeMemory</code> to release the string, which is dynamically allocated in the clientlib.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Query the file path of the specified transfer:
|
||||
</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_getTransferFilePath</b>(</code></td><td><var class="pdparam">transferID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">transferID</var></code>;<br><code>char** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835433006752"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>transferID</code></em></p><p>ID of the filetransfer we want to query.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Points to a C string containing the file path. Remember to call <code class="function">ts3client_freeMemory</code> to release the string, which is dynamically allocated in the clientlib.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Query the remote path on the server of the specified transfer:
|
||||
</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_getTransferFileRemotePath</b>(</code></td><td><var class="pdparam">transferID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">transferID</var></code>;<br><code>char** <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432998080"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>transferID</code></em></p><p>ID of the filetransfer we want to query.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Points to a C string containing the remote path on the server. Remember to call <code class="function">ts3client_freeMemory</code> to release the string, which is dynamically allocated in the clientlib.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Query the file size of the specified transfer:
|
||||
</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_getTransferFileSize</b>(</code></td><td><var class="pdparam">transferID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">transferID</var></code>;<br><code>uint64* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432989408"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>transferID</code></em></p><p>ID of the filetransfer we want to query.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>File size of the transfer.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Query the currently transferred file size of the queried transfer:
|
||||
</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_getTransferFileSizeDone</b>(</code></td><td><var class="pdparam">transferID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">transferID</var></code>;<br><code>uint64* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432981280"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>transferID</code></em></p><p>ID of the filetransfer we want to query.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Already transferred size of the transfer.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Query if the specified transfer is an upload or download:
|
||||
</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_isTransferSender</b>(</code></td><td><var class="pdparam">transferID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">transferID</var></code>;<br><code>int* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432973136"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>transferID</code></em></p><p>ID of the filetransfer we want to query.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>1 == upload, 0 == download</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Query the status of the specified transfer:
|
||||
</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_getTransferStatus</b>(</code></td><td><var class="pdparam">transferID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">transferID</var></code>;<br><code>int* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432965024"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>transferID</code></em></p><p>ID of the filetransfer we want to query.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Current status of the file transfer, specified by the struct <em class="structfield"><code>FileTransferState</code></em>:
|
||||
</p><pre class="programlisting">enum FileTransferState {
|
||||
FILETRANSFER_INITIALISING = 0,
|
||||
FILETRANSFER_ACTIVE,
|
||||
FILETRANSFER_FINISHED,
|
||||
};</pre><p>
|
||||
</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Query the current speed of the specified transfer:
|
||||
</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_getCurrentTransferSpeed</b>(</code></td><td><var class="pdparam">transferID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">transferID</var></code>;<br><code>float* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432955952"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>transferID</code></em></p><p>ID of the filetransfer we want to query.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Currently measured speed of the file transfer.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Query the average speed of the specified transfer:
|
||||
</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_getAverageTransferSpeed</b>(</code></td><td><var class="pdparam">transferID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">transferID</var></code>;<br><code>float* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432947824"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>transferID</code></em></p><p>ID of the filetransfer we want to query.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Average speed of the file transfer.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Query the time the specified transfer has used:
|
||||
</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_getTransferRunTime</b>(</code></td><td><var class="pdparam">transferID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">transferID</var></code>;<br><code>uint64* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432939712"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>transferID</code></em></p><p>ID of the filetransfer we want to query.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Time the transfer has used.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="ft_funcs_transfers"></a>Initiate transfers</h3></div></div></div><p>The following functions implement the core functionality of filetransfers. They initiate new up- and downloads, request file info, delete and rename files, create directories, list directories etc.</p><p>Request uploading a local file to the server:
|
||||
</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_sendFile</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelPW</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">file</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">overwrite</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">resume</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">sourceDirectory</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>const char* <var class="pdparam">channelPW</var></code>;<br><code>const char* <var class="pdparam">file</var></code>;<br><code>int <var class="pdparam">overwrite</var></code>;<br><code>int <var class="pdparam">resume</var></code>;<br><code>const char* <var class="pdparam">sourceDirectory</var></code>;<br><code>anyID* <var class="pdparam">result</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432925136"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the virtual server the file transfer operation will be requested.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>Target channel ID in which the file should be uploaded.</p></li><li><p><em class="parameter"><code>channelPW</code></em></p><p>Optional channel password. Pass empty string if unused.</p></li><li><p><em class="parameter"><code>file</code></em></p><p>Filename of the local file, which is to be uploaded.</p></li><li><p><em class="parameter"><code>overwrite</code></em></p><p>1 == overwrite remote file if it exists, 0 = do not overwrite (operation will abort if remote file exists)</p></li><li><p><em class="parameter"><code>resume</code></em></p><p>If we have a previously halted transfer: 1 = resume, 0 = restart transfer</p></li><li><p><em class="parameter"><code>sourceDirectory</code></em></p><p>Local directory where the file to upload is located.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Pointer to memory where the transferID will be stored, if the transfer has been started successfully (when this function returns <em class="structfield"><code>ERROR_ok</code></em>).</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>String containing the return code if it has been set by the Client Lib function call which caused this error event.</p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Request downloading a file from the server:
|
||||
</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_requestFile</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelPW</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">file</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">overwrite</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">resume</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">destinationDirectory</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">result</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>const char* <var class="pdparam">channelPW</var></code>;<br><code>const char* <var class="pdparam">file</var></code>;<br><code>int <var class="pdparam">overwrite</var></code>;<br><code>int <var class="pdparam">resume</var></code>;<br><code>const char* <var class="pdparam">destinationDirectory</var></code>;<br><code>anyID* <var class="pdparam">result</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432898752"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the virtual server the file transfer operation will be requested.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>Remote channel ID from which the file should be downloaded.</p></li><li><p><em class="parameter"><code>channelPW</code></em></p><p>Optional channel password. Pass empty string if unused.</p></li><li><p><em class="parameter"><code>file</code></em></p><p>Filename of the remote file, which is to be downloaded.</p></li><li><p><em class="parameter"><code>overwrite</code></em></p><p>1 == overwrite local file if it exists, 0 = do not overwrite (operation will abort if local file exists)</p></li><li><p><em class="parameter"><code>resume</code></em></p><p>If we have a previously halted transfer: 1 = resume, 0 = restart transfer</p></li><li><p><em class="parameter"><code>destinationDirectory</code></em></p><p>Local target directory name where the download file should be saved.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Pointer to memory where the transferID will be stored, if the transfer has been started successfully (when this function returns <em class="structfield"><code>ERROR_ok</code></em>).</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>String containing the return code if it has been set by the Client Lib function call which caused this error event.</p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Pause a transfer, specified by its <em class="structfield"><code>transferID</code></em>:
|
||||
</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_haltTransfer</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">transferID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">deleteUnfinishedFile</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>anyID <var class="pdparam">transferID</var></code>;<br><code>int <var class="pdparam">deleteUnfinishedFile</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432875456"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the virtual server the file transfer operation will be requested.</p></li><li><p><em class="parameter"><code>transferID</code></em></p><p>ID of the transfer that should be halted.</p></li><li><p><em class="parameter"><code>deleteUnfinishedFile</code></em></p><p>1 = delete the halted file, 0 = do not deleted halted file</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>String containing the return code if it has been set by the Client Lib function call which caused this error event.</p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Query list of files in a directory. The answer from the server will trigger the <code class="function">onFileListEvent</code> and <code class="function">onFileListFinishedEvent</code> callbacks with the requested information.
|
||||
</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_requestFileList</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelPW</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">path</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>const char* <var class="pdparam">channelPW</var></code>;<br><code>const char* <var class="pdparam">path</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432859728"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the virtual server the file transfer operation will be requested.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>Remote channel ID, from which we want to query the file list.</p></li><li><p><em class="parameter"><code>channelPW</code></em></p><p>Optional channel password. Pass empty string if unused.</p></li><li><p><em class="parameter"><code>path</code></em></p><p>Path inside the channel, defining the subdirectory. Top level path is “<span class="quote">/</span>”</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>String containing the return code if it has been set by the Client Lib function call which caused this error event.</p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Query information of a specified file. The answer from the server will trigger the <code class="function">onFileInfoEvent</code> callback with the requested information.
|
||||
</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_requestFileInfo</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelPW</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">file</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>const char* <var class="pdparam">channelPW</var></code>;<br><code>const char* <var class="pdparam">file</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432842512"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the virtual server the file transfer operation will be requested.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>Remote channel ID, from which we want to query the file info.</p></li><li><p><em class="parameter"><code>channelPW</code></em></p><p>Optional channel password. Pass empty string if unused.</p></li><li><p><em class="parameter"><code>file</code></em></p><p>File name we want to request info from, needs to include the full path within the channel, e.g. “<span class="quote">/file</span>” for a top-level file or “<span class="quote">/dir1/dir2/file</span>” for a file located in a subdirectory.</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>String containing the return code if it has been set by the Client Lib function call which caused this error event.</p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Request deleting one or more remote files on the server:
|
||||
</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_requestDeleteFile</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelPW</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">file</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>const char* <var class="pdparam">channelPW</var></code>;<br><code>const char** <var class="pdparam">file</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432825088"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the virtual server the file transfer operation will be requested.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>Remote channel ID, in which we want to delete the files.</p></li><li><p><em class="parameter"><code>channelPW</code></em></p><p>Optional channel password. Pass empty string if unused.</p></li><li><p><em class="parameter"><code>file</code></em></p><p>List of files we request to delete. Array must be NULL-terminated. The file names need to include the full path within the channel, e.g. “<span class="quote">/file</span>” for a top-level file or “<span class="quote">/dir1/dir2/file</span>” for a file located in a subdirectory.</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>String containing the return code if it has been set by the Client Lib function call which caused this error event.</p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Request creating a directory:
|
||||
</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_requestCreateDirectory</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelPW</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">directoryPath</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>const char* <var class="pdparam">channelPW</var></code>;<br><code>const char* <var class="pdparam">directoryPath</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432807648"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the virtual server the file transfer operation will be requested.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>Remote channel ID, in which we want to create the directory.</p></li><li><p><em class="parameter"><code>channelPW</code></em></p><p>Optional channel password. Pass empty string if unused.</p></li><li><p><em class="parameter"><code>file</code></em></p><p>Name of the directory to create. The directory name needs to include the full path within the channel, e.g. “<span class="quote">/file</span>” for a top-level file or “<span class="quote">/dir1/dir2/file</span>” for a file located in a subdirectory.</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>String containing the return code if it has been set by the Client Lib function call which caused this error event.</p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Request renaming or moving a file. If the source and target channels and paths are the same, the file will simply be renamed.
|
||||
</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_requestRenameFile</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">fromChannelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">fromChannelPW</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">toChannelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">toChannelPW</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">oldFile</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">newFile</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">fromChannelID</var></code>;<br><code>const char* <var class="pdparam">fromChannelPW</var></code>;<br><code>uint64 <var class="pdparam">toChannelID</var></code>;<br><code>const char* <var class="pdparam">toChannelPW</var></code>;<br><code>const char* <var class="pdparam">oldFile</var></code>;<br><code>const char* <var class="pdparam">newFile</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432788032"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the virtual server the file transfer operation will be requested.</p></li><li><p><em class="parameter"><code>fromChannelID</code></em></p><p>Source channel ID, in which we want to rename the file.</p></li><li><p><em class="parameter"><code>fromChannelPW</code></em></p><p>Optional source channel password. Pass empty string if unused.</p></li><li><p><em class="parameter"><code>toChannelID</code></em></p><p>Target channel ID, to which we want to move the file. If the file should not be moved to another channel, this parameter should be equal to <em class="parameter"><code>fromChannelID</code></em>.</p></li><li><p><em class="parameter"><code>toChannelPW</code></em></p><p>Optional target channel password. Pass empty string if unused.</p></li><li><p><em class="parameter"><code>oldFile</code></em></p><p>Old name of the file. The file name needs to include the full path within the channel, e.g. “<span class="quote">/file</span>” for a top-level file or “<span class="quote">/dir1/dir2/file</span>” for a file located in a subdirectory.</p></li><li><p><em class="parameter"><code>newFile</code></em></p><p>Target name of the directory to create. The directory name need to include the full path within the channel, e.g. “<span class="quote">/file</span>” for a top-level file or “<span class="quote">/dir1/dir2/file</span>” for a file located in a subdirectory.</p><p>To move files to another subdirectory in the same channel without renaming the file, <em class="parameter"><code>fromChannelID</code></em> has to be equal to <em class="parameter"><code>toChannelID</code></em>, keep the file name itself but just change the path.</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>String containing the return code if it has been set by the Client Lib function call which caused this error event.</p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>.</p></li></ul></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="ft_funcs_limits"></a>Speed limits</h3></div></div></div><p>The TeamSpeak SDK offers the possibility to control and finetune transfer speed limits. These limits can be applied to the complete server, specific virtual servers or for each individual transfer. By default the transfer speed is unlimited. Every file transfer should at least have a minimum speed limit of 5kb/s.</p><p>Neither the TeamSpeak client nor server will store any of those values. When used, they'll have to be set at each client start to be considered permanent. </p><p>To set the upload speed limit for all virtual servers in bytes/s:
|
||||
</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_setInstanceSpeedLimitUp</b>(</code></td><td><var class="pdparam">newLimit</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">newLimit</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432763728"></a></p><p>To set the download speed limit for all virtual servers in bytes/s:
|
||||
</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_setInstanceSpeedLimitDown</b>(</code></td><td><var class="pdparam">newLimit</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">newLimit</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432760352"></a></p><p>To get the upload speed limit for all virtual servers in bytes/s:
|
||||
</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_getInstanceSpeedLimitUp</b>(</code></td><td><var class="pdparam">limit</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64* <var class="pdparam">limit</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432756976"></a></p><p>To get the download speed limit for all virtual servers in bytes/s:
|
||||
</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_getInstanceSpeedLimitDown</b>(</code></td><td><var class="pdparam">limit</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64* <var class="pdparam">limit</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432753600"></a></p><p>To set the upload speed limit for the specified virtual server in bytes/s:
|
||||
</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_setServerConnectionHandlerSpeedLimitUp</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">newLimit</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">newLimit</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432749472"></a></p><p>To set the download speed limit for the specified virtual server in bytes/s:
|
||||
</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_setServerConnectionHandlerSpeedLimitDown</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">newLimit</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">newLimit</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432745328"></a></p><p>To get the upload speed limit for the specified virtual server in bytes/s:
|
||||
</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_getServerConnectionHandlerSpeedLimitUp</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">limit</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64* <var class="pdparam">limit</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432741184"></a></p><p>To get the download speed limit for the specified virtual server in bytes/s:
|
||||
</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_getServerConnectionHandlerSpeedLimitDown</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">limit</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64* <var class="pdparam">limit</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432737040"></a></p><p>To set the up- or download speed limit for the specified file transfer in bytes/s. Use <code class="function">ts3client_isTransferSender</code> to query if the transfer is an up- or download.
|
||||
</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_setTransferSpeedLimit</b>(</code></td><td><var class="pdparam">transferID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">newLimit</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">transferID</var></code>;<br><code>uint64 <var class="pdparam">newLimit</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432732432"></a></p><p>To get the speed limit for the specified file transfer in bytes/s:
|
||||
</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_getTransferSpeedLimit</b>(</code></td><td><var class="pdparam">transferID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">limit</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">transferID</var></code>;<br><code>uint64* <var class="pdparam">limit</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432728352"></a></p><div class="literallayout"><p><br>
|
||||
</p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="ft_callbacks"></a>Callbacks</h3></div></div></div><p>This event is called when a file transfer, triggered by <code class="function">ts3client_sendFile</code> or <code class="function">ts3client_requestFile</code> has finished or aborted with an error.
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onFileTransferStatusEvent</b>(</code></td><td><var class="pdparam">transferID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">status</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">statusMessage</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">remotefileSize</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">serverConnectionHandlerID</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>anyID <var class="pdparam">transferID</var></code>;<br><code>unsigned int <var class="pdparam">status</var></code>;<br><code>const char* <var class="pdparam">statusMessage</var></code>;<br><code>uint64 <var class="pdparam">remotefileSize</var></code>;<br><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432719888"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>transferID</code></em></p><p>ID of the transfer. This ID was returned by the call to <code class="function">ts3client_sendFile</code> or <code class="function">ts3client_requestFile</code> which triggered this event.</p></li><li><p><em class="parameter"><code>status</code></em></p><p>Indicates how and why the transfer has finished:</p><div class="itemizedlist"><ul type="circle"><li><p><em class="parameter"><code>ERROR_file_transfer_complete</code></em></p><p>Transfer completed successfully.</p></li><li><p><em class="parameter"><code>ERROR_file_transfer_canceled</code></em></p><p>Transfer was halted by a call to <code class="function">ts3client_haltTransfer</code>.</p></li><li><p><em class="parameter"><code>ERROR_file_transfer_interrupted</code></em></p><p>An error occured, transfer was stopped for various reasons (network error etc.)</p></li><li><p><em class="parameter"><code>ERROR_file_transfer_reset</code></em></p><p>Transfer was reset. This can happen if the remote file has changed (another user uploaded another file under the same channel ID, path and file name).</p></li></ul></div></li><li><p><em class="parameter"><code>statusMessage</code></em></p><p>Status text message for a verbose display of the <em class="parameter"><code>status</code></em> parameter.</p></li><li><p><em class="parameter"><code>remotefileSize</code></em></p><p>Remote size of the file on the server.</p></li><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the virtual server on which the file list was requested.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Callback containing the reply by the server on ts3client_requestFileList. There event is called for every file in the specified path. After the last file, <code class="function">onFileListFinished</code> will indicate the end of the list.
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onFileListEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">path</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">name</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">size</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">datetime</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">type</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">incompletesize</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>const char* <var class="pdparam">path</var></code>;<br><code>const char* <var class="pdparam">name</var></code>;<br><code>uint64 <var class="pdparam">size</var></code>;<br><code>uint64 <var class="pdparam">datetime</var></code>;<br><code>int <var class="pdparam">type</var></code>;<br><code>uint64 <var class="pdparam">incompletesize</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432693408"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the virtual server on which the file list was requested.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>ID of the channel which file list was requested.</p></li><li><p><em class="parameter"><code>path</code></em></p><p>Subdirectory inside the channel for which the file list was requested. “<span class="quote">/</span>” indicates the root directory is listed.</p></li><li><p><em class="parameter"><code>name</code></em></p><p>File name.</p></li><li><p><em class="parameter"><code>size</code></em></p><p>File size</p></li><li><p><em class="parameter"><code>datetime</code></em></p><p>File date (Unix time in seconds)</p></li><li><p><em class="parameter"><code>type</code></em></p><p>Indicates if this entry is a directory or a file. Type is specified as:</p><pre class="programlisting">enum {
|
||||
FileListType_Directory = 0,
|
||||
FileListType_File,
|
||||
};</pre></li><li><p><em class="parameter"><code>incompletesize</code></em></p><p>If the file is currently still being transferred, this indicates the currently transferred file size.</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>String containing the return code if it has been set by <code class="function">ts3client_requestFileList</code> which triggered this event.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Callback indicating the end of an incoming file list, see <code class="function">onFileList</code>.
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onFileListFinishedEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">path</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>const char* <var class="pdparam">path</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432671184"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the virtual server on which the file list was requested.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>If of the channel which files have been listed.</p></li><li><p><em class="parameter"><code>path</code></em></p><p>Path within the channel which files have been listed.</p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><p>Callback containing the reply by the server for ts3client_requestFileInfo:
|
||||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onFileInfoEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">channelID</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">name</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">size</var>, </td><td><EFBFBD></td></tr><tr><td><EFBFBD></td><td><var class="pdparam">datetime</var><code>)</code>;</td><td><EFBFBD></td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>const char* <var class="pdparam">name</var></code>;<br><code>uint64 <var class="pdparam">size</var></code>;<br><code>uint64 <var class="pdparam">datetime</var></code>;</div><div class="funcprototype-spacer"><EFBFBD></div></div><p>
|
||||
<a class="indexterm" name="idm44835432659248"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the virtual server on which the file info was requested.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>If of the channel in which the file is located.</p></li><li><p><em class="parameter"><code>name</code></em></p><p>File name including the path within the channel in which the file is located.</p></li><li><p><em class="parameter"><code>size</code></em></p><p>File size</p></li><li><p><em class="parameter"><code>datetime</code></em></p><p>File date (Unix time in seconds)</p></li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s28.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="ar01s30.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Miscellaneous functions<6E></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>FAQ</td></tr></table></div></body></html>
|
||||
47
docs/client_html/ar01s30.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>FAQ</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="ar01s29.html" title="Filetransfer"><link rel="next" href="ix01.html" title="Index"></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">FAQ</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s29.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="ix01.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="faq"></a>FAQ</h2></div></div></div><a class="indexterm" name="idm44835432648768"></a><div class="itemizedlist"><ul type="disc"><li><p><a class="link" href="ar01s30.html#faq_1" title="How to implement Push-To-Talk?">How to implement Push-To-Talk?</a></p></li><li><p><a class="link" href="ar01s30.html#faq_2" title="How to adjust the volume?">How to adjust the volume?</a></p></li><li><p><a class="link" href="ar01s30.html#faq_3" title="How to talk across channels?">How to talk across channels?</a></p></li></ul></div><div class="literallayout"><p><br>
|
||||
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="faq_1"></a>How to implement Push-To-Talk?</h3></div></div></div><p>Push-To-Talk should be implemented by toggling the client variable <em class="structfield"><code>CLIENT_INPUT_DEACTIVATED</code></em> using the function <a class="link" href="ar01s22.html#setclientselfvarasint"><code class="function">ts3client_setClientSelfVariableAsInt</code></a>. The variable can be set to the following values (see the enum <span class="structname">InputDeactivationStatus</span> in <code class="filename">public_definitions.h</code>):<a class="indexterm" name="idm44835432640928"></a><a class="indexterm" name="idm44835432640512"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="structfield"><code>INPUT_ACTIVE</code></em></p></li><li><p><em class="structfield"><code>INPUT_DEACTIVATED</code></em></p></li></ul></div><p>For Push-To-Talk toggle between <em class="structfield"><code>INPUT_ACTIVE</code></em> (talking) and <em class="structfield"><code>INPUT_DEACTIVATED</code></em> (not talking).</p><p>Example code:</p><pre class="programlisting">unsigned int error;
|
||||
bool shouldTalk;
|
||||
|
||||
shouldTalk = isPushToTalkButtonPressed(); // Your key detection implementation
|
||||
if((error = ts3client_setClientSelfVariableAsInt(scHandlerID, CLIENT_INPUT_DEACTIVATED,
|
||||
shouldTalk ? INPUT_ACTIVE : INPUT_DEACTIVATED))
|
||||
!= ERROR_ok) {
|
||||
char* errorMsg;
|
||||
if(ts3client_getErrorMessage(error, &errorMsg) != ERROR_ok) {
|
||||
printf("Error toggling push-to-talk: %s\n", errorMsg);
|
||||
ts3client_freeMemory(errorMsg);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(ts3client_flushClientSelfUpdates(scHandlerID, NULL) != ERROR_ok) {
|
||||
char* errorMsg;
|
||||
if(ts3client_getErrorMessage(error, &errorMsg) != ERROR_ok) {
|
||||
printf("Error flushing after toggling push-to-talk: %s\n", errorMsg);
|
||||
ts3client_freeMemory(errorMsg);
|
||||
}
|
||||
}</pre><p>It is not necessary to close and reopen the capture device to implement Push-To-Talk.</p><p>Basically it would be possible to toggle <em class="structfield"><code>CLIENT_INPUT_MUTED</code></em> as well, but the advantage of <em class="structfield"><code>CLIENT_INPUT_DEACTIVATED</code></em> is that the change is not propagated to the server and other connected clients, thus saving network traffic. <em class="structfield"><code>CLIENT_INPUT_MUTED</code></em> should instead be used for manually muting the microphone when using Voice Activity Detection instead of Push-To-Talk.</p><p>If you need to query the current muted state, use <a class="link" href="ar01s22.html#getclientselfvarasint"><code class="function">ts3client_getClientSelfVariableAsInt</code></a>:</p><pre class="programlisting">int hardwareStatus, deactivated, muted;
|
||||
|
||||
if(ts3client_getClientSelfVariableAsInt(scHandlerID, CLIENT_INPUT_HARDWARE,
|
||||
&hardwareStatus) != ERROR_ok) {
|
||||
/* Handle error */
|
||||
}
|
||||
if(ts3client_getClientSelfVariableAsInt(scHandlerID, CLIENT_INPUT_DEACTIVATED,
|
||||
&deactivated) != ERROR_ok) {
|
||||
/* Handle error */
|
||||
}
|
||||
if(ts3client_getClientSelfVariableAsInt(scHandlerID, CLIENT_INPUT_MUTED,
|
||||
&muted) != ERROR_ok) {
|
||||
/* Handle error */
|
||||
}
|
||||
|
||||
if(hardwareStatus == HARDWAREINPUT_DISABLED) {
|
||||
/* No capture device available */
|
||||
}
|
||||
if(deactivated == INPUT_DEACTIVATED) {
|
||||
/* Input was deactivated for Push-To-Talk (not propagated to server) */
|
||||
}
|
||||
if(muted == MUTEINPUT_MUTED) {
|
||||
/* Input was muted (propagated to server) */
|
||||
}</pre><p>When using Push-To-Talk, you should deactivate Voice Activity Detection in the <a class="link" href="ar01s16.html" title="Preprocessor options">preprocessor</a> or keep the VAD level very low. To deactivate VAD, use:</p><pre class="programlisting">ts3client_setPreProcessorConfigValue(serverConnectionHandlerID, "vad", "false");</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="faq_2"></a>How to adjust the volume?</h3></div></div></div><p><span class="emphasis"><em>Output volume</em></span></p><p>The global voice output volume can be adjusted by changing the “<span class="quote">volume_modifier</span>” <a class="link" href="ar01s17.html" title="Playback options">playback option</a> using the function <code class="function">ts3client_setPlaybackConfigValue</code>. The value is in decibel, so 0 is no modification, negative values make the signal quieter and positive values louder.<a class="indexterm" name="idm44835432623536"></a><a class="indexterm" name="idm44835432622816"></a></p><p>Example to increase the output volume by 10 decibel:
|
||||
</p><pre class="programlisting">ts3client_setPlaybackConfigValue(scHandlerID, "volume_modifier", 10);</pre><p>In addition to modifying the global output volue, the volume of individual clients can be changed with <a class="link" href="ar01s17.html#setclientvolumemodifier"><code class="function">ts3client_setClientVolumeModifier</code></a>.</p><p><span class="emphasis"><em>Input volume</em></span></p><p><a class="link" href="ar01s16.html" title="Preprocessor options">Automatic Gain Control</a> (AGC) takes care of the input volume during preprocessing automatically. Instead of modifying the input volume directly, you modify the AGC preprocessor settings with <code class="function">setProProcessorConfigValue</code>.</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="faq_3"></a>How to talk across channels?</h3></div></div></div><p>Generally clients can only talk to other clients in the same channel. However, for specific scenarios this can be overruled using <a class="link" href="ar01s22.html#whisper" title="Whisper lists">whisper lists.</a>. This feature allows specific clients to temporarily talk to other clients or channels outside of their own channel. While whispering, talking to the own channel is disabled.</p><p>An example for a scenario where whisper may be useful would be a team consisting of a number of squads. Each squad is assigned to one channel, so squad members can only talk to other members of the same squad. In addition, there is a team leader and squad leaders, who want to communicate accross the squad channels. This can be implemented with whispering, so the team leader could broadcast to all squad leaders, or a squad leader could briefly report to the team leader temporarily sending his voice data to him instead of the squad leaders channel.</p><p>This mechanism is powerful and flexible allowing the SDK developer to handle more complex scenarios overruling the standard behaviour where clients can only talk to other clients within the same channel.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s29.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="ix01.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Filetransfer<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>Index</td></tr></table></div></body></html>
|
||||
BIN
docs/client_html/images/caution.png
Normal file
|
After Width: | Height: | Size: 887 B |
BIN
docs/client_html/images/home.png
Normal file
|
After Width: | Height: | Size: 879 B |
BIN
docs/client_html/images/important.png
Normal file
|
After Width: | Height: | Size: 887 B |
BIN
docs/client_html/images/logo.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
docs/client_html/images/next.png
Normal file
|
After Width: | Height: | Size: 681 B |
BIN
docs/client_html/images/note.png
Normal file
|
After Width: | Height: | Size: 815 B |
BIN
docs/client_html/images/prev.png
Normal file
|
After Width: | Height: | Size: 649 B |
BIN
docs/client_html/images/up.png
Normal file
|
After Width: | Height: | Size: 612 B |
5
docs/client_html/index.html
Normal file
1
docs/client_html/ix01.html
Normal file
50
docs/client_html/ts3doc.css
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Stylesheet for TeamSpeak 3 SDK documentation
|
||||
*/
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
div.note {
|
||||
border-left: solid #d5dee3 20px;
|
||||
border-right: solid #d5dee3 20px;
|
||||
margin-left: 5%;
|
||||
margin-right: 10%;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
div.caution {
|
||||
border-left: solid #d5dee3 20px;
|
||||
border-right: solid #d5dee3 20px;
|
||||
margin-left: 5%;
|
||||
margin-right: 10%;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
div.important {
|
||||
border-left: solid #d5dee3 20px;
|
||||
border-right: solid #d5dee3 20px;
|
||||
margin-left: 5%;
|
||||
margin-right: 10%;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.returnvalue {
|
||||
font-family: monospace;
|
||||
font-style: italic;
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
p.legaltext {
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
p.larger {
|
||||
font-size: 125%;
|
||||
}
|
||||
|
||||
#logo {
|
||||
position: absolute;
|
||||
left: 80%;
|
||||
}
|
||||
74
include/plugin_definitions.h
Normal file
@@ -0,0 +1,74 @@
|
||||
#ifndef PLUGIN_DEFINITIONS
|
||||
#define PLUGIN_DEFINITIONS
|
||||
|
||||
/* Return values for ts3plugin_offersConfigure */
|
||||
enum PluginConfigureOffer {
|
||||
PLUGIN_OFFERS_NO_CONFIGURE = 0, /* Plugin does not implement ts3plugin_configure */
|
||||
PLUGIN_OFFERS_CONFIGURE_NEW_THREAD, /* Plugin does implement ts3plugin_configure and requests to run this function in an own thread */
|
||||
PLUGIN_OFFERS_CONFIGURE_QT_THREAD /* Plugin does implement ts3plugin_configure and requests to run this function in the Qt GUI thread */
|
||||
};
|
||||
|
||||
enum PluginMessageTarget {
|
||||
PLUGIN_MESSAGE_TARGET_SERVER = 0,
|
||||
PLUGIN_MESSAGE_TARGET_CHANNEL
|
||||
};
|
||||
|
||||
enum PluginItemType {
|
||||
PLUGIN_SERVER = 0,
|
||||
PLUGIN_CHANNEL,
|
||||
PLUGIN_CLIENT
|
||||
};
|
||||
|
||||
enum PluginMenuType {
|
||||
PLUGIN_MENU_TYPE_GLOBAL = 0,
|
||||
PLUGIN_MENU_TYPE_CHANNEL,
|
||||
PLUGIN_MENU_TYPE_CLIENT
|
||||
};
|
||||
|
||||
#define PLUGIN_MENU_BUFSZ 128
|
||||
|
||||
struct PluginMenuItem {
|
||||
enum PluginMenuType type;
|
||||
int id;
|
||||
char text[PLUGIN_MENU_BUFSZ];
|
||||
char icon[PLUGIN_MENU_BUFSZ];
|
||||
};
|
||||
|
||||
#define PLUGIN_HOTKEY_BUFSZ 128
|
||||
|
||||
struct PluginHotkey {
|
||||
char keyword[PLUGIN_HOTKEY_BUFSZ];
|
||||
char description[PLUGIN_HOTKEY_BUFSZ];
|
||||
};
|
||||
|
||||
struct PluginBookmarkList;
|
||||
struct PluginBookmarkItem {
|
||||
char* name;
|
||||
unsigned char isFolder;
|
||||
unsigned char reserved[3];
|
||||
union{
|
||||
char* uuid;
|
||||
struct PluginBookmarkList* folder;
|
||||
};
|
||||
};
|
||||
|
||||
struct PluginBookmarkList{
|
||||
int itemcount;
|
||||
struct PluginBookmarkItem items[1]; //should be 0 but compiler complains
|
||||
};
|
||||
|
||||
enum PluginGuiProfile{
|
||||
PLUGIN_GUI_SOUND_CAPTURE = 0,
|
||||
PLUGIN_GUI_SOUND_PLAYBACK,
|
||||
PLUGIN_GUI_HOTKEY,
|
||||
PLUGIN_GUI_SOUNDPACK,
|
||||
PLUGIN_GUI_IDENTITY
|
||||
};
|
||||
|
||||
enum PluginConnectTab{
|
||||
PLUGIN_CONNECT_TAB_NEW = 0,
|
||||
PLUGIN_CONNECT_TAB_CURRENT,
|
||||
PLUGIN_CONNECT_TAB_NEW_IF_CURRENT_CONNECTED
|
||||
};
|
||||
|
||||
#endif
|
||||
23
include/teamlog/logtypes.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef TEAMLOG_LOGTYPES_H
|
||||
#define TEAMLOG_LOGTYPES_H
|
||||
|
||||
enum LogTypes {
|
||||
LogType_NONE = 0x0000,
|
||||
LogType_FILE = 0x0001,
|
||||
LogType_CONSOLE = 0x0002,
|
||||
LogType_USERLOGGING = 0x0004,
|
||||
LogType_NO_NETLOGGING = 0x0008,
|
||||
LogType_DATABASE = 0x0010,
|
||||
LogType_SYSLOG = 0x0020,
|
||||
};
|
||||
|
||||
enum LogLevel {
|
||||
LogLevel_CRITICAL = 0, //these messages stop the program
|
||||
LogLevel_ERROR, //everything that is really bad, but not so bad we need to shut down
|
||||
LogLevel_WARNING, //everything that *might* be bad
|
||||
LogLevel_DEBUG, //output that might help find a problem
|
||||
LogLevel_INFO, //informational output, like "starting database version x.y.z"
|
||||
LogLevel_DEVEL //developer only output (will not be displayed in release mode)
|
||||
};
|
||||
|
||||
#endif //TEAMLOG_LOGTYPES_H
|
||||
24
include/teamspeak/clientlib_publicdefinitions.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef CLIENTLIB_PUBLICDEFINITIONS_H
|
||||
#define CLIENTLIB_PUBLICDEFINITIONS_H
|
||||
|
||||
enum Visibility {
|
||||
ENTER_VISIBILITY = 0,
|
||||
RETAIN_VISIBILITY,
|
||||
LEAVE_VISIBILITY
|
||||
};
|
||||
|
||||
enum ConnectStatus {
|
||||
STATUS_DISCONNECTED = 0, //There is no activity to the server, this is the default value
|
||||
STATUS_CONNECTING, //We are trying to connect, we haven't got a clientID yet, we haven't been accepted by the server
|
||||
STATUS_CONNECTED, //The server has accepted us, we can talk and hear and we got a clientID, but we don't have the channels and clients yet, we can get server infos (welcome msg etc.)
|
||||
STATUS_CONNECTION_ESTABLISHING,//we are CONNECTED and we are visible
|
||||
STATUS_CONNECTION_ESTABLISHED, //we are CONNECTED and we have the client and channels available
|
||||
};
|
||||
|
||||
enum LocalTestMode {
|
||||
TEST_MODE_OFF = 0,
|
||||
TEST_MODE_VOICE_LOCAL_ONLY = 1,
|
||||
TEST_MODE_VOICE_LOCAL_AND_REMOTE = 2,
|
||||
};
|
||||
|
||||
#endif //CLIENTLIB_PUBLICDEFINITIONS_H
|
||||
391
include/teamspeak/public_definitions.h
Normal file
@@ -0,0 +1,391 @@
|
||||
#ifndef PUBLIC_DEFINITIONS_H
|
||||
#define PUBLIC_DEFINITIONS_H
|
||||
|
||||
#include "teamlog/logtypes.h"
|
||||
|
||||
//limited length, measured in characters
|
||||
#define TS3_MAX_SIZE_CHANNEL_NAME 40
|
||||
#define TS3_MAX_SIZE_VIRTUALSERVER_NAME 64
|
||||
#define TS3_MAX_SIZE_CLIENT_NICKNAME 64
|
||||
#define TS3_MIN_SIZE_CLIENT_NICKNAME 3
|
||||
#define TS3_MAX_SIZE_REASON_MESSAGE 80
|
||||
|
||||
//limited length, measured in bytes (utf8 encoded)
|
||||
#define TS3_MAX_SIZE_TEXTMESSAGE 8192
|
||||
#define TS3_MAX_SIZE_CHANNEL_TOPIC 255
|
||||
#define TS3_MAX_SIZE_CHANNEL_DESCRIPTION 8192
|
||||
#define TS3_MAX_SIZE_VIRTUALSERVER_WELCOMEMESSAGE 1024
|
||||
#define TS3_SIZE_MYTSID 44
|
||||
|
||||
//minimum amount of seconds before a clientID that was in use can be assigned to a new client
|
||||
#define TS3_MIN_SECONDS_CLIENTID_REUSE 300
|
||||
|
||||
#if defined(WIN32) || defined(__WIN32__) || defined(_WIN32)
|
||||
typedef unsigned __int16 anyID;
|
||||
typedef unsigned __int64 uint64;
|
||||
#ifdef BUILDING_DLL
|
||||
#define EXPORTDLL __declspec(dllexport)
|
||||
#else
|
||||
#define EXPORTDLL
|
||||
#endif
|
||||
#else
|
||||
#include <stdint.h>
|
||||
typedef uint16_t anyID;
|
||||
typedef uint64_t uint64;
|
||||
#ifdef BUILDING_DLL
|
||||
#define EXPORTDLL __attribute__ ((visibility("default")))
|
||||
#else
|
||||
#define EXPORTDLL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
enum TalkStatus {
|
||||
STATUS_NOT_TALKING = 0,
|
||||
STATUS_TALKING = 1,
|
||||
STATUS_TALKING_WHILE_DISABLED = 2,
|
||||
};
|
||||
|
||||
enum CodecType {
|
||||
CODEC_SPEEX_NARROWBAND = 0, //mono, 16bit, 8kHz, bitrate dependent on the quality setting
|
||||
CODEC_SPEEX_WIDEBAND, //mono, 16bit, 16kHz, bitrate dependent on the quality setting
|
||||
CODEC_SPEEX_ULTRAWIDEBAND, //mono, 16bit, 32kHz, bitrate dependent on the quality setting
|
||||
CODEC_CELT_MONO, //mono, 16bit, 48kHz, bitrate dependent on the quality setting
|
||||
CODEC_OPUS_VOICE, //mono, 16bit, 48khz, bitrate dependent on the quality setting, optimized for voice
|
||||
CODEC_OPUS_MUSIC, //stereo, 16bit, 48khz, bitrate dependent on the quality setting, optimized for music
|
||||
};
|
||||
|
||||
enum CodecEncryptionMode {
|
||||
CODEC_ENCRYPTION_PER_CHANNEL = 0,
|
||||
CODEC_ENCRYPTION_FORCED_OFF,
|
||||
CODEC_ENCRYPTION_FORCED_ON,
|
||||
};
|
||||
|
||||
enum TextMessageTargetMode {
|
||||
TextMessageTarget_CLIENT=1,
|
||||
TextMessageTarget_CHANNEL,
|
||||
TextMessageTarget_SERVER,
|
||||
TextMessageTarget_MAX
|
||||
};
|
||||
|
||||
enum MuteInputStatus {
|
||||
MUTEINPUT_NONE = 0,
|
||||
MUTEINPUT_MUTED,
|
||||
};
|
||||
|
||||
enum MuteOutputStatus {
|
||||
MUTEOUTPUT_NONE = 0,
|
||||
MUTEOUTPUT_MUTED,
|
||||
};
|
||||
|
||||
enum HardwareInputStatus {
|
||||
HARDWAREINPUT_DISABLED = 0,
|
||||
HARDWAREINPUT_ENABLED,
|
||||
};
|
||||
|
||||
enum HardwareOutputStatus {
|
||||
HARDWAREOUTPUT_DISABLED = 0,
|
||||
HARDWAREOUTPUT_ENABLED,
|
||||
};
|
||||
|
||||
enum InputDeactivationStatus {
|
||||
INPUT_ACTIVE = 0,
|
||||
INPUT_DEACTIVATED = 1,
|
||||
};
|
||||
|
||||
enum ReasonIdentifier {
|
||||
REASON_NONE = 0, //no reason data
|
||||
REASON_MOVED = 1, //{SectionInvoker}
|
||||
REASON_SUBSCRIPTION = 2, //no reason data
|
||||
REASON_LOST_CONNECTION = 3, //reasonmsg=reason
|
||||
REASON_KICK_CHANNEL = 4, //{SectionInvoker} reasonmsg=reason //{SectionInvoker} is only added server->client
|
||||
REASON_KICK_SERVER = 5, //{SectionInvoker} reasonmsg=reason //{SectionInvoker} is only added server->client
|
||||
REASON_KICK_SERVER_BAN = 6, //{SectionInvoker} reasonmsg=reason bantime=time //{SectionInvoker} is only added server->client
|
||||
REASON_SERVERSTOP = 7, //reasonmsg=reason
|
||||
REASON_CLIENTDISCONNECT = 8, //reasonmsg=reason
|
||||
REASON_CHANNELUPDATE = 9, //no reason data
|
||||
REASON_CHANNELEDIT = 10, //{SectionInvoker}
|
||||
REASON_CLIENTDISCONNECT_SERVER_SHUTDOWN = 11, //reasonmsg=reason
|
||||
};
|
||||
|
||||
enum ChannelProperties {
|
||||
CHANNEL_NAME = 0, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_TOPIC, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_DESCRIPTION, //Must be requested (=> requestChannelDescription)
|
||||
CHANNEL_PASSWORD, //not available client side
|
||||
CHANNEL_CODEC, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_CODEC_QUALITY, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_MAXCLIENTS, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_MAXFAMILYCLIENTS, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_ORDER, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_FLAG_PERMANENT, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_FLAG_SEMI_PERMANENT, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_FLAG_DEFAULT, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_FLAG_PASSWORD, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_CODEC_LATENCY_FACTOR, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_CODEC_IS_UNENCRYPTED, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_SECURITY_SALT, //Not available client side, not used in teamspeak, only SDK. Sets the options+salt for security hash.
|
||||
CHANNEL_DELETE_DELAY, //How many seconds to wait before deleting this channel
|
||||
CHANNEL_ENDMARKER,
|
||||
};
|
||||
|
||||
enum ClientProperties {
|
||||
CLIENT_UNIQUE_IDENTIFIER = 0, //automatically up-to-date for any client "in view", can be used to identify this particular client installation
|
||||
CLIENT_NICKNAME, //automatically up-to-date for any client "in view"
|
||||
CLIENT_VERSION, //for other clients than ourself, this needs to be requested (=> requestClientVariables)
|
||||
CLIENT_PLATFORM, //for other clients than ourself, this needs to be requested (=> requestClientVariables)
|
||||
CLIENT_FLAG_TALKING, //automatically up-to-date for any client that can be heard (in room / whisper)
|
||||
CLIENT_INPUT_MUTED, //automatically up-to-date for any client "in view", this clients microphone mute status
|
||||
CLIENT_OUTPUT_MUTED, //automatically up-to-date for any client "in view", this clients headphones/speakers/mic combined mute status
|
||||
CLIENT_OUTPUTONLY_MUTED, //automatically up-to-date for any client "in view", this clients headphones/speakers only mute status
|
||||
CLIENT_INPUT_HARDWARE, //automatically up-to-date for any client "in view", this clients microphone hardware status (is the capture device opened?)
|
||||
CLIENT_OUTPUT_HARDWARE, //automatically up-to-date for any client "in view", this clients headphone/speakers hardware status (is the playback device opened?)
|
||||
CLIENT_INPUT_DEACTIVATED, //only usable for ourself, not propagated to the network
|
||||
CLIENT_IDLE_TIME, //internal use
|
||||
CLIENT_DEFAULT_CHANNEL, //only usable for ourself, the default channel we used to connect on our last connection attempt
|
||||
CLIENT_DEFAULT_CHANNEL_PASSWORD, //internal use
|
||||
CLIENT_SERVER_PASSWORD, //internal use
|
||||
CLIENT_META_DATA, //automatically up-to-date for any client "in view", not used by TeamSpeak, free storage for sdk users
|
||||
CLIENT_IS_MUTED, //only make sense on the client side locally, "1" if this client is currently muted by us, "0" if he is not
|
||||
CLIENT_IS_RECORDING, //automatically up-to-date for any client "in view"
|
||||
CLIENT_VOLUME_MODIFICATOR, //internal use
|
||||
CLIENT_VERSION_SIGN, //sign
|
||||
CLIENT_SECURITY_HASH, //SDK use, not used by teamspeak. Hash is provided by an outside source. A channel will use the security salt + other client data to calculate a hash, which must be the same as the one provided here.
|
||||
CLIENT_ENCRYPTION_CIPHERS, //internal use
|
||||
CLIENT_ENDMARKER,
|
||||
};
|
||||
|
||||
enum VirtualServerProperties {
|
||||
VIRTUALSERVER_UNIQUE_IDENTIFIER = 0, //available when connected, can be used to identify this particular server installation
|
||||
VIRTUALSERVER_NAME, //available and always up-to-date when connected
|
||||
VIRTUALSERVER_WELCOMEMESSAGE, //available when connected, (=> requestServerVariables)
|
||||
VIRTUALSERVER_PLATFORM, //available when connected
|
||||
VIRTUALSERVER_VERSION, //available when connected
|
||||
VIRTUALSERVER_MAXCLIENTS, //only available on request (=> requestServerVariables), stores the maximum number of clients that may currently join the server
|
||||
VIRTUALSERVER_PASSWORD, //not available to clients, the server password
|
||||
VIRTUALSERVER_CLIENTS_ONLINE, //only available on request (=> requestServerVariables),
|
||||
VIRTUALSERVER_CHANNELS_ONLINE, //only available on request (=> requestServerVariables),
|
||||
VIRTUALSERVER_CREATED, //available when connected, stores the time when the server was created
|
||||
VIRTUALSERVER_UPTIME, //only available on request (=> requestServerVariables), the time since the server was started
|
||||
VIRTUALSERVER_CODEC_ENCRYPTION_MODE, //available and always up-to-date when connected
|
||||
VIRTUALSERVER_ENCRYPTION_CIPHERS, //internal use
|
||||
VIRTUALSERVER_ENDMARKER,
|
||||
};
|
||||
|
||||
enum ConnectionProperties {
|
||||
CONNECTION_PING = 0, //average latency for a round trip through and back this connection
|
||||
CONNECTION_PING_DEVIATION, //standard deviation of the above average latency
|
||||
CONNECTION_CONNECTED_TIME, //how long the connection exists already
|
||||
CONNECTION_IDLE_TIME, //how long since the last action of this client
|
||||
CONNECTION_CLIENT_IP, //IP of this client (as seen from the server side)
|
||||
CONNECTION_CLIENT_PORT, //Port of this client (as seen from the server side)
|
||||
CONNECTION_SERVER_IP, //IP of the server (seen from the client side) - only available on yourself, not for remote clients, not available server side
|
||||
CONNECTION_SERVER_PORT, //Port of the server (seen from the client side) - only available on yourself, not for remote clients, not available server side
|
||||
CONNECTION_PACKETS_SENT_SPEECH, //how many Speech packets were sent through this connection
|
||||
CONNECTION_PACKETS_SENT_KEEPALIVE,
|
||||
CONNECTION_PACKETS_SENT_CONTROL,
|
||||
CONNECTION_PACKETS_SENT_TOTAL, //how many packets were sent totally (this is PACKETS_SENT_SPEECH + PACKETS_SENT_KEEPALIVE + PACKETS_SENT_CONTROL)
|
||||
CONNECTION_BYTES_SENT_SPEECH,
|
||||
CONNECTION_BYTES_SENT_KEEPALIVE,
|
||||
CONNECTION_BYTES_SENT_CONTROL,
|
||||
CONNECTION_BYTES_SENT_TOTAL,
|
||||
CONNECTION_PACKETS_RECEIVED_SPEECH,
|
||||
CONNECTION_PACKETS_RECEIVED_KEEPALIVE,
|
||||
CONNECTION_PACKETS_RECEIVED_CONTROL,
|
||||
CONNECTION_PACKETS_RECEIVED_TOTAL,
|
||||
CONNECTION_BYTES_RECEIVED_SPEECH,
|
||||
CONNECTION_BYTES_RECEIVED_KEEPALIVE,
|
||||
CONNECTION_BYTES_RECEIVED_CONTROL,
|
||||
CONNECTION_BYTES_RECEIVED_TOTAL,
|
||||
CONNECTION_PACKETLOSS_SPEECH,
|
||||
CONNECTION_PACKETLOSS_KEEPALIVE,
|
||||
CONNECTION_PACKETLOSS_CONTROL,
|
||||
CONNECTION_PACKETLOSS_TOTAL, //the probability with which a packet round trip failed because a packet was lost
|
||||
CONNECTION_SERVER2CLIENT_PACKETLOSS_SPEECH, //the probability with which a speech packet failed from the server to the client
|
||||
CONNECTION_SERVER2CLIENT_PACKETLOSS_KEEPALIVE,
|
||||
CONNECTION_SERVER2CLIENT_PACKETLOSS_CONTROL,
|
||||
CONNECTION_SERVER2CLIENT_PACKETLOSS_TOTAL,
|
||||
CONNECTION_CLIENT2SERVER_PACKETLOSS_SPEECH,
|
||||
CONNECTION_CLIENT2SERVER_PACKETLOSS_KEEPALIVE,
|
||||
CONNECTION_CLIENT2SERVER_PACKETLOSS_CONTROL,
|
||||
CONNECTION_CLIENT2SERVER_PACKETLOSS_TOTAL,
|
||||
CONNECTION_BANDWIDTH_SENT_LAST_SECOND_SPEECH, //howmany bytes of speech packets we sent during the last second
|
||||
CONNECTION_BANDWIDTH_SENT_LAST_SECOND_KEEPALIVE,
|
||||
CONNECTION_BANDWIDTH_SENT_LAST_SECOND_CONTROL,
|
||||
CONNECTION_BANDWIDTH_SENT_LAST_SECOND_TOTAL,
|
||||
CONNECTION_BANDWIDTH_SENT_LAST_MINUTE_SPEECH, //howmany bytes/s of speech packets we sent in average during the last minute
|
||||
CONNECTION_BANDWIDTH_SENT_LAST_MINUTE_KEEPALIVE,
|
||||
CONNECTION_BANDWIDTH_SENT_LAST_MINUTE_CONTROL,
|
||||
CONNECTION_BANDWIDTH_SENT_LAST_MINUTE_TOTAL,
|
||||
CONNECTION_BANDWIDTH_RECEIVED_LAST_SECOND_SPEECH,
|
||||
CONNECTION_BANDWIDTH_RECEIVED_LAST_SECOND_KEEPALIVE,
|
||||
CONNECTION_BANDWIDTH_RECEIVED_LAST_SECOND_CONTROL,
|
||||
CONNECTION_BANDWIDTH_RECEIVED_LAST_SECOND_TOTAL,
|
||||
CONNECTION_BANDWIDTH_RECEIVED_LAST_MINUTE_SPEECH,
|
||||
CONNECTION_BANDWIDTH_RECEIVED_LAST_MINUTE_KEEPALIVE,
|
||||
CONNECTION_BANDWIDTH_RECEIVED_LAST_MINUTE_CONTROL,
|
||||
CONNECTION_BANDWIDTH_RECEIVED_LAST_MINUTE_TOTAL,
|
||||
CONNECTION_ENDMARKER,
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
float x; /* X co-ordinate in 3D space. */
|
||||
float y; /* Y co-ordinate in 3D space. */
|
||||
float z; /* Z co-ordinate in 3D space. */
|
||||
} TS3_VECTOR;
|
||||
|
||||
enum GroupWhisperType {
|
||||
GROUPWHISPERTYPE_SERVERGROUP = 0,
|
||||
GROUPWHISPERTYPE_CHANNELGROUP = 1,
|
||||
GROUPWHISPERTYPE_CHANNELCOMMANDER = 2,
|
||||
GROUPWHISPERTYPE_ALLCLIENTS = 3,
|
||||
GROUPWHISPERTYPE_ENDMARKER,
|
||||
};
|
||||
|
||||
enum GroupWhisperTargetMode {
|
||||
GROUPWHISPERTARGETMODE_ALL = 0,
|
||||
GROUPWHISPERTARGETMODE_CURRENTCHANNEL = 1,
|
||||
GROUPWHISPERTARGETMODE_PARENTCHANNEL = 2,
|
||||
GROUPWHISPERTARGETMODE_ALLPARENTCHANNELS = 3,
|
||||
GROUPWHISPERTARGETMODE_CHANNELFAMILY = 4,
|
||||
GROUPWHISPERTARGETMODE_ANCESTORCHANNELFAMILY = 5,
|
||||
GROUPWHISPERTARGETMODE_SUBCHANNELS = 6,
|
||||
GROUPWHISPERTARGETMODE_ENDMARKER,
|
||||
};
|
||||
|
||||
enum MonoSoundDestination{
|
||||
MONO_SOUND_DESTINATION_ALL =0, /* Send mono sound to all available speakers */
|
||||
MONO_SOUND_DESTINATION_FRONT_CENTER =1, /* Send mono sound to front center speaker if available */
|
||||
MONO_SOUND_DESTINATION_FRONT_LEFT_AND_RIGHT =2 /* Send mono sound to front left/right speakers if available */
|
||||
};
|
||||
|
||||
enum SecuritySaltOptions {
|
||||
SECURITY_SALT_CHECK_NICKNAME = 1, /* put nickname into security hash */
|
||||
SECURITY_SALT_CHECK_META_DATA = 2 /* put (game)meta data into security hash */
|
||||
};
|
||||
|
||||
/*this enum is used to disable client commands on the server*/
|
||||
enum ClientCommand{
|
||||
CLIENT_COMMAND_requestConnectionInfo = 0,
|
||||
CLIENT_COMMAND_requestClientMove = 1,
|
||||
CLIENT_COMMAND_requestXXMuteClients = 2,
|
||||
CLIENT_COMMAND_requestClientKickFromXXX = 3,
|
||||
CLIENT_COMMAND_flushChannelCreation = 4,
|
||||
CLIENT_COMMAND_flushChannelUpdates = 5,
|
||||
CLIENT_COMMAND_requestChannelMove = 6,
|
||||
CLIENT_COMMAND_requestChannelDelete = 7,
|
||||
CLIENT_COMMAND_requestChannelDescription = 8,
|
||||
CLIENT_COMMAND_requestChannelXXSubscribeXXX = 9,
|
||||
CLIENT_COMMAND_requestServerConnectionInfo = 10,
|
||||
CLIENT_COMMAND_requestSendXXXTextMsg = 11,
|
||||
CLIENT_COMMAND_filetransfers = 12,
|
||||
CLIENT_COMMAND_ENDMARKER
|
||||
};
|
||||
|
||||
/* Access Control List*/
|
||||
enum ACLType{
|
||||
ACL_NONE = 0,
|
||||
ACL_WHITE_LIST = 1,
|
||||
ACL_BLACK_LIST = 2
|
||||
};
|
||||
|
||||
/* file transfer actions*/
|
||||
enum FTAction{
|
||||
FT_INIT_SERVER = 0,
|
||||
FT_INIT_CHANNEL = 1,
|
||||
FT_UPLOAD = 2,
|
||||
FT_DOWNLOAD = 3,
|
||||
FT_DELETE = 4,
|
||||
FT_CREATEDIR = 5,
|
||||
FT_RENAME = 6,
|
||||
FT_FILELIST = 7,
|
||||
FT_FILEINFO = 8
|
||||
};
|
||||
|
||||
/* file transfer status */
|
||||
enum FileTransferState {
|
||||
FILETRANSFER_INITIALISING = 0,
|
||||
FILETRANSFER_ACTIVE,
|
||||
FILETRANSFER_FINISHED,
|
||||
};
|
||||
|
||||
/* file transfer types */
|
||||
enum {
|
||||
FileListType_Directory = 0,
|
||||
FileListType_File,
|
||||
};
|
||||
|
||||
/* some structs to handle variables in callbacks */
|
||||
#define MAX_VARIABLES_EXPORT_COUNT 64
|
||||
struct VariablesExportItem{
|
||||
unsigned char itemIsValid; /* This item has valid values. ignore this item if 0 */
|
||||
unsigned char proposedIsSet; /* The value in proposed is set. if 0 ignore proposed */
|
||||
const char* current; /* current value (stored in memory) */
|
||||
const char* proposed; /* New value to change to (const, so no updates please) */
|
||||
};
|
||||
|
||||
struct VariablesExport{
|
||||
struct VariablesExportItem items[MAX_VARIABLES_EXPORT_COUNT];
|
||||
};
|
||||
|
||||
struct ClientMiniExport{
|
||||
anyID ID;
|
||||
uint64 channel;
|
||||
const char* ident;
|
||||
const char* nickname;
|
||||
};
|
||||
|
||||
struct TransformFilePathExport{
|
||||
uint64 channel;
|
||||
const char* filename;
|
||||
int action;
|
||||
int transformedFileNameMaxSize;
|
||||
int channelPathMaxSize;
|
||||
};
|
||||
|
||||
struct TransformFilePathExportReturns{
|
||||
char* transformedFileName;
|
||||
char* channelPath;
|
||||
int logFileAction;
|
||||
};
|
||||
|
||||
struct FileTransferCallbackExport{
|
||||
anyID clientID;
|
||||
anyID transferID;
|
||||
anyID remoteTransferID;
|
||||
unsigned int status;
|
||||
const char* statusMessage;
|
||||
uint64 remotefileSize;
|
||||
uint64 bytes;
|
||||
int isSender;
|
||||
};
|
||||
|
||||
/*define for file transfer bandwith limits*/
|
||||
#define BANDWIDTH_LIMIT_UNLIMITED 0xFFFFFFFFFFFFFFFFll
|
||||
|
||||
|
||||
/*defines for speaker locations used by some sound callbacks*/
|
||||
#ifndef SPEAKER_FRONT_LEFT
|
||||
#define SPEAKER_FRONT_LEFT 0x1
|
||||
#define SPEAKER_FRONT_RIGHT 0x2
|
||||
#define SPEAKER_FRONT_CENTER 0x4
|
||||
#define SPEAKER_LOW_FREQUENCY 0x8
|
||||
#define SPEAKER_BACK_LEFT 0x10
|
||||
#define SPEAKER_BACK_RIGHT 0x20
|
||||
#define SPEAKER_FRONT_LEFT_OF_CENTER 0x40
|
||||
#define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80
|
||||
#define SPEAKER_BACK_CENTER 0x100
|
||||
#define SPEAKER_SIDE_LEFT 0x200
|
||||
#define SPEAKER_SIDE_RIGHT 0x400
|
||||
#define SPEAKER_TOP_CENTER 0x800
|
||||
#define SPEAKER_TOP_FRONT_LEFT 0x1000
|
||||
#define SPEAKER_TOP_FRONT_CENTER 0x2000
|
||||
#define SPEAKER_TOP_FRONT_RIGHT 0x4000
|
||||
#define SPEAKER_TOP_BACK_LEFT 0x8000
|
||||
#define SPEAKER_TOP_BACK_CENTER 0x10000
|
||||
#define SPEAKER_TOP_BACK_RIGHT 0x20000
|
||||
#endif
|
||||
#define SPEAKER_HEADPHONES_LEFT 0x10000000
|
||||
#define SPEAKER_HEADPHONES_RIGHT 0x20000000
|
||||
#define SPEAKER_MONO 0x40000000
|
||||
|
||||
#endif /*PUBLIC_DEFINITIONS_H*/
|
||||
194
include/teamspeak/public_errors.h
Normal file
@@ -0,0 +1,194 @@
|
||||
#ifndef PUBLIC_ERRORS_H
|
||||
#define PUBLIC_ERRORS_H
|
||||
|
||||
//The idea here is: the values are 2 bytes wide, the first byte identifies the group, the second the count within that group
|
||||
|
||||
enum Ts3ErrorType {
|
||||
//general
|
||||
ERROR_ok = 0x0000,
|
||||
ERROR_undefined = 0x0001,
|
||||
ERROR_not_implemented = 0x0002,
|
||||
ERROR_ok_no_update = 0x0003,
|
||||
ERROR_dont_notify = 0x0004,
|
||||
ERROR_lib_time_limit_reached = 0x0005,
|
||||
ERROR_out_of_memory = 0x0006,
|
||||
ERROR_canceled = 0x0007,
|
||||
|
||||
//dunno
|
||||
ERROR_command_not_found = 0x0100,
|
||||
ERROR_unable_to_bind_network_port = 0x0101,
|
||||
ERROR_no_network_port_available = 0x0102,
|
||||
ERROR_port_already_in_use = 0x0103,
|
||||
|
||||
//client
|
||||
ERROR_client_invalid_id = 0x0200,
|
||||
ERROR_client_nickname_inuse = 0x0201,
|
||||
ERROR_client_protocol_limit_reached = 0x0203,
|
||||
ERROR_client_invalid_type = 0x0204,
|
||||
ERROR_client_already_subscribed = 0x0205,
|
||||
ERROR_client_not_logged_in = 0x0206,
|
||||
ERROR_client_could_not_validate_identity = 0x0207,
|
||||
ERROR_client_version_outdated = 0x020a,
|
||||
ERROR_client_is_flooding = 0x020c,
|
||||
ERROR_client_hacked = 0x020d,
|
||||
ERROR_client_cannot_verify_now = 0x020e,
|
||||
ERROR_client_login_not_permitted = 0x020f,
|
||||
ERROR_client_not_subscribed = 0x0210,
|
||||
|
||||
//channel
|
||||
ERROR_channel_invalid_id = 0x0300,
|
||||
ERROR_channel_protocol_limit_reached = 0x0301,
|
||||
ERROR_channel_already_in = 0x0302,
|
||||
ERROR_channel_name_inuse = 0x0303,
|
||||
ERROR_channel_not_empty = 0x0304,
|
||||
ERROR_channel_can_not_delete_default = 0x0305,
|
||||
ERROR_channel_default_require_permanent = 0x0306,
|
||||
ERROR_channel_invalid_flags = 0x0307,
|
||||
ERROR_channel_parent_not_permanent = 0x0308,
|
||||
ERROR_channel_maxclients_reached = 0x0309,
|
||||
ERROR_channel_maxfamily_reached = 0x030a,
|
||||
ERROR_channel_invalid_order = 0x030b,
|
||||
ERROR_channel_no_filetransfer_supported = 0x030c,
|
||||
ERROR_channel_invalid_password = 0x030d,
|
||||
ERROR_channel_invalid_security_hash = 0x030f, //note 0x030e is defined in public_rare_errors;
|
||||
|
||||
//server
|
||||
ERROR_server_invalid_id = 0x0400,
|
||||
ERROR_server_running = 0x0401,
|
||||
ERROR_server_is_shutting_down = 0x0402,
|
||||
ERROR_server_maxclients_reached = 0x0403,
|
||||
ERROR_server_invalid_password = 0x0404,
|
||||
ERROR_server_is_virtual = 0x0407,
|
||||
ERROR_server_is_not_running = 0x0409,
|
||||
ERROR_server_is_booting = 0x040a,
|
||||
ERROR_server_status_invalid = 0x040b,
|
||||
ERROR_server_version_outdated = 0x040d,
|
||||
ERROR_server_duplicate_running = 0x040e,
|
||||
|
||||
//parameter
|
||||
ERROR_parameter_quote = 0x0600,
|
||||
ERROR_parameter_invalid_count = 0x0601,
|
||||
ERROR_parameter_invalid = 0x0602,
|
||||
ERROR_parameter_not_found = 0x0603,
|
||||
ERROR_parameter_convert = 0x0604,
|
||||
ERROR_parameter_invalid_size = 0x0605,
|
||||
ERROR_parameter_missing = 0x0606,
|
||||
ERROR_parameter_checksum = 0x0607,
|
||||
|
||||
//unsorted, need further investigation
|
||||
ERROR_vs_critical = 0x0700,
|
||||
ERROR_connection_lost = 0x0701,
|
||||
ERROR_not_connected = 0x0702,
|
||||
ERROR_no_cached_connection_info = 0x0703,
|
||||
ERROR_currently_not_possible = 0x0704,
|
||||
ERROR_failed_connection_initialisation = 0x0705,
|
||||
ERROR_could_not_resolve_hostname = 0x0706,
|
||||
ERROR_invalid_server_connection_handler_id = 0x0707,
|
||||
ERROR_could_not_initialise_input_manager = 0x0708,
|
||||
ERROR_clientlibrary_not_initialised = 0x0709,
|
||||
ERROR_serverlibrary_not_initialised = 0x070a,
|
||||
ERROR_whisper_too_many_targets = 0x070b,
|
||||
ERROR_whisper_no_targets = 0x070c,
|
||||
ERROR_connection_ip_protocol_missing = 0x070d,
|
||||
//reserved = 0x070e,
|
||||
ERROR_illegal_server_license = 0x070f,
|
||||
|
||||
//file transfer
|
||||
ERROR_file_invalid_name = 0x0800,
|
||||
ERROR_file_invalid_permissions = 0x0801,
|
||||
ERROR_file_already_exists = 0x0802,
|
||||
ERROR_file_not_found = 0x0803,
|
||||
ERROR_file_io_error = 0x0804,
|
||||
ERROR_file_invalid_transfer_id = 0x0805,
|
||||
ERROR_file_invalid_path = 0x0806,
|
||||
ERROR_file_no_files_available = 0x0807,
|
||||
ERROR_file_overwrite_excludes_resume = 0x0808,
|
||||
ERROR_file_invalid_size = 0x0809,
|
||||
ERROR_file_already_in_use = 0x080a,
|
||||
ERROR_file_could_not_open_connection = 0x080b,
|
||||
ERROR_file_no_space_left_on_device = 0x080c,
|
||||
ERROR_file_exceeds_file_system_maximum_size = 0x080d,
|
||||
ERROR_file_transfer_connection_timeout = 0x080e,
|
||||
ERROR_file_connection_lost = 0x080f,
|
||||
ERROR_file_exceeds_supplied_size = 0x0810,
|
||||
ERROR_file_transfer_complete = 0x0811,
|
||||
ERROR_file_transfer_canceled = 0x0812,
|
||||
ERROR_file_transfer_interrupted = 0x0813,
|
||||
ERROR_file_transfer_server_quota_exceeded = 0x0814,
|
||||
ERROR_file_transfer_client_quota_exceeded = 0x0815,
|
||||
ERROR_file_transfer_reset = 0x0816,
|
||||
ERROR_file_transfer_limit_reached = 0x0817,
|
||||
|
||||
//sound
|
||||
ERROR_sound_preprocessor_disabled = 0x0900,
|
||||
ERROR_sound_internal_preprocessor = 0x0901,
|
||||
ERROR_sound_internal_encoder = 0x0902,
|
||||
ERROR_sound_internal_playback = 0x0903,
|
||||
ERROR_sound_no_capture_device_available = 0x0904,
|
||||
ERROR_sound_no_playback_device_available = 0x0905,
|
||||
ERROR_sound_could_not_open_capture_device = 0x0906,
|
||||
ERROR_sound_could_not_open_playback_device = 0x0907,
|
||||
ERROR_sound_handler_has_device = 0x0908,
|
||||
ERROR_sound_invalid_capture_device = 0x0909,
|
||||
ERROR_sound_invalid_playback_device = 0x090a,
|
||||
ERROR_sound_invalid_wave = 0x090b,
|
||||
ERROR_sound_unsupported_wave = 0x090c,
|
||||
ERROR_sound_open_wave = 0x090d,
|
||||
ERROR_sound_internal_capture = 0x090e,
|
||||
ERROR_sound_device_in_use = 0x090f,
|
||||
ERROR_sound_device_already_registerred = 0x0910,
|
||||
ERROR_sound_unknown_device = 0x0911,
|
||||
ERROR_sound_unsupported_frequency = 0x0912,
|
||||
ERROR_sound_invalid_channel_count = 0x0913,
|
||||
ERROR_sound_read_wave = 0x0914,
|
||||
ERROR_sound_need_more_data = 0x0915, //for internal purposes only
|
||||
ERROR_sound_device_busy = 0x0916, //for internal purposes only
|
||||
ERROR_sound_no_data = 0x0917,
|
||||
ERROR_sound_channel_mask_mismatch = 0x0918,
|
||||
|
||||
|
||||
//permissions
|
||||
ERROR_permissions_client_insufficient = 0x0a08,
|
||||
ERROR_permissions = 0x0a0c,
|
||||
|
||||
//accounting
|
||||
ERROR_accounting_virtualserver_limit_reached = 0x0b00,
|
||||
ERROR_accounting_slot_limit_reached = 0x0b01,
|
||||
ERROR_accounting_license_file_not_found = 0x0b02,
|
||||
ERROR_accounting_license_date_not_ok = 0x0b03,
|
||||
ERROR_accounting_unable_to_connect_to_server = 0x0b04,
|
||||
ERROR_accounting_unknown_error = 0x0b05,
|
||||
ERROR_accounting_server_error = 0x0b06,
|
||||
ERROR_accounting_instance_limit_reached = 0x0b07,
|
||||
ERROR_accounting_instance_check_error = 0x0b08,
|
||||
ERROR_accounting_license_file_invalid = 0x0b09,
|
||||
ERROR_accounting_running_elsewhere = 0x0b0a,
|
||||
ERROR_accounting_instance_duplicated = 0x0b0b,
|
||||
ERROR_accounting_already_started = 0x0b0c,
|
||||
ERROR_accounting_not_started = 0x0b0d,
|
||||
ERROR_accounting_to_many_starts = 0x0b0e,
|
||||
|
||||
//provisioning server
|
||||
ERROR_provisioning_invalid_password = 0x1100,
|
||||
ERROR_provisioning_invalid_request = 0x1101,
|
||||
ERROR_provisioning_no_slots_available = 0x1102,
|
||||
ERROR_provisioning_pool_missing = 0x1103,
|
||||
ERROR_provisioning_pool_unknown = 0x1104,
|
||||
ERROR_provisioning_unknown_ip_location = 0x1105,
|
||||
ERROR_provisioning_internal_tries_exceeded = 0x1106,
|
||||
ERROR_provisioning_too_many_slots_requested = 0x1107,
|
||||
ERROR_provisioning_too_many_reserved = 0x1108,
|
||||
ERROR_provisioning_could_not_connect = 0x1109,
|
||||
ERROR_provisioning_auth_server_not_connected = 0x1110,
|
||||
ERROR_provisioning_auth_data_too_large = 0x1111,
|
||||
ERROR_provisioning_already_initialized = 0x1112,
|
||||
ERROR_provisioning_not_initialized = 0x1113,
|
||||
ERROR_provisioning_connecting = 0x1114,
|
||||
ERROR_provisioning_already_connected = 0x1115,
|
||||
ERROR_provisioning_not_connected = 0x1116,
|
||||
ERROR_provisioning_io_error = 0x1117,
|
||||
ERROR_provisioning_invalid_timeout = 0x1118,
|
||||
ERROR_provisioning_ts3server_not_found = 0x1119,
|
||||
ERROR_provisioning_no_permission = 0x111A,
|
||||
};
|
||||
#endif
|
||||
97
include/teamspeak/public_errors_rare.h
Normal file
@@ -0,0 +1,97 @@
|
||||
#ifndef PUBLIC_ERRORS__RARE_H
|
||||
#define PUBLIC_ERRORS__RARE_H
|
||||
|
||||
//The idea here is: the values are 2 bytes wide, the first byte identifies the group, the second the count within that group
|
||||
|
||||
enum Ts3RareErrorType {
|
||||
//client
|
||||
ERROR_client_invalid_password = 0x0208,
|
||||
ERROR_client_too_many_clones_connected = 0x0209,
|
||||
ERROR_client_is_online = 0x020b,
|
||||
|
||||
//channel
|
||||
ERROR_channel_is_private_channel = 0x030e,
|
||||
//note 0x030f is defined in public_errors;
|
||||
|
||||
//database
|
||||
ERROR_database = 0x0500,
|
||||
ERROR_database_empty_result = 0x0501,
|
||||
ERROR_database_duplicate_entry = 0x0502,
|
||||
ERROR_database_no_modifications = 0x0503,
|
||||
ERROR_database_constraint = 0x0504,
|
||||
ERROR_database_reinvoke = 0x0505,
|
||||
|
||||
//permissions
|
||||
ERROR_permission_invalid_group_id = 0x0a00,
|
||||
ERROR_permission_duplicate_entry = 0x0a01,
|
||||
ERROR_permission_invalid_perm_id = 0x0a02,
|
||||
ERROR_permission_empty_result = 0x0a03,
|
||||
ERROR_permission_default_group_forbidden = 0x0a04,
|
||||
ERROR_permission_invalid_size = 0x0a05,
|
||||
ERROR_permission_invalid_value = 0x0a06,
|
||||
ERROR_permissions_group_not_empty = 0x0a07,
|
||||
ERROR_permissions_insufficient_group_power = 0x0a09,
|
||||
ERROR_permissions_insufficient_permission_power = 0x0a0a,
|
||||
ERROR_permission_template_group_is_used = 0x0a0b,
|
||||
//0x0a0c is in public_errors.h
|
||||
ERROR_permission_used_by_integration = 0x0a0d,
|
||||
|
||||
//server
|
||||
ERROR_server_deployment_active = 0x0405,
|
||||
ERROR_server_unable_to_stop_own_server = 0x0406,
|
||||
ERROR_server_wrong_machineid = 0x0408,
|
||||
ERROR_server_modal_quit = 0x040c,
|
||||
ERROR_server_time_difference_too_large = 0x040f,
|
||||
ERROR_server_blacklisted = 0x0410,
|
||||
|
||||
//messages
|
||||
ERROR_message_invalid_id = 0x0c00,
|
||||
|
||||
//ban
|
||||
ERROR_ban_invalid_id = 0x0d00,
|
||||
ERROR_connect_failed_banned = 0x0d01,
|
||||
ERROR_rename_failed_banned = 0x0d02,
|
||||
ERROR_ban_flooding = 0x0d03,
|
||||
|
||||
//tts
|
||||
ERROR_tts_unable_to_initialize = 0x0e00,
|
||||
|
||||
//privilege key
|
||||
ERROR_privilege_key_invalid = 0x0f00,
|
||||
|
||||
//voip
|
||||
ERROR_voip_pjsua = 0x1000,
|
||||
ERROR_voip_already_initialized = 0x1001,
|
||||
ERROR_voip_too_many_accounts = 0x1002,
|
||||
ERROR_voip_invalid_account = 0x1003,
|
||||
ERROR_voip_internal_error = 0x1004,
|
||||
ERROR_voip_invalid_connectionId = 0x1005,
|
||||
ERROR_voip_cannot_answer_initiated_call = 0x1006,
|
||||
ERROR_voip_not_initialized = 0x1007,
|
||||
|
||||
//ed25519
|
||||
ERROR_ed25519_rng_fail = 0x1300,
|
||||
ERROR_ed25519_signature_invalid = 0x1301,
|
||||
ERROR_ed25519_invalid_key = 0x1302,
|
||||
ERROR_ed25519_unable_to_create_valid_key = 0x1303,
|
||||
ERROR_ed25519_out_of_memory = 0x1304,
|
||||
ERROR_ed25519_exists = 0x1305,
|
||||
ERROR_ed25519_read_beyond_eof = 0x1306,
|
||||
ERROR_ed25519_write_beyond_eof = 0x1307,
|
||||
ERROR_ed25519_version = 0x1308,
|
||||
ERROR_ed25519_invalid = 0x1309,
|
||||
ERROR_ed25519_invalid_date = 0x130A,
|
||||
ERROR_ed25519_unauthorized = 0x130B,
|
||||
ERROR_ed25519_invalid_type = 0x130C,
|
||||
ERROR_ed25519_address_nomatch = 0x130D,
|
||||
ERROR_ed25519_not_valid_yet = 0x130E,
|
||||
ERROR_ed25519_expired = 0x130F,
|
||||
ERROR_ed25519_index_out_of_range = 0x1310,
|
||||
ERROR_ed25519_invalid_size = 0x1311,
|
||||
|
||||
//mytsid - client
|
||||
ERROR_invalid_mytsid_data = 0x1200,
|
||||
ERROR_invalid_integration = 0x1201,
|
||||
};
|
||||
|
||||
#endif
|
||||
359
include/teamspeak/public_rare_definitions.h
Normal file
@@ -0,0 +1,359 @@
|
||||
#ifndef PUBLIC_RARE_DEFINITIONS_H
|
||||
#define PUBLIC_RARE_DEFINITIONS_H
|
||||
|
||||
#include "public_definitions.h"
|
||||
|
||||
//limited length, measured in characters
|
||||
#define TS3_MAX_SIZE_CLIENT_NICKNAME_NONSDK 30
|
||||
#define TS3_MIN_SIZE_CLIENT_NICKNAME_NONSDK 3
|
||||
#define TS3_MAX_SIZE_AWAY_MESSAGE 80
|
||||
#define TS3_MAX_SIZE_GROUP_NAME 30
|
||||
#define TS3_MAX_SIZE_TALK_REQUEST_MESSAGE 50
|
||||
#define TS3_MAX_SIZE_COMPLAIN_MESSAGE 200
|
||||
#define TS3_MAX_SIZE_CLIENT_DESCRIPTION 200
|
||||
#define TS3_MAX_SIZE_HOST_MESSAGE 200
|
||||
#define TS3_MAX_SIZE_HOSTBUTTON_TOOLTIP 50
|
||||
#define TS3_MAX_SIZE_POKE_MESSAGE 100
|
||||
#define TS3_MAX_SIZE_OFFLINE_MESSAGE 4096
|
||||
#define TS3_MAX_SIZE_OFFLINE_MESSAGE_SUBJECT 200
|
||||
|
||||
//limited length, measured in bytes (utf8 encoded)
|
||||
#define TS3_MAX_SIZE_PLUGIN_COMMAND 1024*8
|
||||
#define TS3_MAX_SIZE_VIRTUALSERVER_HOSTBANNER_GFX_URL 2000
|
||||
|
||||
|
||||
enum GroupShowNameTreeMode {
|
||||
GroupShowNameTreeMode_NONE= 0, //dont group show name
|
||||
GroupShowNameTreeMode_BEFORE, //show group name before client name
|
||||
GroupShowNameTreeMode_BEHIND //show group name behind client name
|
||||
};
|
||||
|
||||
enum PluginTargetMode {
|
||||
PluginCommandTarget_CURRENT_CHANNEL=0, //send plugincmd to all clients in current channel
|
||||
PluginCommandTarget_SERVER, //send plugincmd to all clients on server
|
||||
PluginCommandTarget_CLIENT, //send plugincmd to all given client ids
|
||||
PluginCommandTarget_CURRENT_CHANNEL_SUBSCRIBED_CLIENTS, //send plugincmd to all subscribed clients in current channel
|
||||
PluginCommandTarget_MAX
|
||||
};
|
||||
|
||||
enum {
|
||||
SERVER_BINDING_VIRTUALSERVER=0,
|
||||
SERVER_BINDING_SERVERQUERY =1,
|
||||
SERVER_BINDING_FILETRANSFER =2,
|
||||
};
|
||||
|
||||
enum HostMessageMode {
|
||||
HostMessageMode_NONE=0, //dont display anything
|
||||
HostMessageMode_LOG, //display message inside log
|
||||
HostMessageMode_MODAL, //display message inside a modal dialog
|
||||
HostMessageMode_MODALQUIT //display message inside a modal dialog and quit/close server/connection
|
||||
};
|
||||
|
||||
enum HostBannerMode {
|
||||
HostBannerMode_NO_ADJUST=0, //Do not adjust
|
||||
HostBannerMode_ADJUST_IGNORE_ASPECT, //Adjust but ignore aspect ratio
|
||||
HostBannerMode_ADJUST_KEEP_ASPECT, //Adjust and keep aspect ratio
|
||||
};
|
||||
|
||||
enum ClientType {
|
||||
ClientType_NORMAL = 0,
|
||||
ClientType_SERVERQUERY,
|
||||
};
|
||||
|
||||
enum AwayStatus {
|
||||
AWAY_NONE = 0,
|
||||
AWAY_ZZZ,
|
||||
};
|
||||
|
||||
enum CommandLinePropertiesRare {
|
||||
#ifdef SERVER
|
||||
COMMANDLINE_CREATE_DEFAULT_VIRTUALSERVER= 0, //create default virtualserver
|
||||
COMMANDLINE_MACHINE_ID, //machine id (starts only virtualserver with given machineID
|
||||
COMMANDLINE_DEFAULT_VOICE_PORT,
|
||||
COMMANDLINE_VOICE_IP,
|
||||
COMMANDLINE_THREADS_VOICE_UDP,
|
||||
COMMANDLINE_LICENSEPATH,
|
||||
#ifndef SDK
|
||||
COMMANDLINE_FILETRANSFER_PORT,
|
||||
COMMANDLINE_FILETRANSFER_IP,
|
||||
COMMANDLINE_QUERY_PORT,
|
||||
COMMANDLINE_QUERY_IP,
|
||||
COMMANDLINE_QUERY_IP_WHITELIST,
|
||||
COMMANDLINE_QUERY_IP_BLACKLIST,
|
||||
COMMANDLINE_CLEAR_DATABASE,
|
||||
COMMANDLINE_SERVERADMIN_PASSWORD,
|
||||
COMMANDLINE_DBPLUGIN,
|
||||
COMMANDLINE_DBPLUGINPARAMETER,
|
||||
COMMANDLINE_DBSQLPATH,
|
||||
COMMANDLINE_DBSQLCREATEPATH,
|
||||
COMMANDLINE_DBCONNECTIONS,
|
||||
COMMANDLINE_LOGPATH,
|
||||
COMMANDLINE_CREATEINIFILE,
|
||||
COMMANDLINE_INIFILE,
|
||||
COMMANDLINE_LOGQUERYCOMMANDS,
|
||||
COMMANDLINE_DBCLIENTKEEPDAYS,
|
||||
COMMANDLINE_NO_PERMISSION_UPDATE,
|
||||
COMMANDLINE_OPEN_WIN_CONSOLE,
|
||||
COMMANDLINE_NO_PASSWORD_DIALOG,
|
||||
COMMANDLINE_LOGAPPEND,
|
||||
COMMANDLINE_QUERY_SKIPBRUTEFORCECHECK,
|
||||
COMMANDLINE_QUERY_BUFFER_MB,
|
||||
COMMANDLINE_HTTP_PROXY,
|
||||
COMMANDLINE_LICENSE_ACCEPTED,
|
||||
COMMANDLINE_SERVERQUERYDOCS_PATH,
|
||||
COMMANDLINE_QUERY_SSH_IP,
|
||||
COMMANDLINE_QUERY_SSH_PORT,
|
||||
COMMANDLINE_QUERY_PROTOCOLS,
|
||||
COMMANDLINE_QUERY_SSH_RSA_HOST_KEY,
|
||||
COMMANDLINE_QUERY_TIMEOUT,
|
||||
COMMANDLINE_VERSION,
|
||||
COMMANDLINE_CRASHDUMPSPATH,
|
||||
COMMANDLINE_DAEMON,
|
||||
COMMANDLINE_PID_FILE,
|
||||
#endif
|
||||
#else
|
||||
COMMANDLINE_NOTHING=0,
|
||||
#endif
|
||||
COMMANDLINE_ENDMARKER_RARE,
|
||||
};
|
||||
|
||||
enum ServerInstancePropertiesRare {
|
||||
SERVERINSTANCE_DATABASE_VERSION= 0,
|
||||
SERVERINSTANCE_FILETRANSFER_PORT,
|
||||
SERVERINSTANCE_SERVER_ENTROPY,
|
||||
SERVERINSTANCE_MONTHLY_TIMESTAMP,
|
||||
SERVERINSTANCE_MAX_DOWNLOAD_TOTAL_BANDWIDTH,
|
||||
SERVERINSTANCE_MAX_UPLOAD_TOTAL_BANDWIDTH,
|
||||
SERVERINSTANCE_GUEST_SERVERQUERY_GROUP,
|
||||
SERVERINSTANCE_SERVERQUERY_FLOOD_COMMANDS, //how many commands we can issue while in the SERVERINSTANCE_SERVERQUERY_FLOOD_TIME window
|
||||
SERVERINSTANCE_SERVERQUERY_FLOOD_TIME, //time window in seconds for max command execution check
|
||||
SERVERINSTANCE_SERVERQUERY_BAN_TIME, //how many seconds someone get banned if he floods
|
||||
SERVERINSTANCE_TEMPLATE_SERVERADMIN_GROUP,
|
||||
SERVERINSTANCE_TEMPLATE_SERVERDEFAULT_GROUP,
|
||||
SERVERINSTANCE_TEMPLATE_CHANNELADMIN_GROUP,
|
||||
SERVERINSTANCE_TEMPLATE_CHANNELDEFAULT_GROUP,
|
||||
SERVERINSTANCE_PERMISSIONS_VERSION,
|
||||
SERVERINSTANCE_PENDING_CONNECTIONS_PER_IP,
|
||||
SERVERINSTANCE_SERVERQUERY_MAX_CONNECTIONS_PER_IP,
|
||||
SERVERINSTANCE_ENDMARKER_RARE,
|
||||
};
|
||||
|
||||
enum VirtualServerPropertiesRare {
|
||||
VIRTUALSERVER_DUMMY_1 = VIRTUALSERVER_ENDMARKER,
|
||||
VIRTUALSERVER_DUMMY_2,
|
||||
VIRTUALSERVER_DUMMY_3,
|
||||
VIRTUALSERVER_DUMMY_4,
|
||||
VIRTUALSERVER_DUMMY_5,
|
||||
VIRTUALSERVER_DUMMY_6,
|
||||
VIRTUALSERVER_DUMMY_7,
|
||||
VIRTUALSERVER_DUMMY_8,
|
||||
VIRTUALSERVER_KEYPAIR, //internal use
|
||||
VIRTUALSERVER_HOSTMESSAGE, //available when connected, not updated while connected
|
||||
VIRTUALSERVER_HOSTMESSAGE_MODE, //available when connected, not updated while connected
|
||||
VIRTUALSERVER_FILEBASE, //not available to clients, stores the folder used for file transfers
|
||||
VIRTUALSERVER_DEFAULT_SERVER_GROUP, //the client permissions server group that a new client gets assigned
|
||||
VIRTUALSERVER_DEFAULT_CHANNEL_GROUP, //the channel permissions group that a new client gets assigned when joining a channel
|
||||
VIRTUALSERVER_FLAG_PASSWORD, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_DEFAULT_CHANNEL_ADMIN_GROUP, //the channel permissions group that a client gets assigned when creating a channel
|
||||
VIRTUALSERVER_MAX_DOWNLOAD_TOTAL_BANDWIDTH, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_MAX_UPLOAD_TOTAL_BANDWIDTH, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_HOSTBANNER_URL, //available when connected, always up-to-date
|
||||
VIRTUALSERVER_HOSTBANNER_GFX_URL, //available when connected, always up-to-date
|
||||
VIRTUALSERVER_HOSTBANNER_GFX_INTERVAL, //available when connected, always up-to-date
|
||||
VIRTUALSERVER_COMPLAIN_AUTOBAN_COUNT, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_COMPLAIN_AUTOBAN_TIME, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_COMPLAIN_REMOVE_TIME, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_MIN_CLIENTS_IN_CHANNEL_BEFORE_FORCED_SILENCE,//only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_PRIORITY_SPEAKER_DIMM_MODIFICATOR, //available when connected, always up-to-date
|
||||
VIRTUALSERVER_ID, //available when connected
|
||||
VIRTUALSERVER_ANTIFLOOD_POINTS_TICK_REDUCE, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_ANTIFLOOD_POINTS_NEEDED_COMMAND_BLOCK, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_ANTIFLOOD_POINTS_NEEDED_IP_BLOCK, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_CLIENT_CONNECTIONS, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_QUERY_CLIENT_CONNECTIONS, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_HOSTBUTTON_TOOLTIP, //available when connected, always up-to-date
|
||||
VIRTUALSERVER_HOSTBUTTON_URL, //available when connected, always up-to-date
|
||||
VIRTUALSERVER_HOSTBUTTON_GFX_URL, //available when connected, always up-to-date
|
||||
VIRTUALSERVER_QUERYCLIENTS_ONLINE, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_DOWNLOAD_QUOTA, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_UPLOAD_QUOTA, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_MONTH_BYTES_DOWNLOADED, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_MONTH_BYTES_UPLOADED, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_TOTAL_BYTES_DOWNLOADED, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_TOTAL_BYTES_UPLOADED, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_PORT, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_AUTOSTART, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_MACHINE_ID, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_NEEDED_IDENTITY_SECURITY_LEVEL, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_LOG_CLIENT, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_LOG_QUERY, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_LOG_CHANNEL, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_LOG_PERMISSIONS, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_LOG_SERVER, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_LOG_FILETRANSFER, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_MIN_CLIENT_VERSION, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_NAME_PHONETIC, //available when connected, always up-to-date
|
||||
VIRTUALSERVER_ICON_ID, //available when connected, always up-to-date
|
||||
VIRTUALSERVER_RESERVED_SLOTS, //available when connected, always up-to-date
|
||||
VIRTUALSERVER_TOTAL_PACKETLOSS_SPEECH, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_TOTAL_PACKETLOSS_KEEPALIVE, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_TOTAL_PACKETLOSS_CONTROL, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_TOTAL_PACKETLOSS_TOTAL, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_TOTAL_PING, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_IP, //internal use | contains comma separated ip list
|
||||
VIRTUALSERVER_WEBLIST_ENABLED, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_AUTOGENERATED_PRIVILEGEKEY, //internal use
|
||||
VIRTUALSERVER_ASK_FOR_PRIVILEGEKEY, //available when connected
|
||||
VIRTUALSERVER_HOSTBANNER_MODE, //available when connected, always up-to-date
|
||||
VIRTUALSERVER_CHANNEL_TEMP_DELETE_DELAY_DEFAULT, //available when connected, always up-to-date
|
||||
VIRTUALSERVER_MIN_ANDROID_VERSION, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_MIN_IOS_VERSION, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_MIN_WINPHONE_VERSION, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_NICKNAME, //available when connected, always up-to-date
|
||||
VIRTUALSERVER_ACCOUNTING_TOKEN, //internal use | contains base64 encoded token data
|
||||
VIRTUALSERVER_PROTOCOL_VERIFY_KEYPAIR, //internal use
|
||||
VIRTUALSERVER_ANTIFLOOD_POINTS_NEEDED_PLUGIN_BLOCK, //only available on request (=> requestServerVariables)
|
||||
VIRTUALSERVER_ENDMARKER_RARE
|
||||
};
|
||||
|
||||
enum ChannelPropertiesRare {
|
||||
CHANNEL_DUMMY_2= CHANNEL_ENDMARKER,
|
||||
CHANNEL_DUMMY_3,
|
||||
CHANNEL_DUMMY_4,
|
||||
CHANNEL_DUMMY_5,
|
||||
CHANNEL_DUMMY_6,
|
||||
CHANNEL_DUMMY_7,
|
||||
CHANNEL_FLAG_MAXCLIENTS_UNLIMITED, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_FLAG_MAXFAMILYCLIENTS_UNLIMITED,//Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_FLAG_MAXFAMILYCLIENTS_INHERITED,//Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_FLAG_ARE_SUBSCRIBED, //Only available client side, stores whether we are subscribed to this channel
|
||||
CHANNEL_FILEPATH, //not available client side, the folder used for file-transfers for this channel
|
||||
CHANNEL_NEEDED_TALK_POWER, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_FORCED_SILENCE, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_NAME_PHONETIC, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_ICON_ID, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_BANNER_GFX_URL, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_BANNER_MODE, //Available for all channels that are "in view", always up-to-date
|
||||
CHANNEL_ENDMARKER_RARE,
|
||||
CHANNEL_DELETE_DELAY_DEADLINE = 127 //(for clientlibv2) expected delete time in monotonic clock seconds or 0 if nothing is expected
|
||||
};
|
||||
|
||||
enum ClientPropertiesRare {
|
||||
CLIENT_DUMMY_4 = CLIENT_ENDMARKER,
|
||||
CLIENT_DUMMY_5,
|
||||
CLIENT_DUMMY_6,
|
||||
CLIENT_DUMMY_7,
|
||||
CLIENT_DUMMY_8,
|
||||
CLIENT_DUMMY_9,
|
||||
CLIENT_KEY_OFFSET, //internal use
|
||||
CLIENT_LAST_VAR_REQUEST, //internal use
|
||||
CLIENT_LOGIN_NAME, //used for serverquery clients, makes no sense on normal clients currently
|
||||
CLIENT_LOGIN_PASSWORD, //used for serverquery clients, makes no sense on normal clients currently
|
||||
CLIENT_DATABASE_ID, //automatically up-to-date for any client "in view", only valid with PERMISSION feature, holds database client id
|
||||
CLIENT_CHANNEL_GROUP_ID, //automatically up-to-date for any client "in view", only valid with PERMISSION feature, holds database client id
|
||||
CLIENT_SERVERGROUPS, //automatically up-to-date for any client "in view", only valid with PERMISSION feature, holds all servergroups client belongs too
|
||||
CLIENT_CREATED, //this needs to be requested (=> requestClientVariables), first time this client connected to this server
|
||||
CLIENT_LASTCONNECTED, //this needs to be requested (=> requestClientVariables), last time this client connected to this server
|
||||
CLIENT_TOTALCONNECTIONS, //this needs to be requested (=> requestClientVariables), how many times this client connected to this server
|
||||
CLIENT_AWAY, //automatically up-to-date for any client "in view", this clients away status
|
||||
CLIENT_AWAY_MESSAGE, //automatically up-to-date for any client "in view", this clients away message
|
||||
CLIENT_TYPE, //automatically up-to-date for any client "in view", determines if this is a real client or a server-query connection
|
||||
CLIENT_FLAG_AVATAR, //automatically up-to-date for any client "in view", this client got an avatar
|
||||
CLIENT_TALK_POWER, //automatically up-to-date for any client "in view", only valid with PERMISSION feature, holds database client id
|
||||
CLIENT_TALK_REQUEST, //automatically up-to-date for any client "in view", only valid with PERMISSION feature, holds timestamp where client requested to talk
|
||||
CLIENT_TALK_REQUEST_MSG, //automatically up-to-date for any client "in view", only valid with PERMISSION feature, holds matter for the request
|
||||
CLIENT_DESCRIPTION, //automatically up-to-date for any client "in view"
|
||||
CLIENT_IS_TALKER, //automatically up-to-date for any client "in view"
|
||||
CLIENT_MONTH_BYTES_UPLOADED, //this needs to be requested (=> requestClientVariables)
|
||||
CLIENT_MONTH_BYTES_DOWNLOADED, //this needs to be requested (=> requestClientVariables)
|
||||
CLIENT_TOTAL_BYTES_UPLOADED, //this needs to be requested (=> requestClientVariables)
|
||||
CLIENT_TOTAL_BYTES_DOWNLOADED, //this needs to be requested (=> requestClientVariables)
|
||||
CLIENT_IS_PRIORITY_SPEAKER, //automatically up-to-date for any client "in view"
|
||||
CLIENT_UNREAD_MESSAGES, //automatically up-to-date for any client "in view"
|
||||
CLIENT_NICKNAME_PHONETIC, //automatically up-to-date for any client "in view"
|
||||
CLIENT_NEEDED_SERVERQUERY_VIEW_POWER, //automatically up-to-date for any client "in view"
|
||||
CLIENT_DEFAULT_TOKEN, //only usable for ourself, the default token we used to connect on our last connection attempt
|
||||
CLIENT_ICON_ID, //automatically up-to-date for any client "in view"
|
||||
CLIENT_IS_CHANNEL_COMMANDER, //automatically up-to-date for any client "in view"
|
||||
CLIENT_COUNTRY, //automatically up-to-date for any client "in view"
|
||||
CLIENT_CHANNEL_GROUP_INHERITED_CHANNEL_ID, //automatically up-to-date for any client "in view", only valid with PERMISSION feature, contains channel_id where the channel_group_id is set from
|
||||
CLIENT_BADGES, //automatically up-to-date for any client "in view", stores icons for partner badges
|
||||
CLIENT_MYTEAMSPEAK_ID, //automatically up-to-date for any client "in view", stores myteamspeak id
|
||||
CLIENT_INTEGRATIONS, //automatically up-to-date for any client "in view", stores integrations
|
||||
CLIENT_ACTIVE_INTEGRATIONS_INFO, //stores info from the myts server and contains the subscription info
|
||||
CLIENT_MYTS_AVATAR,
|
||||
CLIENT_SIGNED_BADGES,
|
||||
CLIENT_ENDMARKER_RARE,
|
||||
CLIENT_HW_ID = 127 //(for clientlibv2) unique hardware id
|
||||
};
|
||||
|
||||
enum ConnectionPropertiesRare {
|
||||
CONNECTION_DUMMY_0= CONNECTION_ENDMARKER,
|
||||
CONNECTION_DUMMY_1,
|
||||
CONNECTION_DUMMY_2,
|
||||
CONNECTION_DUMMY_3,
|
||||
CONNECTION_DUMMY_4,
|
||||
CONNECTION_DUMMY_5,
|
||||
CONNECTION_DUMMY_6,
|
||||
CONNECTION_DUMMY_7,
|
||||
CONNECTION_DUMMY_8,
|
||||
CONNECTION_DUMMY_9,
|
||||
CONNECTION_FILETRANSFER_BANDWIDTH_SENT, //how many bytes per second are currently being sent by file transfers
|
||||
CONNECTION_FILETRANSFER_BANDWIDTH_RECEIVED, //how many bytes per second are currently being received by file transfers
|
||||
CONNECTION_FILETRANSFER_BYTES_RECEIVED_TOTAL, //how many bytes we received in total through file transfers
|
||||
CONNECTION_FILETRANSFER_BYTES_SENT_TOTAL, //how many bytes we sent in total through file transfers
|
||||
CONNECTION_ENDMARKER_RARE,
|
||||
};
|
||||
|
||||
enum BBCodeTags {
|
||||
BBCodeTag_B = 0x00000001,
|
||||
BBCodeTag_I = 0x00000002,
|
||||
BBCodeTag_U = 0x00000004,
|
||||
BBCodeTag_S = 0x00000008,
|
||||
BBCodeTag_SUP = 0x00000010,
|
||||
BBCodeTag_SUB = 0x00000020,
|
||||
BBCodeTag_COLOR = 0x00000040,
|
||||
BBCodeTag_SIZE = 0x00000080,
|
||||
BBCodeTag_group_text = 0x000000FF,
|
||||
|
||||
BBCodeTag_LEFT = 0x00001000,
|
||||
BBCodeTag_RIGHT = 0x00002000,
|
||||
BBCodeTag_CENTER = 0x00004000,
|
||||
BBCodeTag_group_align = 0x00007000,
|
||||
|
||||
BBCodeTag_URL = 0x00010000,
|
||||
BBCodeTag_IMAGE = 0x00020000,
|
||||
BBCodeTag_HR = 0x00040000,
|
||||
|
||||
BBCodeTag_LIST = 0x00100000,
|
||||
BBCodeTag_LISTITEM = 0x00200000,
|
||||
BBCodeTag_group_list = 0x00300000,
|
||||
|
||||
BBCodeTag_TABLE = 0x00400000,
|
||||
BBCodeTag_TR = 0x00800000,
|
||||
BBCodeTag_TH = 0x01000000,
|
||||
BBCodeTag_TD = 0x02000000,
|
||||
BBCodeTag_group_table = 0x03C00000,
|
||||
|
||||
BBCodeTag_def_simple = BBCodeTag_B | BBCodeTag_I | BBCodeTag_U | BBCodeTag_S | BBCodeTag_SUP | BBCodeTag_SUB |BBCodeTag_COLOR | BBCodeTag_URL,
|
||||
BBCodeTag_def_simple_Img = BBCodeTag_def_simple | BBCodeTag_IMAGE,
|
||||
BBCodeTag_def_extended = BBCodeTag_group_text | BBCodeTag_group_align | BBCodeTag_URL | BBCodeTag_IMAGE | BBCodeTag_HR | BBCodeTag_group_list | BBCodeTag_group_table,
|
||||
};
|
||||
|
||||
enum LicenseIssue {
|
||||
Blacklisted = 0,
|
||||
Greylisted
|
||||
};
|
||||
|
||||
enum MytsDataUnsetFlags {
|
||||
MytsDataUnsetFlag_None = 0,
|
||||
MytsDataUnsetFlag_Badges = 1,
|
||||
MytsDataUnsetFlag_Avatar = 1 << 1,
|
||||
|
||||
MytsDataUnsetFlag_All = MytsDataUnsetFlag_Badges | MytsDataUnsetFlag_Avatar // make sure "all" really contains all flags
|
||||
};
|
||||
|
||||
typedef int(*ExtraBBCodeValidator)(void* userparam, const char* tag, const char* paramValue, int paramValueSize, const char* childValue, int childValueSize);
|
||||
typedef const char* (*ExtraBBCodeParamTransform)(void* userparam, const char* tag, const char* paramValue);
|
||||
|
||||
#endif //PUBLIC_RARE_DEFINITIONS_H
|
||||
283
include/ts3_functions.h
Normal file
@@ -0,0 +1,283 @@
|
||||
#ifndef TS3_FUNCTIONS_H
|
||||
#define TS3_FUNCTIONS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "teamspeak/clientlib_publicdefinitions.h"
|
||||
#include "teamspeak/public_definitions.h"
|
||||
#include "plugin_definitions.h"
|
||||
|
||||
/* Functions exported to plugin from main binary */
|
||||
struct TS3Functions {
|
||||
unsigned int (*getClientLibVersion)(char** result);
|
||||
unsigned int (*getClientLibVersionNumber)(uint64* result);
|
||||
unsigned int (*spawnNewServerConnectionHandler)(int port, uint64* result);
|
||||
unsigned int (*destroyServerConnectionHandler)(uint64 serverConnectionHandlerID);
|
||||
|
||||
/* Error handling */
|
||||
unsigned int (*getErrorMessage)(unsigned int errorCode, char** error);
|
||||
|
||||
/* Memory management */
|
||||
unsigned int (*freeMemory)(void* pointer);
|
||||
|
||||
/* Logging */
|
||||
unsigned int (*logMessage)(const char* logMessage, enum LogLevel severity, const char* channel, uint64 logID);
|
||||
|
||||
/* Sound */
|
||||
unsigned int (*getPlaybackDeviceList)(const char* modeID, char**** result);
|
||||
unsigned int (*getPlaybackModeList)(char*** result);
|
||||
unsigned int (*getCaptureDeviceList)(const char* modeID, char**** result);
|
||||
unsigned int (*getCaptureModeList)(char*** result);
|
||||
unsigned int (*getDefaultPlaybackDevice)(const char* modeID, char*** result);
|
||||
unsigned int (*getDefaultPlayBackMode)(char** result);
|
||||
unsigned int (*getDefaultCaptureDevice)(const char* modeID, char*** result);
|
||||
unsigned int (*getDefaultCaptureMode)(char** result);
|
||||
unsigned int (*openPlaybackDevice)(uint64 serverConnectionHandlerID, const char* modeID, const char* playbackDevice);
|
||||
unsigned int (*openCaptureDevice)(uint64 serverConnectionHandlerID, const char* modeID, const char* captureDevice);
|
||||
unsigned int (*getCurrentPlaybackDeviceName)(uint64 serverConnectionHandlerID, char** result, int* isDefault);
|
||||
unsigned int (*getCurrentPlayBackMode)(uint64 serverConnectionHandlerID, char** result);
|
||||
unsigned int (*getCurrentCaptureDeviceName)(uint64 serverConnectionHandlerID, char** result, int* isDefault);
|
||||
unsigned int (*getCurrentCaptureMode)(uint64 serverConnectionHandlerID, char** result);
|
||||
unsigned int (*initiateGracefulPlaybackShutdown)(uint64 serverConnectionHandlerID);
|
||||
unsigned int (*closePlaybackDevice)(uint64 serverConnectionHandlerID);
|
||||
unsigned int (*closeCaptureDevice)(uint64 serverConnectionHandlerID);
|
||||
unsigned int (*activateCaptureDevice)(uint64 serverConnectionHandlerID);
|
||||
unsigned int (*playWaveFileHandle)(uint64 serverConnectionHandlerID, const char* path, int loop, uint64* waveHandle);
|
||||
unsigned int (*pauseWaveFileHandle)(uint64 serverConnectionHandlerID, uint64 waveHandle, int pause);
|
||||
unsigned int (*closeWaveFileHandle)(uint64 serverConnectionHandlerID, uint64 waveHandle);
|
||||
unsigned int (*playWaveFile)(uint64 serverConnectionHandlerID, const char* path);
|
||||
unsigned int (*registerCustomDevice)(const char* deviceID, const char* deviceDisplayName, int capFrequency, int capChannels, int playFrequency, int playChannels);
|
||||
unsigned int (*unregisterCustomDevice)(const char* deviceID);
|
||||
unsigned int (*processCustomCaptureData)(const char* deviceName, const short* buffer, int samples);
|
||||
unsigned int (*acquireCustomPlaybackData)(const char* deviceName, short* buffer, int samples);
|
||||
|
||||
/* Preprocessor */
|
||||
unsigned int (*getPreProcessorInfoValueFloat)(uint64 serverConnectionHandlerID, const char* ident, float* result);
|
||||
unsigned int (*getPreProcessorConfigValue)(uint64 serverConnectionHandlerID, const char* ident, char** result);
|
||||
unsigned int (*setPreProcessorConfigValue)(uint64 serverConnectionHandlerID, const char* ident, const char* value);
|
||||
|
||||
/* Encoder */
|
||||
unsigned int (*getEncodeConfigValue)(uint64 serverConnectionHandlerID, const char* ident, char** result);
|
||||
|
||||
/* Playback */
|
||||
unsigned int (*getPlaybackConfigValueAsFloat)(uint64 serverConnectionHandlerID, const char* ident, float* result);
|
||||
unsigned int (*setPlaybackConfigValue)(uint64 serverConnectionHandlerID, const char* ident, const char* value);
|
||||
unsigned int (*setClientVolumeModifier)(uint64 serverConnectionHandlerID, anyID clientID, float value);
|
||||
|
||||
/* Recording */
|
||||
unsigned int (*startVoiceRecording)(uint64 serverConnectionHandlerID);
|
||||
unsigned int (*stopVoiceRecording)(uint64 serverConnectionHandlerID);
|
||||
|
||||
/* 3d sound positioning */
|
||||
unsigned int (*systemset3DListenerAttributes) (uint64 serverConnectionHandlerID, const TS3_VECTOR* position, const TS3_VECTOR* forward, const TS3_VECTOR* up);
|
||||
unsigned int (*set3DWaveAttributes) (uint64 serverConnectionHandlerID, uint64 waveHandle, const TS3_VECTOR* position);
|
||||
unsigned int (*systemset3DSettings) (uint64 serverConnectionHandlerID, float distanceFactor, float rolloffScale);
|
||||
unsigned int (*channelset3DAttributes) (uint64 serverConnectionHandlerID, anyID clientID, const TS3_VECTOR* position);
|
||||
|
||||
/* Interaction with the server */
|
||||
unsigned int (*startConnection)(uint64 serverConnectionHandlerID, const char* identity, const char* ip, unsigned int port, const char* nickname,
|
||||
const char** defaultChannelArray, const char* defaultChannelPassword, const char* serverPassword);
|
||||
unsigned int (*stopConnection)(uint64 serverConnectionHandlerID, const char* quitMessage);
|
||||
unsigned int (*requestClientMove)(uint64 serverConnectionHandlerID, anyID clientID, uint64 newChannelID, const char* password, const char* returnCode);
|
||||
unsigned int (*requestClientVariables)(uint64 serverConnectionHandlerID, anyID clientID, const char* returnCode);
|
||||
unsigned int (*requestClientKickFromChannel)(uint64 serverConnectionHandlerID, anyID clientID, const char* kickReason, const char* returnCode);
|
||||
unsigned int (*requestClientKickFromServer)(uint64 serverConnectionHandlerID, anyID clientID, const char* kickReason, const char* returnCode);
|
||||
unsigned int (*requestChannelDelete)(uint64 serverConnectionHandlerID, uint64 channelID, int force, const char* returnCode);
|
||||
unsigned int (*requestChannelMove)(uint64 serverConnectionHandlerID, uint64 channelID, uint64 newChannelParentID, uint64 newChannelOrder, const char* returnCode);
|
||||
unsigned int (*requestSendPrivateTextMsg)(uint64 serverConnectionHandlerID, const char* message, anyID targetClientID, const char* returnCode);
|
||||
unsigned int (*requestSendChannelTextMsg)(uint64 serverConnectionHandlerID, const char* message, uint64 targetChannelID, const char* returnCode);
|
||||
unsigned int (*requestSendServerTextMsg)(uint64 serverConnectionHandlerID, const char* message, const char* returnCode);
|
||||
unsigned int (*requestConnectionInfo)(uint64 serverConnectionHandlerID, anyID clientID, const char* returnCode);
|
||||
unsigned int (*requestClientSetWhisperList)(uint64 serverConnectionHandlerID, anyID clientID, const uint64* targetChannelIDArray, const anyID* targetClientIDArray, const char* returnCode);
|
||||
unsigned int (*requestChannelSubscribe)(uint64 serverConnectionHandlerID, const uint64* channelIDArray, const char* returnCode);
|
||||
unsigned int (*requestChannelSubscribeAll)(uint64 serverConnectionHandlerID, const char* returnCode);
|
||||
unsigned int (*requestChannelUnsubscribe)(uint64 serverConnectionHandlerID, const uint64* channelIDArray, const char* returnCode);
|
||||
unsigned int (*requestChannelUnsubscribeAll)(uint64 serverConnectionHandlerID, const char* returnCode);
|
||||
unsigned int (*requestChannelDescription)(uint64 serverConnectionHandlerID, uint64 channelID, const char* returnCode);
|
||||
unsigned int (*requestMuteClients)(uint64 serverConnectionHandlerID, const anyID* clientIDArray, const char* returnCode);
|
||||
unsigned int (*requestUnmuteClients)(uint64 serverConnectionHandlerID, const anyID* clientIDArray, const char* returnCode);
|
||||
unsigned int (*requestClientPoke)(uint64 serverConnectionHandlerID, anyID clientID, const char* message, const char* returnCode);
|
||||
unsigned int (*requestClientIDs)(uint64 serverConnectionHandlerID, const char* clientUniqueIdentifier, const char* returnCode);
|
||||
unsigned int (*clientChatClosed)(uint64 serverConnectionHandlerID, const char* clientUniqueIdentifier, anyID clientID, const char* returnCode);
|
||||
unsigned int (*clientChatComposing)(uint64 serverConnectionHandlerID, anyID clientID, const char* returnCode);
|
||||
unsigned int (*requestServerTemporaryPasswordAdd)(uint64 serverConnectionHandlerID, const char* password, const char* description, uint64 duration, uint64 targetChannelID, const char* targetChannelPW, const char* returnCode);
|
||||
unsigned int (*requestServerTemporaryPasswordDel)(uint64 serverConnectionHandlerID, const char* password, const char* returnCode);
|
||||
unsigned int (*requestServerTemporaryPasswordList)(uint64 serverConnectionHandlerID, const char* returnCode);
|
||||
|
||||
/* Access clientlib information */
|
||||
|
||||
/* Query own client ID */
|
||||
unsigned int (*getClientID)(uint64 serverConnectionHandlerID, anyID* result);
|
||||
|
||||
/* Client info */
|
||||
unsigned int (*getClientSelfVariableAsInt)(uint64 serverConnectionHandlerID, size_t flag, int* result);
|
||||
unsigned int (*getClientSelfVariableAsString)(uint64 serverConnectionHandlerID, size_t flag, char** result);
|
||||
unsigned int (*setClientSelfVariableAsInt)(uint64 serverConnectionHandlerID, size_t flag, int value);
|
||||
unsigned int (*setClientSelfVariableAsString)(uint64 serverConnectionHandlerID, size_t flag, const char* value);
|
||||
unsigned int (*flushClientSelfUpdates)(uint64 serverConnectionHandlerID, const char* returnCode);
|
||||
unsigned int (*getClientVariableAsInt)(uint64 serverConnectionHandlerID, anyID clientID, size_t flag, int* result);
|
||||
unsigned int (*getClientVariableAsUInt64)(uint64 serverConnectionHandlerID, anyID clientID, size_t flag, uint64* result);
|
||||
unsigned int (*getClientVariableAsString)(uint64 serverConnectionHandlerID, anyID clientID, size_t flag, char** result);
|
||||
unsigned int (*getClientList)(uint64 serverConnectionHandlerID, anyID** result);
|
||||
unsigned int (*getChannelOfClient)(uint64 serverConnectionHandlerID, anyID clientID, uint64* result);
|
||||
|
||||
/* Channel info */
|
||||
unsigned int (*getChannelVariableAsInt)(uint64 serverConnectionHandlerID, uint64 channelID, size_t flag, int* result);
|
||||
unsigned int (*getChannelVariableAsUInt64)(uint64 serverConnectionHandlerID, uint64 channelID, size_t flag, uint64* result);
|
||||
unsigned int (*getChannelVariableAsString)(uint64 serverConnectionHandlerID, uint64 channelID, size_t flag, char** result);
|
||||
unsigned int (*getChannelIDFromChannelNames)(uint64 serverConnectionHandlerID, char** channelNameArray, uint64* result);
|
||||
unsigned int (*setChannelVariableAsInt)(uint64 serverConnectionHandlerID, uint64 channelID, size_t flag, int value);
|
||||
unsigned int (*setChannelVariableAsUInt64)(uint64 serverConnectionHandlerID, uint64 channelID, size_t flag, uint64 value);
|
||||
unsigned int (*setChannelVariableAsString)(uint64 serverConnectionHandlerID, uint64 channelID, size_t flag, const char* value);
|
||||
unsigned int (*flushChannelUpdates)(uint64 serverConnectionHandlerID, uint64 channelID, const char* returnCode);
|
||||
unsigned int (*flushChannelCreation)(uint64 serverConnectionHandlerID, uint64 channelParentID, const char* returnCode);
|
||||
unsigned int (*getChannelList)(uint64 serverConnectionHandlerID, uint64** result);
|
||||
unsigned int (*getChannelClientList)(uint64 serverConnectionHandlerID, uint64 channelID, anyID** result);
|
||||
unsigned int (*getParentChannelOfChannel)(uint64 serverConnectionHandlerID, uint64 channelID, uint64* result);
|
||||
|
||||
/* Server info */
|
||||
unsigned int (*getServerConnectionHandlerList)(uint64** result);
|
||||
unsigned int (*getServerVariableAsInt)(uint64 serverConnectionHandlerID, size_t flag, int* result);
|
||||
unsigned int (*getServerVariableAsUInt64)(uint64 serverConnectionHandlerID, size_t flag, uint64* result);
|
||||
unsigned int (*getServerVariableAsString)(uint64 serverConnectionHandlerID, size_t flag, char** result);
|
||||
unsigned int (*requestServerVariables)(uint64 serverConnectionHandlerID);
|
||||
|
||||
/* Connection info */
|
||||
unsigned int (*getConnectionStatus)(uint64 serverConnectionHandlerID, int* result);
|
||||
unsigned int (*getConnectionVariableAsUInt64)(uint64 serverConnectionHandlerID, anyID clientID, size_t flag, uint64* result);
|
||||
unsigned int (*getConnectionVariableAsDouble)(uint64 serverConnectionHandlerID, anyID clientID, size_t flag, double* result);
|
||||
unsigned int (*getConnectionVariableAsString)(uint64 serverConnectionHandlerID, anyID clientID, size_t flag, char** result);
|
||||
unsigned int (*cleanUpConnectionInfo)(uint64 serverConnectionHandlerID, anyID clientID);
|
||||
|
||||
/* Client related */
|
||||
unsigned int (*requestClientDBIDfromUID)(uint64 serverConnectionHandlerID, const char* clientUniqueIdentifier, const char* returnCode);
|
||||
unsigned int (*requestClientNamefromUID)(uint64 serverConnectionHandlerID, const char* clientUniqueIdentifier, const char* returnCode);
|
||||
unsigned int (*requestClientNamefromDBID)(uint64 serverConnectionHandlerID, uint64 clientDatabaseID, const char* returnCode);
|
||||
unsigned int (*requestClientEditDescription)(uint64 serverConnectionHandlerID, anyID clientID, const char* clientDescription, const char* returnCode);
|
||||
unsigned int (*requestClientSetIsTalker)(uint64 serverConnectionHandlerID, anyID clientID, int isTalker, const char* returnCode);
|
||||
unsigned int (*requestIsTalker)(uint64 serverConnectionHandlerID, int isTalkerRequest, const char* isTalkerRequestMessage, const char* returnCode);
|
||||
|
||||
/* Plugin related */
|
||||
unsigned int (*requestSendClientQueryCommand)(uint64 serverConnectionHandlerID, const char* command, const char* returnCode);
|
||||
|
||||
/* Filetransfer */
|
||||
unsigned int (*getTransferFileName)(anyID transferID, char** result);
|
||||
unsigned int (*getTransferFilePath)(anyID transferID, char** result);
|
||||
unsigned int (*getTransferFileSize)(anyID transferID, uint64* result);
|
||||
unsigned int (*getTransferFileSizeDone)(anyID transferID, uint64* result);
|
||||
unsigned int (*isTransferSender)(anyID transferID, int* result); /* 1 == upload, 0 == download */
|
||||
unsigned int (*getTransferStatus)(anyID transferID, int* result);
|
||||
unsigned int (*getCurrentTransferSpeed)(anyID transferID, float* result);
|
||||
unsigned int (*getAverageTransferSpeed)(anyID transferID, float* result);
|
||||
unsigned int (*getTransferRunTime)(anyID transferID, uint64* result);
|
||||
unsigned int (*sendFile)(uint64 serverConnectionHandlerID, uint64 channelID, const char* channelPW, const char* file, int overwrite, int resume, const char* sourceDirectory, anyID* result, const char* returnCode);
|
||||
unsigned int (*requestFile)(uint64 serverConnectionHandlerID, uint64 channelID, const char* channelPW, const char* file, int overwrite, int resume, const char* destinationDirectory, anyID* result, const char* returnCode);
|
||||
unsigned int (*haltTransfer)(uint64 serverConnectionHandlerID, anyID transferID, int deleteUnfinishedFile, const char* returnCode);
|
||||
unsigned int (*requestFileList)(uint64 serverConnectionHandlerID, uint64 channelID, const char* channelPW, const char* path, const char* returnCode);
|
||||
unsigned int (*requestFileInfo)(uint64 serverConnectionHandlerID, uint64 channelID, const char* channelPW, const char* file, const char* returnCode);
|
||||
unsigned int (*requestDeleteFile)(uint64 serverConnectionHandlerID, uint64 channelID, const char* channelPW, const char** file, const char* returnCode);
|
||||
unsigned int (*requestCreateDirectory)(uint64 serverConnectionHandlerID, uint64 channelID, const char* channelPW, const char* directoryPath, const char* returnCode);
|
||||
unsigned int (*requestRenameFile)(uint64 serverConnectionHandlerID, uint64 fromChannelID, const char* channelPW, uint64 toChannelID, const char* toChannelPW, const char* oldFile, const char* newFile, const char* returnCode);
|
||||
|
||||
/* Offline message management */
|
||||
unsigned int (*requestMessageAdd)(uint64 serverConnectionHandlerID, const char* toClientUID, const char* subject, const char* message, const char* returnCode);
|
||||
unsigned int (*requestMessageDel)(uint64 serverConnectionHandlerID, uint64 messageID, const char* returnCode);
|
||||
unsigned int (*requestMessageGet)(uint64 serverConnectionHandlerID, uint64 messageID, const char* returnCode);
|
||||
unsigned int (*requestMessageList)(uint64 serverConnectionHandlerID, const char* returnCode);
|
||||
unsigned int (*requestMessageUpdateFlag)(uint64 serverConnectionHandlerID, uint64 messageID, int flag, const char* returnCode);
|
||||
|
||||
/* Interacting with the server - confirming passwords */
|
||||
unsigned int (*verifyServerPassword)(uint64 serverConnectionHandlerID, const char* serverPassword, const char* returnCode);
|
||||
unsigned int (*verifyChannelPassword)(uint64 serverConnectionHandlerID, uint64 channelID, const char* channelPassword, const char* returnCode);
|
||||
|
||||
/* Interacting with the server - banning */
|
||||
unsigned int (*banclient)(uint64 serverConnectionHandlerID, anyID clientID, uint64 timeInSeconds, const char* banReason, const char* returnCode);
|
||||
unsigned int (*banadd)(uint64 serverConnectionHandlerID, const char* ipRegExp, const char* nameRegexp, const char* uniqueIdentity, const char* mytsID, uint64 timeInSeconds, const char* banReason, const char* returnCode);
|
||||
unsigned int (*banclientdbid)(uint64 serverConnectionHandlerID, uint64 clientDBID, uint64 timeInSeconds, const char* banReason, const char* returnCode);
|
||||
unsigned int (*bandel)(uint64 serverConnectionHandlerID, uint64 banID, const char* returnCode);
|
||||
unsigned int (*bandelall)(uint64 serverConnectionHandlerID, const char* returnCode);
|
||||
unsigned int (*requestBanList)(uint64 serverConnectionHandlerID, uint64 start, unsigned int duration, const char* returnCode);
|
||||
|
||||
/* Interacting with the server - complain */
|
||||
unsigned int (*requestComplainAdd)(uint64 serverConnectionHandlerID, uint64 targetClientDatabaseID, const char* complainReason, const char* returnCode);
|
||||
unsigned int (*requestComplainDel)(uint64 serverConnectionHandlerID, uint64 targetClientDatabaseID, uint64 fromClientDatabaseID, const char* returnCode);
|
||||
unsigned int (*requestComplainDelAll)(uint64 serverConnectionHandlerID, uint64 targetClientDatabaseID, const char* returnCode);
|
||||
unsigned int (*requestComplainList)(uint64 serverConnectionHandlerID, uint64 targetClientDatabaseID, const char* returnCode);
|
||||
|
||||
/* Permissions */
|
||||
unsigned int (*requestServerGroupList)(uint64 serverConnectionHandlerID, const char* returnCode);
|
||||
unsigned int (*requestServerGroupAdd)(uint64 serverConnectionHandlerID, const char* groupName, int groupType, const char* returnCode);
|
||||
unsigned int (*requestServerGroupDel)(uint64 serverConnectionHandlerID, uint64 serverGroupID, int force, const char* returnCode);
|
||||
unsigned int (*requestServerGroupAddClient)(uint64 serverConnectionHandlerID, uint64 serverGroupID, uint64 clientDatabaseID, const char* returnCode);
|
||||
unsigned int (*requestServerGroupDelClient)(uint64 serverConnectionHandlerID, uint64 serverGroupID, uint64 clientDatabaseID, const char* returnCode);
|
||||
unsigned int (*requestServerGroupsByClientID)(uint64 serverConnectionHandlerID, uint64 clientDatabaseID, const char* returnCode);
|
||||
unsigned int (*requestServerGroupAddPerm)(uint64 serverConnectionHandlerID, uint64 serverGroupID, int continueonerror, const unsigned int* permissionIDArray, const int* permissionValueArray, const int* permissionNegatedArray, const int* permissionSkipArray, int arraySize, const char* returnCode);
|
||||
unsigned int (*requestServerGroupDelPerm)(uint64 serverConnectionHandlerID, uint64 serverGroupID, int continueOnError, const unsigned int* permissionIDArray, int arraySize, const char* returnCode);
|
||||
unsigned int (*requestServerGroupPermList)(uint64 serverConnectionHandlerID, uint64 serverGroupID, const char* returnCode);
|
||||
unsigned int (*requestServerGroupClientList)(uint64 serverConnectionHandlerID, uint64 serverGroupID, int withNames, const char* returnCode);
|
||||
unsigned int (*requestChannelGroupList)(uint64 serverConnectionHandlerID, const char* returnCode);
|
||||
unsigned int (*requestChannelGroupAdd)(uint64 serverConnectionHandlerID, const char* groupName, int groupType, const char* returnCode);
|
||||
unsigned int (*requestChannelGroupDel)(uint64 serverConnectionHandlerID, uint64 channelGroupID, int force, const char* returnCode);
|
||||
unsigned int (*requestChannelGroupAddPerm)(uint64 serverConnectionHandlerID, uint64 channelGroupID, int continueonerror, const unsigned int* permissionIDArray, const int* permissionValueArray, int arraySize, const char* returnCode);
|
||||
unsigned int (*requestChannelGroupDelPerm)(uint64 serverConnectionHandlerID, uint64 channelGroupID, int continueOnError, const unsigned int* permissionIDArray, int arraySize, const char* returnCode);
|
||||
unsigned int (*requestChannelGroupPermList)(uint64 serverConnectionHandlerID, uint64 channelGroupID, const char* returnCode);
|
||||
unsigned int (*requestSetClientChannelGroup)(uint64 serverConnectionHandlerID, const uint64* channelGroupIDArray, const uint64* channelIDArray, const uint64* clientDatabaseIDArray, int arraySize, const char* returnCode);
|
||||
unsigned int (*requestChannelAddPerm)(uint64 serverConnectionHandlerID, uint64 channelID, const unsigned int* permissionIDArray, const int* permissionValueArray, int arraySize, const char* returnCode);
|
||||
unsigned int (*requestChannelDelPerm)(uint64 serverConnectionHandlerID, uint64 channelID, const unsigned int* permissionIDArray, int arraySize, const char* returnCode);
|
||||
unsigned int (*requestChannelPermList)(uint64 serverConnectionHandlerID, uint64 channelID, const char* returnCode);
|
||||
unsigned int (*requestClientAddPerm)(uint64 serverConnectionHandlerID, uint64 clientDatabaseID, const unsigned int* permissionIDArray, const int* permissionValueArray, const int* permissionSkipArray, int arraySize, const char* returnCode);
|
||||
unsigned int (*requestClientDelPerm)(uint64 serverConnectionHandlerID, uint64 clientDatabaseID, const unsigned int* permissionIDArray, int arraySize, const char* returnCode);
|
||||
unsigned int (*requestClientPermList)(uint64 serverConnectionHandlerID, uint64 clientDatabaseID, const char* returnCode);
|
||||
unsigned int (*requestChannelClientAddPerm)(uint64 serverConnectionHandlerID, uint64 channelID, uint64 clientDatabaseID, const unsigned int* permissionIDArray, const int* permissionValueArray, int arraySize, const char* returnCode);
|
||||
unsigned int (*requestChannelClientDelPerm)(uint64 serverConnectionHandlerID, uint64 channelID, uint64 clientDatabaseID, const unsigned int* permissionIDArray, int arraySize, const char* returnCode);
|
||||
unsigned int (*requestChannelClientPermList)(uint64 serverConnectionHandlerID, uint64 channelID, uint64 clientDatabaseID, const char* returnCode);
|
||||
unsigned int (*privilegeKeyUse)(uint64 serverConnectionHandler, const char* tokenKey, const char* returnCode);
|
||||
unsigned int (*requestPermissionList)(uint64 serverConnectionHandler, const char* returnCode);
|
||||
unsigned int (*requestPermissionOverview)(uint64 serverConnectionHandler, uint64 clientDBID, uint64 channelID, const char* returnCode);
|
||||
|
||||
/* Helper Functions */
|
||||
unsigned int (*clientPropertyStringToFlag)(const char* clientPropertyString, size_t* resultFlag);
|
||||
unsigned int (*channelPropertyStringToFlag)(const char* channelPropertyString, size_t* resultFlag);
|
||||
unsigned int (*serverPropertyStringToFlag)(const char* serverPropertyString, size_t* resultFlag);
|
||||
|
||||
/* Client functions */
|
||||
void (*getAppPath)(char* path, size_t maxLen);
|
||||
void (*getResourcesPath)(char* path, size_t maxLen);
|
||||
void (*getConfigPath)(char* path, size_t maxLen);
|
||||
void (*getPluginPath)(char* path, size_t maxLen, const char* pluginID);
|
||||
uint64 (*getCurrentServerConnectionHandlerID)();
|
||||
void (*printMessage)(uint64 serverConnectionHandlerID, const char* message, enum PluginMessageTarget messageTarget);
|
||||
void (*printMessageToCurrentTab)(const char* message);
|
||||
void (*urlsToBB)(const char* text, char* result, size_t maxLen);
|
||||
void (*sendPluginCommand)(uint64 serverConnectionHandlerID, const char* pluginID, const char* command, int targetMode, const anyID* targetIDs, const char* returnCode);
|
||||
void (*getDirectories)(const char* path, char* result, size_t maxLen);
|
||||
unsigned int (*getServerConnectInfo)(uint64 scHandlerID, char* host, unsigned short* port, char* password, size_t maxLen);
|
||||
unsigned int (*getChannelConnectInfo)(uint64 scHandlerID, uint64 channelID, char* path, char* password, size_t maxLen);
|
||||
void (*createReturnCode)(const char* pluginID, char* returnCode, size_t maxLen);
|
||||
unsigned int (*requestInfoUpdate)(uint64 scHandlerID, enum PluginItemType itemType, uint64 itemID);
|
||||
uint64 (*getServerVersion)(uint64 scHandlerID);
|
||||
unsigned int (*isWhispering)(uint64 scHandlerID, anyID clientID, int* result);
|
||||
unsigned int (*isReceivingWhisper)(uint64 scHandlerID, anyID clientID, int* result);
|
||||
unsigned int (*getAvatar)(uint64 scHandlerID, anyID clientID, char* result, size_t maxLen);
|
||||
void (*setPluginMenuEnabled)(const char* pluginID, int menuID, int enabled);
|
||||
void (*showHotkeySetup)();
|
||||
void (*requestHotkeyInputDialog)(const char* pluginID, const char* keyword, int isDown, void* qParentWindow);
|
||||
unsigned int (*getHotkeyFromKeyword)(const char* pluginID, const char** keywords, char** hotkeys, size_t arrayLen, size_t hotkeyBufSize);
|
||||
unsigned int (*getClientDisplayName)(uint64 scHandlerID, anyID clientID, char* result, size_t maxLen);
|
||||
unsigned int (*getBookmarkList)(struct PluginBookmarkList** list);
|
||||
unsigned int (*getProfileList)(enum PluginGuiProfile profile, int* defaultProfileIdx, char*** result);
|
||||
unsigned int (*guiConnect)(enum PluginConnectTab connectTab, const char* serverLabel, const char* serverAddress, const char* serverPassword, const char* nickname, const char* channel, const char* channelPassword, const char* captureProfile, const char* playbackProfile, const char* hotkeyProfile, const char* soundProfile, const char* userIdentity, const char* oneTimeKey, const char* phoneticName, uint64* scHandlerID);
|
||||
unsigned int (*guiConnectBookmark)(enum PluginConnectTab connectTab, const char* bookmarkuuid, uint64* scHandlerID);
|
||||
unsigned int (*createBookmark)(const char* bookmarkuuid, const char* serverLabel, const char* serverAddress, const char* serverPassword, const char* nickname, const char* channel, const char* channelPassword, const char* captureProfile, const char* playbackProfile, const char* hotkeyProfile, const char* soundProfile, const char* uniqueUserId, const char* oneTimeKey, const char* phoneticName);
|
||||
unsigned int (*getPermissionIDByName)(uint64 serverConnectionHandlerID, const char* permissionName, unsigned int* result);
|
||||
unsigned int (*getClientNeededPermission)(uint64 serverConnectionHandlerID, const char* permissionName, int* result);
|
||||
void(*notifyKeyEvent)(const char *pluginID, const char *keyIdentifier, int up_down);
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
23
readme.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
TeamSpeak 3 Plugin Software Development Kit
|
||||
Copyright (c) TeamSpeak Systems GmbH
|
||||
|
||||
Contents
|
||||
- Demo plugin sourcecode as template for developing own plugins
|
||||
- Required header files
|
||||
- Clientlib documentation
|
||||
|
||||
bin\plugins\
|
||||
Target build directory for the sample project. Instead you might want to configure your output directory
|
||||
to the plugins directory within your TeamSpeak 3 client installation.
|
||||
docs\
|
||||
Clientlib documentation
|
||||
include\
|
||||
Required header files
|
||||
src\
|
||||
Sourcecode of our test plugin
|
||||
|
||||
We strongly recommend to build upon the test plugin. Plugins are required to export some special functions,
|
||||
which already exist in the test plugin. Optional functions may be removed if not used. See code comments
|
||||
for details.
|
||||
|
||||
For questions please visit our forums at https://forum.teamspeak.com
|
||||
BIN
src/icons/1.png
Normal file
|
After Width: | Height: | Size: 234 B |
BIN
src/icons/2.png
Normal file
|
After Width: | Height: | Size: 297 B |
BIN
src/icons/3.png
Normal file
|
After Width: | Height: | Size: 303 B |
BIN
src/icons/t.png
Normal file
|
After Width: | Height: | Size: 241 B |
1169
src/plugin.c
Normal file
150
src/plugin.h
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* TeamSpeak 3 demo plugin
|
||||
*
|
||||
* Copyright (c) TeamSpeak Systems GmbH
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_H
|
||||
#define PLUGIN_H
|
||||
|
||||
#if defined(WIN32) || defined(__WIN32__) || defined(_WIN32)
|
||||
#define PLUGINS_EXPORTDLL __declspec(dllexport)
|
||||
#else
|
||||
#define PLUGINS_EXPORTDLL __attribute__ ((visibility("default")))
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Required functions */
|
||||
PLUGINS_EXPORTDLL const char* ts3plugin_name();
|
||||
PLUGINS_EXPORTDLL const char* ts3plugin_version();
|
||||
PLUGINS_EXPORTDLL int ts3plugin_apiVersion();
|
||||
PLUGINS_EXPORTDLL const char* ts3plugin_author();
|
||||
PLUGINS_EXPORTDLL const char* ts3plugin_description();
|
||||
PLUGINS_EXPORTDLL void ts3plugin_setFunctionPointers(const struct TS3Functions funcs);
|
||||
PLUGINS_EXPORTDLL int ts3plugin_init();
|
||||
PLUGINS_EXPORTDLL void ts3plugin_shutdown();
|
||||
|
||||
/* Optional functions */
|
||||
PLUGINS_EXPORTDLL int ts3plugin_offersConfigure();
|
||||
PLUGINS_EXPORTDLL void ts3plugin_configure(void* handle, void* qParentWidget);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_registerPluginID(const char* id);
|
||||
PLUGINS_EXPORTDLL const char* ts3plugin_commandKeyword();
|
||||
PLUGINS_EXPORTDLL int ts3plugin_processCommand(uint64 serverConnectionHandlerID, const char* command);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_currentServerConnectionChanged(uint64 serverConnectionHandlerID);
|
||||
PLUGINS_EXPORTDLL const char* ts3plugin_infoTitle();
|
||||
PLUGINS_EXPORTDLL void ts3plugin_infoData(uint64 serverConnectionHandlerID, uint64 id, enum PluginItemType type, char** data);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_freeMemory(void* data);
|
||||
PLUGINS_EXPORTDLL int ts3plugin_requestAutoload();
|
||||
PLUGINS_EXPORTDLL void ts3plugin_initMenus(struct PluginMenuItem*** menuItems, char** menuIcon);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_initHotkeys(struct PluginHotkey*** hotkeys);
|
||||
|
||||
/* Clientlib */
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onConnectStatusChangeEvent(uint64 serverConnectionHandlerID, int newStatus, unsigned int errorNumber);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onNewChannelEvent(uint64 serverConnectionHandlerID, uint64 channelID, uint64 channelParentID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onNewChannelCreatedEvent(uint64 serverConnectionHandlerID, uint64 channelID, uint64 channelParentID, anyID invokerID, const char* invokerName, const char* invokerUniqueIdentifier);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onDelChannelEvent(uint64 serverConnectionHandlerID, uint64 channelID, anyID invokerID, const char* invokerName, const char* invokerUniqueIdentifier);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onChannelMoveEvent(uint64 serverConnectionHandlerID, uint64 channelID, uint64 newChannelParentID, anyID invokerID, const char* invokerName, const char* invokerUniqueIdentifier);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onUpdateChannelEvent(uint64 serverConnectionHandlerID, uint64 channelID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onUpdateChannelEditedEvent(uint64 serverConnectionHandlerID, uint64 channelID, anyID invokerID, const char* invokerName, const char* invokerUniqueIdentifier);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onUpdateClientEvent(uint64 serverConnectionHandlerID, anyID clientID, anyID invokerID, const char* invokerName, const char* invokerUniqueIdentifier);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientMoveEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, const char* moveMessage);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientMoveSubscriptionEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientMoveTimeoutEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, const char* timeoutMessage);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientMoveMovedEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, anyID moverID, const char* moverName, const char* moverUniqueIdentifier, const char* moveMessage);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientKickFromChannelEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, anyID kickerID, const char* kickerName, const char* kickerUniqueIdentifier, const char* kickMessage);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientKickFromServerEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, anyID kickerID, const char* kickerName, const char* kickerUniqueIdentifier, const char* kickMessage);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientIDsEvent(uint64 serverConnectionHandlerID, const char* uniqueClientIdentifier, anyID clientID, const char* clientName);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientIDsFinishedEvent(uint64 serverConnectionHandlerID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onServerEditedEvent(uint64 serverConnectionHandlerID, anyID editerID, const char* editerName, const char* editerUniqueIdentifier);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onServerUpdatedEvent(uint64 serverConnectionHandlerID);
|
||||
PLUGINS_EXPORTDLL int ts3plugin_onServerErrorEvent(uint64 serverConnectionHandlerID, const char* errorMessage, unsigned int error, const char* returnCode, const char* extraMessage);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onServerStopEvent(uint64 serverConnectionHandlerID, const char* shutdownMessage);
|
||||
PLUGINS_EXPORTDLL int ts3plugin_onTextMessageEvent(uint64 serverConnectionHandlerID, anyID targetMode, anyID toID, anyID fromID, const char* fromName, const char* fromUniqueIdentifier, const char* message, int ffIgnored);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onTalkStatusChangeEvent(uint64 serverConnectionHandlerID, int status, int isReceivedWhisper, anyID clientID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onConnectionInfoEvent(uint64 serverConnectionHandlerID, anyID clientID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onServerConnectionInfoEvent(uint64 serverConnectionHandlerID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onChannelSubscribeEvent(uint64 serverConnectionHandlerID, uint64 channelID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onChannelSubscribeFinishedEvent(uint64 serverConnectionHandlerID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onChannelUnsubscribeEvent(uint64 serverConnectionHandlerID, uint64 channelID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onChannelUnsubscribeFinishedEvent(uint64 serverConnectionHandlerID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onChannelDescriptionUpdateEvent(uint64 serverConnectionHandlerID, uint64 channelID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onChannelPasswordChangedEvent(uint64 serverConnectionHandlerID, uint64 channelID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onPlaybackShutdownCompleteEvent(uint64 serverConnectionHandlerID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onSoundDeviceListChangedEvent(const char* modeID, int playOrCap);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onEditPlaybackVoiceDataEvent(uint64 serverConnectionHandlerID, anyID clientID, short* samples, int sampleCount, int channels);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onEditPostProcessVoiceDataEvent(uint64 serverConnectionHandlerID, anyID clientID, short* samples, int sampleCount, int channels, const unsigned int* channelSpeakerArray, unsigned int* channelFillMask);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onEditMixedPlaybackVoiceDataEvent(uint64 serverConnectionHandlerID, short* samples, int sampleCount, int channels, const unsigned int* channelSpeakerArray, unsigned int* channelFillMask);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onEditCapturedVoiceDataEvent(uint64 serverConnectionHandlerID, short* samples, int sampleCount, int channels, int* edited);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onCustom3dRolloffCalculationClientEvent(uint64 serverConnectionHandlerID, anyID clientID, float distance, float* volume);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onCustom3dRolloffCalculationWaveEvent(uint64 serverConnectionHandlerID, uint64 waveHandle, float distance, float* volume);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onUserLoggingMessageEvent(const char* logMessage, int logLevel, const char* logChannel, uint64 logID, const char* logTime, const char* completeLogString);
|
||||
|
||||
/* Clientlib rare */
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientBanFromServerEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, anyID kickerID, const char* kickerName, const char* kickerUniqueIdentifier, uint64 time, const char* kickMessage);
|
||||
PLUGINS_EXPORTDLL int ts3plugin_onClientPokeEvent(uint64 serverConnectionHandlerID, anyID fromClientID, const char* pokerName, const char* pokerUniqueIdentity, const char* message, int ffIgnored);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientSelfVariableUpdateEvent(uint64 serverConnectionHandlerID, int flag, const char* oldValue, const char* newValue);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onFileListEvent(uint64 serverConnectionHandlerID, uint64 channelID, const char* path, const char* name, uint64 size, uint64 datetime, int type, uint64 incompletesize, const char* returnCode);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onFileListFinishedEvent(uint64 serverConnectionHandlerID, uint64 channelID, const char* path);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onFileInfoEvent(uint64 serverConnectionHandlerID, uint64 channelID, const char* name, uint64 size, uint64 datetime);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupListEvent(uint64 serverConnectionHandlerID, uint64 serverGroupID, const char* name, int type, int iconID, int saveDB);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupListFinishedEvent(uint64 serverConnectionHandlerID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupByClientIDEvent(uint64 serverConnectionHandlerID, const char* name, uint64 serverGroupList, uint64 clientDatabaseID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupPermListEvent(uint64 serverConnectionHandlerID, uint64 serverGroupID, unsigned int permissionID, int permissionValue, int permissionNegated, int permissionSkip);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupPermListFinishedEvent(uint64 serverConnectionHandlerID, uint64 serverGroupID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupClientListEvent(uint64 serverConnectionHandlerID, uint64 serverGroupID, uint64 clientDatabaseID, const char* clientNameIdentifier, const char* clientUniqueID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onChannelGroupListEvent(uint64 serverConnectionHandlerID, uint64 channelGroupID, const char* name, int type, int iconID, int saveDB);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onChannelGroupListFinishedEvent(uint64 serverConnectionHandlerID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onChannelGroupPermListEvent(uint64 serverConnectionHandlerID, uint64 channelGroupID, unsigned int permissionID, int permissionValue, int permissionNegated, int permissionSkip);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onChannelGroupPermListFinishedEvent(uint64 serverConnectionHandlerID, uint64 channelGroupID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onChannelPermListEvent(uint64 serverConnectionHandlerID, uint64 channelID, unsigned int permissionID, int permissionValue, int permissionNegated, int permissionSkip);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onChannelPermListFinishedEvent(uint64 serverConnectionHandlerID, uint64 channelID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientPermListEvent(uint64 serverConnectionHandlerID, uint64 clientDatabaseID, unsigned int permissionID, int permissionValue, int permissionNegated, int permissionSkip);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientPermListFinishedEvent(uint64 serverConnectionHandlerID, uint64 clientDatabaseID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onChannelClientPermListEvent(uint64 serverConnectionHandlerID, uint64 channelID, uint64 clientDatabaseID, unsigned int permissionID, int permissionValue, int permissionNegated, int permissionSkip);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onChannelClientPermListFinishedEvent(uint64 serverConnectionHandlerID, uint64 channelID, uint64 clientDatabaseID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientChannelGroupChangedEvent(uint64 serverConnectionHandlerID, uint64 channelGroupID, uint64 channelID, anyID clientID, anyID invokerClientID, const char* invokerName, const char* invokerUniqueIdentity);
|
||||
PLUGINS_EXPORTDLL int ts3plugin_onServerPermissionErrorEvent(uint64 serverConnectionHandlerID, const char* errorMessage, unsigned int error, const char* returnCode, unsigned int failedPermissionID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onPermissionListGroupEndIDEvent(uint64 serverConnectionHandlerID, unsigned int groupEndID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onPermissionListEvent(uint64 serverConnectionHandlerID, unsigned int permissionID, const char* permissionName, const char* permissionDescription);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onPermissionListFinishedEvent(uint64 serverConnectionHandlerID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onPermissionOverviewEvent(uint64 serverConnectionHandlerID, uint64 clientDatabaseID, uint64 channelID, int overviewType, uint64 overviewID1, uint64 overviewID2, unsigned int permissionID, int permissionValue, int permissionNegated, int permissionSkip);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onPermissionOverviewFinishedEvent(uint64 serverConnectionHandlerID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupClientAddedEvent(uint64 serverConnectionHandlerID, anyID clientID, const char* clientName, const char* clientUniqueIdentity, uint64 serverGroupID, anyID invokerClientID, const char* invokerName, const char* invokerUniqueIdentity);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onServerGroupClientDeletedEvent(uint64 serverConnectionHandlerID, anyID clientID, const char* clientName, const char* clientUniqueIdentity, uint64 serverGroupID, anyID invokerClientID, const char* invokerName, const char* invokerUniqueIdentity);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientNeededPermissionsEvent(uint64 serverConnectionHandlerID, unsigned int permissionID, int permissionValue);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientNeededPermissionsFinishedEvent(uint64 serverConnectionHandlerID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onFileTransferStatusEvent(anyID transferID, unsigned int status, const char* statusMessage, uint64 remotefileSize, uint64 serverConnectionHandlerID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientChatClosedEvent(uint64 serverConnectionHandlerID, anyID clientID, const char* clientUniqueIdentity);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientChatComposingEvent(uint64 serverConnectionHandlerID, anyID clientID, const char* clientUniqueIdentity);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onServerLogEvent(uint64 serverConnectionHandlerID, const char* logMsg);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onServerLogFinishedEvent(uint64 serverConnectionHandlerID, uint64 lastPos, uint64 fileSize);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onMessageListEvent(uint64 serverConnectionHandlerID, uint64 messageID, const char* fromClientUniqueIdentity, const char* subject, uint64 timestamp, int flagRead);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onMessageGetEvent(uint64 serverConnectionHandlerID, uint64 messageID, const char* fromClientUniqueIdentity, const char* subject, const char* message, uint64 timestamp);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientDBIDfromUIDEvent(uint64 serverConnectionHandlerID, const char* uniqueClientIdentifier, uint64 clientDatabaseID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientNamefromUIDEvent(uint64 serverConnectionHandlerID, const char* uniqueClientIdentifier, uint64 clientDatabaseID, const char* clientNickName);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientNamefromDBIDEvent(uint64 serverConnectionHandlerID, const char* uniqueClientIdentifier, uint64 clientDatabaseID, const char* clientNickName);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onComplainListEvent(uint64 serverConnectionHandlerID, uint64 targetClientDatabaseID, const char* targetClientNickName, uint64 fromClientDatabaseID, const char* fromClientNickName, const char* complainReason, uint64 timestamp);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onBanListEvent(uint64 serverConnectionHandlerID, uint64 banid, const char* ip, const char* name, const char* uid, const char* mytsid, uint64 creationTime, uint64 durationTime, const char* invokerName, uint64 invokercldbid, const char* invokeruid, const char* reason, int numberOfEnforcements, const char* lastNickName);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientServerQueryLoginPasswordEvent(uint64 serverConnectionHandlerID, const char* loginPassword);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onPluginCommandEvent(uint64 serverConnectionHandlerID, const char* pluginName, const char* pluginCommand, anyID invokerClientID, const char* invokerName, const char* invokerUniqueIdentity);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onIncomingClientQueryEvent(uint64 serverConnectionHandlerID, const char* commandText);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onServerTemporaryPasswordListEvent(uint64 serverConnectionHandlerID, const char* clientNickname, const char* uniqueClientIdentifier, const char* description, const char* password, uint64 timestampStart, uint64 timestampEnd, uint64 targetChannelID, const char* targetChannelPW);
|
||||
|
||||
/* Client UI callbacks */
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onAvatarUpdated(uint64 serverConnectionHandlerID, anyID clientID, const char* avatarPath);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onMenuItemEvent(uint64 serverConnectionHandlerID, enum PluginMenuType type, int menuItemID, uint64 selectedItemID);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onHotkeyEvent(const char* keyword);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onHotkeyRecordedEvent(const char* keyword, const char* key);
|
||||
PLUGINS_EXPORTDLL void ts3plugin_onClientDisplayNameChanged(uint64 serverConnectionHandlerID, anyID clientID, const char* displayName, const char* uniqueClientIdentifier);
|
||||
PLUGINS_EXPORTDLL const char* ts3plugin_keyDeviceName(const char* keyIdentifier);
|
||||
PLUGINS_EXPORTDLL const char* ts3plugin_displayKeyText(const char* keyIdentifier);
|
||||
PLUGINS_EXPORTDLL const char* ts3plugin_keyPrefix();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
31
src/test_plugin.sln
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29926.136
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_plugin", "test_plugin.vcxproj", "{192D646D-748B-450B-AF3D-BF8EDD5FC897}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{192D646D-748B-450B-AF3D-BF8EDD5FC897}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{192D646D-748B-450B-AF3D-BF8EDD5FC897}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{192D646D-748B-450B-AF3D-BF8EDD5FC897}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{192D646D-748B-450B-AF3D-BF8EDD5FC897}.Debug|x64.Build.0 = Debug|x64
|
||||
{192D646D-748B-450B-AF3D-BF8EDD5FC897}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{192D646D-748B-450B-AF3D-BF8EDD5FC897}.Release|Win32.Build.0 = Release|Win32
|
||||
{192D646D-748B-450B-AF3D-BF8EDD5FC897}.Release|x64.ActiveCfg = Release|x64
|
||||
{192D646D-748B-450B-AF3D-BF8EDD5FC897}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {8FD60E3B-57E6-4338-A735-E4EFD3DFB6C2}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
165
src/test_plugin.vcxproj
Normal file
@@ -0,0 +1,165 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{192D646D-748B-450B-AF3D-BF8EDD5FC897}</ProjectGuid>
|
||||
<RootNamespace>test_plugin</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>WIFILED</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>\projects\teamspeak\plugins\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<TargetName>WIFILED</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<TargetName>WIFILED</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;TEST_PLUGIN_EXPORTS;WINDOWS;WIN32_LEAN_AND_MEAN;NOFMOD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<LanguageStandard>stdcpp14</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<DataExecutionPrevention />
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;TEST_PLUGIN_EXPORTS;WINDOWS;WIN32_LEAN_AND_MEAN;NOFMOD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<LanguageStandard>stdcpp14</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;TEST_PLUGIN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<DataExecutionPrevention />
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;TEST_PLUGIN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="plugin.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\include\plugin_definitions.h" />
|
||||
<ClInclude Include="..\include\teamlog\logtypes.h" />
|
||||
<ClInclude Include="..\include\teamspeak\clientlib_publicdefinitions.h" />
|
||||
<ClInclude Include="..\include\teamspeak\public_definitions.h" />
|
||||
<ClInclude Include="..\include\teamspeak\public_errors.h" />
|
||||
<ClInclude Include="..\include\teamspeak\public_errors_rare.h" />
|
||||
<ClInclude Include="..\include\teamspeak\public_rare_definitions.h" />
|
||||
<ClInclude Include="..\include\ts3_functions.h" />
|
||||
<ClInclude Include="plugin.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
53
src/test_plugin.vcxproj.filters
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\teamspeak">
|
||||
<UniqueIdentifier>{424f4ce9-e47e-43e3-91bc-85bbfec2c680}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\teamlog">
|
||||
<UniqueIdentifier>{d76dfa87-907d-4936-a5cf-59462dba95d7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="plugin.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="plugin.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\ts3_functions.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\teamspeak\clientlib_publicdefinitions.h">
|
||||
<Filter>Header Files\teamspeak</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\teamspeak\public_definitions.h">
|
||||
<Filter>Header Files\teamspeak</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\teamspeak\public_errors.h">
|
||||
<Filter>Header Files\teamspeak</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\teamspeak\public_errors_rare.h">
|
||||
<Filter>Header Files\teamspeak</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\teamspeak\public_rare_definitions.h">
|
||||
<Filter>Header Files\teamspeak</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\teamlog\logtypes.h">
|
||||
<Filter>Header Files\teamlog</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\plugin_definitions.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||