~julien-spautz/cable/model-view

« back to all changes in this revision

Viewing changes to src/Backend/Maki.vala

  • Committer: Julien Spautz
  • Date: 2013-07-30 00:52:16 UTC
  • Revision ID: spautz.julien@gmail.com-20130730005216-chro25g4728950sd
fixed issued with renaming, some internal changes, created autoscrolled class, stub controller class

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***
2
 
    Copyright (C) 2013 Cable Developers
3
 
 
4
 
    This program or library is free software; you can redistribute it
5
 
    and/or modify it under the terms of the GNU Lesser General Public
6
 
    License as published by the Free Software Foundation; either
7
 
    version 3 of the License, or (at your option) any later version.
8
 
 
9
 
    This library is distributed in the hope that it will be useful,
10
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
 
    Lesser General Public License for more details.
13
 
 
14
 
    You should have received a copy of the GNU Lesser General
15
 
    Public License along with this library; if not, write to the
16
 
    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
 
    Boston, MA 02110-1301 USA.
18
 
***/
19
 
 
20
 
/**
21
 
 * This is a dbus interface to the maki daemon from the SushiIRC project.
22
 
 * Use the methods to send requests or messages to the server and the
23
 
 * signals to react to the server's replies.
24
 
 *
25
 
 * TODO document each function or take the actual documentation, if it exists
26
 
 * TODO rename some of these, some names are not really descriptive
27
 
 */
28
 
[DBus (name = "de.ikkoku.sushi", timeout = 120000)]
29
 
public interface Cable.Backend.Maki : GLib.Object {
30
 
 
31
 
    // 
32
 
    [DBus (name = "action")]
33
 
    public abstract void action (string server, string channel, string message) throws GLib.IOError;
34
 
 
35
 
    // set user as away and set an away message
36
 
    [DBus (name = "away")]
37
 
    public abstract void away (string server, string message) throws GLib.IOError;
38
 
 
39
 
    // unset away status
40
 
    [DBus (name = "back")]
41
 
    public abstract void back (string server) throws GLib.IOError;
42
 
 
43
 
    [DBus (name = "channel_nicks")]
44
 
    public abstract void channel_nicks (string server, string channel, out string[] nicks, out string[] prefixes) throws GLib.IOError;
45
 
 
46
 
    [DBus (name = "channel_topic")]
47
 
    public abstract string channel_topic (string server, string channel) throws GLib.IOError;
48
 
 
49
 
    [DBus (name = "channels")]
50
 
    public abstract string[] channels (string server) throws GLib.IOError;
51
 
 
52
 
    [DBus (name = "config_get")]
53
 
    public abstract string config_get (string group, string key) throws GLib.IOError;
54
 
 
55
 
    [DBus (name = "config_set")]
56
 
    public abstract void config_set (string group, string key, string value) throws GLib.IOError;
57
 
 
58
 
    // connect to a server known to maki
59
 
    [DBus (name = "connect")]
60
 
    public abstract void connect (string server) throws GLib.IOError;
61
 
 
62
 
    [DBus (name = "ctcp")]
63
 
    public abstract void ctcp (string server, string target, string message) throws GLib.IOError;
64
 
 
65
 
    [DBus (name = "dcc_send")]
66
 
    public abstract void dcc_send(string server, string target, string path) throws GLib.IOError;
67
 
 
68
 
    [DBus (name = "dcc_sends")]
69
 
    public abstract void dcc_sends (out uint64[] ids, out string[] servers, out string[] froms, out string[] filenames, out uint64[] sizes, out uint64[] progresses, out uint64[] speeds, out uint64[] statuses) throws GLib.IOError;
70
 
 
71
 
    [DBus (name = "dcc_send_accept")]
72
 
    public abstract void dcc_send_accept (uint64 id) throws GLib.IOError;
73
 
 
74
 
    [DBus (name = "dcc_send_get")]
75
 
    public abstract string dcc_send_get (uint64 id, string key) throws GLib.IOError;
76
 
 
77
 
    [DBus (name = "dcc_send_remove")]
78
 
    public abstract void dcc_send_remove (uint64 id) throws GLib.IOError;
79
 
 
80
 
    [DBus (name = "dcc_send_resume")]
81
 
    public abstract void dcc_send_resume (uint64 id) throws GLib.IOError;
82
 
 
83
 
    [DBus (name = "dcc_send_set")]
84
 
    public abstract void dcc_send_set (uint64 id, string key, string value) throws GLib.IOError;
85
 
 
86
 
    [DBus (name = "ignore")]
87
 
    public abstract void ignore (string server, string pattern) throws GLib.IOError;
88
 
 
89
 
    [DBus (name = "ignores")]
90
 
