plugins/gaim-remote/remote-socket.h

Wed, 28 Jul 2004 00:29:52 +0000

author
István Váradi
date
Wed, 28 Jul 2004 00:29:52 +0000
changeset 9608
0b3b4fcb642a
parent 5859
e9e5fb0bbfe9
permissions
-rw-r--r--

[gaim-migrate @ 10451]
" I added two possible commands to gtk-remote: away and back.
away causes the away dialog to appear with the default
message and sets the status to away, back hides the
dialog and sets the status to online.

To implement this, I added to new CUI packet subtypes:
CUI_USER_AWAY and CUI_USER_BACK. This are processed in
core.c by calling do_away_message and do_im_back,
respectively." --István Váradi


committer: Luke Schierer <lschiere@pidgin.im>

5859
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /*
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * gaim-remote
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 *
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 * Copyright (C) 2002, Sean Egan <bj91704@binghamton.edu>
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 *
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * (at your option) any later version.
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 *
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * GNU General Public License for more details.
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 *
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 */
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 #ifndef _GAIM_SOCKET_H_
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 #define _GAIM_SOCKET_H_
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 #include <glib.h>
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26 typedef struct
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27 {
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28 unsigned char type;
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29 unsigned char subtype;
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30 unsigned long length;
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31 char *data;
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 } GaimRemotePacket;
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35 void gaim_remote_session_send_packet(int fd, GaimRemotePacket *packet);
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36 int gaim_remote_session_connect(int session);
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37 gboolean gaim_remote_session_exists(int sess);
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
38 GaimRemotePacket *gaim_remote_session_read_packet(int fd);
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
40 GaimRemotePacket *gaim_remote_packet_new(guchar type, guchar subtype);
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41 void gaim_remote_packet_free(GaimRemotePacket *p);
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42 void gaim_remote_packet_append_string(GaimRemotePacket *p, char *str);
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
43 void gaim_remote_packet_append_char(GaimRemotePacket *p, char c);
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44 void gaim_remote_packet_append_raw(GaimRemotePacket *p, char *str, int len);
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46 #endif /* _GAIM_SOCKET_H_ */

mercurial