using System.Collections.Generic; namespace axXez.TS3.Protocol { /// Property bag for editing channel settings via channeledit or channelcreate. Only set properties are sent. public class EditChannelProperties { internal Dictionary changes = new Dictionary(); /// Display name of the channel. public string Name { set => changes["channel_name"] = value; } /// Topic line shown below the channel name. public string Topic { set => changes["channel_topic"] = value; } /// Channel password. public string Password { set => changes["channel_password"] = value; } /// Full description text of the channel. public string Description { set => changes["channel_description"] = value; } /// ID of the parent channel. public int ParentId { set => changes["cpid"] = value.ToString(); } /// Audio codec used in the channel. public ChannelCodec Codec { set => changes["channel_codec"] = ((int)value).ToString(); } /// Codec quality level from 0 (lowest) to 10 (highest). public int CodecQuality { set => changes["channel_codec_quality"] = value.ToString(); } /// Codec latency factor; higher values increase audio latency. public int CodecLatencyFactor { set => changes["channel_codec_latency_factor"] = value.ToString(); } /// Whether the channel's codec is unencrypted. public bool CodecIsUnencrypted { set => changes["channel_codec_is_unencrypted"] = value ? "1" : "0"; } /// Maximum number of clients; -1 for unlimited. public int MaxClients { set => changes["channel_maxclients"] = value.ToString(); } /// Maximum number of clients in this channel and sub-channels; -1 for unlimited. public int MaxFamilyClients { set => changes["channel_maxfamilyclients"] = value.ToString(); } /// Sort order position relative to sibling channels. public int Order { set => changes["channel_order"] = value.ToString(); } /// Whether the channel persists after the last client leaves. public bool PermanentFlag { set => changes["channel_flag_permanent"] = value ? "1" : "0"; } /// Whether the channel persists until the server restarts. public bool SemiPermanentFlag { set => changes["channel_flag_semi_permanent"] = value ? "1" : "0"; } /// Whether this is the default channel clients connect to on join. public bool DefaultFlag { set => changes["channel_flag_default"] = value ? "1" : "0"; } /// Whether the channel is password protected. public bool PasswordFlag { set => changes["channel_flag_password"] = value ? "1" : "0"; } /// Delay in seconds before an empty temporary channel is deleted. public int DeleteDelay { set => changes["channel_delete_delay"] = value.ToString(); } /// Whether the client limit for this channel is unlimited. public bool UnlimitedClientsFlag { set => changes["channel_flag_maxclients_unlimited"] = value ? "1" : "0"; } /// Whether the family client limit for this channel is unlimited. public bool UnlimitedFamilyClientsFlag { set => changes["channel_flag_maxfamilyclients_unlimited"] = value ? "1" : "0"; } /// Whether the family client limit is inherited from the parent channel. public bool MaxFamilyClientsInherited { set => changes["channel_flag_maxfamilyclients_inherited"] = value ? "1" : "0"; } /// Minimum talk power a client must have to speak in the channel. public int NeededTalkPower { set => changes["channel_needed_talk_power"] = value.ToString(); } } }