annotate libpurple/protocols/myspace/user.h @ 25011:ae544623840b

propagate from branch 'im.pidgin.pidgin' (head f018e11a7ea08e07f22667e6daca2ec7e64f9710) to branch 'org.darkrain42.pidgin.buddy-add' (head e4fae922272cfd510a1f55595c374c2b9f665767)
author Paul Aurich <paul@darkrain42.org>
date Fri, 02 Jan 2009 19:27:02 +0000
parents 401f548e3544 c6cadb7bdcf7
children 300cf4e16720
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19892
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
1 /* MySpaceIM Protocol Plugin, header file
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
2 *
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
3 * Copyright (C) 2007, Jeff Connelly <jeff2@soc.pidgin.im>
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
4 *
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
5 * This program is free software; you can redistribute it and/or modify
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
6 * it under the terms of the GNU General Public License as published by
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
7 * the Free Software Foundation; either version 2 of the License, or
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
8 * (at your option) any later version.
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
9 *
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
10 * This program is distributed in the hope that it will be useful,
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
13 * GNU General Public License for more details.
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
14 *
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
15 * You should have received a copy of the GNU General Public License
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
16 * along with this program; if not, write to the Free Software
20147
51457cf3d27b merge of '0fb234fbd6f0cbba882df8df649a783fea7f312f'
Casey Harkins <charkins@pidgin.im>
parents: 19680 19892
diff changeset
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
19892
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
18 */
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
19
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
20 #ifndef _MYSPACE_USER_H
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
21 #define _MYSPACE_USER_H
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
22
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
23 /* Hold ephemeral information about buddies, for proto_data of PurpleBuddy. */
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
24 /* GHashTable? */
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
25 typedef struct _MsimUser
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
26 {
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
27 PurpleBuddy *buddy;
24726
694591875bc9 Use the friendly/vanity url when it's available in myspace
Mark Doliner <mark@kingant.net>
parents: 24632
diff changeset
28 /* Note: id is also &buddy->node (set_blist_node_int), when buddy is non-NULL */
24632
128a77f3b3c4 Keep track of the user ID in the MsimUser struct so that we have a copy
Mark Doliner <mark@kingant.net>
parents: 22305
diff changeset
29 int id;
19892
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
30 guint client_cv;
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
31 gchar *client_info;
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
32 guint age;
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
33 gchar *gender;
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
34 gchar *location;
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
35 guint total_friends;
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
36 gchar *headline;
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
37 gchar *display_name;
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
38 gchar *username;
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
39 gchar *band_name, *song_name;
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
40 gchar *image_url;
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
41 guint last_image_updated;
20364
4293673c1f37 applied changes from 8e81ccec879f9cfbd8fc282b703803c98e150ff7
Luke Schierer <lschiere@pidgin.im>
parents: 20257
diff changeset
42 gboolean temporary_user;
19892
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
43 } MsimUser;
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
44
24731
295464ae2d2a No functionality change--just cleanup.
Mark Doliner <mark@kingant.net>
parents: 24726
diff changeset
45 /* Callback function pointer type for when a user's information is received,
19892
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
46 * initiated from a user lookup. */
24764
c044eb54b7ac Fix a leak in myspace prpl.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 24731
diff changeset
47 typedef void (*MSIM_USER_LOOKUP_CB)(MsimSession *session, const MsimMessage *userinfo, gpointer data);
19892
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
48
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
49 MsimUser *msim_get_user_from_buddy(PurpleBuddy *buddy);
24853
c6cadb7bdcf7 A couple of memory leak fixes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 24764
diff changeset
50 void msim_user_free(MsimUser *user);
19892
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
51 MsimUser *msim_find_user(MsimSession *session, const gchar *username);
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
52 void msim_append_user_info(MsimSession *session, PurpleNotifyUserInfo *user_info, MsimUser *user, gboolean full);
24764
c044eb54b7ac Fix a leak in myspace prpl.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 24731
diff changeset
53 gboolean msim_store_user_info(MsimSession *session, const MsimMessage *msg, MsimUser *user);
19892
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
54 gboolean msim_is_userid(const gchar *user);
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
55 void msim_lookup_user(MsimSession *session, const gchar *user, MSIM_USER_LOOKUP_CB cb, gpointer data);
22302
0e2207b46080 In msimprpl, if the user signs in without any username set (this will happen
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 21102
diff changeset
56 void msim_set_username_cb(PurpleConnection *gc);
0e2207b46080 In msimprpl, if the user signs in without any username set (this will happen
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 21102
diff changeset
57 void msim_do_not_set_username_cb(PurpleConnection *gc);
19892
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
58
36ba89a2b7da Replace all CRLF line-endings with LF line endings (Unix-style). This fixes
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 19443
diff changeset
59 #endif /* !_MYSPACE_USER_H */