Files
TS_WIFILED/docs/client_html/ar01s22s02s02.html
2020-04-04 17:21:07 +02:00

8 lines
5.4 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<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> </td><th width="60%" align="center">Channel information</th><td width="20%" align="right"> <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  (ID = 1, order = 0)<br>
Channel_2  (ID = 2, order = 1)<br>
      Subchannel_1  (ID = 4, order = 0)<br>
            Subsubchannel_1  (ID = 6, order = 0)<br>
            Subsubchannel_2  (ID = 7, order = 6)<br>
      Subchannel_2  (ID = 5, order = 4)<br>
Channel_3  (ID = 3, order = 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 &#8220;<span class="quote">Subsubchannel_2</span>&#8221;, 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> </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"> <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 </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"> Server information</td></tr></table></div></body></html>