libpurple/protocols/myspace/user.h

Fri, 12 Dec 2008 04:01:39 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Fri, 12 Dec 2008 04:01:39 +0000
changeset 25116
cb60ad01e2e8
parent 22436
3483af12d74f
child 25193
f98a278fd233
permissions
-rw-r--r--

Keep track of the user ID in the MsimUser struct so that we have a copy
even for people who aren't in our buddy list. This fixes the "View web
profile" link when getting info for people not in our buddy list.

20153
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
1 /* MySpaceIM Protocol Plugin, header file
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
2 *
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
3 * Copyright (C) 2007, Jeff Connelly <jeff2@soc.pidgin.im>
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
4 *
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
5 * This program is free software; you can redistribute it and/or modify
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
6 * it under the terms of the GNU General Public License as published by
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
7 * the Free Software Foundation; either version 2 of the License, or
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
8 * (at your option) any later version.
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
9 *
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
10 * This program is distributed in the hope that it will be useful,
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
13 * GNU General Public License for more details.
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
14 *
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
15 * You should have received a copy of the GNU General Public License
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
16 * along with this program; if not, write to the Free Software
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
18 */
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
19
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
20 #ifndef _MYSPACE_USER_H
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
21 #define _MYSPACE_USER_H
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
22
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
23 /* Hold ephemeral information about buddies, for proto_data of PurpleBuddy. */
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
24 /* GHashTable? */
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
25 typedef struct _MsimUser
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
26 {
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
27 PurpleBuddy *buddy;
25116
cb60ad01e2e8 Keep track of the user ID in the MsimUser struct so that we have a copy
Mark Doliner <markdoliner@pidgin.im>
parents: 22436
diff changeset
28 int id;
20153
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
29 guint client_cv;
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
30 gchar *client_info;
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
31 guint age;
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
32 gchar *gender;
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
33 gchar *location;
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
34 guint total_friends;
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
35 gchar *headline;
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
36 gchar *display_name;
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
37 /* Note: uid is in &buddy->node (set_blist_node_int), since it never changes */
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
38 gchar *username;
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
39 gchar *band_name, *song_name;
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
40 gchar *image_url;
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
41 guint last_image_updated;
20256
5194cfc606e0 applied changes from 8e81ccec879f9cfbd8fc282b703803c98e150ff7
Luke Schierer <lschiere@pidgin.im>
parents: 20153
diff changeset
42 gboolean temporary_user;
20153
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
43 } MsimUser;
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
44
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
45 /* Callback function pointer type for when a user's information is received,
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
46 * initiated from a user lookup. */
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
47 typedef void (*MSIM_USER_LOOKUP_CB)(MsimSession *session, MsimMessage *userinfo, gpointer data);
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
48
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
49 MsimUser *msim_get_user_from_buddy(PurpleBuddy *buddy);
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
50 MsimUser *msim_find_user(MsimSession *session, const gchar *username);
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
51 void msim_append_user_info(MsimSession *session, PurpleNotifyUserInfo *user_info, MsimUser *user, gboolean full);
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
52 gboolean msim_store_user_info(MsimSession *session, MsimMessage *msg, MsimUser *user);
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
53 gboolean msim_is_userid(const gchar *user);
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
54 gboolean msim_is_email(const gchar *user);
22436
3483af12d74f In msimprpl, add msim_is_valid_username() to check whether a username
Jeff Connelly <jeff2@soc.pidgin.im>
parents: 22433
diff changeset
55 gboolean msim_is_valid_username(const gchar *user);
20153
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
56 void msim_lookup_user(MsimSession *session, const gchar *user, MSIM_USER_LOOKUP_CB cb, gpointer data);
22433
41a60cb99e28 In msimprpl, if the user signs in without any username set (this will happen
Jeff Connelly <jeff2@soc.pidgin.im>
parents: 21367
diff changeset
57 void msim_set_username_cb(PurpleConnection *gc);
41a60cb99e28 In msimprpl, if the user signs in without any username set (this will happen
Jeff Connelly <jeff2@soc.pidgin.im>
parents: 21367
diff changeset
58 void msim_do_not_set_username_cb(PurpleConnection *gc);
20153
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
59
7cdc9e4882df Kill CRLF line-endings to make sure this compiles on Solaris. This is a
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
60 #endif /* !_MYSPACE_USER_H */

mercurial