The order how channels should be display in the GUI is defined by the channel variable CHANNEL_ORDER
, which can be queried with ts3client_getChannelVariableAsUInt64
or changed with ts3client_setChannelVariableAsUInt64
.
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.
Channel_1áá(IDá=á1,áorderá=á0)
Channel_2áá(IDá=á2,áorderá=á1)
ááááááSubchannel_1áá(IDá=á4,áorderá=á0)
ááááááááááááSubsubchannel_1áá(IDá=á6,áorderá=á0)
ááááááááááááSubsubchannel_2áá(IDá=á7,áorderá=á6)
ááááááSubchannel_2áá(IDá=á5,áorderá=á4)
Channel_3áá(IDá=á3,áorderá=á2)
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.
When moving a channel to a new parent, the desired channel order can be passed to ts3client_requestChannelMove
.
To move the channel to another position within the current hirarchy - the parent channel stays the same -, adjust the CHANNEL_ORDER
variable with ts3client_setChannelVariableAsUInt64
.
After connecting to a TeamSpeak 3 server, the client will be informed of all channels by the onNewChannelEvent
callback. The order how channels are propagated to the client by this event is:
First the complete channel path to the default channel, which is either the servers default channel with the flag CHANNEL_FLAG_DEFAULT
or the users default channel passed to ts3client_startConnection
. This ensures the channel joined on login is visible as soon as possible.
In above example, assuming the default channel is “Subsubchannel_2”, the channels would be announced in the following order: Channel_2, Subchannel_1, Subsubchannel_2.
After the default channel path has completely arrived, the connection status (see enum ConnectStatus, annouced to the client by the callback onConnectStatusChangeEvent
) changes to STATUS_CONNECTION_ESTABLISHING
.
Next all other channels in the given order, where subchannels are announced right after the parent channel.
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).
When all channels have arrived, the connection status switches to STATUS_CONNECTION_ESTABLISHED
.