Mercurial > pidgin
comparison libpurple/protocols/myspace/session.h @ 17266:793301c04e3a
(Incomplete - plugin does not load) Begin migrating protocol message receiving to MsimMessage.
author | Jeffrey Connelly <jaconnel@calpoly.edu> |
---|---|
date | Thu, 31 May 2007 06:09:46 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
17265:253155592cd5 | 17266:793301c04e3a |
---|---|
1 /* MySpaceIM Protocol Plugin, session header file | |
2 * | |
3 * \author Jeff Connelly | |
4 * | |
5 * Copyright (C) 2007, Jeff Connelly <jeff2@homing.pidgin.im> | |
6 * | |
7 * This program is free software; you can redistribute it and/or modify | |
8 * it under the terms of the GNU General Public License as published by | |
9 * the Free Software Foundation; either version 2 of the License, or | |
10 * (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, | |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 * GNU General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU General Public License | |
18 * along with this program; if not, write to the Free Software | |
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
20 */ | |
21 | |
22 #ifndef _MYSPACE_SESSION_H | |
23 #define _MYSPACE_SESSION_H | |
24 | |
25 #include <glib.h> | |
26 | |
27 #include "account.h" | |
28 | |
29 /* Random number in every MsimSession, to ensure it is valid. */ | |
30 #define MSIM_SESSION_STRUCT_MAGIC 0xe4a6752b | |
31 | |
32 /* Everything needed to keep track of a session. */ | |
33 typedef struct _MsimSession | |
34 { | |
35 guint magic; /**< MSIM_SESSION_STRUCT_MAGIC */ | |
36 PurpleAccount *account; | |
37 PurpleConnection *gc; | |
38 gchar *sesskey; /**< Session key text string from server */ | |
39 gchar *userid; /**< This user's numeric user ID */ | |
40 gint fd; /**< File descriptor to/from server */ | |
41 | |
42 GHashTable *user_lookup_cb; /**< Username -> userid lookup callback */ | |
43 GHashTable *user_lookup_cb_data; /**< Username -> userid lookup callback data */ | |
44 GHashTable *user_lookup_cache; /**< Cached information on users */ | |
45 | |
46 gchar *rxbuf; /**< Receive buffer */ | |
47 guint rxoff; /**< Receive buffer offset */ | |
48 guint next_rid; /**< Next request/response ID */ | |
49 } MsimSession; | |
50 | |
51 /* Check if an MsimSession is valid */ | |
52 #define MSIM_SESSION_VALID(s) (session != NULL && \ | |
53 session->magic == MSIM_SESSION_STRUCT_MAGIC) | |
54 | |
55 #endif /* !_MYSPACE_SESSION_H */ |