-
-
Notifications
You must be signed in to change notification settings - Fork 143
/
Copy pathTsBaseFunctions.gen.cs
144 lines (118 loc) · 6.4 KB
/
TsBaseFunctions.gen.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// TSLib - A free TeamSpeak 3 and 5 client library
// Copyright (C) 2017 TSLib contributors
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the Open Software License v. 3.0
//
// You should have received a copy of the Open Software License along with this
// program. If not, see <https://opensource.org/licenses/OSL-3.0>.
// <auto-generated />
using System;
using System.Threading.Tasks;
using TSLib.Commands;
using TSLib.Messages;
#nullable enable
namespace TSLib
{
partial class TsBaseFunctions
{
/// <summary>
/// Sends a TS-command.
///
///
/// </summary>
/// <param name="command">The command name.</param>
/// <param name="parameter">The parameters to be added to this command.
/// See <see cref="CommandParameter"/>, <see cref="CommandOption"/> or <see cref="CommandMultiParameter"/> for more information.</param>
///
///
public async Task<R<ResponseDictionary[], CommandError>> Send(string command, params ICommandPart[] parameter)
=> await Send<ResponseDictionary>(new TsCommand(command, parameter));
/// <summary>
/// Sends a TS-command.
///
///
/// </summary>
/// <param name="command">The command name.</param>
/// <param name="parameter">The parameters to be added to this command.
/// See <see cref="CommandParameter"/>, <see cref="CommandOption"/> or <see cref="CommandMultiParameter"/> for more information.</param>
///
/// <returns>Returns an enumeration of the deserialized and split up in <see cref="T"/> objects data.</returns>
public async Task<R<T[], CommandError>> Send<T>(string command, params ICommandPart[] parameter) where T : IResponse, new()
=> await Send<T>(new TsCommand(command, parameter));
/// <summary>
/// Sends a TS-command.
///
/// The response (if any) is not deserialized and is discarded.
/// </summary>
/// <param name="command">The command name.</param>
/// <param name="parameter">The parameters to be added to this command.
/// See <see cref="CommandParameter"/>, <see cref="CommandOption"/> or <see cref="CommandMultiParameter"/> for more information.</param>
///
///
public async Task<E<CommandError>> SendVoid(string command, params ICommandPart[] parameter)
=> await Send<ResponseVoid>(new TsCommand(command, parameter));
/// <summary>
/// Sends a TS-command.
///
/// The response (if any) is not deserialized and is discarded.
/// </summary>
/// <param name="command">The command name.</param>
/// <param name="parameter">The parameters to be added to this command.
/// See <see cref="CommandParameter"/>, <see cref="CommandOption"/> or <see cref="CommandMultiParameter"/> for more information.</param>
///
///
public async Task<E<CommandError>> SendVoid(TsCommand com)
=> await Send<ResponseVoid>(com);
/// <summary>
/// Sends a TS-command.
/// This will send a normal query-command when connected via query client. When connected as a full client the first specified notification is used as the response.
///
/// </summary>
/// <param name="command">The command name.</param>
/// <param name="parameter">The parameters to be added to this command.
/// See <see cref="CommandParameter"/>, <see cref="CommandOption"/> or <see cref="CommandMultiParameter"/> for more information.</param>
/// <param name="type">The notification type to wait for and serialize to when called from the full client.</param>
///
public async Task<R<ResponseDictionary[], CommandError>> SendHybrid(string command, NotificationType type, params ICommandPart[] parameter)
=> await SendHybrid<ResponseDictionary>(new TsCommand(command, parameter), type);
/// <summary>
/// Sends a TS-command.
/// This will send a normal query-command when connected via query client. When connected as a full client the first specified notification is used as the response.
///
/// </summary>
/// <param name="command">The command name.</param>
/// <param name="parameter">The parameters to be added to this command.
/// See <see cref="CommandParameter"/>, <see cref="CommandOption"/> or <see cref="CommandMultiParameter"/> for more information.</param>
/// <param name="type">The notification type to wait for and serialize to when called from the full client.</param>
/// <returns>Returns an enumeration of the deserialized and split up in <see cref="T"/> objects data.</returns>
public async Task<R<T[], CommandError>> SendHybrid<T>(string command, NotificationType type, params ICommandPart[] parameter) where T : class, IResponse, new()
=> await SendHybrid<T>(new TsCommand(command, parameter), type);
#pragma warning disable CS0067
public abstract event NotifyEventHandler<ChannelChanged>? OnChannelChanged;
public abstract event EventHandler<ChannelChanged>? OnEachChannelChanged;
public abstract event NotifyEventHandler<ChannelCreated>? OnChannelCreated;
public abstract event EventHandler<ChannelCreated>? OnEachChannelCreated;
public abstract event NotifyEventHandler<ChannelDeleted>? OnChannelDeleted;
public abstract event EventHandler<ChannelDeleted>? OnEachChannelDeleted;
public abstract event NotifyEventHandler<ChannelEdited>? OnChannelEdited;
public abstract event EventHandler<ChannelEdited>? OnEachChannelEdited;
public abstract event NotifyEventHandler<ChannelMoved>? OnChannelMoved;
public abstract event EventHandler<ChannelMoved>? OnEachChannelMoved;
public abstract event NotifyEventHandler<ChannelPasswordChanged>? OnChannelPasswordChanged;
public abstract event EventHandler<ChannelPasswordChanged>? OnEachChannelPasswordChanged;
public abstract event NotifyEventHandler<ClientEnterView>? OnClientEnterView;
public abstract event EventHandler<ClientEnterView>? OnEachClientEnterView;
public abstract event NotifyEventHandler<ClientLeftView>? OnClientLeftView;
public abstract event EventHandler<ClientLeftView>? OnEachClientLeftView;
public abstract event NotifyEventHandler<ClientMoved>? OnClientMoved;
public abstract event EventHandler<ClientMoved>? OnEachClientMoved;
public abstract event NotifyEventHandler<ServerEdited>? OnServerEdited;
public abstract event EventHandler<ServerEdited>? OnEachServerEdited;
public abstract event NotifyEventHandler<TextMessage>? OnTextMessage;
public abstract event EventHandler<TextMessage>? OnEachTextMessage;
public abstract event NotifyEventHandler<TokenUsed>? OnTokenUsed;
public abstract event EventHandler<TokenUsed>? OnEachTokenUsed;
#pragma warning restore CS0067
}
}