Seems 0.5.6 was kept around, whoops. I wondered why that binary was a little heavy.
1.1 --- a/Frameworks/libpurple.framework/Versions/0.5.6/Headers/account.h Sun Jun 21 22:04:11 2009 -0400
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,1054 +0,0 @@
1.4 -/**
1.5 - * @file account.h Account API
1.6 - * @ingroup core
1.7 - * @see @ref account-signals
1.8 - */
1.9 -
1.10 -/* purple
1.11 - *
1.12 - * Purple is the legal property of its developers, whose names are too numerous
1.13 - * to list here. Please refer to the COPYRIGHT file distributed with this
1.14 - * source distribution.
1.15 - *
1.16 - * This program is free software; you can redistribute it and/or modify
1.17 - * it under the terms of the GNU General Public License as published by
1.18 - * the Free Software Foundation; either version 2 of the License, or
1.19 - * (at your option) any later version.
1.20 - *
1.21 - * This program is distributed in the hope that it will be useful,
1.22 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.23 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.24 - * GNU General Public License for more details.
1.25 - *
1.26 - * You should have received a copy of the GNU General Public License
1.27 - * along with this program; if not, write to the Free Software
1.28 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
1.29 - */
1.30 -#ifndef _PURPLE_ACCOUNT_H_
1.31 -#define _PURPLE_ACCOUNT_H_
1.32 -
1.33 -#include <glib.h>
1.34 -#include <glib-object.h>
1.35 -
1.36 -/** @copydoc _PurpleAccountUiOps */
1.37 -typedef struct _PurpleAccountUiOps PurpleAccountUiOps;
1.38 -/** @copydoc _PurpleAccount */
1.39 -typedef struct _PurpleAccount PurpleAccount;
1.40 -
1.41 -typedef gboolean (*PurpleFilterAccountFunc)(PurpleAccount *account);
1.42 -typedef void (*PurpleAccountRequestAuthorizationCb)(void *);
1.43 -typedef void (*PurpleAccountRegistrationCb)(PurpleAccount *account, gboolean succeeded, void *user_data);
1.44 -typedef void (*PurpleAccountUnregistrationCb)(PurpleAccount *account, gboolean succeeded, void *user_data);
1.45 -
1.46 -#include "connection.h"
1.47 -#include "log.h"
1.48 -#include "proxy.h"
1.49 -#include "prpl.h"
1.50 -#include "status.h"
1.51 -
1.52 -/**
1.53 - * Account request types.
1.54 - */
1.55 -typedef enum
1.56 -{
1.57 - PURPLE_ACCOUNT_REQUEST_AUTHORIZATION = 0 /* Account authorization request */
1.58 -} PurpleAccountRequestType;
1.59 -
1.60 -
1.61 -/** Account UI operations, used to notify the user of status changes and when
1.62 - * buddies add this account to their buddy lists.
1.63 - */
1.64 -struct _PurpleAccountUiOps
1.65 -{
1.66 - /** A buddy who is already on this account's buddy list added this account
1.67 - * to their buddy list.
1.68 - */
1.69 - void (*notify_added)(PurpleAccount *account,
1.70 - const char *remote_user,
1.71 - const char *id,
1.72 - const char *alias,
1.73 - const char *message);
1.74 -
1.75 - /** This account's status changed. */
1.76 - void (*status_changed)(PurpleAccount *account,
1.77 - PurpleStatus *status);
1.78 -
1.79 - /** Someone we don't have on our list added us; prompt to add them. */
1.80 - void (*request_add)(PurpleAccount *account,
1.81 - const char *remote_user,
1.82 - const char *id,
1.83 - const char *alias,
1.84 - const char *message);
1.85 -
1.86 - /** Prompt for authorization when someone adds this account to their buddy
1.87 - * list. To authorize them to see this account's presence, call \a
1.88 - * authorize_cb (\a user_data); otherwise call \a deny_cb (\a user_data);
1.89 - * @return a UI-specific handle, as passed to #close_account_request.
1.90 - */
1.91 - void *(*request_authorize)(PurpleAccount *account,
1.92 - const char *remote_user,
1.93 - const char *id,
1.94 - const char *alias,
1.95 - const char *message,
1.96 - gboolean on_list,
1.97 - PurpleAccountRequestAuthorizationCb authorize_cb,
1.98 - PurpleAccountRequestAuthorizationCb deny_cb,
1.99 - void *user_data);
1.100 -
1.101 - /** Close a pending request for authorization. \a ui_handle is a handle
1.102 - * as returned by #request_authorize.
1.103 - */
1.104 - void (*close_account_request)(void *ui_handle);
1.105 -
1.106 - void (*_purple_reserved1)(void);
1.107 - void (*_purple_reserved2)(void);
1.108 - void (*_purple_reserved3)(void);
1.109 - void (*_purple_reserved4)(void);
1.110 -};
1.111 -
1.112 -/** Structure representing an account.
1.113 - */
1.114 -struct _PurpleAccount
1.115 -{
1.116 - char *username; /**< The username. */
1.117 - char *alias; /**< How you appear to yourself. */
1.118 - char *password; /**< The account password. */
1.119 - char *user_info; /**< User information. */
1.120 -
1.121 - char *buddy_icon_path; /**< The buddy icon's non-cached path. */
1.122 -
1.123 - gboolean remember_pass; /**< Remember the password. */
1.124 -
1.125 - char *protocol_id; /**< The ID of the protocol. */
1.126 -
1.127 - PurpleConnection *gc; /**< The connection handle. */
1.128 - gboolean disconnecting; /**< The account is currently disconnecting */
1.129 -
1.130 - GHashTable *settings; /**< Protocol-specific settings. */
1.131 - GHashTable *ui_settings; /**< UI-specific settings. */
1.132 -
1.133 - PurpleProxyInfo *proxy_info; /**< Proxy information. This will be set */
1.134 - /* to NULL when the account inherits */
1.135 - /* proxy settings from global prefs. */
1.136 -
1.137 - /*
1.138 - * TODO: Supplementing the next two linked lists with hash tables
1.139 - * should help performance a lot when these lists are long. This
1.140 - * matters quite a bit for protocols like MSN, where all your
1.141 - * buddies are added to your permit list. Currently we have to
1.142 - * iterate through the entire list if we want to check if someone
1.143 - * is permitted or denied. We should do this for 3.0.0.
1.144 - */
1.145 - GSList *permit; /**< Permit list. */
1.146 - GSList *deny; /**< Deny list. */
1.147 - int perm_deny; /**< The permit/deny setting. */
1.148 -
1.149 - GList *status_types; /**< Status types. */
1.150 -
1.151 - PurplePresence *presence; /**< Presence. */
1.152 - PurpleLog *system_log; /**< The system log */
1.153 -
1.154 - void *ui_data; /**< The UI can put data here. */
1.155 - PurpleAccountRegistrationCb registration_cb;
1.156 - void *registration_cb_user_data;
1.157 -
1.158 - gpointer priv; /**< Pointer to opaque private data. */
1.159 -};
1.160 -
1.161 -#ifdef __cplusplus
1.162 -extern "C" {
1.163 -#endif
1.164 -
1.165 -/**************************************************************************/
1.166 -/** @name Account API */
1.167 -/**************************************************************************/
1.168 -/*@{*/
1.169 -
1.170 -/**
1.171 - * Creates a new account.
1.172 - *
1.173 - * @param username The username.
1.174 - * @param protocol_id The protocol ID.
1.175 - *
1.176 - * @return The new account.
1.177 - */
1.178 -PurpleAccount *purple_account_new(const char *username, const char *protocol_id);
1.179 -
1.180 -/**
1.181 - * Destroys an account.
1.182 - *
1.183 - * @param account The account to destroy.
1.184 - */
1.185 -void purple_account_destroy(PurpleAccount *account);
1.186 -
1.187 -/**
1.188 - * Connects to an account.
1.189 - *
1.190 - * @param account The account to connect to.
1.191 - */
1.192 -void purple_account_connect(PurpleAccount *account);
1.193 -
1.194 -/**
1.195 - * Sets the callback for successful registration.
1.196 - *
1.197 - * @param account The account for which this callback should be used
1.198 - * @param cb The callback
1.199 - * @param user_data The user data passed to the callback
1.200 - */
1.201 -void purple_account_set_register_callback(PurpleAccount *account, PurpleAccountRegistrationCb cb, void *user_data);
1.202 -
1.203 -/**
1.204 - * Registers an account.
1.205 - *
1.206 - * @param account The account to register.
1.207 - */
1.208 -void purple_account_register(PurpleAccount *account);
1.209 -
1.210 -/**
1.211 - * Unregisters an account (deleting it from the server).
1.212 - *
1.213 - * @param account The account to unregister.
1.214 - * @param cb Optional callback to be called when unregistration is complete
1.215 - * @param user_data user data to pass to the callback
1.216 - */
1.217 -void purple_account_unregister(PurpleAccount *account, PurpleAccountUnregistrationCb cb, void *user_data);
1.218 -
1.219 -/**
1.220 - * Disconnects from an account.
1.221 - *
1.222 - * @param account The account to disconnect from.
1.223 - */
1.224 -void purple_account_disconnect(PurpleAccount *account);
1.225 -
1.226 -/**
1.227 - * Notifies the user that the account was added to a remote user's
1.228 - * buddy list.
1.229 - *
1.230 - * This will present a dialog informing the user that he was added to the
1.231 - * remote user's buddy list.
1.232 - *
1.233 - * @param account The account that was added.
1.234 - * @param remote_user The name of the user that added this account.
1.235 - * @param id The optional ID of the local account. Rarely used.
1.236 - * @param alias The optional alias of the user.
1.237 - * @param message The optional message sent from the user adding you.
1.238 - */
1.239 -void purple_account_notify_added(PurpleAccount *account, const char *remote_user,
1.240 - const char *id, const char *alias,
1.241 - const char *message);
1.242 -
1.243 -/**
1.244 - * Notifies the user that the account was addded to a remote user's buddy
1.245 - * list and asks ther user if they want to add the remote user to their buddy
1.246 - * list.
1.247 - *
1.248 - * This will present a dialog informing the local user that the remote user
1.249 - * added them to the remote user's buddy list and will ask if they want to add
1.250 - * the remote user to the buddy list.
1.251 - *
1.252 - * @param account The account that was added.
1.253 - * @param remote_user The name of the user that added this account.
1.254 - * @param id The optional ID of the local account. Rarely used.
1.255 - * @param alias The optional alias of the user.
1.256 - * @param message The optional message sent from the user adding you.
1.257 - */
1.258 -void purple_account_request_add(PurpleAccount *account, const char *remote_user,
1.259 - const char *id, const char *alias,
1.260 - const char *message);
1.261 -
1.262 -/**
1.263 - * Notifies the user that a remote user has wants to add the local user
1.264 - * to his or her buddy list and requires authorization to do so.
1.265 - *
1.266 - * This will present a dialog informing the user of this and ask if the
1.267 - * user authorizes or denies the remote user from adding him.
1.268 - *
1.269 - * @param account The account that was added
1.270 - * @param remote_user The name of the user that added this account.
1.271 - * @param id The optional ID of the local account. Rarely used.
1.272 - * @param alias The optional alias of the remote user.
1.273 - * @param message The optional message sent by the user wanting to add you.
1.274 - * @param on_list Is the remote user already on the buddy list?
1.275 - * @param auth_cb The callback called when the local user accepts
1.276 - * @param deny_cb The callback called when the local user rejects
1.277 - * @param user_data Data to be passed back to the above callbacks
1.278 - *
1.279 - * @return A UI-specific handle.
1.280 - */
1.281 -void *purple_account_request_authorization(PurpleAccount *account, const char *remote_user,
1.282 - const char *id, const char *alias, const char *message, gboolean on_list,
1.283 - PurpleAccountRequestAuthorizationCb auth_cb, PurpleAccountRequestAuthorizationCb deny_cb, void *user_data);
1.284 -
1.285 -/**
1.286 - * Close account requests registered for the given PurpleAccount
1.287 - *
1.288 - * @param account The account for which requests should be closed
1.289 - */
1.290 -void purple_account_request_close_with_account(PurpleAccount *account);
1.291 -
1.292 -/**
1.293 - * Close the account request for the given ui handle
1.294 - *
1.295 - * @param ui_handle The ui specific handle for which requests should be closed
1.296 - */
1.297 -void purple_account_request_close(void *ui_handle);
1.298 -
1.299 -/**
1.300 - * Requests a password from the user for the account. Does not set the
1.301 - * account password on success; do that in ok_cb if desired.
1.302 - *
1.303 - * @param account The account to request the password for.
1.304 - * @param ok_cb The callback for the OK button.
1.305 - * @param cancel_cb The callback for the cancel button.
1.306 - * @param user_data User data to be passed into callbacks.
1.307 - */
1.308 -void purple_account_request_password(PurpleAccount *account, GCallback ok_cb,
1.309 - GCallback cancel_cb, void *user_data);
1.310 -
1.311 -/**
1.312 - * Requests information from the user to change the account's password.
1.313 - *
1.314 - * @param account The account to change the password on.
1.315 - */
1.316 -void purple_account_request_change_password(PurpleAccount *account);
1.317 -
1.318 -/**
1.319 - * Requests information from the user to change the account's
1.320 - * user information.
1.321 - *
1.322 - * @param account The account to change the user information on.
1.323 - */
1.324 -void purple_account_request_change_user_info(PurpleAccount *account);
1.325 -
1.326 -/**
1.327 - * Sets the account's username.
1.328 - *
1.329 - * @param account The account.
1.330 - * @param username The username.
1.331 - */
1.332 -void purple_account_set_username(PurpleAccount *account, const char *username);
1.333 -
1.334 -/**
1.335 - * Sets the account's password.
1.336 - *
1.337 - * @param account The account.
1.338 - * @param password The password.
1.339 - */
1.340 -void purple_account_set_password(PurpleAccount *account, const char *password);
1.341 -
1.342 -/**
1.343 - * Sets the account's alias.
1.344 - *
1.345 - * @param account The account.
1.346 - * @param alias The alias.
1.347 - */
1.348 -void purple_account_set_alias(PurpleAccount *account, const char *alias);
1.349 -
1.350 -/**
1.351 - * Sets the account's user information
1.352 - *
1.353 - * @param account The account.
1.354 - * @param user_info The user information.
1.355 - */
1.356 -void purple_account_set_user_info(PurpleAccount *account, const char *user_info);
1.357 -
1.358 -/**
1.359 - * Sets the account's buddy icon path.
1.360 - *
1.361 - * @param account The account.
1.362 - * @param path The buddy icon non-cached path.
1.363 - */
1.364 -void purple_account_set_buddy_icon_path(PurpleAccount *account, const char *path);
1.365 -
1.366 -/**
1.367 - * Sets the account's protocol ID.
1.368 - *
1.369 - * @param account The account.
1.370 - * @param protocol_id The protocol ID.
1.371 - */
1.372 -void purple_account_set_protocol_id(PurpleAccount *account,
1.373 - const char *protocol_id);
1.374 -
1.375 -/**
1.376 - * Sets the account's connection.
1.377 - *
1.378 - * @param account The account.
1.379 - * @param gc The connection.
1.380 - */
1.381 -void purple_account_set_connection(PurpleAccount *account, PurpleConnection *gc);
1.382 -
1.383 -/**
1.384 - * Sets whether or not this account should save its password.
1.385 - *
1.386 - * @param account The account.
1.387 - * @param value @c TRUE if it should remember the password.
1.388 - */
1.389 -void purple_account_set_remember_password(PurpleAccount *account, gboolean value);
1.390 -
1.391 -/**
1.392 - * Sets whether or not this account should check for mail.
1.393 - *
1.394 - * @param account The account.
1.395 - * @param value @c TRUE if it should check for mail.
1.396 - */
1.397 -void purple_account_set_check_mail(PurpleAccount *account, gboolean value);
1.398 -
1.399 -/**
1.400 - * Sets whether or not this account is enabled for the specified
1.401 - * UI.
1.402 - *
1.403 - * @param account The account.
1.404 - * @param ui The UI.
1.405 - * @param value @c TRUE if it is enabled.
1.406 - */
1.407 -void purple_account_set_enabled(PurpleAccount *account, const char *ui,
1.408 - gboolean value);
1.409 -
1.410 -/**
1.411 - * Sets the account's proxy information.
1.412 - *
1.413 - * @param account The account.
1.414 - * @param info The proxy information.
1.415 - */
1.416 -void purple_account_set_proxy_info(PurpleAccount *account, PurpleProxyInfo *info);
1.417 -
1.418 -/**
1.419 - * Sets the account's status types.
1.420 - *
1.421 - * @param account The account.
1.422 - * @param status_types The list of status types.
1.423 - */
1.424 -void purple_account_set_status_types(PurpleAccount *account, GList *status_types);
1.425 -
1.426 -/**
1.427 - * Variadic version of purple_account_set_status_list(); the variadic list
1.428 - * replaces @a attrs, and should be <tt>NULL</tt>-terminated.
1.429 - *
1.430 - * @copydoc purple_account_set_status_list()
1.431 - */
1.432 -void purple_account_set_status(PurpleAccount *account, const char *status_id,
1.433 - gboolean active, ...) G_GNUC_NULL_TERMINATED;
1.434 -
1.435 -
1.436 -/**
1.437 - * Activates or deactivates a status. All changes to the statuses of
1.438 - * an account go through this function or purple_account_set_status().
1.439 - *
1.440 - * You can only deactivate an exclusive status by activating another exclusive
1.441 - * status. So, if @a status_id is an exclusive status and @a active is @c
1.442 - * FALSE, this function does nothing.
1.443 - *
1.444 - * @param account The account.
1.445 - * @param status_id The ID of the status.
1.446 - * @param active Whether @a status_id is to be activated (<tt>TRUE</tt>) or
1.447 - * deactivated (<tt>FALSE</tt>).
1.448 - * @param attrs A list of <tt>const char *</tt> attribute names followed by
1.449 - * <tt>const char *</tt> attribute values for the status.
1.450 - * (For example, one pair might be <tt>"message"</tt> followed
1.451 - * by <tt>"hello, talk to me!"</tt>.)
1.452 - */
1.453 -void purple_account_set_status_list(PurpleAccount *account,
1.454 - const char *status_id, gboolean active, GList *attrs);
1.455 -
1.456 -/**
1.457 - * Clears all protocol-specific settings on an account.
1.458 - *
1.459 - * @param account The account.
1.460 - */
1.461 -void purple_account_clear_settings(PurpleAccount *account);
1.462 -
1.463 -/**
1.464 - * Sets a protocol-specific integer setting for an account.
1.465 - *
1.466 - * @param account The account.
1.467 - * @param name The name of the setting.
1.468 - * @param value The setting's value.
1.469 - */
1.470 -void purple_account_set_int(PurpleAccount *account, const char *name, int value);
1.471 -
1.472 -/**
1.473 - * Sets a protocol-specific string setting for an account.
1.474 - *
1.475 - * @param account The account.
1.476 - * @param name The name of the setting.
1.477 - * @param value The setting's value.
1.478 - */
1.479 -void purple_account_set_string(PurpleAccount *account, const char *name,
1.480 - const char *value);
1.481 -
1.482 -/**
1.483 - * Sets a protocol-specific boolean setting for an account.
1.484 - *
1.485 - * @param account The account.
1.486 - * @param name The name of the setting.
1.487 - * @param value The setting's value.
1.488 - */
1.489 -void purple_account_set_bool(PurpleAccount *account, const char *name,
1.490 - gboolean value);
1.491 -
1.492 -/**
1.493 - * Sets a UI-specific integer setting for an account.
1.494 - *
1.495 - * @param account The account.
1.496 - * @param ui The UI name.
1.497 - * @param name The name of the setting.
1.498 - * @param value The setting's value.
1.499 - */
1.500 -void purple_account_set_ui_int(PurpleAccount *account, const char *ui,
1.501 - const char *name, int value);
1.502 -
1.503 -/**
1.504 - * Sets a UI-specific string setting for an account.
1.505 - *
1.506 - * @param account The account.
1.507 - * @param ui The UI name.
1.508 - * @param name The name of the setting.
1.509 - * @param value The setting's value.
1.510 - */
1.511 -void purple_account_set_ui_string(PurpleAccount *account, const char *ui,
1.512 - const char *name, const char *value);
1.513 -
1.514 -/**
1.515 - * Sets a UI-specific boolean setting for an account.
1.516 - *
1.517 - * @param account The account.
1.518 - * @param ui The UI name.
1.519 - * @param name The name of the setting.
1.520 - * @param value The setting's value.
1.521 - */
1.522 -void purple_account_set_ui_bool(PurpleAccount *account, const char *ui,
1.523 - const char *name, gboolean value);
1.524 -
1.525 -/**
1.526 - * Returns whether or not the account is connected.
1.527 - *
1.528 - * @param account The account.
1.529 - *
1.530 - * @return @c TRUE if connected, or @c FALSE otherwise.
1.531 - */
1.532 -gboolean purple_account_is_connected(const PurpleAccount *account);
1.533 -
1.534 -/**
1.535 - * Returns whether or not the account is connecting.
1.536 - *
1.537 - * @param account The account.
1.538 - *
1.539 - * @return @c TRUE if connecting, or @c FALSE otherwise.
1.540 - */
1.541 -gboolean purple_account_is_connecting(const PurpleAccount *account);
1.542 -
1.543 -/**
1.544 - * Returns whether or not the account is disconnected.
1.545 - *
1.546 - * @param account The account.
1.547 - *
1.548 - * @return @c TRUE if disconnected, or @c FALSE otherwise.
1.549 - */
1.550 -gboolean purple_account_is_disconnected(const PurpleAccount *account);
1.551 -
1.552 -/**
1.553 - * Returns the account's username.
1.554 - *
1.555 - * @param account The account.
1.556 - *
1.557 - * @return The username.
1.558 - */
1.559 -const char *purple_account_get_username(const PurpleAccount *account);
1.560 -
1.561 -/**
1.562 - * Returns the account's password.
1.563 - *
1.564 - * @param account The account.
1.565 - *
1.566 - * @return The password.
1.567 - */
1.568 -const char *purple_account_get_password(const PurpleAccount *account);
1.569 -
1.570 -/**
1.571 - * Returns the account's alias.
1.572 - *
1.573 - * @param account The account.
1.574 - *
1.575 - * @return The alias.
1.576 - */
1.577 -const char *purple_account_get_alias(const PurpleAccount *account);
1.578 -
1.579 -/**
1.580 - * Returns the account's user information.
1.581 - *
1.582 - * @param account The account.
1.583 - *
1.584 - * @return The user information.
1.585 - */
1.586 -const char *purple_account_get_user_info(const PurpleAccount *account);
1.587 -
1.588 -/**
1.589 - * Gets the account's buddy icon path.
1.590 - *
1.591 - * @param account The account.
1.592 - *
1.593 - * @return The buddy icon's non-cached path.
1.594 - */
1.595 -const char *purple_account_get_buddy_icon_path(const PurpleAccount *account);
1.596 -
1.597 -/**
1.598 - * Returns the account's protocol ID.
1.599 - *
1.600 - * @param account The account.
1.601 - *
1.602 - * @return The protocol ID.
1.603 - */
1.604 -const char *purple_account_get_protocol_id(const PurpleAccount *account);
1.605 -
1.606 -/**
1.607 - * Returns the account's protocol name.
1.608 - *
1.609 - * @param account The account.
1.610 - *
1.611 - * @return The protocol name.
1.612 - */
1.613 -const char *purple_account_get_protocol_name(const PurpleAccount *account);
1.614 -
1.615 -/**
1.616 - * Returns the account's connection.
1.617 - *
1.618 - * @param account The account.
1.619 - *
1.620 - * @return The connection.
1.621 - */
1.622 -PurpleConnection *purple_account_get_connection(const PurpleAccount *account);
1.623 -
1.624 -/**
1.625 - * Returns whether or not this account should save its password.
1.626 - *
1.627 - * @param account The account.
1.628 - *
1.629 - * @return @c TRUE if it should remember the password.
1.630 - */
1.631 -gboolean purple_account_get_remember_password(const PurpleAccount *account);
1.632 -
1.633 -/**
1.634 - * Returns whether or not this account should check for mail.
1.635 - *
1.636 - * @param account The account.
1.637 - *
1.638 - * @return @c TRUE if it should check for mail.
1.639 - */
1.640 -gboolean purple_account_get_check_mail(const PurpleAccount *account);
1.641 -
1.642 -/**
1.643 - * Returns whether or not this account is enabled for the
1.644 - * specified UI.
1.645 - *
1.646 - * @param account The account.
1.647 - * @param ui The UI.
1.648 - *
1.649 - * @return @c TRUE if it enabled on this UI.
1.650 - */
1.651 -gboolean purple_account_get_enabled(const PurpleAccount *account,
1.652 - const char *ui);
1.653 -
1.654 -/**
1.655 - * Returns the account's proxy information.
1.656 - *
1.657 - * @param account The account.
1.658 - *
1.659 - * @return The proxy information.
1.660 - */
1.661 -PurpleProxyInfo *purple_account_get_proxy_info(const PurpleAccount *account);
1.662 -
1.663 -/**
1.664 - * Returns the active status for this account. This looks through
1.665 - * the PurplePresence associated with this account and returns the
1.666 - * PurpleStatus that has its active flag set to "TRUE." There can be
1.667 - * only one active PurpleStatus in a PurplePresence.
1.668 - *
1.669 - * @param account The account.
1.670 - *
1.671 - * @return The active status.
1.672 - */
1.673 -PurpleStatus *purple_account_get_active_status(const PurpleAccount *account);
1.674 -
1.675 -/**
1.676 - * Returns the account status with the specified ID.
1.677 - *
1.678 - * Note that this works differently than purple_buddy_get_status() in that
1.679 - * it will only return NULL if the status was not registered.
1.680 - *
1.681 - * @param account The account.
1.682 - * @param status_id The status ID.
1.683 - *
1.684 - * @return The status, or NULL if it was never registered.
1.685 - */
1.686 -PurpleStatus *purple_account_get_status(const PurpleAccount *account,
1.687 - const char *status_id);
1.688 -
1.689 -/**
1.690 - * Returns the account status type with the specified ID.
1.691 - *
1.692 - * @param account The account.
1.693 - * @param id The ID of the status type to find.
1.694 - *
1.695 - * @return The status type if found, or NULL.
1.696 - */
1.697 -PurpleStatusType *purple_account_get_status_type(const PurpleAccount *account,
1.698 - const char *id);
1.699 -
1.700 -/**
1.701 - * Returns the account status type with the specified primitive.
1.702 - * Note: It is possible for an account to have more than one
1.703 - * PurpleStatusType with the same primitive. In this case, the
1.704 - * first PurpleStatusType is returned.
1.705 - *
1.706 - * @param account The account.
1.707 - * @param primitive The type of the status type to find.
1.708 - *
1.709 - * @return The status if found, or NULL.
1.710 - */
1.711 -PurpleStatusType *purple_account_get_status_type_with_primitive(
1.712 - const PurpleAccount *account,
1.713 - PurpleStatusPrimitive primitive);
1.714 -
1.715 -/**
1.716 - * Returns the account's presence.
1.717 - *
1.718 - * @param account The account.
1.719 - *
1.720 - * @return The account's presence.
1.721 - */
1.722 -PurplePresence *purple_account_get_presence(const PurpleAccount *account);
1.723 -
1.724 -/**
1.725 - * Returns whether or not an account status is active.
1.726 - *
1.727 - * @param account The account.
1.728 - * @param status_id The status ID.
1.729 - *
1.730 - * @return TRUE if active, or FALSE if not.
1.731 - */
1.732 -gboolean purple_account_is_status_active(const PurpleAccount *account,
1.733 - const char *status_id);
1.734 -
1.735 -/**
1.736 - * Returns the account's status types.
1.737 - *
1.738 - * @param account The account.
1.739 - *
1.740 - * @constreturn The account's status types.
1.741 - */
1.742 -GList *purple_account_get_status_types(const PurpleAccount *account);
1.743 -
1.744 -/**
1.745 - * Returns a protocol-specific integer setting for an account.
1.746 - *
1.747 - * @param account The account.
1.748 - * @param name The name of the setting.
1.749 - * @param default_value The default value.
1.750 - *
1.751 - * @return The value.
1.752 - */
1.753 -int purple_account_get_int(const PurpleAccount *account, const char *name,
1.754 - int default_value);
1.755 -
1.756 -/**
1.757 - * Returns a protocol-specific string setting for an account.
1.758 - *
1.759 - * @param account The account.
1.760 - * @param name The name of the setting.
1.761 - * @param default_value The default value.
1.762 - *
1.763 - * @return The value.
1.764 - */
1.765 -const char *purple_account_get_string(const PurpleAccount *account,
1.766 - const char *name,
1.767 - const char *default_value);
1.768 -
1.769 -/**
1.770 - * Returns a protocol-specific boolean setting for an account.
1.771 - *
1.772 - * @param account The account.
1.773 - * @param name The name of the setting.
1.774 - * @param default_value The default value.
1.775 - *
1.776 - * @return The value.
1.777 - */
1.778 -gboolean purple_account_get_bool(const PurpleAccount *account, const char *name,
1.779 - gboolean default_value);
1.780 -
1.781 -/**
1.782 - * Returns a UI-specific integer setting for an account.
1.783 - *
1.784 - * @param account The account.
1.785 - * @param ui The UI name.
1.786 - * @param name The name of the setting.
1.787 - * @param default_value The default value.
1.788 - *
1.789 - * @return The value.
1.790 - */
1.791 -int purple_account_get_ui_int(const PurpleAccount *account, const char *ui,
1.792 - const char *name, int default_value);
1.793 -
1.794 -/**
1.795 - * Returns a UI-specific string setting for an account.
1.796 - *
1.797 - * @param account The account.
1.798 - * @param ui The UI name.
1.799 - * @param name The name of the setting.
1.800 - * @param default_value The default value.
1.801 - *
1.802 - * @return The value.
1.803 - */
1.804 -const char *purple_account_get_ui_string(const PurpleAccount *account,
1.805 - const char *ui, const char *name,
1.806 - const char *default_value);
1.807 -
1.808 -/**
1.809 - * Returns a UI-specific boolean setting for an account.
1.810 - *
1.811 - * @param account The account.
1.812 - * @param ui The UI name.
1.813 - * @param name The name of the setting.
1.814 - * @param default_value The default value.
1.815 - *
1.816 - * @return The value.
1.817 - */
1.818 -gboolean purple_account_get_ui_bool(const PurpleAccount *account, const char *ui,
1.819 - const char *name, gboolean default_value);
1.820 -
1.821 -
1.822 -/**
1.823 - * Returns the system log for an account.
1.824 - *
1.825 - * @param account The account.
1.826 - * @param create Should it be created if it doesn't exist?
1.827 - *
1.828 - * @return The log.
1.829 - *
1.830 - * @note Callers should almost always pass @c FALSE for @a create.
1.831 - * Passing @c TRUE could result in an existing log being reopened,
1.832 - * if the log has already been closed, which not all loggers deal
1.833 - * with appropriately.
1.834 - */
1.835 -PurpleLog *purple_account_get_log(PurpleAccount *account, gboolean create);
1.836 -
1.837 -/**
1.838 - * Frees the system log of an account
1.839 - *
1.840 - * @param account The account.
1.841 - */
1.842 -void purple_account_destroy_log(PurpleAccount *account);
1.843 -
1.844 -/**
1.845 - * Adds a buddy to the server-side buddy list for the specified account.
1.846 - *
1.847 - * @param account The account.
1.848 - * @param buddy The buddy to add.
1.849 - */
1.850 -void purple_account_add_buddy(PurpleAccount *account, PurpleBuddy *buddy);
1.851 -/**
1.852 - * Adds a list of buddies to the server-side buddy list.
1.853 - *
1.854 - * @param account The account.
1.855 - * @param buddies The list of PurpleBlistNodes representing the buddies to add.
1.856 - */
1.857 -void purple_account_add_buddies(PurpleAccount *account, GList *buddies);
1.858 -
1.859 -/**
1.860 - * Removes a buddy from the server-side buddy list.
1.861 - *
1.862 - * @param account The account.
1.863 - * @param buddy The buddy to remove.
1.864 - * @param group The group to remove the buddy from.
1.865 - */
1.866 -void purple_account_remove_buddy(PurpleAccount *account, PurpleBuddy *buddy,
1.867 - PurpleGroup *group);
1.868 -
1.869 -/**
1.870 - * Removes a list of buddies from the server-side buddy list.
1.871 - *
1.872 - * @note The lists buddies and groups are parallel lists. Be sure that node n of
1.873 - * groups matches node n of buddies.
1.874 - *
1.875 - * @param account The account.
1.876 - * @param buddies The list of buddies to remove.
1.877 - * @param groups The list of groups to remove buddies from. Each node of this
1.878 - * list should match the corresponding node of buddies.
1.879 - */
1.880 -void purple_account_remove_buddies(PurpleAccount *account, GList *buddies,
1.881 - GList *groups);
1.882 -
1.883 -/**
1.884 - * Removes a group from the server-side buddy list.
1.885 - *
1.886 - * @param account The account.
1.887 - * @param group The group to remove.
1.888 - */
1.889 -void purple_account_remove_group(PurpleAccount *account, PurpleGroup *group);
1.890 -
1.891 -/**
1.892 - * Changes the password on the specified account.
1.893 - *
1.894 - * @param account The account.
1.895 - * @param orig_pw The old password.
1.896 - * @param new_pw The new password.
1.897 - */
1.898 -void purple_account_change_password(PurpleAccount *account, const char *orig_pw,
1.899 - const char *new_pw);
1.900 -
1.901 -/**
1.902 - * Whether the account supports sending offline messages to buddy.
1.903 - *
1.904 - * @param account The account
1.905 - * @param buddy The buddy
1.906 - */
1.907 -gboolean purple_account_supports_offline_message(PurpleAccount *account, PurpleBuddy *buddy);
1.908 -
1.909 -/**
1.910 - * Get the error that caused the account to be disconnected, or @c NULL if the
1.911 - * account is happily connected or disconnected without an error.
1.912 - *
1.913 - * @param account The account whose error should be retrieved.
1.914 - * @constreturn The type of error and a human-readable description of the
1.915 - * current error, or @c NULL if there is no current error. This
1.916 - * pointer is guaranteed to remain valid until the @ref
1.917 - * account-error-changed signal is emitted for @a account.
1.918 - */
1.919 -const PurpleConnectionErrorInfo *purple_account_get_current_error(PurpleAccount *account);
1.920 -
1.921 -/**
1.922 - * Clear an account's current error state, resetting it to @c NULL.
1.923 - *
1.924 - * @param account The account whose error state should be cleared.
1.925 - */
1.926 -void purple_account_clear_current_error(PurpleAccount *account);
1.927 -
1.928 -/*@}*/
1.929 -
1.930 -/**************************************************************************/
1.931 -/** @name Accounts API */
1.932 -/**************************************************************************/
1.933 -/*@{*/
1.934 -
1.935 -/**
1.936 - * Adds an account to the list of accounts.
1.937 - *
1.938 - * @param account The account.
1.939 - */
1.940 -void purple_accounts_add(PurpleAccount *account);
1.941 -
1.942 -/**
1.943 - * Removes an account from the list of accounts.
1.944 - *
1.945 - * @param account The account.
1.946 - */
1.947 -void purple_accounts_remove(PurpleAccount *account);
1.948 -
1.949 -/**
1.950 - * Deletes an account.
1.951 - *
1.952 - * This will remove any buddies from the buddy list that belong to this
1.953 - * account, buddy pounces that belong to this account, and will also
1.954 - * destroy @a account.
1.955 - *
1.956 - * @param account The account.
1.957 - */
1.958 -void purple_accounts_delete(PurpleAccount *account);
1.959 -
1.960 -/**
1.961 - * Reorders an account.
1.962 - *
1.963 - * @param account The account to reorder.
1.964 - * @param new_index The new index for the account.
1.965 - */
1.966 -void purple_accounts_reorder(PurpleAccount *account, gint new_index);
1.967 -
1.968 -/**
1.969 - * Returns a list of all accounts.
1.970 - *
1.971 - * @constreturn A list of all accounts.
1.972 - */
1.973 -GList *purple_accounts_get_all(void);
1.974 -
1.975 -/**
1.976 - * Returns a list of all enabled accounts
1.977 - *
1.978 - * @return A list of all enabled accounts. The list is owned
1.979 - * by the caller, and must be g_list_free()d to avoid
1.980 - * leaking the nodes.
1.981 - */
1.982 -GList *purple_accounts_get_all_active(void);
1.983 -
1.984 -/**
1.985 - * Finds an account with the specified name and protocol id.
1.986 - *
1.987 - * @param name The account username.
1.988 - * @param protocol The account protocol ID.
1.989 - *
1.990 - * @return The account, if found, or @c FALSE otherwise.
1.991 - */
1.992 -PurpleAccount *purple_accounts_find(const char *name, const char *protocol);
1.993 -
1.994 -/**
1.995 - * This is called by the core after all subsystems and what
1.996 - * not have been initialized. It sets all enabled accounts
1.997 - * to their startup status by signing them on, setting them
1.998 - * away, etc.
1.999 - *
1.1000 - * You probably shouldn't call this unless you really know
1.1001 - * what you're doing.
1.1002 - */
1.1003 -void purple_accounts_restore_current_statuses(void);
1.1004 -
1.1005 -/*@}*/
1.1006 -
1.1007 -
1.1008 -/**************************************************************************/
1.1009 -/** @name UI Registration Functions */
1.1010 -/**************************************************************************/
1.1011 -/*@{*/
1.1012 -/**
1.1013 - * Sets the UI operations structure to be used for accounts.
1.1014 - *
1.1015 - * @param ops The UI operations structure.
1.1016 - */
1.1017 -void purple_accounts_set_ui_ops(PurpleAccountUiOps *ops);
1.1018 -
1.1019 -/**
1.1020 - * Returns the UI operations structure used for accounts.
1.1021 - *
1.1022 - * @return The UI operations structure in use.
1.1023 - */
1.1024 -PurpleAccountUiOps *purple_accounts_get_ui_ops(void);
1.1025 -
1.1026 -/*@}*/
1.1027 -
1.1028 -
1.1029 -/**************************************************************************/
1.1030 -/** @name Accounts Subsystem */
1.1031 -/**************************************************************************/
1.1032 -/*@{*/
1.1033 -
1.1034 -/**
1.1035 - * Returns the accounts subsystem handle.
1.1036 - *
1.1037 - * @return The accounts subsystem handle.
1.1038 - */
1.1039 -void *purple_accounts_get_handle(void);
1.1040 -
1.1041 -/**
1.1042 - * Initializes the accounts subsystem.
1.1043 - */
1.1044 -void purple_accounts_init(void);
1.1045 -
1.1046 -/**
1.1047 - * Uninitializes the accounts subsystem.
1.1048 - */
1.1049 -void purple_accounts_uninit(void);
1.1050 -
1.1051 -/*@}*/
1.1052 -
1.1053 -#ifdef __cplusplus
1.1054 -}
1.1055 -#endif
1.1056 -
1.1057 -#endif /* _PURPLE_ACCOUNT_H_ */
2.1 --- a/Frameworks/libpurple.framework/Versions/0.5.6/Headers/accountopt.h Sun Jun 21 22:04:11 2009 -0400
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,395 +0,0 @@
2.4 -/**
2.5 - * @file accountopt.h Account Options API
2.6 - * @ingroup core
2.7 - */
2.8 -
2.9 -/* purple
2.10 - *
2.11 - * Purple is the legal property of its developers, whose names are too numerous
2.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
2.13 - * source distribution.
2.14 - *
2.15 - * This program is free software; you can redistribute it and/or modify
2.16 - * it under the terms of the GNU General Public License as published by
2.17 - * the Free Software Foundation; either version 2 of the License, or
2.18 - * (at your option) any later version.
2.19 - *
2.20 - * This program is distributed in the hope that it will be useful,
2.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
2.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2.23 - * GNU General Public License for more details.
2.24 - *
2.25 - * You should have received a copy of the GNU General Public License
2.26 - * along with this program; if not, write to the Free Software
2.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
2.28 - */
2.29 -#ifndef _PURPLE_ACCOUNTOPT_H_
2.30 -#define _PURPLE_ACCOUNTOPT_H_
2.31 -
2.32 -#include "prefs.h"
2.33 -
2.34 -/**
2.35 - * An option for an account.
2.36 - *
2.37 - * This is set by protocol plugins, and appears in the account settings
2.38 - * dialogs.
2.39 - */
2.40 -typedef struct
2.41 -{
2.42 - PurplePrefType type; /**< The type of value. */
2.43 -
2.44 - char *text; /**< The text that will appear to the user. */
2.45 - char *pref_name; /**< The name of the associated preference. */
2.46 -
2.47 - union
2.48 - {
2.49 - gboolean boolean; /**< The default boolean value. */
2.50 - int integer; /**< The default integer value. */
2.51 - char *string; /**< The default string value. */
2.52 - GList *list; /**< The default list value. */
2.53 -
2.54 - } default_value;
2.55 -
2.56 - gboolean masked; /**< Whether the value entered should be
2.57 - * obscured from view (for passwords and
2.58 - * similar options)
2.59 - */
2.60 -} PurpleAccountOption;
2.61 -
2.62 -/**
2.63 - * A username split.
2.64 - *
2.65 - * This is used by some protocols to separate the fields of the username
2.66 - * into more human-readable components.
2.67 - */
2.68 -typedef struct
2.69 -{
2.70 - char *text; /**< The text that will appear to the user. */
2.71 - char *default_value; /**< The default value. */
2.72 - char field_sep; /**< The field separator. */
2.73 - gboolean reverse; /**< TRUE if the separator should be found
2.74 - starting a the end of the string, FALSE
2.75 - otherwise */
2.76 -
2.77 -} PurpleAccountUserSplit;
2.78 -
2.79 -#ifdef __cplusplus
2.80 -extern "C" {
2.81 -#endif
2.82 -
2.83 -/**************************************************************************/
2.84 -/** @name Account Option API */
2.85 -/**************************************************************************/
2.86 -/*@{*/
2.87 -
2.88 -/**
2.89 - * Creates a new account option. If you know what @a type will be in advance,
2.90 - * consider using purple_account_option_bool_new(),
2.91 - * purple_account_option_int_new(), purple_account_option_string_new() or
2.92 - * purple_account_option_list_new() (as appropriate) instead.
2.93 - *
2.94 - * @param type The type of option.
2.95 - * @param text The text of the option.
2.96 - * @param pref_name The account preference name for the option.
2.97 - *
2.98 - * @return The account option.
2.99 - */
2.100 -PurpleAccountOption *purple_account_option_new(PurplePrefType type,
2.101 - const char *text, const char *pref_name);
2.102 -
2.103 -/**
2.104 - * Creates a new boolean account option.
2.105 - *
2.106 - * @param text The text of the option.
2.107 - * @param pref_name The account preference name for the option.
2.108 - * @param default_value The default value.
2.109 - *
2.110 - * @return The account option.
2.111 - */
2.112 -PurpleAccountOption *purple_account_option_bool_new(const char *text,
2.113 - const char *pref_name, gboolean default_value);
2.114 -
2.115 -/**
2.116 - * Creates a new integer account option.
2.117 - *
2.118 - * @param text The text of the option.
2.119 - * @param pref_name The account preference name for the option.
2.120 - * @param default_value The default value.
2.121 - *
2.122 - * @return The account option.
2.123 - */
2.124 -PurpleAccountOption *purple_account_option_int_new(const char *text,
2.125 - const char *pref_name, int default_value);
2.126 -
2.127 -/**
2.128 - * Creates a new string account option.
2.129 - *
2.130 - * @param text The text of the option.
2.131 - * @param pref_name The account preference name for the option.
2.132 - * @param default_value The default value.
2.133 - *
2.134 - * @return The account option.
2.135 - */
2.136 -PurpleAccountOption *purple_account_option_string_new(const char *text,
2.137 - const char *pref_name, const char *default_value);
2.138 -
2.139 -/**
2.140 - * Creates a new list account option.
2.141 - *
2.142 - * The list passed will be owned by the account option, and the
2.143 - * strings inside will be freed automatically.
2.144 - *
2.145 - * The list is a list of #PurpleKeyValuePair items. The key is the label that
2.146 - * should be displayed to the user, and the <tt>(const char *)</tt> value is
2.147 - * the internal ID that should be passed to purple_account_set_string() to
2.148 - * choose that value.
2.149 - *
2.150 - * @param text The text of the option.
2.151 - * @param pref_name The account preference name for the option.
2.152 - * @param list The key, value list.
2.153 - *
2.154 - * @return The account option.
2.155 - */
2.156 -PurpleAccountOption *purple_account_option_list_new(const char *text,
2.157 - const char *pref_name, GList *list);
2.158 -
2.159 -/**
2.160 - * Destroys an account option.
2.161 - *
2.162 - * @param option The option to destroy.
2.163 - */
2.164 -void purple_account_option_destroy(PurpleAccountOption *option);
2.165 -
2.166 -/**
2.167 - * Sets the default boolean value for an account option.
2.168 - *
2.169 - * @param option The account option.
2.170 - * @param value The default boolean value.
2.171 - */
2.172 -void purple_account_option_set_default_bool(PurpleAccountOption *option,
2.173 - gboolean value);
2.174 -
2.175 -/**
2.176 - * Sets the default integer value for an account option.
2.177 - *
2.178 - * @param option The account option.
2.179 - * @param value The default integer value.
2.180 - */
2.181 -void purple_account_option_set_default_int(PurpleAccountOption *option,
2.182 - int value);
2.183 -
2.184 -/**
2.185 - * Sets the default string value for an account option.
2.186 - *
2.187 - * @param option The account option.
2.188 - * @param value The default string value.
2.189 - */
2.190 -void purple_account_option_set_default_string(PurpleAccountOption *option,
2.191 - const char *value);
2.192 -
2.193 -/**
2.194 - * Sets the masking for an account option. Setting this to %TRUE acts
2.195 - * as a hint to the UI that the option's value should be obscured from
2.196 - * view, like a password.
2.197 - *
2.198 - * @param option The account option.
2.199 - * @param masked The masking.
2.200 - */
2.201 -void
2.202 -purple_account_option_set_masked(PurpleAccountOption *option, gboolean masked);
2.203 -
2.204 -/**
2.205 - * Sets the list values for an account option.
2.206 - *
2.207 - * The list passed will be owned by the account option, and the
2.208 - * strings inside will be freed automatically.
2.209 - *
2.210 - * The list is in key, value pairs. The key is the ID stored and used
2.211 - * internally, and the value is the label displayed.
2.212 - *
2.213 - * @param option The account option.
2.214 - * @param values The default list value.
2.215 - */
2.216 -void purple_account_option_set_list(PurpleAccountOption *option, GList *values);
2.217 -
2.218 -/**
2.219 - * Adds an item to a list account option.
2.220 - *
2.221 - * @param option The account option.
2.222 - * @param key The key.
2.223 - * @param value The value.
2.224 - */
2.225 -void purple_account_option_add_list_item(PurpleAccountOption *option,
2.226 - const char *key, const char *value);
2.227 -
2.228 -/**
2.229 - * Returns the specified account option's type.
2.230 - *
2.231 - * @param option The account option.
2.232 - *
2.233 - * @return The account option's type.
2.234 - */
2.235 -PurplePrefType purple_account_option_get_type(const PurpleAccountOption *option);
2.236 -
2.237 -/**
2.238 - * Returns the text for an account option.
2.239 - *
2.240 - * @param option The account option.
2.241 - *
2.242 - * @return The account option's text.
2.243 - */
2.244 -const char *purple_account_option_get_text(const PurpleAccountOption *option);
2.245 -
2.246 -/**
2.247 - * Returns the name of an account option. This corresponds to the @c pref_name
2.248 - * parameter supplied to purple_account_option_new() or one of the
2.249 - * type-specific constructors.
2.250 - *
2.251 - * @param option The account option.
2.252 - *
2.253 - * @return The option's name.
2.254 - */
2.255 -const char *purple_account_option_get_setting(const PurpleAccountOption *option);
2.256 -
2.257 -/**
2.258 - * Returns the default boolean value for an account option.
2.259 - *
2.260 - * @param option The account option.
2.261 - *
2.262 - * @return The default boolean value.
2.263 - */
2.264 -gboolean purple_account_option_get_default_bool(const PurpleAccountOption *option);
2.265 -
2.266 -/**
2.267 - * Returns the default integer value for an account option.
2.268 - *
2.269 - * @param option The account option.
2.270 - *
2.271 - * @return The default integer value.
2.272 - */
2.273 -int purple_account_option_get_default_int(const PurpleAccountOption *option);
2.274 -
2.275 -/**
2.276 - * Returns the default string value for an account option.
2.277 - *
2.278 - * @param option The account option.
2.279 - *
2.280 - * @return The default string value.
2.281 - */
2.282 -const char *purple_account_option_get_default_string(
2.283 - const PurpleAccountOption *option);
2.284 -
2.285 -/**
2.286 - * Returns the default string value for a list account option.
2.287 - *
2.288 - * @param option The account option.
2.289 - *
2.290 - * @return The default list string value.
2.291 - */
2.292 -const char *purple_account_option_get_default_list_value(
2.293 - const PurpleAccountOption *option);
2.294 -
2.295 -/**
2.296 - * Returns whether an option's value should be masked from view, like a
2.297 - * password. If so, the UI might display each character of the option
2.298 - * as a '*' (for example).
2.299 - *
2.300 - * @param option The account option.
2.301 - *
2.302 - * @return %TRUE if the option's value should be obscured.
2.303 - */
2.304 -gboolean
2.305 -purple_account_option_get_masked(const PurpleAccountOption *option);
2.306 -
2.307 -/**
2.308 - * Returns the list values for an account option.
2.309 - *
2.310 - * @param option The account option.
2.311 - *
2.312 - * @constreturn A list of #PurpleKeyValuePair, mapping the human-readable
2.313 - * description of the value to the <tt>(const char *)</tt> that
2.314 - * should be passed to purple_account_set_string() to set the
2.315 - * option.
2.316 - */
2.317 -GList *purple_account_option_get_list(const PurpleAccountOption *option);
2.318 -
2.319 -/*@}*/
2.320 -
2.321 -
2.322 -/**************************************************************************/
2.323 -/** @name Account User Split API */
2.324 -/**************************************************************************/
2.325 -/*@{*/
2.326 -
2.327 -/**
2.328 - * Creates a new account username split.
2.329 - *
2.330 - * @param text The text of the option.
2.331 - * @param default_value The default value.
2.332 - * @param sep The field separator.
2.333 - *
2.334 - * @return The new user split.
2.335 - */
2.336 -PurpleAccountUserSplit *purple_account_user_split_new(const char *text,
2.337 - const char *default_value,
2.338 - char sep);
2.339 -
2.340 -/**
2.341 - * Destroys an account username split.
2.342 - *
2.343 - * @param split The split to destroy.
2.344 - */
2.345 -void purple_account_user_split_destroy(PurpleAccountUserSplit *split);
2.346 -
2.347 -/**
2.348 - * Returns the text for an account username split.
2.349 - *
2.350 - * @param split The account username split.
2.351 - *
2.352 - * @return The account username split's text.
2.353 - */
2.354 -const char *purple_account_user_split_get_text(const PurpleAccountUserSplit *split);
2.355 -
2.356 -/**
2.357 - * Returns the default string value for an account split.
2.358 - *
2.359 - * @param split The account username split.
2.360 - *
2.361 - * @return The default string.
2.362 - */
2.363 -const char *purple_account_user_split_get_default_value(
2.364 - const PurpleAccountUserSplit *split);
2.365 -
2.366 -/**
2.367 - * Returns the field separator for an account split.
2.368 - *
2.369 - * @param split The account username split.
2.370 - *
2.371 - * @return The field separator.
2.372 - */
2.373 -char purple_account_user_split_get_separator(const PurpleAccountUserSplit *split);
2.374 -
2.375 -/**
2.376 - * Returns the 'reverse' value for an account split.
2.377 - *
2.378 - * @param split The account username split.
2.379 - *
2.380 - * @return The 'reverse' value.
2.381 - */
2.382 -gboolean purple_account_user_split_get_reverse(const PurpleAccountUserSplit *split);
2.383 -
2.384 -/**
2.385 - * Sets the 'reverse' value for an account split.
2.386 - *
2.387 - * @param split The account username split.
2.388 - * @param reverse The 'reverse' value
2.389 - */
2.390 -void purple_account_user_split_set_reverse(PurpleAccountUserSplit *split, gboolean reverse);
2.391 -
2.392 -/*@}*/
2.393 -
2.394 -#ifdef __cplusplus
2.395 -}
2.396 -#endif
2.397 -
2.398 -#endif /* _PURPLE_ACCOUNTOPT_H_ */
3.1 --- a/Frameworks/libpurple.framework/Versions/0.5.6/Headers/blist.h Sun Jun 21 22:04:11 2009 -0400
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,1045 +0,0 @@
3.4 -/**
3.5 - * @file blist.h Buddy List API
3.6 - * @ingroup core
3.7 - * @see @ref blist-signals
3.8 - */
3.9 -
3.10 -/* purple
3.11 - *
3.12 - * Purple is the legal property of its developers, whose names are too numerous
3.13 - * to list here. Please refer to the COPYRIGHT file distributed with this
3.14 - * source distribution.
3.15 - *
3.16 - * This program is free software; you can redistribute it and/or modify
3.17 - * it under the terms of the GNU General Public License as published by
3.18 - * the Free Software Foundation; either version 2 of the License, or
3.19 - * (at your option) any later version.
3.20 - *
3.21 - * This program is distributed in the hope that it will be useful,
3.22 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
3.23 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3.24 - * GNU General Public License for more details.
3.25 - *
3.26 - * You should have received a copy of the GNU General Public License
3.27 - * along with this program; if not, write to the Free Software
3.28 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
3.29 - */
3.30 -#ifndef _PURPLE_BLIST_H_
3.31 -#define _PURPLE_BLIST_H_
3.32 -
3.33 -/* I can't believe I let ChipX86 inspire me to write good code. -Sean */
3.34 -
3.35 -#include <glib.h>
3.36 -
3.37 -/** @copydoc _PurpleBuddyList */
3.38 -typedef struct _PurpleBuddyList PurpleBuddyList;
3.39 -/** @copydoc _PurpleBlistUiOps */
3.40 -typedef struct _PurpleBlistUiOps PurpleBlistUiOps;
3.41 -/** @copydoc _PurpleBlistNode */
3.42 -typedef struct _PurpleBlistNode PurpleBlistNode;
3.43 -
3.44 -/** @copydoc _PurpleChat */
3.45 -typedef struct _PurpleChat PurpleChat;
3.46 -/** @copydoc _PurpleGroup */
3.47 -typedef struct _PurpleGroup PurpleGroup;
3.48 -/** @copydoc _PurpleContact */
3.49 -typedef struct _PurpleContact PurpleContact;
3.50 -/** @copydoc _PurpleBuddy */
3.51 -typedef struct _PurpleBuddy PurpleBuddy;
3.52 -
3.53 -/**************************************************************************/
3.54 -/* Enumerations */
3.55 -/**************************************************************************/
3.56 -typedef enum
3.57 -{
3.58 - PURPLE_BLIST_GROUP_NODE,
3.59 - PURPLE_BLIST_CONTACT_NODE,
3.60 - PURPLE_BLIST_BUDDY_NODE,
3.61 - PURPLE_BLIST_CHAT_NODE,
3.62 - PURPLE_BLIST_OTHER_NODE
3.63 -
3.64 -} PurpleBlistNodeType;
3.65 -
3.66 -#define PURPLE_BLIST_NODE_IS_CHAT(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_CHAT_NODE)
3.67 -#define PURPLE_BLIST_NODE_IS_BUDDY(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_BUDDY_NODE)
3.68 -#define PURPLE_BLIST_NODE_IS_CONTACT(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_CONTACT_NODE)
3.69 -#define PURPLE_BLIST_NODE_IS_GROUP(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_GROUP_NODE)
3.70 -
3.71 -#define PURPLE_BUDDY_IS_ONLINE(b) \
3.72 - ((b) != NULL && purple_account_is_connected(purple_buddy_get_account(b)) && \
3.73 - purple_presence_is_online(purple_buddy_get_presence(b)))
3.74 -
3.75 -typedef enum
3.76 -{
3.77 - PURPLE_BLIST_NODE_FLAG_NO_SAVE = 1 << 0 /**< node should not be saved with the buddy list */
3.78 -
3.79 -} PurpleBlistNodeFlags;
3.80 -
3.81 -#define PURPLE_BLIST_NODE_HAS_FLAG(b, f) (purple_blist_node_get_flags((PurpleBlistNode*)(b)) & (f))
3.82 -#define PURPLE_BLIST_NODE_SHOULD_SAVE(b) (! PURPLE_BLIST_NODE_HAS_FLAG(b, PURPLE_BLIST_NODE_FLAG_NO_SAVE))
3.83 -
3.84 -#define PURPLE_BLIST_NODE_NAME(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_CHAT_NODE ? purple_chat_get_name((PurpleChat*)n) : \
3.85 - purple_blist_node_get_type(n) == PURPLE_BLIST_BUDDY_NODE ? purple_buddy_get_name((PurpleBuddy*)n) : NULL)
3.86 -
3.87 -#include "account.h"
3.88 -#include "buddyicon.h"
3.89 -#include "status.h"
3.90 -
3.91 -/**************************************************************************/
3.92 -/* Data Structures */
3.93 -/**************************************************************************/
3.94 -
3.95 -#if !(defined PURPLE_HIDE_STRUCTS) || (defined _PURPLE_BLIST_C_)
3.96 -
3.97 -/**
3.98 - * A Buddy list node. This can represent a group, a buddy, or anything else.
3.99 - * This is a base class for struct buddy and struct group and for anything
3.100 - * else that wants to put itself in the buddy list. */
3.101 -struct _PurpleBlistNode {
3.102 - PurpleBlistNodeType type; /**< The type of node this is */
3.103 - PurpleBlistNode *prev; /**< The sibling before this buddy. */
3.104 - PurpleBlistNode *next; /**< The sibling after this buddy. */
3.105 - PurpleBlistNode *parent; /**< The parent of this node */
3.106 - PurpleBlistNode *child; /**< The child of this node */
3.107 - GHashTable *settings; /**< per-node settings */
3.108 - void *ui_data; /**< The UI can put data here. */
3.109 - PurpleBlistNodeFlags flags; /**< The buddy flags */
3.110 -};
3.111 -
3.112 -/**
3.113 - * A buddy. This contains everything Purple will ever need to know about someone on the buddy list. Everything.
3.114 - */
3.115 -struct _PurpleBuddy {
3.116 - PurpleBlistNode node; /**< The node that this buddy inherits from */
3.117 - char *name; /**< The screenname of the buddy. */
3.118 - char *alias; /**< The user-set alias of the buddy */
3.119 - char *server_alias; /**< The server-specified alias of the buddy. (i.e. MSN "Friendly Names") */
3.120 - void *proto_data; /**< This allows the prpl to associate whatever data it wants with a buddy */
3.121 - PurpleBuddyIcon *icon; /**< The buddy icon. */
3.122 - PurpleAccount *account; /**< the account this buddy belongs to */
3.123 - PurplePresence *presence;
3.124 -};
3.125 -
3.126 -/**
3.127 - * A contact. This contains everything Purple will ever need to know about a contact.
3.128 - */
3.129 -struct _PurpleContact {
3.130 - PurpleBlistNode node; /**< The node that this contact inherits from. */
3.131 - char *alias; /**< The user-set alias of the contact */
3.132 - int totalsize; /**< The number of buddies in this contact */
3.133 - int currentsize; /**< The number of buddies in this contact corresponding to online accounts */
3.134 - int online; /**< The number of buddies in this contact who are currently online */
3.135 - PurpleBuddy *priority; /**< The "top" buddy for this contact */
3.136 - gboolean priority_valid; /**< Is priority valid? */
3.137 -};
3.138 -
3.139 -
3.140 -/**
3.141 - * A group. This contains everything Purple will ever need to know about a group.
3.142 - */
3.143 -struct _PurpleGroup {
3.144 - PurpleBlistNode node; /**< The node that this group inherits from */
3.145 - char *name; /**< The name of this group. */
3.146 - int totalsize; /**< The number of chats and contacts in this group */
3.147 - int currentsize; /**< The number of chats and contacts in this group corresponding to online accounts */
3.148 - int online; /**< The number of chats and contacts in this group who are currently online */
3.149 -};
3.150 -
3.151 -/**
3.152 - * A chat. This contains everything Purple needs to put a chat room in the
3.153 - * buddy list.
3.154 - */
3.155 -struct _PurpleChat {
3.156 - PurpleBlistNode node; /**< The node that this chat inherits from */
3.157 - char *alias; /**< The display name of this chat. */
3.158 - GHashTable *components; /**< the stuff the protocol needs to know to join the chat */
3.159 - PurpleAccount *account; /**< The account this chat is attached to */
3.160 -};
3.161 -
3.162 -#endif /* PURPLE_HIDE_STRUCTS && PURPLE_BLIST_STRUCTS */
3.163 -
3.164 -
3.165 -/**
3.166 - * The Buddy List
3.167 - */
3.168 -struct _PurpleBuddyList {
3.169 - PurpleBlistNode *root; /**< The first node in the buddy list */
3.170 - GHashTable *buddies; /**< Every buddy in this list */
3.171 - void *ui_data; /**< UI-specific data. */
3.172 -};
3.173 -
3.174 -/**
3.175 - * Buddy list UI operations.
3.176 - *
3.177 - * Any UI representing a buddy list must assign a filled-out PurpleBlistUiOps
3.178 - * structure to the buddy list core.
3.179 - */
3.180 -struct _PurpleBlistUiOps
3.181 -{
3.182 - void (*new_list)(PurpleBuddyList *list); /**< Sets UI-specific data on a buddy list. */
3.183 - void (*new_node)(PurpleBlistNode *node); /**< Sets UI-specific data on a node. */
3.184 - void (*show)(PurpleBuddyList *list); /**< The core will call this when it's finished doing its core stuff */
3.185 - void (*update)(PurpleBuddyList *list,
3.186 - PurpleBlistNode *node); /**< This will update a node in the buddy list. */
3.187 - void (*remove)(PurpleBuddyList *list,
3.188 - PurpleBlistNode *node); /**< This removes a node from the list */
3.189 - void (*destroy)(PurpleBuddyList *list); /**< When the list gets destroyed, this gets called to destroy the UI. */
3.190 - void (*set_visible)(PurpleBuddyList *list,
3.191 - gboolean show); /**< Hides or unhides the buddy list */
3.192 - void (*request_add_buddy)(PurpleAccount *account, const char *username,
3.193 - const char *group, const char *alias);
3.194 - void (*request_add_chat)(PurpleAccount *account, PurpleGroup *group,
3.195 - const char *alias, const char *name);
3.196 - void (*request_add_group)(void);
3.197 -
3.198 - void (*_purple_reserved1)(void);
3.199 - void (*_purple_reserved2)(void);
3.200 - void (*_purple_reserved3)(void);
3.201 - void (*_purple_reserved4)(void);
3.202 -};
3.203 -
3.204 -#ifdef __cplusplus
3.205 -extern "C" {
3.206 -#endif
3.207 -
3.208 -/**************************************************************************/
3.209 -/** @name Buddy List API */
3.210 -/**************************************************************************/
3.211 -/*@{*/
3.212 -
3.213 -/**
3.214 - * Creates a new buddy list
3.215 - *
3.216 - * @return The new buddy list.
3.217 - */
3.218 -PurpleBuddyList *purple_blist_new(void);
3.219 -
3.220 -/**
3.221 - * Sets the main buddy list.
3.222 - *
3.223 - * @param blist The buddy list you want to use.
3.224 - */
3.225 -void purple_set_blist(PurpleBuddyList *blist);
3.226 -
3.227 -/**
3.228 - * Returns the main buddy list.
3.229 - *
3.230 - * @return The main buddy list.
3.231 - */
3.232 -PurpleBuddyList *purple_get_blist(void);
3.233 -
3.234 -/**
3.235 - * Returns the root node of the main buddy list.
3.236 - *
3.237 - * @return The root node.
3.238 - */
3.239 -PurpleBlistNode *purple_blist_get_root(void);
3.240 -
3.241 -/**
3.242 - * Returns the next node of a given node. This function is to be used to iterate
3.243 - * over the tree returned by purple_get_blist.
3.244 - *
3.245 - * @param node A node.
3.246 - * @param offline Whether to include nodes for offline accounts
3.247 - * @return The next node
3.248 - * @see purple_blist_node_get_parent
3.249 - * @see purple_blist_node_get_first_child
3.250 - * @see purple_blist_node_get_sibling_next
3.251 - * @see purple_blist_node_get_sibling_prev
3.252 - */
3.253 -PurpleBlistNode *purple_blist_node_next(PurpleBlistNode *node, gboolean offline);
3.254 -
3.255 -/**
3.256 - * Returns the parent node of a given node.
3.257 - *
3.258 - * @param node A node.
3.259 - * @return The parent node.
3.260 - * @since 2.4.0
3.261 - * @see purple_blist_node_get_first_child
3.262 - * @see purple_blist_node_get_sibling_next
3.263 - * @see purple_blist_node_get_sibling_prev
3.264 - * @see purple_blist_node_next
3.265 - */
3.266 -PurpleBlistNode *purple_blist_node_get_parent(PurpleBlistNode *node);
3.267 -
3.268 -/**
3.269 - * Returns the the first child node of a given node.
3.270 - *
3.271 - * @param node A node.
3.272 - * @return The child node.
3.273 - * @since 2.4.0
3.274 - * @see purple_blist_node_get_parent
3.275 - * @see purple_blist_node_get_sibling_next
3.276 - * @see purple_blist_node_get_sibling_prev
3.277 - * @see purple_blist_node_next
3.278 - */
3.279 -PurpleBlistNode *purple_blist_node_get_first_child(PurpleBlistNode *node);
3.280 -
3.281 -/**
3.282 - * Returns the sibling node of a given node.
3.283 - *
3.284 - * @param node A node.
3.285 - * @return The sibling node.
3.286 - * @since 2.4.0
3.287 - * @see purple_blist_node_get_parent
3.288 - * @see purple_blist_node_get_first_child
3.289 - * @see purple_blist_node_get_sibling_prev
3.290 - * @see purple_blist_node_next
3.291 - */
3.292 -PurpleBlistNode *purple_blist_node_get_sibling_next(PurpleBlistNode *node);
3.293 -
3.294 -/**
3.295 - * Returns the previous sibling node of a given node.
3.296 - *
3.297 - * @param node A node.
3.298 - * @return The sibling node.
3.299 - * @since 2.4.0
3.300 - * @see purple_blist_node_get_parent
3.301 - * @see purple_blist_node_get_first_child
3.302 - * @see purple_blist_node_get_sibling_next
3.303 - * @see purple_blist_node_next
3.304 - */
3.305 -PurpleBlistNode *purple_blist_node_get_sibling_prev(PurpleBlistNode *node);
3.306 -
3.307 -/**
3.308 - * Shows the buddy list, creating a new one if necessary.
3.309 - */
3.310 -void purple_blist_show(void);
3.311 -
3.312 -
3.313 -/**
3.314 - * Destroys the buddy list window.
3.315 - */
3.316 -void purple_blist_destroy(void);
3.317 -
3.318 -/**
3.319 - * Hides or unhides the buddy list.
3.320 - *
3.321 - * @param show Whether or not to show the buddy list
3.322 - */
3.323 -void purple_blist_set_visible(gboolean show);
3.324 -
3.325 -/**
3.326 - * Updates a buddy's status.
3.327 - *
3.328 - * @param buddy The buddy whose status has changed.
3.329 - * @param old_status The status from which we are changing.
3.330 - */
3.331 -void purple_blist_update_buddy_status(PurpleBuddy *buddy, PurpleStatus *old_status);
3.332 -
3.333 -/**
3.334 - * Updates a node's custom icon.
3.335 - *
3.336 - * @param node The PurpleBlistNode whose custom icon has changed.
3.337 - * @since 2.5.0
3.338 - */
3.339 -void purple_blist_update_node_icon(PurpleBlistNode *node);
3.340 -
3.341 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_BLIST_C_)
3.342 -/**
3.343 - * Updates a buddy's icon.
3.344 - *
3.345 - * @param buddy The buddy whose buddy icon has changed
3.346 - * @deprecated Use purple_blist_update_node_icon() instead.
3.347 - */
3.348 -void purple_blist_update_buddy_icon(PurpleBuddy *buddy);
3.349 -#endif
3.350 -
3.351 -/**
3.352 - * Renames a buddy in the buddy list.
3.353 - *
3.354 - * @param buddy The buddy whose name will be changed.
3.355 - * @param name The new name of the buddy.
3.356 - */
3.357 -void purple_blist_rename_buddy(PurpleBuddy *buddy, const char *name);
3.358 -
3.359 -/**
3.360 - * Aliases a contact in the buddy list.
3.361 - *
3.362 - * @param contact The contact whose alias will be changed.
3.363 - * @param alias The contact's alias.
3.364 - */
3.365 -void purple_blist_alias_contact(PurpleContact *contact, const char *alias);
3.366 -
3.367 -/**
3.368 - * Aliases a buddy in the buddy list.
3.369 - *
3.370 - * @param buddy The buddy whose alias will be changed.
3.371 - * @param alias The buddy's alias.
3.372 - */
3.373 -void purple_blist_alias_buddy(PurpleBuddy *buddy, const char *alias);
3.374 -
3.375 -/**
3.376 - * Sets the server-sent alias of a buddy in the buddy list.
3.377 - * PRPLs should call serv_got_alias() instead of this.
3.378 - *
3.379 - * @param buddy The buddy whose alias will be changed.
3.380 - * @param alias The buddy's "official" alias.
3.381 - */
3.382 -void purple_blist_server_alias_buddy(PurpleBuddy *buddy, const char *alias);
3.383 -
3.384 -/**
3.385 - * Aliases a chat in the buddy list.
3.386 - *
3.387 - * @param chat The chat whose alias will be changed.
3.388 - * @param alias The chat's new alias.
3.389 - */
3.390 -void purple_blist_alias_chat(PurpleChat *chat, const char *alias);
3.391 -
3.392 -/**
3.393 - * Renames a group
3.394 - *
3.395 - * @param group The group to rename
3.396 - * @param name The new name
3.397 - */
3.398 -void purple_blist_rename_group(PurpleGroup *group, const char *name);
3.399 -
3.400 -/**
3.401 - * Creates a new chat for the buddy list
3.402 - *
3.403 - * @param account The account this chat will get added to
3.404 - * @param alias The alias of the new chat
3.405 - * @param components The info the prpl needs to join the chat. The
3.406 - * hash function should be g_str_hash() and the
3.407 - * equal function should be g_str_equal().
3.408 - * @return A newly allocated chat
3.409 - */
3.410 -PurpleChat *purple_chat_new(PurpleAccount *account, const char *alias, GHashTable *components);
3.411 -
3.412 -/**
3.413 - * Adds a new chat to the buddy list.
3.414 - *
3.415 - * The chat will be inserted right after node or appended to the end
3.416 - * of group if node is NULL. If both are NULL, the buddy will be added to
3.417 - * the "Chats" group.
3.418 - *
3.419 - * @param chat The new chat who gets added
3.420 - * @param group The group to add the new chat to.
3.421 - * @param node The insertion point
3.422 - */
3.423 -void purple_blist_add_chat(PurpleChat *chat, PurpleGroup *group, PurpleBlistNode *node);
3.424 -
3.425 -/**
3.426 - * Creates a new buddy
3.427 - *
3.428 - * @param account The account this buddy will get added to
3.429 - * @param screenname The screenname of the new buddy
3.430 - * @param alias The alias of the new buddy (or NULL if unaliased)
3.431 - * @return A newly allocated buddy
3.432 - */
3.433 -PurpleBuddy *purple_buddy_new(PurpleAccount *account, const char *screenname, const char *alias);
3.434 -
3.435 -/**
3.436 - * Sets a buddy's icon.
3.437 - *
3.438 - * This should only be called from within Purple. You probably want to
3.439 - * call purple_buddy_icon_set_data().
3.440 - *
3.441 - * @param buddy The buddy.
3.442 - * @param icon The buddy icon.
3.443 - *
3.444 - * @see purple_buddy_icon_set_data()
3.445 - */
3.446 -void purple_buddy_set_icon(PurpleBuddy *buddy, PurpleBuddyIcon *icon);
3.447 -
3.448 -/**
3.449 - * Returns a buddy's account.
3.450 - *
3.451 - * @param buddy The buddy.
3.452 - *
3.453 - * @return The account
3.454 - */
3.455 -PurpleAccount *purple_buddy_get_account(const PurpleBuddy *buddy);
3.456 -
3.457 -/**
3.458 - * Returns a buddy's name
3.459 - *
3.460 - * @param buddy The buddy.
3.461 - *
3.462 - * @return The name.
3.463 - */
3.464 -const char *purple_buddy_get_name(const PurpleBuddy *buddy);
3.465 -
3.466 -/**
3.467 - * Returns a buddy's icon.
3.468 - *
3.469 - * @param buddy The buddy.
3.470 - *
3.471 - * @return The buddy icon.
3.472 - */
3.473 -PurpleBuddyIcon *purple_buddy_get_icon(const PurpleBuddy *buddy);
3.474 -
3.475 -/**
3.476 - * Returns a buddy's contact.
3.477 - *
3.478 - * @param buddy The buddy.
3.479 - *
3.480 - * @return The buddy's contact.
3.481 - */
3.482 -PurpleContact *purple_buddy_get_contact(PurpleBuddy *buddy);
3.483 -
3.484 -/**
3.485 - * Returns a buddy's presence.
3.486 - *
3.487 - * @param buddy The buddy.
3.488 - *
3.489 - * @return The buddy's presence.
3.490 - */
3.491 -PurplePresence *purple_buddy_get_presence(const PurpleBuddy *buddy);
3.492 -
3.493 -/**
3.494 - * Adds a new buddy to the buddy list.
3.495 - *
3.496 - * The buddy will be inserted right after node or prepended to the
3.497 - * group if node is NULL. If both are NULL, the buddy will be added to
3.498 - * the "Buddies" group.
3.499 - *
3.500 - * @param buddy The new buddy who gets added
3.501 - * @param contact The optional contact to place the buddy in.
3.502 - * @param group The group to add the new buddy to.
3.503 - * @param node The insertion point. Pass in NULL to add the node as
3.504 - * the last child in the given group.
3.505 - */
3.506 -void purple_blist_add_buddy(PurpleBuddy *buddy, PurpleContact *contact, PurpleGroup *group, PurpleBlistNode *node);
3.507 -
3.508 -/**
3.509 - * Creates a new group
3.510 - *
3.511 - * You can't have more than one group with the same name. Sorry. If you pass
3.512 - * this the * name of a group that already exists, it will return that group.
3.513 - *
3.514 - * @param name The name of the new group
3.515 - * @return A new group struct
3.516 -*/
3.517 -PurpleGroup *purple_group_new(const char *name);
3.518 -
3.519 -/**
3.520 - * Adds a new group to the buddy list.
3.521 - *
3.522 - * The new group will be inserted after insert or prepended to the list if
3.523 - * node is NULL.
3.524 - *
3.525 - * @param group The group
3.526 - * @param node The insertion point
3.527 - */
3.528 -void purple_blist_add_group(PurpleGroup *group, PurpleBlistNode *node);
3.529 -
3.530 -/**
3.531 - * Creates a new contact
3.532 - *
3.533 - * @return A new contact struct
3.534 - */
3.535 -PurpleContact *purple_contact_new(void);
3.536 -
3.537 -/**
3.538 - * Adds a new contact to the buddy list.
3.539 - *
3.540 - * The new contact will be inserted after insert or prepended to the list if
3.541 - * node is NULL.
3.542 - *
3.543 - * @param contact The contact
3.544 - * @param group The group to add the contact to
3.545 - * @param node The insertion point
3.546 - */
3.547 -void purple_blist_add_contact(PurpleContact *contact, PurpleGroup *group, PurpleBlistNode *node);
3.548 -
3.549 -/**
3.550 - * Merges two contacts
3.551 - *
3.552 - * All of the buddies from source will be moved to target
3.553 - *
3.554 - * @param source The contact to merge
3.555 - * @param node The place to merge to (a buddy or contact)
3.556 - */
3.557 -void purple_blist_merge_contact(PurpleContact *source, PurpleBlistNode *node);
3.558 -
3.559 -/**
3.560 - * Returns the highest priority buddy for a given contact.
3.561 - *
3.562 - * @param contact The contact
3.563 - * @return The highest priority buddy
3.564 - */
3.565 -PurpleBuddy *purple_contact_get_priority_buddy(PurpleContact *contact);
3.566 -
3.567 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_BLIST_C_)
3.568 -/**
3.569 - * Sets the alias for a contact.
3.570 - *
3.571 - * @param contact The contact
3.572 - * @param alias The alias to set, or NULL to unset
3.573 - *
3.574 - * @deprecated Use purple_blist_alias_contact() instead.
3.575 - */
3.576 -void purple_contact_set_alias(PurpleContact *contact, const char *alias);
3.577 -#endif
3.578 -
3.579 -/**
3.580 - * Gets the alias for a contact.
3.581 - *
3.582 - * @param contact The contact
3.583 - * @return The alias, or NULL if it is not set.
3.584 - */
3.585 -const char *purple_contact_get_alias(PurpleContact *contact);
3.586 -
3.587 -/**
3.588 - * Determines whether an account owns any buddies in a given contact
3.589 - *
3.590 - * @param contact The contact to search through.
3.591 - * @param account The account.
3.592 - *
3.593 - * @return TRUE if there are any buddies from account in the contact, or FALSE otherwise.
3.594 - */
3.595 -gboolean purple_contact_on_account(PurpleContact *contact, PurpleAccount *account);
3.596 -
3.597 -/**
3.598 - * Invalidates the priority buddy so that the next call to
3.599 - * purple_contact_get_priority_buddy recomputes it.
3.600 - *
3.601 - * @param contact The contact
3.602 - */
3.603 -void purple_contact_invalidate_priority_buddy(PurpleContact *contact);
3.604 -
3.605 -/**
3.606 - * Removes a buddy from the buddy list and frees the memory allocated to it.
3.607 - * This doesn't actually try to remove the buddy from the server list, nor does
3.608 - * it clean up the prpl_data.
3.609 - *
3.610 - * @param buddy The buddy to be removed
3.611 - */
3.612 -void purple_blist_remove_buddy(PurpleBuddy *buddy);
3.613 -
3.614 -/**
3.615 - * Removes a contact, and any buddies it contains, and frees the memory
3.616 - * allocated to it.
3.617 - *
3.618 - * @param contact The contact to be removed
3.619 - */
3.620 -void purple_blist_remove_contact(PurpleContact *contact);
3.621 -
3.622 -/**
3.623 - * Removes a chat from the buddy list and frees the memory allocated to it.
3.624 - *
3.625 - * @param chat The chat to be removed
3.626 - */
3.627 -void purple_blist_remove_chat(PurpleChat *chat);
3.628 -
3.629 -/**
3.630 - * Removes a group from the buddy list and frees the memory allocated to it and to
3.631 - * its children
3.632 - *
3.633 - * @param group The group to be removed
3.634 - */
3.635 -void purple_blist_remove_group(PurpleGroup *group);
3.636 -
3.637 -/**
3.638 - * Returns the alias of a buddy.
3.639 - *
3.640 - * @param buddy The buddy whose name will be returned.
3.641 - * @return The alias (if set), server alias (if set),
3.642 - * or NULL.
3.643 - */
3.644 -const char *purple_buddy_get_alias_only(PurpleBuddy *buddy);
3.645 -
3.646 -/**
3.647 - * Gets the server alias for a buddy.
3.648 - *
3.649 - * @param buddy The buddy whose name will be returned
3.650 - * @return The server alias, or NULL if it is not set.
3.651 - */
3.652 -const char *purple_buddy_get_server_alias(PurpleBuddy *buddy);
3.653 -
3.654 -/**
3.655 - * Returns the correct name to display for a buddy, taking the contact alias
3.656 - * into account. In order of precedence: the buddy's alias; the buddy's
3.657 - * contact alias; the buddy's server alias; the buddy's user name.
3.658 - *
3.659 - * @param buddy The buddy whose name will be returned
3.660 - * @return The appropriate name or alias, or NULL.
3.661 - *
3.662 - */
3.663 -const char *purple_buddy_get_contact_alias(PurpleBuddy *buddy);
3.664 -
3.665 -/**
3.666 - * Returns the correct alias for this user, ignoring server aliases. Used
3.667 - * when a user-recognizable name is required. In order: buddy's alias; buddy's
3.668 - * contact alias; buddy's user name.
3.669 - *
3.670 - * @param buddy The buddy whose alias will be returned.
3.671 - * @return The appropriate name or alias.
3.672 - */
3.673 -const char *purple_buddy_get_local_alias(PurpleBuddy *buddy);
3.674 -
3.675 -/**
3.676 - * Returns the correct name to display for a buddy. In order of precedence:
3.677 - * the buddy's alias; the buddy's server alias; the buddy's contact alias;
3.678 - * the buddy's user name.
3.679 - *
3.680 - * @param buddy The buddy whose name will be returned.
3.681 - * @return The appropriate name or alias, or NULL
3.682 - */
3.683 -const char *purple_buddy_get_alias(PurpleBuddy *buddy);
3.684 -
3.685 -/**
3.686 - * Returns the correct name to display for a blist chat.
3.687 - *
3.688 - * @param chat The chat whose name will be returned.
3.689 - * @return The alias (if set), or first component value.
3.690 - */
3.691 -const char *purple_chat_get_name(PurpleChat *chat);
3.692 -
3.693 -/**
3.694 - * Finds the buddy struct given a screenname and an account
3.695 - *
3.696 - * @param account The account this buddy belongs to
3.697 - * @param name The buddy's screenname
3.698 - * @return The buddy or NULL if the buddy does not exist
3.699 - */
3.700 -PurpleBuddy *purple_find_buddy(PurpleAccount *account, const char *name);
3.701 -
3.702 -/**
3.703 - * Finds the buddy struct given a screenname, an account, and a group
3.704 - *
3.705 - * @param account The account this buddy belongs to
3.706 - * @param name The buddy's screenname
3.707 - * @param group The group to look in
3.708 - * @return The buddy or NULL if the buddy does not exist in the group
3.709 - */
3.710 -PurpleBuddy *purple_find_buddy_in_group(PurpleAccount *account, const char *name,
3.711 - PurpleGroup *group);
3.712 -
3.713 -/**
3.714 - * Finds all PurpleBuddy structs given a screenname and an account
3.715 - *
3.716 - * @param account The account this buddy belongs to
3.717 - * @param name The buddy's screenname (or NULL to return all buddies in the account)
3.718 - *
3.719 - * @return A GSList of buddies (which must be freed), or NULL if the buddy doesn't exist
3.720 - */
3.721 -GSList *purple_find_buddies(PurpleAccount *account, const char *name);
3.722 -
3.723 -
3.724 -/**
3.725 - * Finds a group by name
3.726 - *
3.727 - * @param name The group's name
3.728 - * @return The group or NULL if the group does not exist
3.729 - */
3.730 -PurpleGroup *purple_find_group(const char *name);
3.731 -
3.732 -/**
3.733 - * Finds a chat by name.
3.734 - *
3.735 - * @param account The chat's account.
3.736 - * @param name The chat's name.
3.737 - *
3.738 - * @return The chat, or @c NULL if the chat does not exist.
3.739 - */
3.740 -PurpleChat *purple_blist_find_chat(PurpleAccount *account, const char *name);
3.741 -
3.742 -/**
3.743 - * Returns the group of which the chat is a member.
3.744 - *
3.745 - * @param chat The chat.
3.746 - *
3.747 - * @return The parent group, or @c NULL if the chat is not in a group.
3.748 - */
3.749 -PurpleGroup *purple_chat_get_group(PurpleChat *chat);
3.750 -
3.751 -/**
3.752 - * Returns the account the chat belongs to.
3.753 - *
3.754 - * @param chat The chat.
3.755 - *
3.756 - * @return The account the chat belongs to.
3.757 - * @since 2.4.0
3.758 - */
3.759 -PurpleAccount *purple_chat_get_account(PurpleChat *chat);
3.760 -
3.761 -/**
3.762 - * Get a hashtable containing information about a chat.
3.763 - *
3.764 - * @param chat The chat.
3.765 - *
3.766 - * @constreturn The hashtable.
3.767 - * @since 2.4.0
3.768 - */
3.769 -GHashTable *purple_chat_get_components(PurpleChat *chat);
3.770 -
3.771 -/**
3.772 - * Returns the group of which the buddy is a member.
3.773 - *
3.774 - * @param buddy The buddy
3.775 - * @return The group or NULL if the buddy is not in a group
3.776 - */
3.777 -PurpleGroup *purple_buddy_get_group(PurpleBuddy *buddy);
3.778 -
3.779 -
3.780 -/**
3.781 - * Returns a list of accounts that have buddies in this group
3.782 - *
3.783 - * @param g The group
3.784 - *
3.785 - * @return A GSList of accounts (which must be freed), or NULL if the group
3.786 - * has no accounts.
3.787 - */
3.788 -GSList *purple_group_get_accounts(PurpleGroup *g);
3.789 -
3.790 -/**
3.791 - * Determines whether an account owns any buddies in a given group
3.792 - *
3.793 - * @param g The group to search through.
3.794 - * @param account The account.
3.795 - *
3.796 - * @return TRUE if there are any buddies in the group, or FALSE otherwise.
3.797 - */
3.798 -gboolean purple_group_on_account(PurpleGroup *g, PurpleAccount *account);
3.799 -
3.800 -/**
3.801 - * Returns the name of a group.
3.802 - *
3.803 - * @param group The group.
3.804 - *
3.805 - * @return The name of the group.
3.806 - */
3.807 -const char *purple_group_get_name(PurpleGroup *group);
3.808 -
3.809 -/**
3.810 - * Called when an account gets signed on. Tells the UI to update all the
3.811 - * buddies.
3.812 - *
3.813 - * @param account The account
3.814 - */
3.815 -void purple_blist_add_account(PurpleAccount *account);
3.816 -
3.817 -
3.818 -/**
3.819 - * Called when an account gets signed off. Sets the presence of all the buddies to 0
3.820 - * and tells the UI to update them.
3.821 - *
3.822 - * @param account The account
3.823 - */
3.824 -void purple_blist_remove_account(PurpleAccount *account);
3.825 -
3.826 -
3.827 -/**
3.828 - * Determines the total size of a group
3.829 - *
3.830 - * @param group The group
3.831 - * @param offline Count buddies in offline accounts
3.832 - * @return The number of buddies in the group
3.833 - */
3.834 -int purple_blist_get_group_size(PurpleGroup *group, gboolean offline);
3.835 -
3.836 -/**
3.837 - * Determines the number of online buddies in a group
3.838 - *
3.839 - * @param group The group
3.840 - * @return The number of online buddies in the group, or 0 if the group is NULL
3.841 - */
3.842 -int purple_blist_get_group_online_count(PurpleGroup *group);
3.843 -
3.844 -/*@}*/
3.845 -
3.846 -/****************************************************************************************/
3.847 -/** @name Buddy list file management API */
3.848 -/****************************************************************************************/
3.849 -
3.850 -/**
3.851 - * Loads the buddy list from ~/.purple/blist.xml.
3.852 - */
3.853 -void purple_blist_load(void);
3.854 -
3.855 -/**
3.856 - * Schedule a save of the blist.xml file. This is used by the privacy
3.857 - * API whenever the privacy settings are changed. If you make a change
3.858 - * to blist.xml using one of the functions in the buddy list API, then
3.859 - * the buddy list is saved automatically, so you should not need to
3.860 - * call this.
3.861 - */
3.862 -void purple_blist_schedule_save(void);
3.863 -
3.864 -/**
3.865 - * Requests from the user information needed to add a buddy to the
3.866 - * buddy list.
3.867 - *
3.868 - * @param account The account the buddy is added to.
3.869 - * @param username The username of the buddy.
3.870 - * @param group The name of the group to place the buddy in.
3.871 - * @param alias The optional alias for the buddy.
3.872 - */
3.873 -void purple_blist_request_add_buddy(PurpleAccount *account, const char *username,
3.874 - const char *group, const char *alias);
3.875 -
3.876 -/**
3.877 - * Requests from the user information needed to add a chat to the
3.878 - * buddy list.
3.879 - *
3.880 - * @param account The account the buddy is added to.
3.881 - * @param group The optional group to add the chat to.
3.882 - * @param alias The optional alias for the chat.
3.883 - * @param name The required chat name.
3.884 - */
3.885 -void purple_blist_request_add_chat(PurpleAccount *account, PurpleGroup *group,
3.886 - const char *alias, const char *name);
3.887 -
3.888 -/**
3.889 - * Requests from the user information needed to add a group to the
3.890 - * buddy list.
3.891 - */
3.892 -void purple_blist_request_add_group(void);
3.893 -
3.894 -/**
3.895 - * Associates a boolean with a node in the buddy list
3.896 - *
3.897 - * @param node The node to associate the data with
3.898 - * @param key The identifier for the data
3.899 - * @param value The value to set
3.900 - */
3.901 -void purple_blist_node_set_bool(PurpleBlistNode *node, const char *key, gboolean value);
3.902 -
3.903 -/**
3.904 - * Retrieves a named boolean setting from a node in the buddy list
3.905 - *
3.906 - * @param node The node to retrieve the data from
3.907 - * @param key The identifier of the data
3.908 - *
3.909 - * @return The value, or FALSE if there is no setting
3.910 - */
3.911 -gboolean purple_blist_node_get_bool(PurpleBlistNode *node, const char *key);
3.912 -
3.913 -/**
3.914 - * Associates an integer with a node in the buddy list
3.915 - *
3.916 - * @param node The node to associate the data with
3.917 - * @param key The identifier for the data
3.918 - * @param value The value to set
3.919 - */
3.920 -void purple_blist_node_set_int(PurpleBlistNode *node, const char *key, int value);
3.921 -
3.922 -/**
3.923 - * Retrieves a named integer setting from a node in the buddy list
3.924 - *
3.925 - * @param node The node to retrieve the data from
3.926 - * @param key The identifier of the data
3.927 - *
3.928 - * @return The value, or 0 if there is no setting
3.929 - */
3.930 -int purple_blist_node_get_int(PurpleBlistNode *node, const char *key);
3.931 -
3.932 -/**
3.933 - * Associates a string with a node in the buddy list
3.934 - *
3.935 - * @param node The node to associate the data with
3.936 - * @param key The identifier for the data
3.937 - * @param value The value to set
3.938 - */
3.939 -void purple_blist_node_set_string(PurpleBlistNode *node, const char *key,
3.940 - const char *value);
3.941 -
3.942 -/**
3.943 - * Retrieves a named string setting from a node in the buddy list
3.944 - *
3.945 - * @param node The node to retrieve the data from
3.946 - * @param key The identifier of the data
3.947 - *
3.948 - * @return The value, or NULL if there is no setting
3.949 - */
3.950 -const char *purple_blist_node_get_string(PurpleBlistNode *node, const char *key);
3.951 -
3.952 -/**
3.953 - * Removes a named setting from a blist node
3.954 - *
3.955 - * @param node The node from which to remove the setting
3.956 - * @param key The name of the setting
3.957 - */
3.958 -void purple_blist_node_remove_setting(PurpleBlistNode *node, const char *key);
3.959 -
3.960 -/**
3.961 - * Set the flags for the given node. Setting a node's flags will overwrite
3.962 - * the old flags, so if you want to save them, you must first call
3.963 - * purple_blist_node_get_flags and modify that appropriately.
3.964 - *
3.965 - * @param node The node on which to set the flags.
3.966 - * @param flags The flags to set. This is a bitmask.
3.967 - */
3.968 -void purple_blist_node_set_flags(PurpleBlistNode *node, PurpleBlistNodeFlags flags);
3.969 -
3.970 -/**
3.971 - * Get the current flags on a given node.
3.972 - *
3.973 - * @param node The node from which to get the flags.
3.974 - *
3.975 - * @return The flags on the node. This is a bitmask.
3.976 - */
3.977 -PurpleBlistNodeFlags purple_blist_node_get_flags(PurpleBlistNode *node);
3.978 -
3.979 -/**
3.980 - * Get the type of a given node.
3.981 - *
3.982 - * @param node The node.
3.983 - *
3.984 - * @return The type of the node.
3.985 - * @since 2.1.0
3.986 - */
3.987 -PurpleBlistNodeType purple_blist_node_get_type(PurpleBlistNode *node);
3.988 -
3.989 -/*@}*/
3.990 -
3.991 -/**
3.992 - * Retrieves the extended menu items for a buddy list node.
3.993 - * @param n The blist node for which to obtain the extended menu items.
3.994 - * @return A list of PurpleMenuAction items, as harvested by the
3.995 - * blist-node-extended-menu signal.
3.996 - */
3.997 -GList *purple_blist_node_get_extended_menu(PurpleBlistNode *n);
3.998 -
3.999 -/**************************************************************************/
3.1000 -/** @name UI Registration Functions */
3.1001 -/**************************************************************************/
3.1002 -/*@{*/
3.1003 -
3.1004 -/**
3.1005 - * Sets the UI operations structure to be used for the buddy list.
3.1006 - *
3.1007 - * @param ops The ops struct.
3.1008 - */
3.1009 -void purple_blist_set_ui_ops(PurpleBlistUiOps *ops);
3.1010 -
3.1011 -/**
3.1012 - * Returns the UI operations structure to be used for the buddy list.
3.1013 - *
3.1014 - * @return The UI operations structure.
3.1015 - */
3.1016 -PurpleBlistUiOps *purple_blist_get_ui_ops(void);
3.1017 -
3.1018 -/*@}*/
3.1019 -
3.1020 -/**************************************************************************/
3.1021 -/** @name Buddy List Subsystem */
3.1022 -/**************************************************************************/
3.1023 -/*@{*/
3.1024 -
3.1025 -/**
3.1026 - * Returns the handle for the buddy list subsystem.
3.1027 - *
3.1028 - * @return The buddy list subsystem handle.
3.1029 - */
3.1030 -void *purple_blist_get_handle(void);
3.1031 -
3.1032 -/**
3.1033 - * Initializes the buddy list subsystem.
3.1034 - */
3.1035 -void purple_blist_init(void);
3.1036 -
3.1037 -/**
3.1038 - * Uninitializes the buddy list subsystem.
3.1039 - */
3.1040 -void purple_blist_uninit(void);
3.1041 -
3.1042 -/*@}*/
3.1043 -
3.1044 -#ifdef __cplusplus
3.1045 -}
3.1046 -#endif
3.1047 -
3.1048 -#endif /* _PURPLE_BLIST_H_ */
4.1 --- a/Frameworks/libpurple.framework/Versions/0.5.6/Headers/buddy.h Sun Jun 21 22:04:11 2009 -0400
4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3 @@ -1,124 +0,0 @@
4.4 -/**
4.5 - * @file buddy.h Buddy handlers
4.6 - *
4.7 - * purple
4.8 - *
4.9 - * Copyright (C) 2003 Nathan Walp <faceprint@faceprint.com>
4.10 - *
4.11 - * This program is free software; you can redistribute it and/or modify
4.12 - * it under the terms of the GNU General Public License as published by
4.13 - * the Free Software Foundation; either version 2 of the License, or
4.14 - * (at your option) any later version.
4.15 - *
4.16 - * This program is distributed in the hope that it will be useful,
4.17 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
4.18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4.19 - * GNU General Public License for more details.
4.20 - *
4.21 - * You should have received a copy of the GNU General Public License
4.22 - * along with this program; if not, write to the Free Software
4.23 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
4.24 - */
4.25 -#ifndef _PURPLE_JABBER_BUDDY_H_
4.26 -#define _PURPLE_JABBER_BUDDY_H_
4.27 -
4.28 -typedef enum {
4.29 - JABBER_BUDDY_STATE_UNKNOWN = -2,
4.30 - JABBER_BUDDY_STATE_ERROR = -1,
4.31 - JABBER_BUDDY_STATE_UNAVAILABLE = 0,
4.32 - JABBER_BUDDY_STATE_ONLINE,
4.33 - JABBER_BUDDY_STATE_CHAT,
4.34 - JABBER_BUDDY_STATE_AWAY,
4.35 - JABBER_BUDDY_STATE_XA,
4.36 - JABBER_BUDDY_STATE_DND
4.37 -} JabberBuddyState;
4.38 -
4.39 -#include "jabber.h"
4.40 -#include "caps.h"
4.41 -
4.42 -#define AVATARNAMESPACEDATA "http://www.xmpp.org/extensions/xep-0084.html#ns-data"
4.43 -#define AVATARNAMESPACEMETA "http://www.xmpp.org/extensions/xep-0084.html#ns-metadata"
4.44 -
4.45 -typedef struct _JabberBuddy {
4.46 - GList *resources;
4.47 - char *error_msg;
4.48 - enum {
4.49 - JABBER_INVISIBLE_NONE = 0,
4.50 - JABBER_INVISIBLE_SERVER = 1 << 1,
4.51 - JABBER_INVIS_BUDDY = 1 << 2
4.52 - } invisible;
4.53 - enum {
4.54 - JABBER_SUB_NONE = 0,
4.55 - JABBER_SUB_PENDING = 1 << 1,
4.56 - JABBER_SUB_TO = 1 << 2,
4.57 - JABBER_SUB_FROM = 1 << 3,
4.58 - JABBER_SUB_BOTH = (JABBER_SUB_TO | JABBER_SUB_FROM),
4.59 - JABBER_SUB_REMOVE = 1 << 4
4.60 - } subscription;
4.61 -} JabberBuddy;
4.62 -
4.63 -typedef struct _JabberAdHocCommands {
4.64 - char *jid;
4.65 - char *node;
4.66 - char *name;
4.67 -} JabberAdHocCommands;
4.68 -
4.69 -typedef struct _JabberBuddyResource {
4.70 - JabberBuddy *jb;
4.71 - char *name;
4.72 - int priority;
4.73 - JabberBuddyState state;
4.74 - char *status;
4.75 - JabberCapabilities capabilities;
4.76 - char *thread_id;
4.77 - enum {
4.78 - JABBER_CHAT_STATES_UNKNOWN,
4.79 - JABBER_CHAT_STATES_UNSUPPORTED,
4.80 - JABBER_CHAT_STATES_SUPPORTED
4.81 - } chat_states;
4.82 - struct {
4.83 - char *version;
4.84 - char *name;
4.85 - char *os;
4.86 - } client;
4.87 - JabberCapsClientInfo *caps;
4.88 - GList *commands;
4.89 -} JabberBuddyResource;
4.90 -
4.91 -void jabber_buddy_free(JabberBuddy *jb);
4.92 -JabberBuddy *jabber_buddy_find(JabberStream *js, const char *name,
4.93 - gboolean create);
4.94 -JabberBuddyResource *jabber_buddy_find_resource(JabberBuddy *jb,
4.95 - const char *resource);
4.96 -JabberBuddyResource *jabber_buddy_track_resource(JabberBuddy *jb, const char *resource,
4.97 - int priority, JabberBuddyState state, const char *status);
4.98 -void jabber_buddy_resource_free(JabberBuddyResource *jbr);
4.99 -void jabber_buddy_remove_resource(JabberBuddy *jb, const char *resource);
4.100 -const char *jabber_buddy_get_status_msg(JabberBuddy *jb);
4.101 -void jabber_buddy_get_info(PurpleConnection *gc, const char *who);
4.102 -
4.103 -GList *jabber_blist_node_menu(PurpleBlistNode *node);
4.104 -
4.105 -void jabber_set_info(PurpleConnection *gc, const char *info);
4.106 -void jabber_setup_set_info(PurplePluginAction *action);
4.107 -void jabber_set_buddy_icon(PurpleConnection *gc, PurpleStoredImage *img);
4.108 -void jabber_buddy_avatar_update_metadata(JabberStream *js, const char *from, xmlnode *items);
4.109 -
4.110 -const char *jabber_buddy_state_get_name(JabberBuddyState state);
4.111 -const char *jabber_buddy_state_get_status_id(JabberBuddyState state);
4.112 -const char *jabber_buddy_state_get_show(JabberBuddyState state);
4.113 -JabberBuddyState jabber_buddy_status_id_get_state(const char *id);
4.114 -JabberBuddyState jabber_buddy_show_get_state(const char *id);
4.115 -
4.116 -void jabber_user_search(JabberStream *js, const char *directory);
4.117 -void jabber_user_search_begin(PurplePluginAction *);
4.118 -
4.119 -void jabber_buddy_remove_all_pending_buddy_info_requests(JabberStream *js);
4.120 -
4.121 -void jabber_vcard_fetch_mine(JabberStream *js);
4.122 -
4.123 -gboolean jabber_resource_has_capability(const JabberBuddyResource *jbr,
4.124 - const gchar *cap);
4.125 -gboolean jabber_buddy_has_capability(const JabberBuddy *jb, const gchar *cap);
4.126 -
4.127 -#endif /* _PURPLE_JABBER_BUDDY_H_ */
5.1 --- a/Frameworks/libpurple.framework/Versions/0.5.6/Headers/buddyicon.h Sun Jun 21 22:04:11 2009 -0400
5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
5.3 @@ -1,443 +0,0 @@
5.4 -/**
5.5 - * @file buddyicon.h Buddy Icon API
5.6 - * @ingroup core
5.7 - */
5.8 -
5.9 -/* purple
5.10 - *
5.11 - * Purple is the legal property of its developers, whose names are too numerous
5.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
5.13 - * source distribution.
5.14 - *
5.15 - * This program is free software; you can redistribute it and/or modify
5.16 - * it under the terms of the GNU General Public License as published by
5.17 - * the Free Software Foundation; either version 2 of the License, or
5.18 - * (at your option) any later version.
5.19 - *
5.20 - * This program is distributed in the hope that it will be useful,
5.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
5.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5.23 - * GNU General Public License for more details.
5.24 - *
5.25 - * You should have received a copy of the GNU General Public License
5.26 - * along with this program; if not, write to the Free Software
5.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
5.28 - */
5.29 -#ifndef _PURPLE_BUDDYICON_H_
5.30 -#define _PURPLE_BUDDYICON_H_
5.31 -
5.32 -/** An opaque structure representing a buddy icon for a particular user on a
5.33 - * particular #PurpleAccount. Instances are reference-counted; use
5.34 - * purple_buddy_icon_ref() and purple_buddy_icon_unref() to take and release
5.35 - * references.
5.36 - */
5.37 -typedef struct _PurpleBuddyIcon PurpleBuddyIcon;
5.38 -
5.39 -#include "account.h"
5.40 -#include "blist.h"
5.41 -#include "imgstore.h"
5.42 -#include "prpl.h"
5.43 -#include "util.h"
5.44 -
5.45 -#ifdef __cplusplus
5.46 -extern "C" {
5.47 -#endif
5.48 -
5.49 -
5.50 -/**************************************************************************/
5.51 -/** @name Buddy Icon API */
5.52 -/**************************************************************************/
5.53 -/*@{*/
5.54 -
5.55 -/**
5.56 - * Creates a new buddy icon structure and populates it.
5.57 - *
5.58 - * If the buddy icon already exists, you'll get a reference to that structure,
5.59 - * which will have been updated with the data supplied.
5.60 - *
5.61 - * @param account The account the user is on.
5.62 - * @param username The username the icon belongs to.
5.63 - * @param icon_data The buddy icon data.
5.64 - * @param icon_len The buddy icon length.
5.65 - * @param checksum A protocol checksum from the prpl or @c NULL.
5.66 - *
5.67 - * @return The buddy icon structure, with a reference for the caller.
5.68 - */
5.69 -PurpleBuddyIcon *purple_buddy_icon_new(PurpleAccount *account, const char *username,
5.70 - void *icon_data, size_t icon_len,
5.71 - const char *checksum);
5.72 -
5.73 -/**
5.74 - * Increments the reference count on a buddy icon.
5.75 - *
5.76 - * @param icon The buddy icon.
5.77 - *
5.78 - * @return @a icon.
5.79 - */
5.80 -PurpleBuddyIcon *purple_buddy_icon_ref(PurpleBuddyIcon *icon);
5.81 -
5.82 -/**
5.83 - * Decrements the reference count on a buddy icon.
5.84 - *
5.85 - * If the reference count reaches 0, the icon will be destroyed.
5.86 - *
5.87 - * @param icon The buddy icon.
5.88 - *
5.89 - * @return @a icon, or @c NULL if the reference count reached 0.
5.90 - */
5.91 -PurpleBuddyIcon *purple_buddy_icon_unref(PurpleBuddyIcon *icon);
5.92 -
5.93 -/**
5.94 - * Updates every instance of this icon.
5.95 - *
5.96 - * @param icon The buddy icon.
5.97 - */
5.98 -void purple_buddy_icon_update(PurpleBuddyIcon *icon);
5.99 -
5.100 -/**
5.101 - * Sets the buddy icon's data.
5.102 - *
5.103 - * @param icon The buddy icon.
5.104 - * @param data The buddy icon data, which the buddy icon code
5.105 - * takes ownership of and will free.
5.106 - * @param len The length of the data in @a data.
5.107 - * @param checksum A protocol checksum from the prpl or @c NULL.
5.108 - */
5.109 -void
5.110 -purple_buddy_icon_set_data(PurpleBuddyIcon *icon, guchar *data,
5.111 - size_t len, const char *checksum);
5.112 -
5.113 -/**
5.114 - * Returns the buddy icon's account.
5.115 - *
5.116 - * @param icon The buddy icon.
5.117 - *
5.118 - * @return The account.
5.119 - */
5.120 -PurpleAccount *purple_buddy_icon_get_account(const PurpleBuddyIcon *icon);
5.121 -
5.122 -/**
5.123 - * Returns the buddy icon's username.
5.124 - *
5.125 - * @param icon The buddy icon.
5.126 - *
5.127 - * @return The username.
5.128 - */
5.129 -const char *purple_buddy_icon_get_username(const PurpleBuddyIcon *icon);
5.130 -
5.131 -/**
5.132 - * Returns the buddy icon's checksum.
5.133 - *
5.134 - * This function is really only for prpl use.
5.135 - *
5.136 - * @param icon The buddy icon.
5.137 - *
5.138 - * @return The checksum.
5.139 - */
5.140 -const char *purple_buddy_icon_get_checksum(const PurpleBuddyIcon *icon);
5.141 -
5.142 -/**
5.143 - * Returns the buddy icon's data.
5.144 - *
5.145 - * @param icon The buddy icon.
5.146 - * @param len If not @c NULL, the length of the icon data returned will be
5.147 - * set in the location pointed to by this.
5.148 - *
5.149 - * @return A pointer to the icon data.
5.150 - */
5.151 -gconstpointer purple_buddy_icon_get_data(const PurpleBuddyIcon *icon, size_t *len);
5.152 -
5.153 -/**
5.154 - * Returns an extension corresponding to the buddy icon's file type.
5.155 - *
5.156 - * @param icon The buddy icon.
5.157 - *
5.158 - * @return The icon's extension, "icon" if unknown, or @c NULL if
5.159 - * the image data has disappeared.
5.160 - */
5.161 -const char *purple_buddy_icon_get_extension(const PurpleBuddyIcon *icon);
5.162 -
5.163 -/**
5.164 - * Returns a full path to an icon.
5.165 - *
5.166 - * If the icon has data and the file exists in the cache, this will return
5.167 - * a full path to the cache file.
5.168 - *
5.169 - * In general, it is not appropriate to be poking in the icon cache
5.170 - * directly. If you find yourself wanting to use this function, think
5.171 - * very long and hard about it, and then don't.
5.172 - *
5.173 - * @param icon The buddy icon
5.174 - *
5.175 - * @return A full path to the file, or @c NULL under various conditions.
5.176 - */
5.177 -char *purple_buddy_icon_get_full_path(PurpleBuddyIcon *icon);
5.178 -
5.179 -/*@}*/
5.180 -
5.181 -/**************************************************************************/
5.182 -/** @name Buddy Icon Subsystem API */
5.183 -/**************************************************************************/
5.184 -/*@{*/
5.185 -
5.186 -/**
5.187 - * Sets a buddy icon for a user.
5.188 - *
5.189 - * @param account The account the user is on.
5.190 - * @param username The username of the user.
5.191 - * @param icon_data The buddy icon data, which the buddy icon code
5.192 - * takes ownership of and will free.
5.193 - * @param icon_len The length of the icon data.
5.194 - * @param checksum A protocol checksum from the prpl or @c NULL.
5.195 - *
5.196 - * @return The buddy icon set, or NULL if no icon was set.
5.197 - */
5.198 -void
5.199 -purple_buddy_icons_set_for_user(PurpleAccount *account, const char *username,
5.200 - void *icon_data, size_t icon_len,
5.201 - const char *checksum);
5.202 -
5.203 -/**
5.204 - * Returns the checksum for the buddy icon of a specified buddy.
5.205 - *
5.206 - * This avoids loading the icon image data from the cache if it's
5.207 - * not already loaded for some other reason.
5.208 - *
5.209 - * @param buddy The buddy
5.210 - *
5.211 - * @return The checksum.
5.212 - */
5.213 -const char *
5.214 -purple_buddy_icons_get_checksum_for_user(PurpleBuddy *buddy);
5.215 -
5.216 -/**
5.217 - * Returns the buddy icon information for a user.
5.218 - *
5.219 - * @param account The account the user is on.
5.220 - * @param username The username of the user.
5.221 - *
5.222 - * @return The icon (with a reference for the caller) if found, or @c NULL if
5.223 - * not found.
5.224 - */
5.225 -PurpleBuddyIcon *
5.226 -purple_buddy_icons_find(PurpleAccount *account, const char *username);
5.227 -
5.228 -/**
5.229 - * Returns the buddy icon image for an account.
5.230 - *
5.231 - * The caller owns a reference to the image in the store, and must dereference
5.232 - * the image with purple_imgstore_unref() for it to be freed.
5.233 - *
5.234 - * This function deals with loading the icon from the cache, if
5.235 - * needed, so it should be called in any case where you want the
5.236 - * appropriate icon.
5.237 - *
5.238 - * @param account The account
5.239 - *
5.240 - * @return The account's buddy icon image.
5.241 - */
5.242 -PurpleStoredImage *
5.243 -purple_buddy_icons_find_account_icon(PurpleAccount *account);
5.244 -
5.245 -/**
5.246 - * Sets a buddy icon for an account.
5.247 - *
5.248 - * This function will deal with saving a record of the icon,
5.249 - * caching the data, etc.
5.250 - *
5.251 - * @param account The account for which to set a custom icon.
5.252 - * @param icon_data The image data of the icon, which the
5.253 - * buddy icon code will free.
5.254 - * @param icon_len The length of the data in @a icon_data.
5.255 - *
5.256 - * @return The icon that was set. The caller does NOT own
5.257 - * a reference to this, and must call purple_imgstore_ref()
5.258 - * if it wants one.
5.259 - */
5.260 -PurpleStoredImage *
5.261 -purple_buddy_icons_set_account_icon(PurpleAccount *account,
5.262 - guchar *icon_data, size_t icon_len);
5.263 -
5.264 -/**
5.265 - * Returns the timestamp of when the icon was set.
5.266 - *
5.267 - * This is intended for use in protocols that require a timestamp for
5.268 - * buddy icon update reasons.
5.269 - *
5.270 - * @param account The account
5.271 - *
5.272 - * @return The time the icon was set, or 0 if an error occurred.
5.273 - */
5.274 -time_t
5.275 -purple_buddy_icons_get_account_icon_timestamp(PurpleAccount *account);
5.276 -
5.277 -/**
5.278 - * Returns a boolean indicating if a given blist node has a custom buddy icon.
5.279 - *
5.280 - * @param node The blist node.
5.281 - *
5.282 - * @return A boolean indicating if @a node has a custom buddy icon.
5.283 - * @since 2.5.0
5.284 - */
5.285 -gboolean
5.286 -purple_buddy_icons_node_has_custom_icon(PurpleBlistNode *node);
5.287 -
5.288 -/**
5.289 - * Returns the custom buddy icon image for a blist node.
5.290 - *
5.291 - * The caller owns a reference to the image in the store, and must dereference
5.292 - * the image with purple_imgstore_unref() for it to be freed.
5.293 - *
5.294 - * This function deals with loading the icon from the cache, if
5.295 - * needed, so it should be called in any case where you want the
5.296 - * appropriate icon.
5.297 - *
5.298 - * @param node The node.
5.299 - *
5.300 - * @return The custom buddy icon.
5.301 - * @since 2.5.0
5.302 - */
5.303 -PurpleStoredImage *
5.304 -purple_buddy_icons_node_find_custom_icon(PurpleBlistNode *node);
5.305 -
5.306 -/**
5.307 - * Sets a custom buddy icon for a blist node.
5.308 - *
5.309 - * This function will deal with saving a record of the icon, caching the data,
5.310 - * etc.
5.311 - *
5.312 - * @param node The blist node for which to set a custom icon.
5.313 - * @param icon_data The image data of the icon, which the buddy icon code will
5.314 - * free. Use NULL to unset the icon.
5.315 - * @param icon_len The length of the data in @a icon_data.
5.316 - *
5.317 - * @return The icon that was set. The caller does NOT own a reference to this,
5.318 - * and must call purple_imgstore_ref() if it wants one.
5.319 - * @since 2.5.0
5.320 - */
5.321 -PurpleStoredImage *
5.322 -purple_buddy_icons_node_set_custom_icon(PurpleBlistNode *node,
5.323 - guchar *icon_data, size_t icon_len);
5.324 -
5.325 -/**
5.326 - * Sets a custom buddy icon for a blist node.
5.327 - *
5.328 - * Convenience wrapper around purple_buddy_icons_node_set_custom_icon.
5.329 - * @see purple_buddy_icons_node_set_custom_icon()
5.330 - *
5.331 - * @param node The blist node for which to set a custom icon.
5.332 - * @param filename The path to the icon to set for the blist node. Use NULL
5.333 - * to unset the custom icon.
5.334 - *
5.335 - * @return The icon that was set. The caller does NOT own a reference to this,
5.336 - * and must call purple_imgstore_ref() if it wants one.
5.337 - * @since 2.5.0
5.338 - */
5.339 -PurpleStoredImage *
5.340 -purple_buddy_icons_node_set_custom_icon_from_file(PurpleBlistNode *node,
5.341 - const gchar *filename);
5.342 -
5.343 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_BUDDYICON_C_)
5.344 -/**
5.345 - * PurpleContact version of purple_buddy_icons_node_has_custom_icon.
5.346 - *
5.347 - * @copydoc purple_buddy_icons_node_has_custom_icon()
5.348 - *
5.349 - * @deprecated Use purple_buddy_icons_node_has_custom_icon instead.
5.350 - */
5.351 -gboolean
5.352 -purple_buddy_icons_has_custom_icon(PurpleContact *contact);
5.353 -
5.354 -/**
5.355 - * PurpleContact version of purple_buddy_icons_node_find_custom_icon.
5.356 - *
5.357 - * @copydoc purple_buddy_icons_node_find_custom_icon()
5.358 - *
5.359 - * @deprecated Use purple_buddy_icons_node_find_custom_icon instead.
5.360 - */
5.361 -PurpleStoredImage *
5.362 -purple_buddy_icons_find_custom_icon(PurpleContact *contact);
5.363 -
5.364 -/**
5.365 - * PurpleContact version of purple_buddy_icons_node_set_custom_icon.
5.366 - *
5.367 - * @copydoc purple_buddy_icons_node_set_custom_icon()
5.368 - *
5.369 - * @deprecated Use purple_buddy_icons_node_set_custom_icon instead.
5.370 - */
5.371 -PurpleStoredImage *
5.372 -purple_buddy_icons_set_custom_icon(PurpleContact *contact,
5.373 - guchar *icon_data, size_t icon_len);
5.374 -#endif
5.375 -
5.376 -/**
5.377 - * Sets whether or not buddy icon caching is enabled.
5.378 - *
5.379 - * @param caching TRUE of buddy icon caching should be enabled, or
5.380 - * FALSE otherwise.
5.381 - */
5.382 -void purple_buddy_icons_set_caching(gboolean caching);
5.383 -
5.384 -/**
5.385 - * Returns whether or not buddy icon caching should be enabled.
5.386 - *
5.387 - * The default is TRUE, unless otherwise specified by
5.388 - * purple_buddy_icons_set_caching().
5.389 - *
5.390 - * @return TRUE if buddy icon caching is enabled, or FALSE otherwise.
5.391 - */
5.392 -gboolean purple_buddy_icons_is_caching(void);
5.393 -
5.394 -/**
5.395 - * Sets the directory used to store buddy icon cache files.
5.396 - *
5.397 - * @param cache_dir The directory to store buddy icon cache files to.
5.398 - */
5.399 -void purple_buddy_icons_set_cache_dir(const char *cache_dir);
5.400 -
5.401 -/**
5.402 - * Returns the directory used to store buddy icon cache files.
5.403 - *
5.404 - * The default directory is PURPLEDIR/icons, unless otherwise specified
5.405 - * by purple_buddy_icons_set_cache_dir().
5.406 - *
5.407 - * @return The directory to store buddy icon cache files to.
5.408 - */
5.409 -const char *purple_buddy_icons_get_cache_dir(void);
5.410 -
5.411 -/**
5.412 - * Returns the buddy icon subsystem handle.
5.413 - *
5.414 - * @return The subsystem handle.
5.415 - */
5.416 -void *purple_buddy_icons_get_handle(void);
5.417 -
5.418 -/**
5.419 - * Initializes the buddy icon subsystem.
5.420 - */
5.421 -void purple_buddy_icons_init(void);
5.422 -
5.423 -/**
5.424 - * Uninitializes the buddy icon subsystem.
5.425 - */
5.426 -void purple_buddy_icons_uninit(void);
5.427 -
5.428 -/*@}*/
5.429 -
5.430 -/**************************************************************************/
5.431 -/** @name Buddy Icon Helper API */
5.432 -/**************************************************************************/
5.433 -/*@{*/
5.434 -
5.435 -/**
5.436 - * Gets display size for a buddy icon
5.437 - */
5.438 -void purple_buddy_icon_get_scale_size(PurpleBuddyIconSpec *spec, int *width, int *height);
5.439 -
5.440 -/*@}*/
5.441 -
5.442 -#ifdef __cplusplus
5.443 -}
5.444 -#endif
5.445 -
5.446 -#endif /* _PURPLE_BUDDYICON_H_ */
6.1 --- a/Frameworks/libpurple.framework/Versions/0.5.6/Headers/buddylist.h Sun Jun 21 22:04:11 2009 -0400
6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
6.3 @@ -1,65 +0,0 @@
6.4 -/**
6.5 - * @file buddylist.h
6.6 - *
6.7 - * purple
6.8 - *
6.9 - * Copyright (C) 2005 Bartosz Oler <bartosz@bzimage.us>
6.10 - *
6.11 - * This program is free software; you can redistribute it and/or modify
6.12 - * it under the terms of the GNU General Public License as published by
6.13 - * the Free Software Foundation; either version 2 of the License, or
6.14 - * (at your option) any later version.
6.15 - *
6.16 - * This program is distributed in the hope that it will be useful,
6.17 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
6.18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6.19 - * GNU General Public License for more details.
6.20 - *
6.21 - * You should have received a copy of the GNU General Public License
6.22 - * along with this program; if not, write to the Free Software
6.23 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
6.24 - */
6.25 -
6.26 -
6.27 -#ifndef _PURPLE_GG_BUDDYLIST_H
6.28 -#define _PURPLE_GG_BUDDYLIST_H
6.29 -
6.30 -#include "connection.h"
6.31 -#include "account.h"
6.32 -
6.33 -void
6.34 -ggp_buddylist_send(PurpleConnection *gc);
6.35 -
6.36 -/**
6.37 - * Load buddylist from server into the rooster.
6.38 - *
6.39 - * @param gc PurpleConnection
6.40 - * @param buddylist Pointer to the buddylist that will be loaded.
6.41 - */
6.42 -/* void ggp_buddylist_load(PurpleConnection *gc, char *buddylist) {{{ */
6.43 -void
6.44 -ggp_buddylist_load(PurpleConnection *gc, char *buddylist);
6.45 -
6.46 -/**
6.47 - * Set offline status for all buddies.
6.48 - *
6.49 - * @param gc Connection handler
6.50 - */
6.51 -void
6.52 -ggp_buddylist_offline(PurpleConnection *gc);
6.53 -
6.54 -/**
6.55 - * Get all the buddies in the current account.
6.56 - *
6.57 - * @param account Current account.
6.58 - *
6.59 - * @return List of buddies.
6.60 - */
6.61 -char *
6.62 -ggp_buddylist_dump(PurpleAccount *account);
6.63 -
6.64 -
6.65 -#endif /* _PURPLE_GG_BUDDYLIST_H */
6.66 -
6.67 -
6.68 -/* vim: set ts=8 sts=0 sw=8 noet: */
7.1 --- a/Frameworks/libpurple.framework/Versions/0.5.6/Headers/caps.h Sun Jun 21 22:04:11 2009 -0400
7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
7.3 @@ -1,49 +0,0 @@
7.4 -/*
7.5 - * purple - Jabber Protocol Plugin
7.6 - *
7.7 - * Copyright (C) 2007, Andreas Monitzer <andy@monitzer.com>
7.8 - *
7.9 - * This program is free software; you can redistribute it and/or modify
7.10 - * it under the terms of the GNU General Public License as published by
7.11 - * the Free Software Foundation; either version 2 of the License, or
7.12 - * (at your option) any later version.
7.13 - *
7.14 - * This program is distributed in the hope that it will be useful,
7.15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
7.16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7.17 - * GNU General Public License for more details.
7.18 - *
7.19 - * You should have received a copy of the GNU General Public License
7.20 - * along with this program; if not, write to the Free Software
7.21 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
7.22 - *
7.23 - */
7.24 -
7.25 -#ifndef _PURPLE_JABBER_CAPS_H_
7.26 -#define _PURPLE_JABBER_CAPS_H_
7.27 -
7.28 -typedef struct _JabberCapsClientInfo JabberCapsClientInfo;
7.29 -
7.30 -#include "jabber.h"
7.31 -
7.32 -/* Implementation of XEP-0115 */
7.33 -
7.34 -typedef struct _JabberCapsIdentity {
7.35 - char *category;
7.36 - char *type;
7.37 - char *name;
7.38 -} JabberCapsIdentity;
7.39 -
7.40 -struct _JabberCapsClientInfo {
7.41 - GList *identities; /* JabberCapsIdentity */
7.42 - GList *features; /* char * */
7.43 -};
7.44 -
7.45 -typedef void (*jabber_caps_get_info_cb)(JabberCapsClientInfo *info, gpointer user_data);
7.46 -
7.47 -void jabber_caps_init(void);
7.48 -
7.49 -void jabber_caps_get_info(JabberStream *js, const char *who, const char *node, const char *ver, const char *ext, jabber_caps_get_info_cb cb, gpointer user_data);
7.50 -void jabber_caps_free_clientinfo(JabberCapsClientInfo *clientinfo);
7.51 -
7.52 -#endif /* _PURPLE_JABBER_CAPS_H_ */
8.1 --- a/Frameworks/libpurple.framework/Versions/0.5.6/Headers/certificate.h Sun Jun 21 22:04:11 2009 -0400
8.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
8.3 @@ -1,802 +0,0 @@
8.4 -/**
8.5 - * @file certificate.h Public-Key Certificate API
8.6 - * @ingroup core
8.7 - * @see @ref certificate-signals
8.8 - * @since 2.2.0
8.9 - */
8.10 -
8.11 -/*
8.12 - *
8.13 - * purple
8.14 - *
8.15 - * Purple is the legal property of its developers, whose names are too numerous
8.16 - * to list here. Please refer to the COPYRIGHT file distributed with this
8.17 - * source distribution.
8.18 - *
8.19 - * This program is free software; you can redistribute it and/or modify
8.20 - * it under the terms of the GNU General Public License as published by
8.21 - * the Free Software Foundation; either version 2 of the License, or
8.22 - * (at your option) any later version.
8.23 - *
8.24 - * This program is distributed in the hope that it will be useful,
8.25 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
8.26 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8.27 - * GNU General Public License for more details.
8.28 - *
8.29 - * You should have received a copy of the GNU General Public License
8.30 - * along with this program; if not, write to the Free Software
8.31 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
8.32 - */
8.33 -
8.34 -#ifndef _PURPLE_CERTIFICATE_H
8.35 -#define _PURPLE_CERTIFICATE_H
8.36 -
8.37 -#include <time.h>
8.38 -
8.39 -#include <glib.h>
8.40 -
8.41 -#ifdef __cplusplus
8.42 -extern "C" {
8.43 -#endif /* __cplusplus */
8.44 -
8.45 -
8.46 -typedef enum
8.47 -{
8.48 - PURPLE_CERTIFICATE_INVALID = 0,
8.49 - PURPLE_CERTIFICATE_VALID = 1
8.50 -} PurpleCertificateVerificationStatus;
8.51 -
8.52 -typedef struct _PurpleCertificate PurpleCertificate;
8.53 -typedef struct _PurpleCertificatePool PurpleCertificatePool;
8.54 -typedef struct _PurpleCertificateScheme PurpleCertificateScheme;
8.55 -typedef struct _PurpleCertificateVerifier PurpleCertificateVerifier;
8.56 -typedef struct _PurpleCertificateVerificationRequest PurpleCertificateVerificationRequest;
8.57 -
8.58 -/**
8.59 - * Callback function for the results of a verification check
8.60 - * @param st Status code
8.61 - * @param userdata User-defined data
8.62 - */
8.63 -typedef void (*PurpleCertificateVerifiedCallback)
8.64 - (PurpleCertificateVerificationStatus st,
8.65 - gpointer userdata);
8.66 -
8.67 -/** A certificate instance
8.68 - *
8.69 - * An opaque data structure representing a single certificate under some
8.70 - * CertificateScheme
8.71 - */
8.72 -struct _PurpleCertificate
8.73 -{
8.74 - /** Scheme this certificate is under */
8.75 - PurpleCertificateScheme * scheme;
8.76 - /** Opaque pointer to internal data */
8.77 - gpointer data;
8.78 -};
8.79 -
8.80 -/**
8.81 - * Database for retrieval or storage of Certificates
8.82 - *
8.83 - * More or less a hash table; all lookups and writes are controlled by a string
8.84 - * key.
8.85 - */
8.86 -struct _PurpleCertificatePool
8.87 -{
8.88 - /** Scheme this Pool operates for */
8.89 - gchar *scheme_name;
8.90 - /** Internal name to refer to the pool by */
8.91 - gchar *name;
8.92 -
8.93 - /** User-friendly name for this type
8.94 - * ex: N_("SSL Servers")
8.95 - * When this is displayed anywhere, it should be i18ned
8.96 - * ex: _(pool->fullname)
8.97 - */
8.98 - gchar *fullname;
8.99 -
8.100 - /** Internal pool data */
8.101 - gpointer data;
8.102 -
8.103 - /**
8.104 - * Set up the Pool's internal state
8.105 - *
8.106 - * Upon calling purple_certificate_register_pool() , this function will
8.107 - * be called. May be NULL.
8.108 - * @return TRUE if the initialization succeeded, otherwise FALSE
8.109 - */
8.110 - gboolean (* init)(void);
8.111 -
8.112 - /**
8.113 - * Uninit the Pool's internal state
8.114 - *
8.115 - * Will be called by purple_certificate_unregister_pool() . May be NULL
8.116 - */
8.117 - void (* uninit)(void);
8.118 -
8.119 - /** Check for presence of a certificate in the pool using unique ID */
8.120 - gboolean (* cert_in_pool)(const gchar *id);
8.121 - /** Retrieve a PurpleCertificate from the pool */
8.122 - PurpleCertificate * (* get_cert)(const gchar *id);
8.123 - /** Add a certificate to the pool. Must overwrite any other
8.124 - * certificates sharing the same ID in the pool.
8.125 - * @return TRUE if the operation succeeded, otherwise FALSE
8.126 - */
8.127 - gboolean (* put_cert)(const gchar *id, PurpleCertificate *crt);
8.128 - /** Delete a certificate from the pool */
8.129 - gboolean (* delete_cert)(const gchar *id);
8.130 -
8.131 - /** Returns a list of IDs stored in the pool */
8.132 - GList * (* get_idlist)(void);
8.133 -
8.134 - void (*_purple_reserved1)(void);
8.135 - void (*_purple_reserved2)(void);
8.136 - void (*_purple_reserved3)(void);
8.137 - void (*_purple_reserved4)(void);
8.138 -};
8.139 -
8.140 -/** A certificate type
8.141 - *
8.142 - * A CertificateScheme must implement all of the fields in the structure,
8.143 - * and register it using purple_certificate_register_scheme()
8.144 - *
8.145 - * There may be only ONE CertificateScheme provided for each certificate
8.146 - * type, as specified by the "name" field.
8.147 - */
8.148 -struct _PurpleCertificateScheme
8.149 -{
8.150 - /** Name of the certificate type
8.151 - * ex: "x509", "pgp", etc.
8.152 - * This must be globally unique - you may not register more than one
8.153 - * CertificateScheme of the same name at a time.
8.154 - */
8.155 - gchar * name;
8.156 -
8.157 - /** User-friendly name for this type
8.158 - * ex: N_("X.509 Certificates")
8.159 - * When this is displayed anywhere, it should be i18ned
8.160 - * ex: _(scheme->fullname)
8.161 - */
8.162 - gchar * fullname;
8.163 -
8.164 - /** Imports a certificate from a file
8.165 - *
8.166 - * @param filename File to import the certificate from
8.167 - * @return Pointer to the newly allocated Certificate struct
8.168 - * or NULL on failure.
8.169 - */
8.170 - PurpleCertificate * (* import_certificate)(const gchar * filename);
8.171 -
8.172 - /**
8.173 - * Exports a certificate to a file
8.174 - *
8.175 - * @param filename File to export the certificate to
8.176 - * @param crt Certificate to export
8.177 - * @return TRUE if the export succeeded, otherwise FALSE
8.178 - * @see purple_certificate_export()
8.179 - */
8.180 - gboolean (* export_certificate)(const gchar *filename, PurpleCertificate *crt);
8.181 -
8.182 - /**
8.183 - * Duplicates a certificate
8.184 - *
8.185 - * Certificates are generally assumed to be read-only, so feel free to
8.186 - * do any sort of reference-counting magic you want here. If this ever
8.187 - * changes, please remember to change the magic accordingly.
8.188 - * @return Reference to the new copy
8.189 - */
8.190 - PurpleCertificate * (* copy_certificate)(PurpleCertificate *crt);
8.191 -
8.192 - /** Destroys and frees a Certificate structure
8.193 - *
8.194 - * Destroys a Certificate's internal data structures and calls
8.195 - * free(crt)
8.196 - *
8.197 - * @param crt Certificate instance to be destroyed. It WILL NOT be
8.198 - * destroyed if it is not of the correct
8.199 - * CertificateScheme. Can be NULL
8.200 - */
8.201 - void (* destroy_certificate)(PurpleCertificate * crt);
8.202 -
8.203 - /** Find whether "crt" has a valid signature from issuer "issuer"
8.204 - * @see purple_certificate_signed_by() */
8.205 - gboolean (*signed_by)(PurpleCertificate *crt, PurpleCertificate *issuer);
8.206 - /**
8.207 - * Retrieves the certificate public key fingerprint using SHA1
8.208 - *
8.209 - * @param crt Certificate instance
8.210 - * @return Binary representation of SHA1 hash - must be freed using
8.211 - * g_byte_array_free()
8.212 - */
8.213 - GByteArray * (* get_fingerprint_sha1)(PurpleCertificate *crt);
8.214 -
8.215 - /**
8.216 - * Retrieves a unique certificate identifier
8.217 - *
8.218 - * @param crt Certificate instance
8.219 - * @return Newly allocated string that can be used to uniquely
8.220 - * identify the certificate.
8.221 - */
8.222 - gchar * (* get_unique_id)(PurpleCertificate *crt);
8.223 -
8.224 - /**
8.225 - * Retrieves a unique identifier for the certificate's issuer
8.226 - *
8.227 - * @param crt Certificate instance
8.228 - * @return Newly allocated string that can be used to uniquely
8.229 - * identify the issuer's certificate.
8.230 - */
8.231 - gchar * (* get_issuer_unique_id)(PurpleCertificate *crt);
8.232 -
8.233 - /**
8.234 - * Gets the certificate subject's name
8.235 - *
8.236 - * For X.509, this is the "Common Name" field, as we're only using it
8.237 - * for hostname verification at the moment
8.238 - *
8.239 - * @see purple_certificate_get_subject_name()
8.240 - *
8.241 - * @param crt Certificate instance
8.242 - * @return Newly allocated string with the certificate subject.
8.243 - */
8.244 - gchar * (* get_subject_name)(PurpleCertificate *crt);
8.245 -
8.246 - /**
8.247 - * Check the subject name against that on the certificate
8.248 - * @see purple_certificate_check_subject_name()
8.249 - * @return TRUE if it is a match, else FALSE
8.250 - */
8.251 - gboolean (* check_subject_name)(PurpleCertificate *crt, const gchar *name);
8.252 -
8.253 - /** Retrieve the certificate activation/expiration times */
8.254 - gboolean (* get_times)(PurpleCertificate *crt, time_t *activation, time_t *expiration);
8.255 -
8.256 - void (*_purple_reserved1)(void);
8.257 - void (*_purple_reserved2)(void);
8.258 - void (*_purple_reserved3)(void);
8.259 - void (*_purple_reserved4)(void);
8.260 -};
8.261 -
8.262 -/** A set of operations used to provide logic for verifying a Certificate's
8.263 - * authenticity.
8.264 - *
8.265 - * A Verifier provider must fill out these fields, then register it using
8.266 - * purple_certificate_register_verifier()
8.267 - *
8.268 - * The (scheme_name, name) value must be uniqu