    public abstract string[] ignores (string server) throws GLib.IOError;
91
 
 
92
 
    [DBus (name = "invite")]
93
 
    public abstract void invite (string server, string channel, string who) throws GLib.IOError;
94
 
 
95
 
    [DBus (name = "join")]
96
 
    public abstract void join (string server, string channel, string key) throws GLib.IOError;
97
 
 
98
 
    [DBus (name = "kick")]
99
 
    public abstract void kick (string server, string channel, string who, string message) throws GLib.IOError;
100
 
 
101
 
    [DBus (name = "list")]
102
 
    public abstract void list (string server, string channel) throws GLib.IOError;
103
 
 
104
 
    [DBus (name = "log")]
105
 
    public abstract string[] log (string server, string target, uint64 lines) throws GLib.IOError;
106
 
 
107
 
    [DBus (name = "message")]
108
 
    public abstract void message (string server, string target, string message) throws GLib.IOError;
109
 
 
110
 
    [DBus (name = "mode")]
111
 
    public abstract void mode (string server, string target, string mode) throws GLib.IOError;
112
 
 
113
 
    [DBus (name = "names")]
114
 
    public abstract void names (string server, string channel) throws GLib.IOError;
115
 
 
116
 
    [DBus (name = "nick")]
117
 
    public abstract void nick (string server, string nick) throws GLib.IOError;
118
 
 
119
 
    [DBus (name = "nickserv")]
120
 
    public abstract void nickserv (string server) throws GLib.IOError;
121
 
 
122
 
    [DBus (name = "notice")]
123
 
    public abstract void notice (string server, string target, string message) throws GLib.IOError;
124
 
 
125
 
    [DBus (name = "oper")]
126
 
    public abstract void oper (string server, string name, string password) throws GLib.IOError;
127
 
 
128
 
    [DBus (name = "part")]
129
 
    public abstract void part (string server, string channel, string message) throws GLib.IOError;
130
 
 
131
 
    [DBus (name = "quit")]
132
 
    public abstract void quit (string server, string message) throws GLib.IOError;
133
 
 
134
 
    [DBus (name = "raw")]
135
 
    public abstract void raw (string server, string command) throws GLib.IOError;
136
 
 
137
 
    [DBus (name = "server_get")]
138
 
    public abstract string server_get (string server, string group, string key) throws GLib.IOError;
139
 
 
140
 
    [DBus (name = "server_get_list")]
141
 
    public abstract string[] server_get_list (string server, string group, string key) throws GLib.IOError;
142
 
 
143
 
    // server_list ("", "") gives a list of servers known to maki
144
 
    [DBus (name = "server_list")]
145
 
    public abstract string[] server_list (string server, string group) throws GLib.IOError;
146
 
 
147
 
    [DBus (name = "server_remove")]
148
 
    public abstract void server_remove (string server, string group, string key) throws GLib.IOError;
149
 
 
150
 
    [DBus (name = "server_rename")]
151
 
    public abstract void server_rename (string old, string new_) throws GLib.IOError;
152
 
 
153
 
    // change server config (keys: address, port, nick, name)
154
 
    [DBus (name = "server_set")]
155
 
    public abstract void server_set (string server, string group, string key, string value) throws GLib.IOError;
156
 
 
157
 
    [DBus (name = "server_set_list")]
158
 
    public abstract void server_set_list (string server, string group, string key, string[] list) throws GLib.IOError;
159
 
 
160
 
    [DBus (name = "servers")]
161
 
    public abstract string[] servers () throws GLib.IOError;
162
 
 
163
 
    [DBus (name = "shutdown")]
164
 
    public abstract void shutdown (string message) throws GLib.IOError;
165
 
 
166
 
    [DBus (name = "support_chantypes")]
167
 
    public abstract string support_chantypes (string server) throws GLib.IOError;
168
 
 
169
 
    [DBus (name = "support_prefix")]
170
 
    public abstract string[] support_prefix (string server) throws GLib.IOError;
171
 
 
172
 
    [DBus (name = "topic")]
173
 
    public abstract void topic (string server, string channel, string topic) throws GLib.IOError;
174
 
 
175
 
    [DBus (name = "unignore")]
176
 
    public abstract void unignore (string server, string pattern) throws GLib.IOError;
177
 
 
178
 
    [DBus (name = "user_away")]
179
 
    public abstract bool user_away (string server, string nick) throws GLib.IOError;
180
 
 
181
 
    [DBus (name = "user_channel_mode")]
182
 
    public abstract string user_channel_mode (string server, string channel, string nick) throws GLib.IOError;
183
 
 
184
 
    [DBus (name = "user_channel_prefix")]
185
 
