plugins/gaim-remote/remote.h

Tue, 21 Jun 2005 04:40:34 +0000

author
Sean Egan <seanegan@pidgin.im>
date
Tue, 21 Jun 2005 04:40:34 +0000
changeset 11016
9990e360ee9c
parent 10395
786e15490d85
permissions
-rw-r--r--

[gaim-migrate @ 12885]
Wherever possible, allow users to act on objects and data directly, rather
than through dialogs or explicit commands. For example, it is more intuitive
to drag a circle object around in a diagram rather than selecting a "Move"
command from a menu while the circle is selected. Simlarly, in an email
application, allow the user to attach files by dragging them from the file
manager and dropping them onto the message composition window if they wish.
-- GNOME HIG

This allows direct manipulation of buddy aliases and group names, by moving
the features from dialogs to GtkTreeView's inline editing.

I think this is a great change, but it seems like the type of thing that
might stir up controversy. If so, take it to the mailing list for discussion.
If not, I'll go ahead and perfect this sometime later.

-s.

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 * Remote control plugin for Gaim
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.
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
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
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 * modify it under the terms of the GNU General Public License as
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * published by the Free Software Foundation; either version 2 of the
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * License, or (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, but
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * 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 GNU
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * 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
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 * 02111-1307, USA.
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 */
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 #ifndef _GAIM_REMOTE_H_
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 #define _GAIM_REMOTE_H_
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25 #include <gaim-remote/remote-socket.h>
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
27
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
28 /* this is the basis of the CUI protocol. */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
29 #define CUI_TYPE_META 1
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
30 #define CUI_TYPE_PLUGIN 2
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
31 #define CUI_TYPE_USER 3
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
32 #define CUI_TYPE_CONN 4
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
33 #define CUI_TYPE_BUDDY 5 /* BUDDY_LIST, i.e., both groups and buddies */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
34 #define CUI_TYPE_MESSAGE 6
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
35 #define CUI_TYPE_CHAT 7
10395
786e15490d85 [gaim-migrate @ 11624]
Evan Schoenberg <evands@pidgin.im>
parents: 9608
diff changeset
36 #define CUI_TYPE_REMOTE 8
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
37 /* This is used to send commands to other UI's,
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
38 * like "Open new conversation" or "send IM".
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
39 * Even though there's much redundancy with the
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
40 * other CUI_TYPES, we're better keeping this stuff
8735
01248ea222d3 [gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents: 5884
diff changeset
41 * separate because it's intended use is so different */
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
42
10395
786e15490d85 [gaim-migrate @ 11624]
Evan Schoenberg <evands@pidgin.im>
parents: 9608
diff changeset
43 #define CUI_META_LIST 1
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
44 /* 1 is always list; this is ignored by the core.
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
45 If we move to TCP this can be a keepalive */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
46 #define CUI_META_QUIT 2
10395
786e15490d85 [gaim-migrate @ 11624]
Evan Schoenberg <evands@pidgin.im>
parents: 9608
diff changeset
47 #define CUI_META_DETACH 3
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
48 /* you don't need to send this, you can just close
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
49 the socket. the core will understand. */
10395
786e15490d85 [gaim-migrate @ 11624]
Evan Schoenberg <evands@pidgin.im>
parents: 9608
diff changeset
50 #define CUI_META_PING 4
786e15490d85 [gaim-migrate @ 11624]
Evan Schoenberg <evands@pidgin.im>
parents: 9608
diff changeset
51 #define CUI_META_ACK 5
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
52
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
53 #define CUI_PLUGIN_LIST 1
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
54 #define CUI_PLUGIN_LOAD 2
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
55 #define CUI_PLUGIN_UNLOAD 3
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
56
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
57 #define CUI_USER_LIST 1
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
58 #define CUI_USER_ADD 2
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
59 #define CUI_USER_REMOVE 3
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
60 #define CUI_USER_MODIFY 4 /* this handles moving them in the list too */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
61 #define CUI_USER_SIGNON 5
9608
0b3b4fcb642a [gaim-migrate @ 10451]
István Váradi
parents: 8735
diff changeset
62 #define CUI_USER_AWAY 6
0b3b4fcb642a [gaim-migrate @ 10451]
István Váradi
parents: 8735
diff changeset
63 #define CUI_USER_BACK 7
10395
786e15490d85 [gaim-migrate @ 11624]
Evan Schoenberg <evands@pidgin.im>
parents: 9608
diff changeset
64 #define CUI_USER_LOGOUT 8
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
65
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
66 #define CUI_CONN_LIST 1
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
67 #define CUI_CONN_PROGRESS 2
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
68 #define CUI_CONN_ONLINE 3
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
69 #define CUI_CONN_OFFLINE 4 /* this may send a "reason" for why it was killed */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
70
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
71 #define CUI_BUDDY_LIST 1
10395
786e15490d85 [gaim-migrate @ 11624]
Evan Schoenberg <evands@pidgin.im>
parents: 9608
diff changeset
72 #define CUI_BUDDY_STATE 2
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
73 /* notifies the UI of state changes; UI can use it to
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
74 request the current status from the core */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
75 #define CUI_BUDDY_ADD 3
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
76 #define CUI_BUDDY_REMOVE 4
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
77 #define CUI_BUDDY_MODIFY 5
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
78
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
79 #define CUI_MESSAGE_LIST 1 /* no idea */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
80 #define CUI_MESSAGE_SEND 2
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
81 #define CUI_MESSAGE_RECV 3
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
82
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
83 #define CUI_CHAT_LIST 1
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
84 #define CUI_CHAT_HISTORY 2 /* is this necessary? should we have one for IMs? */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
85 #define CUI_CHAT_JOIN 3 /* handles other people joining/parting too */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
86 #define CUI_CHAT_PART 4
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
87 #define CUI_CHAT_SEND 5
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
88 #define CUI_CHAT_RECV 6
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
89
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
90 #define CUI_REMOTE_CONNECTIONS 2 /* Get a list of gaim_connections */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
91 #define CUI_REMOTE_URI 3 /* Have the core handle aim:// URI's */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
92 #define CUI_REMOTE_BLIST 4 /* Return a copy of the buddy list */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
93 #define CUI_REMOTE_STATE 5 /* Given a buddy, return his presence. */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
94 #define CUI_REMOTE_NEW_CONVO 6 /* Must give a user, can give an optional message */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
95 #define CUI_REMOTE_SEND 7 /* Sends a message, a 'quiet' flag determines whether
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
96 * a convo window is displayed or not. */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
97 #define CUI_REMOTE_ADD_BUDDY 8 /* Adds buddy to list */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
98 #define CUI_REMOTE_REMOVE_BUDDY 9 /* Removes buddy from list */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
99 #define CUI_REMOTE_JOIN_CHAT 10 /* Joins a chat. */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
100 /* What else?? */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5859
diff changeset
101
5859
e9e5fb0bbfe9 [gaim-migrate @ 6290]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
102 #endif /* _GAIM_REMOTE_H_ */

mercurial