2
Copyright (C) 2013 Cable Developers
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.
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.
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.
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.
25
[DBus (name = "de.ikkoku.sushi", timeout = 120000)]
26
public interface Cable.Irc.Maki : GLib.Object {
28
[DBus (name = "action")]
29
public abstract void action (string server, string channel, string message) throws GLib.IOError;
31
[DBus (name = "away")]
32
public abstract void away (string server, string message) throws GLib.IOError;
34
[DBus (name = "back")]
35
public abstract void back (string server) throws GLib.IOError;
37
[DBus (name = "channel_nicks")]
38
public abstract void channel_nicks (string server, string channel, out string[] nicks, out string[] prefixes) throws GLib.IOError;
40
[DBus (name = "channel_topic")]
41
public abstract string channel_topic (string server, string channel) throws GLib.IOError;
43
[DBus (name = "channels")]
44
public abstract string[] channels (string server) throws GLib.IOError;
46
[DBus (name = "config_get")]
47
public abstract string config_get (string group, string key) throws GLib.IOError;
49
[DBus (name = "config_set")]
50
public abstract void config_set (string group, string key, string value) throws GLib.IOError;
52
// connect to a server known to maki
53
[DBus (name = "connect")]
54
public abstract void connect (string server) throws GLib.IOError;
56
[DBus (name = "ctcp")]
57
public abstract void ctcp (string server, string target, string message) throws GLib.IOError;
59
[DBus (name = "dcc_send")]
60
public abstract void dcc_send(string server, string target, string path) throws GLib.IOError;
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;
65
[DBus (name = "dcc_send_accept")]
66
public abstract void dcc_send_accept (uint64 id) throws GLib.IOError;
68
[DBus (name = "dcc_send_get")]
69
public abstract string dcc_send_get (uint64 id, string key) throws GLib.IOError;
71
[DBus (name = "dcc_send_remove")]
72
public abstract void dcc_send_remove (uint64 id) throws GLib.IOError;
74
[DBus (name = "dcc_send_resume")]
75
public abstract void dcc_send_resume (uint64 id) throws GLib.IOError;
77
[DBus (name = "dcc_send_set")]
78
public abstract void dcc_send_set (uint64 id, string key, string value) throws GLib.IOError;
80
[DBus (name = "ignore")]
81
public abstract void ignore (string server, string pattern) throws GLib.IOError;
83
[DBus (name = "ignores")]
84
public abstract string[] ignores (string server) throws GLib.IOError;
86
[DBus (name = "invite")]
87
public abstract void invite (string server, string channel, string who) throws GLib.IOError;
89
[DBus (name = "join")]
90
public abstract void join (string server, string channel, string key) throws GLib.IOError;
92
[DBus (name = "kick")]
93
public abstract void kick (string server, string channel, string who, string message) throws GLib.IOError;
95
[DBus (name = "list")]
96
public abstract void list (string server, string channel) throws GLib.IOError;
99
public abstract string[] log (string server, string target, uint64 lines) throws GLib.IOError;
101
[DBus (name = "message")]
102
public abstract void message (string server, string target, string message) throws GLib.IOError;
104
[DBus (name = "mode")]
105
public abstract void mode (string server, string target, string mode) throws GLib.IOError;
107
[DBus (name = "names")]
108
public abstract void names (string server, string channel) throws GLib.IOError;
110
[DBus (name = "nick")]
111
public abstract void nick (string server, string nick) throws GLib.IOError;
113
[DBus (name = "nickserv")]
114
public abstract void nickserv (string server) throws GLib.IOError;
116
[DBus (name = "notice")]
117
public abstract void notice (string server, string target, string message) throws GLib.IOError;
119
[DBus (name = "oper")]
120
public abstract void oper (string server, string name, string password) throws GLib.IOError;
122
[DBus (name = "part")]
123
public abstract void part (string server, string channel, string message) throws GLib.IOError;
125
[DBus (name = "quit")]
126
public abstract void quit (string server, string message) throws GLib.IOError;
128
[DBus (name = "raw")]
129
public abstract void raw (string server, string command) throws GLib.IOError;
131
[DBus (name = "server_get")]
132
public abstract string server_get (string server, string group, string key) throws GLib.IOError;
134
[DBus (name = "server_get_list")]
135
public abstract string[] server_get_list (string server, string group, string key) throws GLib.IOError;
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;
141
[DBus (name = "server_remove")]
142
public abstract void server_remove (string server, string group, string key) throws GLib.IOError;
144
[DBus (name = "server_rename")]
145
public abstract void server_rename (string old, string new_) throws GLib.IOError;
147
[DBus (name = "server_set")]
148
public abstract void server_set (string server, string group, string key, string value) throws GLib.IOError;
150
[DBus (name = "server_set_list")]
151
public abstract void server_set_list (string server, string group, string key, string[] list) throws GLib.IOError;
153
[DBus (name = "servers")]
154
public abstract string[] servers () throws GLib.IOError;
156
[DBus (name = "shutdown")]
157
public abstract void shutdown (string message) throws GLib.IOError;
159
[DBus (name = "support_chantypes")]
160
public abstract string support_chantypes (string server) throws GLib.IOError;
162
[DBus (name = "support_prefix")]
163
public abstract string[] support_prefix (string server) throws GLib.IOError;
165
[DBus (name = "topic")]
166
public abstract void topic (string server, string channel, string topic) throws GLib.IOError;
168
[DBus (name = "unignore")]
169
public abstract void unignore (string server, string pattern) throws GLib.IOError;
171
[DBus (name = "user_away")]
172
public abstract bool user_away (string server, string nick) throws GLib.IOError;
174
[DBus (name = "user_channel_mode")]
175
public abstract string user_channel_mode (string server, string channel, string nick) throws GLib.IOError;
177
[DBus (name = "user_channel_prefix")]
178
public abstract string user_channel_prefix (string server, string channel, string nick) throws GLib.IOError;
180
[DBus (name = "user_from")]
181
public abstract string user_from (string server, string nick) throws GLib.IOError;
183
[DBus (name = "version")]
184
public abstract uint64[] version () throws GLib.IOError;
186
[DBus (name = "who")]
187
public abstract void who (string server, string mask, bool operators_only) throws GLib.IOError;
189
[DBus (name = "whois")]
190
public abstract void whois (string server, string mask) throws GLib.IOError;
192
[DBus (name = "action")]
193
public signal void event_action (int64 time, string server, string from, string target, string message);
195
[DBus (name = "away")]
196
public signal void event_away (int64 time, string server);
198
[DBus (name = "away_message")]
199
public signal void event_away_message (int64 time, string server, string nick, string message);
201
[DBus (name = "back")]
202
public signal void event_back (int64 time, string server);
204
[DBus (name = "banlist")]
205
public signal void event_banlist (int64 time, string server, string channel, string mask, string who, int64 when);
207
[DBus (name = "cannot_join")]
208
public signal void event_cannot_join (int64 time, string server, string channel, string reason);
210
[DBus (name = "connect")]
211
public signal void event_connect (int64 time, string server);
213
[DBus (name = "connected")]
214
public signal void event_connected (int64 time, string server);
216
[DBus (name = "ctcp")]
217
public signal void event_ctcp (int64 time, string server, string from, string target, string message);
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);
222
[DBus (name = "error")]
223
public signal void event_error (int64 time, string server, string domain, string reason, string[] arguments);
225
[DBus (name = "invite")]
226
public signal void event_invite (int64 time, string server, string from, string channel, string who);
228
[DBus (name = "join")]
229
public signal void event_join (int64 time, string server, string from, string channel);
231
[DBus (name = "kick")]
232
public signal void event_kick (int64 time, string server, string from, string channel, string who, string message);
234
[DBus (name = "list")]
235
public signal void event_list (int64 time, string server, string channel, int64 users, string topic);
237
[DBus (name = "message")]
238
public signal void event_message (int64 time, string server, string from, string target, string message);
240
[DBus (name = "mode")]
241
public signal void event_mode (int64 time, string server, string from, string target, string mode, string parameter);
243
[DBus (name = "motd")]
244
public signal void event_motd (int64 time, string server, string message);
246
[DBus (name = "names")]
247
public signal void event_names (int64 time, string server, string channel, string[] nicks, string[] prefixes);
249
[DBus (name = "nick")]
250
public signal void event_nick (int64 time, string server, string from, string new_nick);
252
[DBus (name = "no_such")]
253
public signal void event_no_such (int64 time, string server, string target, string type);
255
[DBus (name = "notice")]
256
public signal void event_notice (int64 time, string server, string from, string target, string message);
258
[DBus (name = "oper")]
259
public signal void event_oper (int64 time, string server);
261
[DBus (name = "part")]
262
public signal void event_part (int64 time, string server, string from, string channel, string message);
264
[DBus (name = "quit")]
265
public signal void event_quit (int64 time, string server, string from, string message);
267
[DBus (name = "shutdown")]
268
public signal void event_shutdown (int64 time);
270
[DBus (name = "topic")]
271
public signal void event_topic (int64 time, string server, string from, string channel, string topic);
273
[DBus (name = "user_away")]
274
public signal void event_user_away (int64 time, string server, string from, bool away);
276
[DBus (name = "whois")]
277
public signal void event_whois (int64 time, string server, string nick, string message);