    public abstract string user_channel_prefix (string server, string channel, string nick) throws GLib.IOError;
186
 
 
187
 
    [DBus (name = "user_from")]
188
 
    public abstract string user_from (string server, string nick) throws GLib.IOError;
189
 
 
190
 
    [DBus (name = "version")]
191
 
    public abstract uint64[] version () throws GLib.IOError;
192
 
 
193
 
    [DBus (name = "who")]
194
 
    public abstract void who (string server, string mask, bool operators_only) throws GLib.IOError;
195
 
 
196
 
    [DBus (name = "whois")]
197
 
    public abstract void whois (string server, string mask) throws GLib.IOError;
198
 
 
199
 
    [DBus (name = "action")]
200
 
    public signal void event_action (int64 time, string server, string from, string target, string message);
201
 
 
202
 
    [DBus (name = "away")]
203
 
    public signal void event_away (int64 time, string server);
204
 
 
205
 
    [DBus (name = "away_message")]
206
 
    public signal void event_away_message (int64 time, string server, string nick, string message);
207
 
 
208
 
    [DBus (name = "back")]
209
 
    public signal void event_back (int64 time, string server);
210
 
 
211
 
    [DBus (name = "banlist")]
212
 
    public signal void event_banlist (int64 time, string server, string channel, string mask, string who, int64 when);
213
 
 
214
 
    [DBus (name = "cannot_join")]
215
 
    public signal void event_cannot_join (int64 time, string server, string channel, string reason);
216
 
 
217
 
    [DBus (name = "connect")]
218
 
    public signal void event_connect (int64 time, string server);
219
 
 
220
 
    [DBus (name = "connected")]
221
 
    public signal void event_connected (int64 time, string server);
222
 
 
223
 
    [DBus (name = "ctcp")]
224
 
    public signal void event_ctcp (int64 time, string server, string from, string target, string message);
225
 
 
226
 
    [DBus (name = "dcc_send")]
227
 
    public signal void event_dcc_send (int64 time, string server, uint64 id, string from, string filename, uint64 size, uint64 progress, uint64 speed, uint64 status);
228
 
 
229
 
    [DBus (name = "error")]
230
 
    public signal void event_error (int64 time, string server, string domain, string reason, string[] arguments);
231
 
 
232
 
    [DBus (name = "invite")]
233
 
    public signal void event_invite (int64 time, string server, string from, string channel, string who);
234
 
 
235
 
    [DBus (name = "join")]
236
 
    public signal void event_join (int64 time, string server, string from, string channel);
237
 
 
238
 
    [DBus (name = "kick")]
239
 
    public signal void event_kick (int64 time, string server, string from, string channel, string who, string message);
240
 
 
241
 
    [DBus (name = "list")]
242
 
    public signal void event_list (int64 time, string server, string channel, int64 users, string topic);
243
 
 
244
 
    [DBus (name = "message")]
245
 
    public signal void event_message (int64 time, string server, string from, string target, string message);
246
 
 
247
 
    [DBus (name = "mode")]
248
 
    public signal void event_mode (int64 time, string server, string from, string target, string mode, string parameter);
249
 
 
250
 
    [DBus (name = "motd")]
251
 
    public signal void event_motd (int64 time, string server, string message);
252
 
 
253
 
    [DBus (name = "names")]
254
 
    public signal void event_names (int64 time, string server, string channel, string[] nicks, string[] prefixes);
255
 
 
256
 
    [DBus (name = "nick")]
257
 
    public signal void event_nick (int64 time, string server, string from, string new_nick);
258
 
 
259
 
    [DBus (name = "no_such")]
260
 
    public signal void event_no_such (int64 time, string server, string target, string type);
261
 
 
262
 
    [DBus (name = "notice")]
263
 
    public signal void event_notice (int64 time, string server, string from, string target, string message);
264
 
 
265
 
    [DBus (name = "oper")]
266
 
    public signal void event_oper (int64 time, string server);
267
 
 
268
 
    [DBus (name = "part")]
269
 
    public signal void event_part (int64 time, string server, string from, string channel, string message);
270
 
 
271
 
    [DBus (name = "quit")]
272
 
    public signal void event_quit (int64 time, string server, string from, string message);
273
 
 
274
 
    [DBus (name = "shutdown")]
275
 
    public signal void event_shutdown (int64 time);
276
 
 
277
 
    [DBus (name = "topic")]
278
 
    public signal void event_topic (int64 time, string server, string from, string channel, string topic);
279
 
 
280
 
    [DBus (name = "user_away")]
281
 
    public signal void event_user_away (int64 time, string server, string from, bool away);
282
 
 
283
 
    [DBus (name = "whois")]
284
 
    public signal void event_whois (int64 time, string server, string nick, string message);
285
 
}