annotate libpurple/protocols/myspace/myspace.h @ 16405:8063f163f411

Add MySpaceIM header file and reorganize functions.
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Sat, 28 Apr 2007 21:19:40 +0000
parents
children bb649c52fc19
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16405
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
1 /* MySpaceIM Protocol Plugin, headr file
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
2 *
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
3 * \author Jeff Connelly
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
4 *
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
5 * Copyright (C) 2007, Jeff Connelly <jeff2@homing.pidgin.im>
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
6 *
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
10 * (at your option) any later version.
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
11 *
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
15 * GNU General Public License for more details.
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
16 *
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
20 */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
21
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
22 /* Statuses */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
23 #define MSIM_STATUS_ONLINE "online"
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
24 #define MSIM_STATUS_AWAY "away"
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
25 #define MSIM_STATUS_OFFLINE "offline"
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
26 #define MSIM_STATUS_INVISIBLE "invisible"
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
27
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
28 /* Build version of MySpaceIM to report to servers (1.0.xxx.0) */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
29 #define MSIM_CLIENT_VERSION 673
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
30
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
31 /* Server */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
32 #define MSIM_SERVER "im.myspace.akadns.net"
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
33 //#define MSIM_SERVER "localhost"
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
34 #define MSIM_PORT 1863 /* TODO: alternate ports and automatic */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
35
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
36 /* Constants */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
37 #define HASH_SIZE 0x14 /**< Size of SHA-1 hash for login */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
38 #define NONCE_SIZE 0x20 /**< Half of decoded 'nc' field */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
39 #define MSIM_READ_BUF_SIZE 5*1024 /**< Receive buffer size */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
40 #define MSIM_FINAL_STRING "\\final\\" /**< Message end marker */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
41
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
42 /* Messages */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
43 #define MSIM_BM_INSTANT 1
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
44 #define MSIM_BM_STATUS 100
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
45 #define MSIM_BM_ACTION 121
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
46 /*#define MSIM_BM_UNKNOWN1 122*/
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
47
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
48 /* Random number in every MsimSession, to ensure it is valid. */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
49 #define MSIM_SESSION_STRUCT_MAGIC 0xe4a6752b
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
50
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
51 /* Everything needed to keep track of a session. */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
52 typedef struct _MsimSession
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
53 {
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
54 guint magic; /**< MSIM_SESSION_STRUCT_MAGIC */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
55 PurpleAccount *account;
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
56 PurpleConnection *gc;
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
57 gchar *sesskey; /**< Session key text string from server */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
58 gchar *userid; /**< This user's numeric user ID */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
59 gint fd; /**< File descriptor to/from server */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
60
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
61 GHashTable *user_lookup_cb; /**< Username -> userid lookup callback */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
62 GHashTable *user_lookup_cb_data; /**< Username -> userid lookup callback data */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
63 GHashTable *user_lookup_cache; /**< Cached information on users */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
64
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
65 gchar *rxbuf; /**< Receive buffer */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
66 guint rxoff; /**< Receive buffer offset */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
67 /* TODO: rid, store here and increment instead of random. */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
68 } MsimSession;
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
69
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
70 /* Check if an MsimSession is valid */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
71 #define MSIM_SESSION_VALID(s) (session != NULL && \
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
72 session->magic == MSIM_SESSION_STRUCT_MAGIC)
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
73
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
74 /* Callback function pointer type for when a user's information is received,
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
75 * initiated from a user lookup. */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
76 typedef void (*MSIM_USER_LOOKUP_CB)(MsimSession *session, GHashTable *userinfo,
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
77 gpointer data);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
78
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
79 /* Passed to MSIM_USER_LOOKUP_CB for msim_send_im_cb - called when
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
80 * user information is available, ready to send a message. */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
81 typedef struct _send_im_cb_struct
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
82 {
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
83 gchar *who;
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
84 gchar *message;
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
85 PurpleMessageFlags flags;
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
86 } send_im_cb_struct;
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
87
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
88
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
89 /* Functions */
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
90 static void init_plugin(PurplePlugin *plugin);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
91 static GList *msim_status_types(PurpleAccount *acct);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
92 static const gchar *msim_list_icon(PurpleAccount *acct, PurpleBuddy *buddy);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
93
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
94 static GHashTable* msim_parse(gchar* msg);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
95 static GHashTable *msim_parse_body(const gchar *body_str);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
96
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
97 static void print_hash_item(gpointer key, gpointer value, gpointer user_data);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
98 static void msim_send(MsimSession *session, const gchar *msg);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
99
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
100 static void msim_login(PurpleAccount *acct);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
101 static int msim_login_challenge(MsimSession *session, GHashTable *table);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
102 static gchar* msim_compute_login_response(guchar nonce[2*NONCE_SIZE],
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
103 gchar* email, gchar* password);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
104
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
105 static int msim_send_im(PurpleConnection *gc, const char *who,
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
106 const char *message, PurpleMessageFlags flags);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
107 static int msim_send_im_by_userid(MsimSession *session, const gchar *userid,
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
108 const gchar *message, PurpleMessageFlags flags);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
109 static void msim_send_im_by_userid_cb(MsimSession *session,
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
110 GHashTable *userinfo, gpointer data);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
111 static void msim_incoming_im_cb(MsimSession *session, GHashTable *userinfo,
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
112 gpointer data);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
113 static int msim_incoming_im(MsimSession *session, GHashTable *table);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
114
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
115 static int msim_process_reply(MsimSession *session, GHashTable *table);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
116 static int msim_process(PurpleConnection *gc, GHashTable *table);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
117
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
118 static int msim_error(MsimSession *session, GHashTable *table);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
119 static void msim_status_cb(MsimSession *session, GHashTable *userinfo,
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
120 gpointer data);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
121 static int msim_status(MsimSession *session, GHashTable *table);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
122 static void msim_input_cb(gpointer gc_uncasted, gint source,
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
123 PurpleInputCondition cond);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
124 static void msim_connect_cb(gpointer data, gint source,
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
125 const gchar *error_message);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
126
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
127 static MsimSession *msim_session_new(PurpleAccount *acct);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
128 static void msim_session_destroy(MsimSession *session);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
129
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
130 static void msim_close(PurpleConnection *gc);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
131
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
132 static inline gboolean msim_is_userid(const gchar *user);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
133 static inline gboolean msim_is_email(const gchar *user);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
134
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
135 static void msim_lookup_user(MsimSession *session, const gchar *user,
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
136 MSIM_USER_LOOKUP_CB cb, gpointer data);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
137
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
138 static char *msim_status_text(PurpleBuddy *buddy);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
139 static void msim_tooltip_text(PurpleBuddy *buddy,
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
140 PurpleNotifyUserInfo *user_info, gboolean full);
8063f163f411 Add MySpaceIM header file and reorganize functions.
Jeffrey Connelly <jaconnel@calpoly.edu>
parents:
diff changeset
141