~julien-spautz/cable/model-view

« back to all changes in this revision

Viewing changes to src/Irc/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
[DBus (name = "de.ikkoku.sushi", timeout = 120000)]
 
26
public interface Cable.Irc.Maki : GLib.Object {
 
27
 
 
28
    [DBus (name = "action")]
 
29
    public abstract void action (string server, string channel, string message) throws GLib.IOError;
 
30
 
 
31
    [DBus (name = "away")]
 
32
    public abstract void away (string server, string message) throws GLib.IOError;
 
33
 
 
34
    [DBus (name = "back")]
 
35
    public abstract void back (string server) throws GLib.IOError;
 
36
 
 
37
    [DBus (name = "channel_nicks")]
 
38
    public abstract void channel_nicks (string server, string channel, out string[] nicks, out string[] prefixes) throws GLib.IOError;
 
39
 
 
40
    [DBus (name = "channel_topic")]
 
41
    public abstract string channel_topic (string server, string channel) throws GLib.IOError;
 
42
 
 
43
    [DBus (name = "channels")]
 
44
    public abstract string[] channels (string server) throws GLib.IOError;
 
45
 
 
46
    [DBus (name = "config_get")]
 
47
    public abstract string config_get (string group, string key) throws GLib.IOError;
 
48
 
 
49
    [DBus (name = "config_set")]
 
50
    public abstract void config_set (string group, string key, string value) throws GLib.IOError;
 
51
 
 
52
    // connect to a server known to maki
 
53
    [DBus (name = "connect")]
 
54
    public abstract void connect (string server) throws GLib.IOError;
 
55
 
 
56
    [DBus (name = "ctcp")]
 
57
    public abstract void ctcp (string server, string target, string message) throws GLib.IOError;
 
58
 
 
59
    [DBus (name = "dcc_send")]
 
60
    public abstract void dcc_send(string server, string target, string path) throws GLib.IOError;
 
61
 
 
62
    [DBus (name = "dcc_sends")]
 
63
    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;
 
64
 
 
65
    [DBus (name = "dcc_send_accept")]
 
66
    public abstract void dcc_send_accept (uint64 id) throws GLib.IOError;
 
67
 
 
68
    [DBus (name = "dcc_send_get")]
 
69
    public abstract string dcc_send_get (uint64 id, string key) throws GLib.IOError;
 
70
 
 
71
    [DBus (name = "dcc_send_remove")]
 
72
    public abstract void dcc_send_remove (uint64 id) throws GLib.IOError;
 
73
 
 
74
    [DBus (name = "dcc_send_resume")]
 
75
    public abstract void dcc_send_resume (uint64 id) throws GLib.IOError;
 
76
 
 
77
    [DBus (name = "dcc_send_set")]
 
78
    public abstract void dcc_send_set (uint64 id, string key, string value) throws GLib.IOError;
 
79
 
 
80
    [DBus (name = "ignore")]
 
81
    public abstract void ignore (string server, string pattern) throws GLib.IOError;
 
82
 
 
83
    [DBus (name = "ignores")]
 
84
    public abstract string[] ignores (string server) throws GLib.IOError;
 
85
 
 
86
    [DBus (name = "invite")]
 
87
    public abstract void invite (string server, string channel, string who) throws GLib.IOError;
 
88
 
 
89
    [DBus (name = "join")]
 
90
    public abstract void join (string server, string channel, string key) throws GLib.IOError;
 
91
 
 
92
    [DBus (name = "kick")]
 
93
    public abstract void kick (string server, string channel, string who, string message) throws GLib.IOError;
 
94
 
 
95
    [DBus (name = "list")]
 
96
    public abstract void list (string server, string channel) throws GLib.IOError;
 
97
 
 
98
    [DBus (name = "log")]
 
99
    public abstract string[] log (string server, string target, uint64 lines) throws GLib.IOError;
 
100
 
 
101
    [DBus (name = "message")]
 
102
    public abstract void message (string server, string target, string message) throws GLib.IOError;
 
103
 
 
104
    [DBus (name = "mode")]
 
105
    public abstract void mode (string server, string target, string mode) throws GLib.IOError;
 
106
 
 
107
    [DBus (name = "names")]
 
108
    public abstract void names (string server, string channel) throws GLib.IOError;
 
109
 
 
110
    [DBus (name = "nick")]
 
111
    public abstract void nick (string server, string nick) throws GLib.IOError;
 
112
 
 
113
    [DBus (name = "nickserv")]
 
114
    public abstract void nickserv (string server) throws GLib.IOError;
 
115
 
 
116
    [DBus (name = "notice")]
 
117
    public abstract void notice (string server, string target, string message) throws GLib.IOError;
 
118
 
 
119
    [DBus (name = "oper")]
 
120
    public abstract void oper (string server, string name, string password) throws GLib.IOError;
 
121
 
 
122
    [DBus (name = "part")]
 
123
    public abstract void part (string server, string channel, string message) throws GLib.IOError;
 
124
 
 
125
    [DBus (name = "quit")]
 
126
    public abstract void quit (string server, string message) throws GLib.IOError;
 
127
 
 
128
    [DBus (name = "raw")]
 
129
    public abstract void raw (string server, string command) throws GLib.IOError;
 
130
 
 
131
    [DBus (name = "server_get")]
 
132
    public abstract string server_get (string server, string group, string key) throws GLib.IOError;
 
133
 
 
134
    [DBus (name = "server_get_list")]
 
135
    public abstract string[] server_get_list (string server, string group, string key) throws GLib.IOError;
 
136
 
 
137
    // server_list ("", "") gives a list of servers known to maki
 
138
    [DBus (name = "server_list")]
 
139
    public abstract string[] server_list (string server, string group) throws GLib.IOError;
 
140
 
 
141
    [DBus (name = "server_remove")]
 
142
    public abstract void server_remove (string server, string group, string key) throws GLib.IOError;
 
143
 
 
144
    [DBus (name = "server_rename")]
 
145
    public abstract void server_rename (string old, string new_) throws GLib.IOError;
 
146
 
 
147
    [DBus (name = "server_set")]
 
148
    public abstract void server_set (string server, string group, string key, string value) throws GLib.IOError;
 
149
 
 
150
    [DBus (name = "server_set_list")]
 
151
    public abstract void server_set_list (string server, string group, string key, string[] list) throws GLib.IOError;
 
152
 
 
153
    [DBus (name = "servers")]
 
154
    public abstract string[] servers () throws GLib.IOError;
 
155
 
 
156
    [DBus (name = "shutdown")]
 
157
    public abstract void shutdown (string message) throws GLib.IOError;
 
158
 
 
159
    [DBus (name = "support_chantypes")]
 
160
    public abstract string support_chantypes (string server) throws GLib.IOError;
 
161
 
 
162
    [DBus (name = "support_prefix")]
 
163
    public abstract string[] support_prefix (string server) throws GLib.IOError;
 
164
 
 
165
    [DBus (name = "topic")]
 
166
    public abstract void topic (string server, string channel, string topic) throws GLib.IOError;
 
167
 
 
168
    [DBus (name = "unignore")]
 
169
    public abstract void unignore (string server, string pattern) throws GLib.IOError;
 
170
 
 
171
    [DBus (name = "user_away")]
 
172
    public abstract bool user_away (string server, string nick) throws GLib.IOError;
 
173
 
 
174
    [DBus (name = "user_channel_mode")]
 
175
    public abstract string user_channel_mode (string server, string channel, string nick) throws GLib.IOError;
 
176
 
 
177
    [DBus (name = "user_channel_prefix")]
 
178
    public abstract string user_channel_prefix (string server, string channel, string nick) throws GLib.IOError;
 
179
 
 
180
    [DBus (name = "user_from")]
 
181
    public abstract string user_from (string server, string nick) throws GLib.IOError;
 
182
 
 
183
    [DBus (name = "version")]
 
184
    public abstract uint64[] version () throws GLib.IOError;
 
185
 
 
186
    [DBus (name = "who")]
 
187
    public abstract void who (string server, string mask, bool operators_only) throws GLib.IOError;
 
188
 
 
189
    [DBus (name = "whois")]
 
190
    public abstract void whois (string server, string mask) throws GLib.IOError;
 
191
 
 
192
    [DBus (name = "action")]
 
193
    public signal void event_action (int64 time, string server, string from, string target, string message);
 
194
 
 
195
    [DBus (name = "away")]
 
196
    public signal void event_away (int64 time, string server);
 
197
 
 
198
    [DBus (name = "away_message")]
 
199
    public signal void event_away_message (int64 time, string server, string nick, string message);
 
200
 
 
201
    [DBus (name = "back")]
 
202
    public signal void event_back (int64 time, string server);
 
203
 
 
204
    [DBus (name = "banlist")]
 
205
    public signal void event_banlist (int64 time, string server, string channel, string mask, string who, int64 when);
 
206
 
 
207
    [DBus (name = "cannot_join")]
 
208
    public signal void event_cannot_join (int64 time, string server, string channel, string reason);
 
209
 
 
210
    [DBus (name = "connect")]
 
211
    public signal void event_connect (int64 time, string server);
 
212
 
 
213
    [DBus (name = "connected")]
 
214
    public signal void event_connected (int64 time, string server);
 
215
 
 
216
    [DBus (name = "ctcp")]
 
217
    public signal void event_ctcp (int64 time, string server, string from, string target, string message);
 
218
 
 
219
    [DBus (name = "dcc_send")]
 
220
    public signal void event_dcc_send (int64 time, string server, uint64 id, string from, string filename, uint64 size, uint64 progress, uint64 speed, uint64 status);
 
221
 
 
222
    [DBus (name = "error")]
 
223
    public signal void event_error (int64 time, string server, string domain, string reason, string[] arguments);
 
224
 
 
225
    [DBus (name = "invite")]
 
226
    public signal void event_invite (int64 time, string server, string from, string channel, string who);
 
227
 
 
228
    [DBus (name = "join")]
 
229
    public signal void event_join (int64 time, string server, string from, string channel);
 
230
 
 
231
    [DBus (name = "kick")]
 
232
    public signal void event_kick (int64 time, string server, string from, string channel, string who, string message);
 
233
 
 
234
    [DBus (name = "list")]
 
235
    public signal void event_list (int64 time, string server, string channel, int64 users, string topic);
 
236
 
 
237
    [DBus (name = "message")]
 
238
    public signal void event_message (int64 time, string server, string from, string target, string message);
 
239
 
 
240
    [DBus (name = "mode")]
 
241
    public signal void event_mode (int64 time, string server, string from, string target, string mode, string parameter);
 
242
 
 
243
    [DBus (name = "motd")]
 
244
    public signal void event_motd (int64 time, string server, string message);
 
245
 
 
246
    [DBus (name = "names")]
 
247
    public signal void event_names (int64 time, string server, string channel, string[] nicks, string[] prefixes);
 
248
 
 
249
    [DBus (name = "nick")]
 
250
    public signal void event_nick (int64 time, string server, string from, string new_nick);
 
251
 
 
252
    [DBus (name = "no_such")]
 
253
    public signal void event_no_such (int64 time, string server, string target, string type);
 
254
 
 
255
    [DBus (name = "notice")]
 
256
    public signal void event_notice (int64 time, string server, string from, string target, string message);
 
257
 
 
258
    [DBus (name = "oper")]
 
259
    public signal void event_oper (int64 time, string server);
 
260
 
 
261
    [DBus (name = "part")]
 
262
    public signal void event_part (int64 time, string server, string from, string channel, string message);
 
263
 
 
264
    [DBus (name = "quit")]
 
265
    public signal void event_quit (int64 time, string server, string from, string message);
 
266
 
 
267
    [DBus (name = "shutdown")]
 
268
    public signal void event_shutdown (int64 time);
 
269
 
 
270
    [DBus (name = "topic")]
 
271
    public signal void event_topic (int64 time, string server, string from, string channel, string topic);
 
272
 
 
273
    [DBus (name = "user_away")]
 
274
    public signal void event_user_away (int64 time, string server, string from, bool away);
 
275
 
 
276
    [DBus (name = "whois")]
 
277
    public signal void event_whois (int64 time, string server, string nick, string message);
 
278
}