Moving a channel

To move a channel to a different parent channel call

unsigned int ts3client_requestChannelMove(uint64 serverConnectionHandlerID, uint64 channelID, uint64 newChannelParentID, uint64 newChannelOrder, const char *returnCode)

Move a channel in a tree or to a different parent channel.

You will receive an onServerErrorEvent with the passed returnCode indicating whether or not the operation was successful.

Parameters:
  • serverConnectionHandlerID – the connection handler on which the channel is located

  • channelID – the channel id to move or change the parent of

  • newChannelParentID – the channel id of the channel to be the new parent channel

  • newChannelOrder – the channel id of the channel below which the channel is to be sorted

  • returnCode – a c string to identify this request in callbacks. Pass an empty string if unused.

Returns:

An Error code from the Ts3ErrorType enum indicating either success or the failure reason

Callback

After sending the request, the following event will be called if the move was successful:

struct ClientUIFunctions

Defines available callbacks that you can receive.

Set the members of this struct to a function to call when the specific event happens.

Public Members

void (*onChannelMoveEvent)(uint64 serverConnectionHandlerID, uint64 channelID, uint64 newChannelParentID, anyID invokerID, const char *invokerName, const char *invokerUniqueIdentifier)

called when a channel is moved to a different location on the server

Param serverConnectionHandlerID:

specifies on which connection the callback was called

Param channelID:

the id of the channel being moved

Param newChannelParentID:

the id of the new parent channel

Param invokerID:

client if of the client that moved the channel. 0 if caused by server.

Param invokerName:

utf8 encoded c string containing the display name of the client that moved the channel

Param invokerUniqueIdentifier:

utf8 encoded c string containing the unique identifier of the client that moved the channel

Change sorting

To simply change the ordering of a channel without changing the parent channel you can also set the CHANNEL_ORDER property of the channel using ts3client_setChannelVariableAsInt() and flush the changes using ts3client_flushChannelUpdates().

If this was successful then the onUpdateChannelEvent() callback will be called.