Frameworks/libpurple.framework/Versions/0.6.0/Headers/user.h
changeset 2592 e8d15275025e
parent 2591 f66a716bfc79
child 2593 b4bd28402abc
     1.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/user.h	Fri Aug 21 13:24:36 2009 -0700
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,412 +0,0 @@
     1.4 -/**
     1.5 - * @file user.h User functions
     1.6 - *
     1.7 - * purple
     1.8 - *
     1.9 - * Purple is the legal property of its developers, whose names are too numerous
    1.10 - * to list here.  Please refer to the COPYRIGHT file distributed with this
    1.11 - * source distribution.
    1.12 - *
    1.13 - * This program is free software; you can redistribute it and/or modify
    1.14 - * it under the terms of the GNU General Public License as published by
    1.15 - * the Free Software Foundation; either version 2 of the License, or
    1.16 - * (at your option) any later version.
    1.17 - *
    1.18 - * This program is distributed in the hope that it will be useful,
    1.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.21 - * GNU General Public License for more details.
    1.22 - *
    1.23 - * You should have received a copy of the GNU General Public License
    1.24 - * along with this program; if not, write to the Free Software
    1.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
    1.26 - */
    1.27 -#ifndef _MSN_USER_H_
    1.28 -#define _MSN_USER_H_
    1.29 -
    1.30 -typedef struct _MsnUser  MsnUser;
    1.31 -
    1.32 -#include "session.h"
    1.33 -#include "object.h"
    1.34 -
    1.35 -#include "userlist.h"
    1.36 -
    1.37 -typedef enum
    1.38 -{
    1.39 -	MSN_NETWORK_UNKNOWN      = 0x00,
    1.40 -	MSN_NETWORK_PASSPORT     = 0x01,
    1.41 -	MSN_NETWORK_COMMUNICATOR = 0x02,
    1.42 -	MSN_NETWORK_MOBILE       = 0x04,
    1.43 -	MSN_NETWORK_MNI          = 0x08,
    1.44 -	MSN_NETWORK_SMTP         = 0x10,
    1.45 -	MSN_NETWORK_YAHOO        = 0x20
    1.46 -} MsnNetwork;
    1.47 -
    1.48 -/**
    1.49 - * Current media.
    1.50 - */
    1.51 -typedef enum
    1.52 -{
    1.53 -	CURRENT_MEDIA_UNKNOWN,
    1.54 -	CURRENT_MEDIA_MUSIC,
    1.55 -	CURRENT_MEDIA_GAMES,
    1.56 -	CURRENT_MEDIA_OFFICE
    1.57 -} CurrentMediaType;
    1.58 -
    1.59 -typedef struct _CurrentMedia
    1.60 -{
    1.61 -	CurrentMediaType type;     /**< Type.   */
    1.62 -	char *title;    /**< Title.  */
    1.63 -	char *artist;   /**< Artist. */
    1.64 -	char *album;    /**< Album.  */
    1.65 -} CurrentMedia;
    1.66 -
    1.67 -/**
    1.68 - * A user.
    1.69 - */
    1.70 -struct _MsnUser
    1.71 -{
    1.72 -	MsnUserList *userlist;
    1.73 -
    1.74 -	char *passport;         /**< The passport account.          */
    1.75 -	char *friendly_name;    /**< The friendly name.             */
    1.76 -
    1.77 -	char * uid;				/*< User Id							*/
    1.78 -
    1.79 -	const char *status;     /**< The state of the user.         */
    1.80 -	char *statusline;       /**< The state of the user.         */
    1.81 -	CurrentMedia media;     /**< Current media of the user.     */
    1.82 -
    1.83 -	gboolean idle;          /**< The idle state of the user.    */
    1.84 -
    1.85 -	struct
    1.86 -	{
    1.87 -		char *home;         /**< Home phone number.             */
    1.88 -		char *work;         /**< Work phone number.             */
    1.89 -		char *mobile;       /**< Mobile phone number.           */
    1.90 -
    1.91 -	} phone;
    1.92 -
    1.93 -	gboolean authorized;    /**< Authorized to add this user.   */
    1.94 -	gboolean mobile;        /**< Signed up with MSN Mobile.     */
    1.95 -
    1.96 -	GList *group_ids;       /**< The group IDs.                 */
    1.97 -	char *pending_group;    /**< A pending group to add.        */
    1.98 -
    1.99 -	MsnObject *msnobj;      /**< The user's MSN Object.         */
   1.100 -
   1.101 -	GHashTable *clientcaps; /**< The client's capabilities.     */
   1.102 -
   1.103 -	guint clientid;         /**< The client's ID                */
   1.104 -
   1.105 -	MsnNetwork networkid;   /**< The user's network             */
   1.106 -
   1.107 -	int list_op;            /**< Which lists the user is in     */
   1.108 -
   1.109 -	guint membership_id[5];	/**< The membershipId sent by the contacts server,
   1.110 -				     indexed by the list it belongs to		*/
   1.111 -
   1.112 -	char *invite_message;   /**< Invite message of user request */
   1.113 -};
   1.114 -
   1.115 -/**************************************************************************
   1.116 - ** @name User API                                                        *
   1.117 - **************************************************************************/
   1.118 -/*@{*/
   1.119 -
   1.120 -/**
   1.121 - * Creates a new user structure.
   1.122 - *
   1.123 - * @param session      The MSN session.
   1.124 - * @param passport     The initial passport.
   1.125 - * @param stored_name  The initial stored name.
   1.126 - *
   1.127 - * @return A new user structure.
   1.128 - */
   1.129 -MsnUser *msn_user_new(MsnUserList *userlist, const char *passport,
   1.130 -					  const char *friendly_name);
   1.131 -
   1.132 -/**
   1.133 - * Destroys a user structure.
   1.134 - *
   1.135 - * @param user The user to destroy.
   1.136 - */
   1.137 -void msn_user_destroy(MsnUser *user);
   1.138 -
   1.139 -
   1.140 -/**
   1.141 - * Updates the user.
   1.142 - *
   1.143 - * Communicates with the core to update the ui, etc.
   1.144 - *
   1.145 - * @param user The user to update.
   1.146 - */
   1.147 -void msn_user_update(MsnUser *user);
   1.148 -
   1.149 - /**
   1.150 -  *  Sets the new statusline of user.
   1.151 -  *
   1.152 -  *  @param user The user.
   1.153 -  *  @param state The statusline string.
   1.154 -  */
   1.155 -void msn_user_set_statusline(MsnUser *user, const char *statusline);
   1.156 -
   1.157 - /**
   1.158 -  *  Sets the current media of user.
   1.159 -  *
   1.160 -  *  @param user   The user.
   1.161 -  *  @param cmedia Current media.
   1.162 -  */
   1.163 -void msn_user_set_currentmedia(MsnUser *user, const CurrentMedia *cmedia);
   1.164 -
   1.165 -/**
   1.166 - * Sets the new state of user.
   1.167 - *
   1.168 - * @param user The user.
   1.169 - * @param state The state string.
   1.170 - */
   1.171 -void msn_user_set_state(MsnUser *user, const char *state);
   1.172 -
   1.173 -/**
   1.174 - * Sets the passport account for a user.
   1.175 - *
   1.176 - * @param user     The user.
   1.177 - * @param passport The passport account.
   1.178 - */
   1.179 -void msn_user_set_passport(MsnUser *user, const char *passport);
   1.180 -
   1.181 -/**
   1.182 - * Sets the friendly name for a user.
   1.183 - *
   1.184 - * @param user The user.
   1.185 - * @param name The friendly name.
   1.186 - *
   1.187 - * @returns TRUE is name actually changed, FALSE otherwise.
   1.188 - */
   1.189 -gboolean msn_user_set_friendly_name(MsnUser *user, const char *name);
   1.190 -
   1.191 -/**
   1.192 - * Sets the buddy icon for a local user.
   1.193 - *
   1.194 - * @param user     The user.
   1.195 - * @param img      The buddy icon image
   1.196 - */
   1.197 -void msn_user_set_buddy_icon(MsnUser *user, PurpleStoredImage *img);
   1.198 -
   1.199 -/**
   1.200 - * Sets the group ID list for a user.
   1.201 - *
   1.202 - * @param user The user.
   1.203 - * @param ids  The group ID list.
   1.204 - */
   1.205 -void msn_user_set_group_ids(MsnUser *user, GList *ids);
   1.206 -
   1.207 -/**
   1.208 - * Adds the group ID for a user.
   1.209 - *
   1.210 - * @param user The user.
   1.211 - * @param id   The group ID.
   1.212 - */
   1.213 -void msn_user_add_group_id(MsnUser *user, const char * id);
   1.214 -
   1.215 -/**
   1.216 - * Removes the group ID from a user.
   1.217 - *
   1.218 - * @param user The user.
   1.219 - * @param id   The group ID.
   1.220 - */
   1.221 -void msn_user_remove_group_id(MsnUser *user, const char * id);
   1.222 -
   1.223 -/**
   1.224 - * Sets the pending group for a user.
   1.225 - *
   1.226 - * @param user  The user.
   1.227 - * @param group The group name.
   1.228 - */
   1.229 -void msn_user_set_pending_group(MsnUser *user, const char *group);
   1.230 -
   1.231 -/**
   1.232 - * Removes the pending group from a user.
   1.233 - *
   1.234 - * @param user The user.
   1.235 - *
   1.236 - * @return Returns the pending group name.
   1.237 - */
   1.238 -char *msn_user_remove_pending_group(MsnUser *user);
   1.239 -
   1.240 -/**
   1.241 - * Sets the home phone number for a user.
   1.242 - *
   1.243 - * @param user   The user.
   1.244 - * @param number The home phone number.
   1.245 - */
   1.246 -void msn_user_set_home_phone(MsnUser *user, const char *number);
   1.247 -
   1.248 -/**
   1.249 - * Sets the work phone number for a user.
   1.250 - *
   1.251 - * @param user   The user.
   1.252 - * @param number The work phone number.
   1.253 - */
   1.254 -void msn_user_set_work_phone(MsnUser *user, const char *number);
   1.255 -
   1.256 -void msn_user_set_uid(MsnUser *user, const char *uid);
   1.257 -
   1.258 -/**
   1.259 - * Sets the client id for a user.
   1.260 - *
   1.261 - * @param user     The user.
   1.262 - * @param clientid The client id.
   1.263 - */
   1.264 -void msn_user_set_clientid(MsnUser *user, guint clientid);
   1.265 -
   1.266 -/**
   1.267 - * Sets the network id for a user.
   1.268 - *
   1.269 - * @param user    The user.
   1.270 - * @param network The network id.
   1.271 - */
   1.272 -void msn_user_set_network(MsnUser *user, MsnNetwork network);
   1.273 -
   1.274 -/**
   1.275 - * Sets the mobile phone number for a user.
   1.276 - *
   1.277 - * @param user   The user.
   1.278 - * @param number The mobile phone number.
   1.279 - */
   1.280 -void msn_user_set_mobile_phone(MsnUser *user, const char *number);
   1.281 -
   1.282 -/**
   1.283 - * Sets the MSNObject for a user.
   1.284 - *
   1.285 - * @param user The user.
   1.286 - * @param obj  The MSNObject.
   1.287 - */
   1.288 -void msn_user_set_object(MsnUser *user, MsnObject *obj);
   1.289 -
   1.290 -/**
   1.291 - * Sets the client information for a user.
   1.292 - *
   1.293 - * @param user The user.
   1.294 - * @param info The client information.
   1.295 - */
   1.296 -void msn_user_set_client_caps(MsnUser *user, GHashTable *info);
   1.297 -
   1.298 -/**
   1.299 - * Sets the invite message for a user.
   1.300 - *
   1.301 - * @param user    The user.
   1.302 - * @param message The invite message for a user.
   1.303 - */
   1.304 -void msn_user_set_invite_message(MsnUser *user, const char *message);
   1.305 -
   1.306 -
   1.307 -/**
   1.308 - * Returns the passport account for a user.
   1.309 - *
   1.310 - * @param user The user.
   1.311 - *
   1.312 - * @return The passport account.
   1.313 - */
   1.314 -const char *msn_user_get_passport(const MsnUser *user);
   1.315 -
   1.316 -/**
   1.317 - * Returns the friendly name for a user.
   1.318 - *
   1.319 - * @param user The user.
   1.320 - *
   1.321 - * @return The friendly name.
   1.322 - */
   1.323 -const char *msn_user_get_friendly_name(const MsnUser *user);
   1.324 -
   1.325 -/**
   1.326 - * Returns the home phone number for a user.
   1.327 - *
   1.328 - * @param user The user.
   1.329 - *
   1.330 - * @return The user's home phone number.
   1.331 - */
   1.332 -const char *msn_user_get_home_phone(const MsnUser *user);
   1.333 -
   1.334 -/**
   1.335 - * Returns the work phone number for a user.
   1.336 - *
   1.337 - * @param user The user.
   1.338 - *
   1.339 - * @return The user's work phone number.
   1.340 - */
   1.341 -const char *msn_user_get_work_phone(const MsnUser *user);
   1.342 -
   1.343 -/**
   1.344 - * Returns the mobile phone number for a user.
   1.345 - *
   1.346 - * @param user The user.
   1.347 - *
   1.348 - * @return The user's mobile phone number.
   1.349 - */
   1.350 -const char *msn_user_get_mobile_phone(const MsnUser *user);
   1.351 -
   1.352 -/**
   1.353 - * Returns the client id for a user.
   1.354 - *
   1.355 - * @param user    The user.
   1.356 - *
   1.357 - * @return The user's client id.
   1.358 - */
   1.359 -guint msn_user_get_clientid(const MsnUser *user);
   1.360 -
   1.361 -/**
   1.362 - * Returns the network id for a user.
   1.363 - *
   1.364 - * @param user    The user.
   1.365 - *
   1.366 - * @return The user's network id.
   1.367 - */
   1.368 -MsnNetwork msn_user_get_network(const MsnUser *user);
   1.369 -
   1.370 -/**
   1.371 - * Returns the MSNObject for a user.
   1.372 - *
   1.373 - * @param user The user.
   1.374 - *
   1.375 - * @return The MSNObject.
   1.376 - */
   1.377 -MsnObject *msn_user_get_object(const MsnUser *user);
   1.378 -
   1.379 -/**
   1.380 - * Returns the client information for a user.
   1.381 - *
   1.382 - * @param user The user.
   1.383 - *
   1.384 - * @return The client information.
   1.385 - */
   1.386 -GHashTable *msn_user_get_client_caps(const MsnUser *user);
   1.387 -
   1.388 -/**
   1.389 - * Returns the invite message for a user.
   1.390 - *
   1.391 - * @param user The user.
   1.392 - *
   1.393 - * @return The user's invite message.
   1.394 - */
   1.395 -const char *msn_user_get_invite_message(const MsnUser *user);
   1.396 -
   1.397 -/**
   1.398 - * check to see if user is online
   1.399 - */
   1.400 -gboolean
   1.401 -msn_user_is_online(PurpleAccount *account, const char *name);
   1.402 -
   1.403 -/**
   1.404 - * check to see if user is Yahoo User
   1.405 - */
   1.406 -gboolean
   1.407 -msn_user_is_yahoo(PurpleAccount *account ,const char *name);
   1.408 -
   1.409 -void msn_user_set_op(MsnUser *user, int list_op);
   1.410 -void msn_user_unset_op(MsnUser *user, int list_op);
   1.411 -
   1.412 -/*@}*/
   1.413 -
   1.414 -
   1.415 -#endif /* _MSN_USER_H_ */