1.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/account.h Fri Aug 21 13:24:36 2009 -0700
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,1065 +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 "privacy.h"
1.49 -#include "proxy.h"
1.50 -#include "prpl.h"
1.51 -#include "status.h"
1.52 -
1.53 -/**
1.54 - * Account request types.
1.55 - */
1.56 -typedef enum
1.57 -{
1.58 - PURPLE_ACCOUNT_REQUEST_AUTHORIZATION = 0 /* Account authorization request */
1.59 -} PurpleAccountRequestType;
1.60 -
1.61 -
1.62 -/** Account UI operations, used to notify the user of status changes and when
1.63 - * buddies add this account to their buddy lists.
1.64 - */
1.65 -struct _PurpleAccountUiOps
1.66 -{
1.67 - /** A buddy who is already on this account's buddy list added this account
1.68 - * to their buddy list.
1.69 - */
1.70 - void (*notify_added)(PurpleAccount *account,
1.71 - const char *remote_user,
1.72 - const char *id,
1.73 - const char *alias,
1.74 - const char *message);
1.75 -
1.76 - /** This account's status changed. */
1.77 - void (*status_changed)(PurpleAccount *account,
1.78 - PurpleStatus *status);
1.79 -
1.80 - /** Someone we don't have on our list added us; prompt to add them. */
1.81 - void (*request_add)(PurpleAccount *account,
1.82 - const char *remote_user,
1.83 - const char *id,
1.84 - const char *alias,
1.85 - const char *message);
1.86 -
1.87 - /** Prompt for authorization when someone adds this account to their buddy
1.88 - * list. To authorize them to see this account's presence, call \a
1.89 - * authorize_cb (\a user_data); otherwise call \a deny_cb (\a user_data);
1.90 - * @return a UI-specific handle, as passed to #close_account_request.
1.91 - */
1.92 - void *(*request_authorize)(PurpleAccount *account,
1.93 - const char *remote_user,
1.94 - const char *id,
1.95 - const char *alias,
1.96 - const char *message,
1.97 - gboolean on_list,
1.98 - PurpleAccountRequestAuthorizationCb authorize_cb,
1.99 - PurpleAccountRequestAuthorizationCb deny_cb,
1.100 - void *user_data);
1.101 -
1.102 - /** Close a pending request for authorization. \a ui_handle is a handle
1.103 - * as returned by #request_authorize.
1.104 - */
1.105 - void (*close_account_request)(void *ui_handle);
1.106 -
1.107 - void (*_purple_reserved1)(void);
1.108 - void (*_purple_reserved2)(void);
1.109 - void (*_purple_reserved3)(void);
1.110 - void (*_purple_reserved4)(void);
1.111 -};
1.112 -
1.113 -/** Structure representing an account.
1.114 - */
1.115 -struct _PurpleAccount
1.116 -{
1.117 - char *username; /**< The username. */
1.118 - char *alias; /**< How you appear to yourself. */
1.119 - char *password; /**< The account password. */
1.120 - char *user_info; /**< User information. */
1.121 -
1.122 - char *buddy_icon_path; /**< The buddy icon's non-cached path. */
1.123 -
1.124 - gboolean remember_pass; /**< Remember the password. */
1.125 -
1.126 - char *protocol_id; /**< The ID of the protocol. */
1.127 -
1.128 - PurpleConnection *gc; /**< The connection handle. */
1.129 - gboolean disconnecting; /**< The account is currently disconnecting */
1.130 -
1.131 - GHashTable *settings; /**< Protocol-specific settings. */
1.132 - GHashTable *ui_settings; /**< UI-specific settings. */
1.133 -
1.134 - PurpleProxyInfo *proxy_info; /**< Proxy information. This will be set */
1.135 - /* to NULL when the account inherits */
1.136 - /* proxy settings from global prefs. */
1.137 -
1.138 - /*
1.139 - * TODO: Supplementing the next two linked lists with hash tables
1.140 - * should help performance a lot when these lists are long. This
1.141 - * matters quite a bit for protocols like MSN, where all your
1.142 - * buddies are added to your permit list. Currently we have to
1.143 - * iterate through the entire list if we want to check if someone
1.144 - * is permitted or denied. We should do this for 3.0.0.
1.145 - */
1.146 - GSList *permit; /**< Permit list. */
1.147 - GSList *deny; /**< Deny list. */
1.148 - PurplePrivacyType perm_deny; /**< The permit/deny setting. */
1.149 -
1.150 - GList *status_types; /**< Status types. */
1.151 -
1.152 - PurplePresence *presence; /**< Presence. */
1.153 - PurpleLog *system_log; /**< The system log */
1.154 -
1.155 - void *ui_data; /**< The UI can put data here. */
1.156 - PurpleAccountRegistrationCb registration_cb;
1.157 - void *registration_cb_user_data;
1.158 -
1.159 - gpointer priv; /**< Pointer to opaque private data. */
1.160 -};
1.161 -
1.162 -#ifdef __cplusplus
1.163 -extern "C" {
1.164 -#endif
1.165 -
1.166 -/**************************************************************************/
1.167 -/** @name Account API */
1.168 -/**************************************************************************/
1.169 -/*@{*/
1.170 -
1.171 -/**
1.172 - * Creates a new account.
1.173 - *
1.174 - * @param username The username.
1.175 - * @param protocol_id The protocol ID.
1.176 - *
1.177 - * @return The new account.
1.178 - */
1.179 -PurpleAccount *purple_account_new(const char *username, const char *protocol_id);
1.180 -
1.181 -/**
1.182 - * Destroys an account.
1.183 - *
1.184 - * @param account The account to destroy.
1.185 - */
1.186 -void purple_account_destroy(PurpleAccount *account);
1.187 -
1.188 -/**
1.189 - * Connects to an account.
1.190 - *
1.191 - * @param account The account to connect to.
1.192 - */
1.193 -void purple_account_connect(PurpleAccount *account);
1.194 -
1.195 -/**
1.196 - * Sets the callback for successful registration.
1.197 - *
1.198 - * @param account The account for which this callback should be used
1.199 - * @param cb The callback
1.200 - * @param user_data The user data passed to the callback
1.201 - */
1.202 -void purple_account_set_register_callback(PurpleAccount *account, PurpleAccountRegistrationCb cb, void *user_data);
1.203 -
1.204 -/**
1.205 - * Registers an account.
1.206 - *
1.207 - * @param account The account to register.
1.208 - */
1.209 -void purple_account_register(PurpleAccount *account);
1.210 -
1.211 -/**
1.212 - * Unregisters an account (deleting it from the server).
1.213 - *
1.214 - * @param account The account to unregister.
1.215 - * @param cb Optional callback to be called when unregistration is complete
1.216 - * @param user_data user data to pass to the callback
1.217 - */
1.218 -void purple_account_unregister(PurpleAccount *account, PurpleAccountUnregistrationCb cb, void *user_data);
1.219 -
1.220 -/**
1.221 - * Disconnects from an account.
1.222 - *
1.223 - * @param account The account to disconnect from.
1.224 - */
1.225 -void purple_account_disconnect(PurpleAccount *account);
1.226 -
1.227 -/**
1.228 - * Notifies the user that the account was added to a remote user's
1.229 - * buddy list.
1.230 - *
1.231 - * This will present a dialog informing the user that he was added to the
1.232 - * remote user's buddy list.
1.233 - *
1.234 - * @param account The account that was added.
1.235 - * @param remote_user The name of the user that added this account.
1.236 - * @param id The optional ID of the local account. Rarely used.
1.237 - * @param alias The optional alias of the user.
1.238 - * @param message The optional message sent from the user adding you.
1.239 - */
1.240 -void purple_account_notify_added(PurpleAccount *account, const char *remote_user,
1.241 - const char *id, const char *alias,
1.242 - const char *message);
1.243 -
1.244 -/**
1.245 - * Notifies the user that the account was addded to a remote user's buddy
1.246 - * list and asks ther user if they want to add the remote user to their buddy
1.247 - * list.
1.248 - *
1.249 - * This will present a dialog informing the local user that the remote user
1.250 - * added them to the remote user's buddy list and will ask if they want to add
1.251 - * the remote user to the buddy list.
1.252 - *
1.253 - * @param account The account that was added.
1.254 - * @param remote_user The name of the user that added this account.
1.255 - * @param id The optional ID of the local account. Rarely used.
1.256 - * @param alias The optional alias of the user.
1.257 - * @param message The optional message sent from the user adding you.
1.258 - */
1.259 -void purple_account_request_add(PurpleAccount *account, const char *remote_user,
1.260 - const char *id, const char *alias,
1.261 - const char *message);
1.262 -
1.263 -/**
1.264 - * Notifies the user that a remote user has wants to add the local user
1.265 - * to his or her buddy list and requires authorization to do so.
1.266 - *
1.267 - * This will present a dialog informing the user of this and ask if the
1.268 - * user authorizes or denies the remote user from adding him.
1.269 - *
1.270 - * @param account The account that was added
1.271 - * @param remote_user The name of the user that added this account.
1.272 - * @param id The optional ID of the local account. Rarely used.
1.273 - * @param alias The optional alias of the remote user.
1.274 - * @param message The optional message sent by the user wanting to add you.
1.275 - * @param on_list Is the remote user already on the buddy list?
1.276 - * @param auth_cb The callback called when the local user accepts
1.277 - * @param deny_cb The callback called when the local user rejects
1.278 - * @param user_data Data to be passed back to the above callbacks
1.279 - *
1.280 - * @return A UI-specific handle.
1.281 - */
1.282 -void *purple_account_request_authorization(PurpleAccount *account, const char *remote_user,
1.283 - const char *id, const char *alias, const char *message, gboolean on_list,
1.284 - PurpleAccountRequestAuthorizationCb auth_cb, PurpleAccountRequestAuthorizationCb deny_cb, void *user_data);
1.285 -
1.286 -/**
1.287 - * Close account requests registered for the given PurpleAccount
1.288 - *
1.289 - * @param account The account for which requests should be closed
1.290 - */
1.291 -void purple_account_request_close_with_account(PurpleAccount *account);
1.292 -
1.293 -/**
1.294 - * Close the account request for the given ui handle
1.295 - *
1.296 - * @param ui_handle The ui specific handle for which requests should be closed
1.297 - */
1.298 -void purple_account_request_close(void *ui_handle);
1.299 -
1.300 -/**
1.301 - * Requests a password from the user for the account. Does not set the
1.302 - * account password on success; do that in ok_cb if desired.
1.303 - *
1.304 - * @param account The account to request the password for.
1.305 - * @param ok_cb The callback for the OK button.
1.306 - * @param cancel_cb The callback for the cancel button.
1.307 - * @param user_data User data to be passed into callbacks.
1.308 - */
1.309 -void purple_account_request_password(PurpleAccount *account, GCallback ok_cb,
1.310 - GCallback cancel_cb, void *user_data);
1.311 -
1.312 -/**
1.313 - * Requests information from the user to change the account's password.
1.314 - *
1.315 - * @param account The account to change the password on.
1.316 - */
1.317 -void purple_account_request_change_password(PurpleAccount *account);
1.318 -
1.319 -/**
1.320 - * Requests information from the user to change the account's
1.321 - * user information.
1.322 - *
1.323 - * @param account The account to change the user information on.
1.324 - */
1.325 -void purple_account_request_change_user_info(PurpleAccount *account);
1.326 -
1.327 -/**
1.328 - * Sets the account's username.
1.329 - *
1.330 - * @param account The account.
1.331 - * @param username The username.
1.332 - */
1.333 -void purple_account_set_username(PurpleAccount *account, const char *username);
1.334 -
1.335 -/**
1.336 - * Sets the account's password.
1.337 - *
1.338 - * @param account The account.
1.339 - * @param password The password.
1.340 - */
1.341 -void purple_account_set_password(PurpleAccount *account, const char *password);
1.342 -
1.343 -/**
1.344 - * Sets the account's alias.
1.345 - *
1.346 - * @param account The account.
1.347 - * @param alias The alias.
1.348 - */
1.349 -void purple_account_set_alias(PurpleAccount *account, const char *alias);
1.350 -
1.351 -/**
1.352 - * Sets the account's user information
1.353 - *
1.354 - * @param account The account.
1.355 - * @param user_info The user information.
1.356 - */
1.357 -void purple_account_set_user_info(PurpleAccount *account, const char *user_info);
1.358 -
1.359 -/**
1.360 - * Sets the account's buddy icon path.
1.361 - *
1.362 - * @param account The account.
1.363 - * @param path The buddy icon non-cached path.
1.364 - */
1.365 -void purple_account_set_buddy_icon_path(PurpleAccount *account, const char *path);
1.366 -
1.367 -/**
1.368 - * Sets the account's protocol ID.
1.369 - *
1.370 - * @param account The account.
1.371 - * @param protocol_id The protocol ID.
1.372 - */
1.373 -void purple_account_set_protocol_id(PurpleAccount *account,
1.374 - const char *protocol_id);
1.375 -
1.376 -/**
1.377 - * Sets the account's connection.
1.378 - *
1.379 - * @param account The account.
1.380 - * @param gc The connection.
1.381 - */
1.382 -void purple_account_set_connection(PurpleAccount *account, PurpleConnection *gc);
1.383 -
1.384 -/**
1.385 - * Sets whether or not this account should save its password.
1.386 - *
1.387 - * @param account The account.
1.388 - * @param value @c TRUE if it should remember the password.
1.389 - */
1.390 -void purple_account_set_remember_password(PurpleAccount *account, gboolean value);
1.391 -
1.392 -/**
1.393 - * Sets whether or not this account should check for mail.
1.394 - *
1.395 - * @param account The account.
1.396 - * @param value @c TRUE if it should check for mail.
1.397 - */
1.398 -void purple_account_set_check_mail(PurpleAccount *account, gboolean value);
1.399 -
1.400 -/**
1.401 - * Sets whether or not this account is enabled for the specified
1.402 - * UI.
1.403 - *
1.404 - * @param account The account.
1.405 - * @param ui The UI.
1.406 - * @param value @c TRUE if it is enabled.
1.407 - */
1.408 -void purple_account_set_enabled(PurpleAccount *account, const char *ui,
1.409 - gboolean value);
1.410 -
1.411 -/**
1.412 - * Sets the account's proxy information.
1.413 - *
1.414 - * @param account The account.
1.415 - * @param info The proxy information.
1.416 - */
1.417 -void purple_account_set_proxy_info(PurpleAccount *account, PurpleProxyInfo *info);
1.418 -
1.419 -/**
1.420 - * Sets the account's status types.
1.421 - *
1.422 - * @param account The account.
1.423 - * @param status_types The list of status types.
1.424 - */
1.425 -void purple_account_set_status_types(PurpleAccount *account, GList *status_types);
1.426 -
1.427 -/**
1.428 - * Variadic version of purple_account_set_status_list(); the variadic list
1.429 - * replaces @a attrs, and should be <tt>NULL</tt>-terminated.
1.430 - *
1.431 - * @copydoc purple_account_set_status_list()
1.432 - */
1.433 -void purple_account_set_status(PurpleAccount *account, const char *status_id,
1.434 - gboolean active, ...) G_GNUC_NULL_TERMINATED;
1.435 -
1.436 -
1.437 -/**
1.438 - * Activates or deactivates a status. All changes to the statuses of
1.439 - * an account go through this function or purple_account_set_status().
1.440 - *
1.441 - * You can only deactivate an exclusive status by activating another exclusive
1.442 - * status. So, if @a status_id is an exclusive status and @a active is @c
1.443 - * FALSE, this function does nothing.
1.444 - *
1.445 - * @param account The account.
1.446 - * @param status_id The ID of the status.
1.447 - * @param active Whether @a status_id is to be activated (<tt>TRUE</tt>) or
1.448 - * deactivated (<tt>FALSE</tt>).
1.449 - * @param attrs A list of <tt>const char *</tt> attribute names followed by
1.450 - * <tt>const char *</tt> attribute values for the status.
1.451 - * (For example, one pair might be <tt>"message"</tt> followed
1.452 - * by <tt>"hello, talk to me!"</tt>.)
1.453 - */
1.454 -void purple_account_set_status_list(PurpleAccount *account,
1.455 - const char *status_id, gboolean active, GList *attrs);
1.456 -
1.457 -/**
1.458 - * Clears all protocol-specific settings on an account.
1.459 - *
1.460 - * @param account The account.
1.461 - */
1.462 -void purple_account_clear_settings(PurpleAccount *account);
1.463 -
1.464 -/**
1.465 - * Removes an account-specific setting by name.
1.466 - *
1.467 - * @param account The account.
1.468 - * @param setting The setting to remove.
1.469 - *
1.470 - * @since 2.6.0
1.471 - */
1.472 -void purple_account_remove_setting(PurpleAccount *account, const char *setting);
1.473 -
1.474 -/**
1.475 - * Sets a protocol-specific integer setting for an account.
1.476 - *
1.477 - * @param account The account.
1.478 - * @param name The name of the setting.
1.479 - * @param value The setting's value.
1.480 - */
1.481 -void purple_account_set_int(PurpleAccount *account, const char *name, int value);
1.482 -
1.483 -/**
1.484 - * Sets a protocol-specific string setting for an account.
1.485 - *
1.486 - * @param account The account.
1.487 - * @param name The name of the setting.
1.488 - * @param value The setting's value.
1.489 - */
1.490 -void purple_account_set_string(PurpleAccount *account, const char *name,
1.491 - const char *value);
1.492 -
1.493 -/**
1.494 - * Sets a protocol-specific boolean setting for an account.
1.495 - *
1.496 - * @param account The account.
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_bool(PurpleAccount *account, const char *name,
1.501 - gboolean value);
1.502 -
1.503 -/**
1.504 - * Sets a UI-specific integer 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_int(PurpleAccount *account, const char *ui,
1.512 - const char *name, int value);
1.513 -
1.514 -/**
1.515 - * Sets a UI-specific string 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_string(PurpleAccount *account, const char *ui,
1.523 - const char *name, const char *value);
1.524 -
1.525 -/**
1.526 - * Sets a UI-specific boolean setting for an account.
1.527 - *
1.528 - * @param account The account.
1.529 - * @param ui The UI name.
1.530 - * @param name The name of the setting.
1.531 - * @param value The setting's value.
1.532 - */
1.533 -void purple_account_set_ui_bool(PurpleAccount *account, const char *ui,
1.534 - const char *name, gboolean value);
1.535 -
1.536 -/**
1.537 - * Returns whether or not the account is connected.
1.538 - *
1.539 - * @param account The account.
1.540 - *
1.541 - * @return @c TRUE if connected, or @c FALSE otherwise.
1.542 - */
1.543 -gboolean purple_account_is_connected(const PurpleAccount *account);
1.544 -
1.545 -/**
1.546 - * Returns whether or not the account is connecting.
1.547 - *
1.548 - * @param account The account.
1.549 - *
1.550 - * @return @c TRUE if connecting, or @c FALSE otherwise.
1.551 - */
1.552 -gboolean purple_account_is_connecting(const PurpleAccount *account);
1.553 -
1.554 -/**
1.555 - * Returns whether or not the account is disconnected.
1.556 - *
1.557 - * @param account The account.
1.558 - *
1.559 - * @return @c TRUE if disconnected, or @c FALSE otherwise.
1.560 - */
1.561 -gboolean purple_account_is_disconnected(const PurpleAccount *account);
1.562 -
1.563 -/**
1.564 - * Returns the account's username.
1.565 - *
1.566 - * @param account The account.
1.567 - *
1.568 - * @return The username.
1.569 - */
1.570 -const char *purple_account_get_username(const PurpleAccount *account);
1.571 -
1.572 -/**
1.573 - * Returns the account's password.
1.574 - *
1.575 - * @param account The account.
1.576 - *
1.577 - * @return The password.
1.578 - */
1.579 -const char *purple_account_get_password(const PurpleAccount *account);
1.580 -
1.581 -/**
1.582 - * Returns the account's alias.
1.583 - *
1.584 - * @param account The account.
1.585 - *
1.586 - * @return The alias.
1.587 - */
1.588 -const char *purple_account_get_alias(const PurpleAccount *account);
1.589 -
1.590 -/**
1.591 - * Returns the account's user information.
1.592 - *
1.593 - * @param account The account.
1.594 - *
1.595 - * @return The user information.
1.596 - */
1.597 -const char *purple_account_get_user_info(const PurpleAccount *account);
1.598 -
1.599 -/**
1.600 - * Gets the account's buddy icon path.
1.601 - *
1.602 - * @param account The account.
1.603 - *
1.604 - * @return The buddy icon's non-cached path.
1.605 - */
1.606 -const char *purple_account_get_buddy_icon_path(const PurpleAccount *account);
1.607 -
1.608 -/**
1.609 - * Returns the account's protocol ID.
1.610 - *
1.611 - * @param account The account.
1.612 - *
1.613 - * @return The protocol ID.
1.614 - */
1.615 -const char *purple_account_get_protocol_id(const PurpleAccount *account);
1.616 -
1.617 -/**
1.618 - * Returns the account's protocol name.
1.619 - *
1.620 - * @param account The account.
1.621 - *
1.622 - * @return The protocol name.
1.623 - */
1.624 -const char *purple_account_get_protocol_name(const PurpleAccount *account);
1.625 -
1.626 -/**
1.627 - * Returns the account's connection.
1.628 - *
1.629 - * @param account The account.
1.630 - *
1.631 - * @return The connection.
1.632 - */
1.633 -PurpleConnection *purple_account_get_connection(const PurpleAccount *account);
1.634 -
1.635 -/**
1.636 - * Returns whether or not this account should save its password.
1.637 - *
1.638 - * @param account The account.
1.639 - *
1.640 - * @return @c TRUE if it should remember the password.
1.641 - */
1.642 -gboolean purple_account_get_remember_password(const PurpleAccount *account);
1.643 -
1.644 -/**
1.645 - * Returns whether or not this account should check for mail.
1.646 - *
1.647 - * @param account The account.
1.648 - *
1.649 - * @return @c TRUE if it should check for mail.
1.650 - */
1.651 -gboolean purple_account_get_check_mail(const PurpleAccount *account);
1.652 -
1.653 -/**
1.654 - * Returns whether or not this account is enabled for the
1.655 - * specified UI.
1.656 - *
1.657 - * @param account The account.
1.658 - * @param ui The UI.
1.659 - *
1.660 - * @return @c TRUE if it enabled on this UI.
1.661 - */
1.662 -gboolean purple_account_get_enabled(const PurpleAccount *account,
1.663 - const char *ui);
1.664 -
1.665 -/**
1.666 - * Returns the account's proxy information.
1.667 - *
1.668 - * @param account The account.
1.669 - *
1.670 - * @return The proxy information.
1.671 - */
1.672 -PurpleProxyInfo *purple_account_get_proxy_info(const PurpleAccount *account);
1.673 -
1.674 -/**
1.675 - * Returns the active status for this account. This looks through
1.676 - * the PurplePresence associated with this account and returns the
1.677 - * PurpleStatus that has its active flag set to "TRUE." There can be
1.678 - * only one active PurpleStatus in a PurplePresence.
1.679 - *
1.680 - * @param account The account.
1.681 - *
1.682 - * @return The active status.
1.683 - */
1.684 -PurpleStatus *purple_account_get_active_status(const PurpleAccount *account);
1.685 -
1.686 -/**
1.687 - * Returns the account status with the specified ID.
1.688 - *
1.689 - * Note that this works differently than purple_buddy_get_status() in that
1.690 - * it will only return NULL if the status was not registered.
1.691 - *
1.692 - * @param account The account.
1.693 - * @param status_id The status ID.
1.694 - *
1.695 - * @return The status, or NULL if it was never registered.
1.696 - */
1.697 -PurpleStatus *purple_account_get_status(const PurpleAccount *account,
1.698 - const char *status_id);
1.699 -
1.700 -/**
1.701 - * Returns the account status type with the specified ID.
1.702 - *
1.703 - * @param account The account.
1.704 - * @param id The ID of the status type to find.
1.705 - *
1.706 - * @return The status type if found, or NULL.
1.707 - */
1.708 -PurpleStatusType *purple_account_get_status_type(const PurpleAccount *account,
1.709 - const char *id);
1.710 -
1.711 -/**
1.712 - * Returns the account status type with the specified primitive.
1.713 - * Note: It is possible for an account to have more than one
1.714 - * PurpleStatusType with the same primitive. In this case, the
1.715 - * first PurpleStatusType is returned.
1.716 - *
1.717 - * @param account The account.
1.718 - * @param primitive The type of the status type to find.
1.719 - *
1.720 - * @return The status if found, or NULL.
1.721 - */
1.722 -PurpleStatusType *purple_account_get_status_type_with_primitive(
1.723 - const PurpleAccount *account,
1.724 - PurpleStatusPrimitive primitive);
1.725 -
1.726 -/**
1.727 - * Returns the account's presence.
1.728 - *
1.729 - * @param account The account.
1.730 - *
1.731 - * @return The account's presence.
1.732 - */
1.733 -PurplePresence *purple_account_get_presence(const PurpleAccount *account);
1.734 -
1.735 -/**
1.736 - * Returns whether or not an account status is active.
1.737 - *
1.738 - * @param account The account.
1.739 - * @param status_id The status ID.
1.740 - *
1.741 - * @return TRUE if active, or FALSE if not.
1.742 - */
1.743 -gboolean purple_account_is_status_active(const PurpleAccount *account,
1.744 - const char *status_id);
1.745 -
1.746 -/**
1.747 - * Returns the account's status types.
1.748 - *
1.749 - * @param account The account.
1.750 - *
1.751 - * @constreturn The account's status types.
1.752 - */
1.753 -GList *purple_account_get_status_types(const PurpleAccount *account);
1.754 -
1.755 -/**
1.756 - * Returns a protocol-specific integer setting for an account.
1.757 - *
1.758 - * @param account The account.
1.759 - * @param name The name of the setting.
1.760 - * @param default_value The default value.
1.761 - *
1.762 - * @return The value.
1.763 - */
1.764 -int purple_account_get_int(const PurpleAccount *account, const char *name,
1.765 - int default_value);
1.766 -
1.767 -/**
1.768 - * Returns a protocol-specific string setting for an account.
1.769 - *
1.770 - * @param account The account.
1.771 - * @param name The name of the setting.
1.772 - * @param default_value The default value.
1.773 - *
1.774 - * @return The value.
1.775 - */
1.776 -const char *purple_account_get_string(const PurpleAccount *account,
1.777 - const char *name,
1.778 - const char *default_value);
1.779 -
1.780 -/**
1.781 - * Returns a protocol-specific boolean setting for an account.
1.782 - *
1.783 - * @param account The account.
1.784 - * @param name The name of the setting.
1.785 - * @param default_value The default value.
1.786 - *
1.787 - * @return The value.
1.788 - */
1.789 -gboolean purple_account_get_bool(const PurpleAccount *account, const char *name,
1.790 - gboolean default_value);
1.791 -
1.792 -/**
1.793 - * Returns a UI-specific integer setting for an account.
1.794 - *
1.795 - * @param account The account.
1.796 - * @param ui The UI name.
1.797 - * @param name The name of the setting.
1.798 - * @param default_value The default value.
1.799 - *
1.800 - * @return The value.
1.801 - */
1.802 -int purple_account_get_ui_int(const PurpleAccount *account, const char *ui,
1.803 - const char *name, int default_value);
1.804 -
1.805 -/**
1.806 - * Returns a UI-specific string setting for an account.
1.807 - *
1.808 - * @param account The account.
1.809 - * @param ui The UI name.
1.810 - * @param name The name of the setting.
1.811 - * @param default_value The default value.
1.812 - *
1.813 - * @return The value.
1.814 - */
1.815 -const char *purple_account_get_ui_string(const PurpleAccount *account,
1.816 - const char *ui, const char *name,
1.817 - const char *default_value);
1.818 -
1.819 -/**
1.820 - * Returns a UI-specific boolean setting for an account.
1.821 - *
1.822 - * @param account The account.
1.823 - * @param ui The UI name.
1.824 - * @param name The name of the setting.
1.825 - * @param default_value The default value.
1.826 - *
1.827 - * @return The value.
1.828 - */
1.829 -gboolean purple_account_get_ui_bool(const PurpleAccount *account, const char *ui,
1.830 - const char *name, gboolean default_value);
1.831 -
1.832 -
1.833 -/**
1.834 - * Returns the system log for an account.
1.835 - *
1.836 - * @param account The account.
1.837 - * @param create Should it be created if it doesn't exist?
1.838 - *
1.839 - * @return The log.
1.840 - *
1.841 - * @note Callers should almost always pass @c FALSE for @a create.
1.842 - * Passing @c TRUE could result in an existing log being reopened,
1.843 - * if the log has already been closed, which not all loggers deal
1.844 - * with appropriately.
1.845 - */
1.846 -PurpleLog *purple_account_get_log(PurpleAccount *account, gboolean create);
1.847 -
1.848 -/**
1.849 - * Frees the system log of an account
1.850 - *
1.851 - * @param account The account.
1.852 - */
1.853 -void purple_account_destroy_log(PurpleAccount *account);
1.854 -
1.855 -/**
1.856 - * Adds a buddy to the server-side buddy list for the specified account.
1.857 - *
1.858 - * @param account The account.
1.859 - * @param buddy The buddy to add.
1.860 - */
1.861 -void purple_account_add_buddy(PurpleAccount *account, PurpleBuddy *buddy);
1.862 -/**
1.863 - * Adds a list of buddies to the server-side buddy list.
1.864 - *
1.865 - * @param account The account.
1.866 - * @param buddies The list of PurpleBlistNodes representing the buddies to add.
1.867 - */
1.868 -void purple_account_add_buddies(PurpleAccount *account, GList *buddies);
1.869 -
1.870 -/**
1.871 - * Removes a buddy from the server-side buddy list.
1.872 - *
1.873 - * @param account The account.
1.874 - * @param buddy The buddy to remove.
1.875 - * @param group The group to remove the buddy from.
1.876 - */
1.877 -void purple_account_remove_buddy(PurpleAccount *account, PurpleBuddy *buddy,
1.878 - PurpleGroup *group);
1.879 -
1.880 -/**
1.881 - * Removes a list of buddies from the server-side buddy list.
1.882 - *
1.883 - * @note The lists buddies and groups are parallel lists. Be sure that node n of
1.884 - * groups matches node n of buddies.
1.885 - *
1.886 - * @param account The account.
1.887 - * @param buddies The list of buddies to remove.
1.888 - * @param groups The list of groups to remove buddies from. Each node of this
1.889 - * list should match the corresponding node of buddies.
1.890 - */
1.891 -void purple_account_remove_buddies(PurpleAccount *account, GList *buddies,
1.892 - GList *groups);
1.893 -
1.894 -/**
1.895 - * Removes a group from the server-side buddy list.
1.896 - *
1.897 - * @param account The account.
1.898 - * @param group The group to remove.
1.899 - */
1.900 -void purple_account_remove_group(PurpleAccount *account, PurpleGroup *group);
1.901 -
1.902 -/**
1.903 - * Changes the password on the specified account.
1.904 - *
1.905 - * @param account The account.
1.906 - * @param orig_pw The old password.
1.907 - * @param new_pw The new password.
1.908 - */
1.909 -void purple_account_change_password(PurpleAccount *account, const char *orig_pw,
1.910 - const char *new_pw);
1.911 -
1.912 -/**
1.913 - * Whether the account supports sending offline messages to buddy.
1.914 - *
1.915 - * @param account The account
1.916 - * @param buddy The buddy
1.917 - */
1.918 -gboolean purple_account_supports_offline_message(PurpleAccount *account, PurpleBuddy *buddy);
1.919 -
1.920 -/**
1.921 - * Get the error that caused the account to be disconnected, or @c NULL if the
1.922 - * account is happily connected or disconnected without an error.
1.923 - *
1.924 - * @param account The account whose error should be retrieved.
1.925 - * @constreturn The type of error and a human-readable description of the
1.926 - * current error, or @c NULL if there is no current error. This
1.927 - * pointer is guaranteed to remain valid until the @ref
1.928 - * account-error-changed signal is emitted for @a account.
1.929 - */
1.930 -const PurpleConnectionErrorInfo *purple_account_get_current_error(PurpleAccount *account);
1.931 -
1.932 -/**
1.933 - * Clear an account's current error state, resetting it to @c NULL.
1.934 - *
1.935 - * @param account The account whose error state should be cleared.
1.936 - */
1.937 -void purple_account_clear_current_error(PurpleAccount *account);
1.938 -
1.939 -/*@}*/
1.940 -
1.941 -/**************************************************************************/
1.942 -/** @name Accounts API */
1.943 -/**************************************************************************/
1.944 -/*@{*/
1.945 -
1.946 -/**
1.947 - * Adds an account to the list of accounts.
1.948 - *
1.949 - * @param account The account.
1.950 - */
1.951 -void purple_accounts_add(PurpleAccount *account);
1.952 -
1.953 -/**
1.954 - * Removes an account from the list of accounts.
1.955 - *
1.956 - * @param account The account.
1.957 - */
1.958 -void purple_accounts_remove(PurpleAccount *account);
1.959 -
1.960 -/**
1.961 - * Deletes an account.
1.962 - *
1.963 - * This will remove any buddies from the buddy list that belong to this
1.964 - * account, buddy pounces that belong to this account, and will also
1.965 - * destroy @a account.
1.966 - *
1.967 - * @param account The account.
1.968 - */
1.969 -void purple_accounts_delete(PurpleAccount *account);
1.970 -
1.971 -/**
1.972 - * Reorders an account.
1.973 - *
1.974 - * @param account The account to reorder.
1.975 - * @param new_index The new index for the account.
1.976 - */
1.977 -void purple_accounts_reorder(PurpleAccount *account, gint new_index);
1.978 -
1.979 -/**
1.980 - * Returns a list of all accounts.
1.981 - *
1.982 - * @constreturn A list of all accounts.
1.983 - */
1.984 -GList *purple_accounts_get_all(void);
1.985 -
1.986 -/**
1.987 - * Returns a list of all enabled accounts
1.988 - *
1.989 - * @return A list of all enabled accounts. The list is owned
1.990 - * by the caller, and must be g_list_free()d to avoid
1.991 - * leaking the nodes.
1.992 - */
1.993 -GList *purple_accounts_get_all_active(void);
1.994 -
1.995 -/**
1.996 - * Finds an account with the specified name and protocol id.
1.997 - *
1.998 - * @param name The account username.
1.999 - * @param protocol The account protocol ID.
1.1000 - *
1.1001 - * @return The account, if found, or @c FALSE otherwise.
1.1002 - */
1.1003 -PurpleAccount *purple_accounts_find(const char *name, const char *protocol);
1.1004 -
1.1005 -/**
1.1006 - * This is called by the core after all subsystems and what
1.1007 - * not have been initialized. It sets all enabled accounts
1.1008 - * to their startup status by signing them on, setting them
1.1009 - * away, etc.
1.1010 - *
1.1011 - * You probably shouldn't call this unless you really know
1.1012 - * what you're doing.
1.1013 - */
1.1014 -void purple_accounts_restore_current_statuses(void);
1.1015 -
1.1016 -/*@}*/
1.1017 -
1.1018 -
1.1019 -/**************************************************************************/
1.1020 -/** @name UI Registration Functions */
1.1021 -/**************************************************************************/
1.1022 -/*@{*/
1.1023 -/**
1.1024 - * Sets the UI operations structure to be used for accounts.
1.1025 - *
1.1026 - * @param ops The UI operations structure.
1.1027 - */
1.1028 -void purple_accounts_set_ui_ops(PurpleAccountUiOps *ops);
1.1029 -
1.1030 -/**
1.1031 - * Returns the UI operations structure used for accounts.
1.1032 - *
1.1033 - * @return The UI operations structure in use.
1.1034 - */
1.1035 -PurpleAccountUiOps *purple_accounts_get_ui_ops(void);
1.1036 -
1.1037 -/*@}*/
1.1038 -
1.1039 -
1.1040 -/**************************************************************************/
1.1041 -/** @name Accounts Subsystem */
1.1042 -/**************************************************************************/
1.1043 -/*@{*/
1.1044 -
1.1045 -/**
1.1046 - * Returns the accounts subsystem handle.
1.1047 - *
1.1048 - * @return The accounts subsystem handle.
1.1049 - */
1.1050 -void *purple_accounts_get_handle(void);
1.1051 -
1.1052 -/**
1.1053 - * Initializes the accounts subsystem.
1.1054 - */
1.1055 -void purple_accounts_init(void);
1.1056 -
1.1057 -/**
1.1058 - * Uninitializes the accounts subsystem.
1.1059 - */
1.1060 -void purple_accounts_uninit(void);
1.1061 -
1.1062 -/*@}*/
1.1063 -
1.1064 -#ifdef __cplusplus
1.1065 -}
1.1066 -#endif
1.1067 -
1.1068 -#endif /* _PURPLE_ACCOUNT_H_ */
2.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/accountopt.h Fri Aug 21 13:24:36 2009 -0700
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.6.0/Headers/blist.h Fri Aug 21 13:24:36 2009 -0700
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,1248 +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 -/**
3.82 - * @since 2.6.0
3.83 - */
3.84 -#define PURPLE_BLIST_NODE(obj) ((PurpleBlistNode *)(obj))
3.85 -
3.86 -#define PURPLE_BLIST_NODE_HAS_FLAG(b, f) (purple_blist_node_get_flags((PurpleBlistNode*)(b)) & (f))
3.87 -#define PURPLE_BLIST_NODE_SHOULD_SAVE(b) (! PURPLE_BLIST_NODE_HAS_FLAG(b, PURPLE_BLIST_NODE_FLAG_NO_SAVE))
3.88 -
3.89 -#define PURPLE_BLIST_NODE_NAME(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_CHAT_NODE ? purple_chat_get_name((PurpleChat*)n) : \
3.90 - purple_blist_node_get_type(n) == PURPLE_BLIST_BUDDY_NODE ? purple_buddy_get_name((PurpleBuddy*)n) : NULL)
3.91 -
3.92 -/**
3.93 - * @since 2.6.0
3.94 - */
3.95 -#define PURPLE_GROUP(obj) ((PurpleGroup *)(obj))
3.96 -
3.97 -/**
3.98 - * @since 2.6.0
3.99 - */
3.100 -#define PURPLE_CONTACT(obj) ((PurpleContact *)(obj))
3.101 -
3.102 -/**
3.103 - * @since 2.6.0
3.104 - */
3.105 -#define PURPLE_BUDDY(obj) ((PurpleBuddy *)(obj))
3.106 -
3.107 -/**
3.108 - * @since 2.6.0
3.109 - */
3.110 -#define PURPLE_CHAT(obj) ((PurpleChat *)(obj))
3.111 -
3.112 -#include "account.h"
3.113 -#include "buddyicon.h"
3.114 -#include "status.h"
3.115 -
3.116 -/**************************************************************************/
3.117 -/* Data Structures */
3.118 -/**************************************************************************/
3.119 -
3.120 -#if !(defined PURPLE_HIDE_STRUCTS) || (defined _PURPLE_BLIST_C_)
3.121 -
3.122 -/**
3.123 - * A Buddy list node. This can represent a group, a buddy, or anything else.
3.124 - * This is a base class for PurpleBuddy, PurpleContact, PurpleGroup, and for
3.125 - * anything else that wants to put itself in the buddy list. */
3.126 -struct _PurpleBlistNode {
3.127 - PurpleBlistNodeType type; /**< The type of node this is */
3.128 - PurpleBlistNode *prev; /**< The sibling before this buddy. */
3.129 - PurpleBlistNode *next; /**< The sibling after this buddy. */
3.130 - PurpleBlistNode *parent; /**< The parent of this node */
3.131 - PurpleBlistNode *child; /**< The child of this node */
3.132 - GHashTable *settings; /**< per-node settings */
3.133 - void *ui_data; /**< The UI can put data here. */
3.134 - PurpleBlistNodeFlags flags; /**< The buddy flags */
3.135 -};
3.136 -
3.137 -/**
3.138 - * A buddy. This contains everything Purple will ever need to know about someone on the buddy list. Everything.
3.139 - */
3.140 -struct _PurpleBuddy {
3.141 - PurpleBlistNode node; /**< The node that this buddy inherits from */
3.142 - char *name; /**< The name of the buddy. */
3.143 - char *alias; /**< The user-set alias of the buddy */
3.144 - char *server_alias; /**< The server-specified alias of the buddy. (i.e. MSN "Friendly Names") */
3.145 - void *proto_data; /**< This allows the prpl to associate whatever data it wants with a buddy */
3.146 - PurpleBuddyIcon *icon; /**< The buddy icon. */
3.147 - PurpleAccount *account; /**< the account this buddy belongs to */
3.148 - PurplePresence *presence;
3.149 -};
3.150 -
3.151 -/**
3.152 - * A contact. This contains everything Purple will ever need to know about a contact.
3.153 - */
3.154 -struct _PurpleContact {
3.155 - PurpleBlistNode node; /**< The node that this contact inherits from. */
3.156 - char *alias; /**< The user-set alias of the contact */
3.157 - int totalsize; /**< The number of buddies in this contact */
3.158 - int currentsize; /**< The number of buddies in this contact corresponding to online accounts */
3.159 - int online; /**< The number of buddies in this contact who are currently online */
3.160 - PurpleBuddy *priority; /**< The "top" buddy for this contact */
3.161 - gboolean priority_valid; /**< Is priority valid? */
3.162 -};
3.163 -
3.164 -
3.165 -/**
3.166 - * A group. This contains everything Purple will ever need to know about a group.
3.167 - */
3.168 -struct _PurpleGroup {
3.169 - PurpleBlistNode node; /**< The node that this group inherits from */
3.170 - char *name; /**< The name of this group. */
3.171 - int totalsize; /**< The number of chats and contacts in this group */
3.172 - int currentsize; /**< The number of chats and contacts in this group corresponding to online accounts */
3.173 - int online; /**< The number of chats and contacts in this group who are currently online */
3.174 -};
3.175 -
3.176 -/**
3.177 - * A chat. This contains everything Purple needs to put a chat room in the
3.178 - * buddy list.
3.179 - */
3.180 -struct _PurpleChat {
3.181 - PurpleBlistNode node; /**< The node that this chat inherits from */
3.182 - char *alias; /**< The display name of this chat. */
3.183 - GHashTable *components; /**< the stuff the protocol needs to know to join the chat */
3.184 - PurpleAccount *account; /**< The account this chat is attached to */
3.185 -};
3.186 -
3.187 -/**
3.188 - * The Buddy List
3.189 - */
3.190 -struct _PurpleBuddyList {
3.191 - PurpleBlistNode *root; /**< The first node in the buddy list */
3.192 - GHashTable *buddies; /**< Every buddy in this list */
3.193 - void *ui_data; /**< UI-specific data. */
3.194 -};
3.195 -
3.196 -#endif /* PURPLE_HIDE_STRUCTS && PURPLE_BLIST_STRUCTS */
3.197 -
3.198 -/**
3.199 - * Buddy list UI operations.
3.200 - *
3.201 - * Any UI representing a buddy list must assign a filled-out PurpleBlistUiOps
3.202 - * structure to the buddy list core.
3.203 - */
3.204 -struct _PurpleBlistUiOps
3.205 -{
3.206 - void (*new_list)(PurpleBuddyList *list); /**< Sets UI-specific data on a buddy list. */
3.207 - void (*new_node)(PurpleBlistNode *node); /**< Sets UI-specific data on a node. */
3.208 - void (*show)(PurpleBuddyList *list); /**< The core will call this when it's finished doing its core stuff */
3.209 - void (*update)(PurpleBuddyList *list,
3.210 - PurpleBlistNode *node); /**< This will update a node in the buddy list. */
3.211 - void (*remove)(PurpleBuddyList *list,
3.212 - PurpleBlistNode *node); /**< This removes a node from the list */
3.213 - void (*destroy)(PurpleBuddyList *list); /**< When the list is destroyed, this is called to destroy the UI. */
3.214 - void (*set_visible)(PurpleBuddyList *list,
3.215 - gboolean show); /**< Hides or unhides the buddy list */
3.216 - void (*request_add_buddy)(PurpleAccount *account, const char *username,
3.217 - const char *group, const char *alias);
3.218 - void (*request_add_chat)(PurpleAccount *account, PurpleGroup *group,
3.219 - const char *alias, const char *name);
3.220 - void (*request_add_group)(void);
3.221 -
3.222 - /**
3.223 - * This is called when a node has been modified and should be saved.
3.224 - *
3.225 - * Implementation of this UI op is OPTIONAL. If not implemented, it will
3.226 - * be set to a fallback function that saves data to blist.xml like in
3.227 - * previous libpurple versions.
3.228 - *
3.229 - * @attrib node The node which has been modified.
3.230 - *
3.231 - * @since 2.6.0.
3.232 - */
3.233 - void (*save_node)(PurpleBlistNode *node);
3.234 -
3.235 - /**
3.236 - * Called when a node is about to be removed from the buddy list.
3.237 - * The UI op should update the relevant data structures to remove this
3.238 - * node (for example, removing a buddy from the group this node is in).
3.239 - *
3.240 - * Implementation of this UI op is OPTIONAL. If not implemented, it will
3.241 - * be set to a fallback function that saves data to blist.xml like in
3.242 - * previous libpurple versions.
3.243 - *
3.244 - * @attrib node The node which has been modified.
3.245 - * @since 2.6.0.
3.246 - */
3.247 - void (*remove_node)(PurpleBlistNode *node);
3.248 -
3.249 - /**
3.250 - * Called to save all the data for an account. If the UI sets this,
3.251 - * the callback must save the privacy and buddy list data for an account.
3.252 - * If the account is NULL, save the data for all accounts.
3.253 - *
3.254 - * Implementation of this UI op is OPTIONAL. If not implemented, it will
3.255 - * be set to a fallback function that saves data to blist.xml like in
3.256 - * previous libpurple versions.
3.257 - *
3.258 - * @attrib account The account whose data to save. If NULL, save all data
3.259 - * for all accounts.
3.260 - * @since 2.6.0.
3.261 - */
3.262 - void (*save_account)(PurpleAccount *account);
3.263 -
3.264 - void (*_purple_reserved1)(void);
3.265 -};
3.266 -
3.267 -#ifdef __cplusplus
3.268 -extern "C" {
3.269 -#endif
3.270 -
3.271 -/**************************************************************************/
3.272 -/** @name Buddy List API */
3.273 -/**************************************************************************/
3.274 -/*@{*/
3.275 -
3.276 -/**
3.277 - * Creates a new buddy list
3.278 - *
3.279 - * @return The new buddy list.
3.280 - * @deprecated In 3.0.0, this will be handled by purple_blist_init()
3.281 - */
3.282 -PurpleBuddyList *purple_blist_new(void);
3.283 -
3.284 -/**
3.285 - * Sets the main buddy list.
3.286 - *
3.287 - * @param blist The buddy list you want to use.
3.288 - * @deprecated In 3.0.0, this will be handled by purple_blist_init()
3.289 - */
3.290 -void purple_set_blist(PurpleBuddyList *blist);
3.291 -
3.292 -/**
3.293 - * Returns the main buddy list.
3.294 - *
3.295 - * @return The main buddy list.
3.296 - */
3.297 -PurpleBuddyList *purple_get_blist(void);
3.298 -
3.299 -/**
3.300 - * Returns the root node of the main buddy list.
3.301 - *
3.302 - * @return The root node.
3.303 - */
3.304 -PurpleBlistNode *purple_blist_get_root(void);
3.305 -
3.306 -/**
3.307 - * Returns a list of every buddy in the list. Use of this function is
3.308 - * discouraged if you do not actually need every buddy in the list. Use
3.309 - * purple_find_buddies instead.
3.310 - *
3.311 - * @return A list of every buddy in the list. Caller is responsible for
3.312 - * freeing the list.
3.313 - *
3.314 - * @see purple_find_buddies
3.315 - * @since 2.6.0
3.316 - */
3.317 -GSList *purple_blist_get_buddies(void);
3.318 -
3.319 -/**
3.320 - * Returns the UI data for the list.
3.321 - *
3.322 - * @return The UI data for the list.
3.323 - *
3.324 - * @since 2.6.0
3.325 - */
3.326 -gpointer purple_blist_get_ui_data(void);
3.327 -
3.328 -/**
3.329 - * Sets the UI data for the list.
3.330 - *
3.331 - * @param ui_data The UI data for the list.
3.332 - *
3.333 - * @since 2.6.0
3.334 - */
3.335 -void purple_blist_set_ui_data(gpointer ui_data);
3.336 -
3.337 -/**
3.338 - * Returns the next node of a given node. This function is to be used to iterate
3.339 - * over the tree returned by purple_get_blist.
3.340 - *
3.341 - * @param node A node.
3.342 - * @param offline Whether to include nodes for offline accounts
3.343 - * @return The next node
3.344 - * @see purple_blist_node_get_parent
3.345 - * @see purple_blist_node_get_first_child
3.346 - * @see purple_blist_node_get_sibling_next
3.347 - * @see purple_blist_node_get_sibling_prev
3.348 - */
3.349 -PurpleBlistNode *purple_blist_node_next(PurpleBlistNode *node, gboolean offline);
3.350 -
3.351 -/**
3.352 - * Returns the parent node of a given node.
3.353 - *
3.354 - * @param node A node.
3.355 - * @return The parent node.
3.356 - * @since 2.4.0
3.357 - * @see purple_blist_node_get_first_child
3.358 - * @see purple_blist_node_get_sibling_next
3.359 - * @see purple_blist_node_get_sibling_prev
3.360 - * @see purple_blist_node_next
3.361 - */
3.362 -PurpleBlistNode *purple_blist_node_get_parent(PurpleBlistNode *node);
3.363 -
3.364 -/**
3.365 - * Returns the the first child node of a given node.
3.366 - *
3.367 - * @param node A node.
3.368 - * @return The child node.
3.369 - * @since 2.4.0
3.370 - * @see purple_blist_node_get_parent
3.371 - * @see purple_blist_node_get_sibling_next
3.372 - * @see purple_blist_node_get_sibling_prev
3.373 - * @see purple_blist_node_next
3.374 - */
3.375 -PurpleBlistNode *purple_blist_node_get_first_child(PurpleBlistNode *node);
3.376 -
3.377 -/**
3.378 - * Returns the sibling node of a given node.
3.379 - *
3.380 - * @param node A node.
3.381 - * @return The sibling node.
3.382 - * @since 2.4.0
3.383 - * @see purple_blist_node_get_parent
3.384 - * @see purple_blist_node_get_first_child
3.385 - * @see purple_blist_node_get_sibling_prev
3.386 - * @see purple_blist_node_next
3.387 - */
3.388 -PurpleBlistNode *purple_blist_node_get_sibling_next(PurpleBlistNode *node);
3.389 -
3.390 -/**
3.391 - * Returns the previous sibling node of a given node.
3.392 - *
3.393 - * @param node A node.
3.394 - * @return The sibling node.
3.395 - * @since 2.4.0
3.396 - * @see purple_blist_node_get_parent
3.397 - * @see purple_blist_node_get_first_child
3.398 - * @see purple_blist_node_get_sibling_next
3.399 - * @see purple_blist_node_next
3.400 - */
3.401 -PurpleBlistNode *purple_blist_node_get_sibling_prev(PurpleBlistNode *node);
3.402 -
3.403 -/**
3.404 - * Returns the UI data of a given node.
3.405 - *
3.406 - * @param node The node.
3.407 - * @return The UI data.
3.408 - * @since 2.6.0
3.409 - */
3.410 -gpointer purple_blist_node_get_ui_data(const PurpleBlistNode *node);
3.411 -
3.412 -/**
3.413 - * Sets the UI data of a given node.
3.414 - *
3.415 - * @param node The node.
3.416 - * @param ui_data The UI data.
3.417 - *
3.418 - * @since 2.6.0
3.419 - */
3.420 -void purple_blist_node_set_ui_data(PurpleBlistNode *node, gpointer ui_data);
3.421 -
3.422 -/**
3.423 - * Shows the buddy list, creating a new one if necessary.
3.424 - */
3.425 -void purple_blist_show(void);
3.426 -
3.427 -
3.428 -/**
3.429 - * Destroys the buddy list window.
3.430 - *
3.431 - * @deprecated The UI is responsible for cleaning up the
3.432 - * PurpleBuddyList->ui_data. purple_blist_uninit() will free the
3.433 - * PurpleBuddyList* itself.
3.434 - */
3.435 -void purple_blist_destroy(void);
3.436 -
3.437 -/**
3.438 - * Hides or unhides the buddy list.
3.439 - *
3.440 - * @param show Whether or not to show the buddy list
3.441 - */
3.442 -void purple_blist_set_visible(gboolean show);
3.443 -
3.444 -/**
3.445 - * Updates a buddy's status.
3.446 - *
3.447 - * This should only be called from within Purple.
3.448 - *
3.449 - * @param buddy The buddy whose status has changed.
3.450 - * @param old_status The status from which we are changing.
3.451 - */
3.452 -void purple_blist_update_buddy_status(PurpleBuddy *buddy, PurpleStatus *old_status);
3.453 -
3.454 -/**
3.455 - * Updates a node's custom icon.
3.456 - *
3.457 - * @param node The PurpleBlistNode whose custom icon has changed.
3.458 - *
3.459 - * @since 2.5.0
3.460 - */
3.461 -void purple_blist_update_node_icon(PurpleBlistNode *node);
3.462 -
3.463 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_BLIST_C_)
3.464 -/**
3.465 - * Updates a buddy's icon.
3.466 - *
3.467 - * @param buddy The buddy whose buddy icon has changed
3.468 - * @deprecated Use purple_blist_update_node_icon() instead.
3.469 - */
3.470 -void purple_blist_update_buddy_icon(PurpleBuddy *buddy);
3.471 -#endif
3.472 -
3.473 -/**
3.474 - * Renames a buddy in the buddy list.
3.475 - *
3.476 - * @param buddy The buddy whose name will be changed.
3.477 - * @param name The new name of the buddy.
3.478 - */
3.479 -void purple_blist_rename_buddy(PurpleBuddy *buddy, const char *name);
3.480 -
3.481 -/**
3.482 - * Aliases a contact in the buddy list.
3.483 - *
3.484 - * @param contact The contact whose alias will be changed.
3.485 - * @param alias The contact's alias.
3.486 - */
3.487 -void purple_blist_alias_contact(PurpleContact *contact, const char *alias);
3.488 -
3.489 -/**
3.490 - * Aliases a buddy in the buddy list.
3.491 - *
3.492 - * @param buddy The buddy whose alias will be changed.
3.493 - * @param alias The buddy's alias.
3.494 - */
3.495 -void purple_blist_alias_buddy(PurpleBuddy *buddy, const char *alias);
3.496 -
3.497 -/**
3.498 - * Sets the server-sent alias of a buddy in the buddy list.
3.499 - * PRPLs should call serv_got_alias() instead of this.
3.500 - *
3.501 - * @param buddy The buddy whose alias will be changed.
3.502 - * @param alias The buddy's "official" alias.
3.503 - */
3.504 -void purple_blist_server_alias_buddy(PurpleBuddy *buddy, const char *alias);
3.505 -
3.506 -/**
3.507 - * Aliases a chat in the buddy list.
3.508 - *
3.509 - * @param chat The chat whose alias will be changed.
3.510 - * @param alias The chat's new alias.
3.511 - */
3.512 -void purple_blist_alias_chat(PurpleChat *chat, const char *alias);
3.513 -
3.514 -/**
3.515 - * Renames a group
3.516 - *
3.517 - * @param group The group to rename
3.518 - * @param name The new name
3.519 - */
3.520 -void purple_blist_rename_group(PurpleGroup *group, const char *name);
3.521 -
3.522 -/**
3.523 - * Creates a new chat for the buddy list
3.524 - *
3.525 - * @param account The account this chat will get added to
3.526 - * @param alias The alias of the new chat
3.527 - * @param components The info the prpl needs to join the chat. The
3.528 - * hash function should be g_str_hash() and the
3.529 - * equal function should be g_str_equal().
3.530 - * @return A newly allocated chat
3.531 - */
3.532 -PurpleChat *purple_chat_new(PurpleAccount *account, const char *alias, GHashTable *components);
3.533 -
3.534 -/**
3.535 - * Destroys a chat
3.536 - *
3.537 - * @param chat The chat to destroy
3.538 - */
3.539 -void purple_chat_destroy(PurpleChat *chat);
3.540 -
3.541 -/**
3.542 - * Adds a new chat to the buddy list.
3.543 - *
3.544 - * The chat will be inserted right after node or appended to the end
3.545 - * of group if node is NULL. If both are NULL, the buddy will be added to
3.546 - * the "Chats" group.
3.547 - *
3.548 - * @param chat The new chat who gets added
3.549 - * @param group The group to add the new chat to.
3.550 - * @param node The insertion point
3.551 - */
3.552 -void purple_blist_add_chat(PurpleChat *chat, PurpleGroup *group, PurpleBlistNode *node);
3.553 -
3.554 -/**
3.555 - * Creates a new buddy.
3.556 - *
3.557 - * This function only creates the PurpleBuddy. Use purple_blist_add_buddy
3.558 - * to add the buddy to the list and purple_account_add_buddy to sync up
3.559 - * with the server.
3.560 - *
3.561 - * @param account The account this buddy will get added to
3.562 - * @param name The name of the new buddy
3.563 - * @param alias The alias of the new buddy (or NULL if unaliased)
3.564 - * @return A newly allocated buddy
3.565 - *
3.566 - * @see purple_account_add_buddy
3.567 - * @see purple_blist_add_buddy
3.568 - */
3.569 -PurpleBuddy *purple_buddy_new(PurpleAccount *account, const char *name, const char *alias);
3.570 -
3.571 -/**
3.572 - * Destroys a buddy
3.573 - *
3.574 - * @param buddy The buddy to destroy
3.575 - */
3.576 -void purple_buddy_destroy(PurpleBuddy *buddy);
3.577 -
3.578 -/**
3.579 - * Sets a buddy's icon.
3.580 - *
3.581 - * This should only be called from within Purple. You probably want to
3.582 - * call purple_buddy_icon_set_data().
3.583 - *
3.584 - * @param buddy The buddy.
3.585 - * @param icon The buddy icon.
3.586 - *
3.587 - * @see purple_buddy_icon_set_data()
3.588 - */
3.589 -void purple_buddy_set_icon(PurpleBuddy *buddy, PurpleBuddyIcon *icon);
3.590 -
3.591 -/**
3.592 - * Returns a buddy's account.
3.593 - *
3.594 - * @param buddy The buddy.
3.595 - *
3.596 - * @return The account
3.597 - */
3.598 -PurpleAccount *purple_buddy_get_account(const PurpleBuddy *buddy);
3.599 -
3.600 -/**
3.601 - * Returns a buddy's name
3.602 - *
3.603 - * @param buddy The buddy.
3.604 - *
3.605 - * @return The name.
3.606 - */
3.607 -const char *purple_buddy_get_name(const PurpleBuddy *buddy);
3.608 -
3.609 -/**
3.610 - * Returns a buddy's icon.
3.611 - *
3.612 - * @param buddy The buddy.
3.613 - *
3.614 - * @return The buddy icon.
3.615 - */
3.616 -PurpleBuddyIcon *purple_buddy_get_icon(const PurpleBuddy *buddy);
3.617 -
3.618 -/**
3.619 - * Returns a buddy's protocol-specific data.
3.620 - *
3.621 - * This should only be called from the associated prpl.
3.622 - *
3.623 - * @param buddy The buddy.
3.624 - * @return The protocol data.
3.625 - *
3.626 - * @see purple_buddy_set_protocol_data()
3.627 - * @since 2.6.0
3.628 - */
3.629 -gpointer purple_buddy_get_protocol_data(const PurpleBuddy *buddy);
3.630 -
3.631 -/**
3.632 - * Sets a buddy's protocol-specific data.
3.633 - *
3.634 - * This should only be called from the associated prpl.
3.635 - *
3.636 - * @param buddy The buddy.
3.637 - * @param data The data.
3.638 - *
3.639 - * @see purple_buddy_get_protocol_data()
3.640 - * @since 2.6.0
3.641 - */
3.642 -void purple_buddy_set_protocol_data(PurpleBuddy *buddy, gpointer data);
3.643 -
3.644 -/**
3.645 - * Returns a buddy's contact.
3.646 - *
3.647 - * @param buddy The buddy.
3.648 - *
3.649 - * @return The buddy's contact.
3.650 - */
3.651 -PurpleContact *purple_buddy_get_contact(PurpleBuddy *buddy);
3.652 -
3.653 -/**
3.654 - * Returns a buddy's presence.
3.655 - *
3.656 - * @param buddy The buddy.
3.657 - *
3.658 - * @return The buddy's presence.
3.659 - */
3.660 -PurplePresence *purple_buddy_get_presence(const PurpleBuddy *buddy);
3.661 -
3.662 -/**
3.663 - * Adds a new buddy to the buddy list.
3.664 - *
3.665 - * The buddy will be inserted right after node or prepended to the
3.666 - * group if node is NULL. If both are NULL, the buddy will be added to
3.667 - * the "Buddies" group.
3.668 - *
3.669 - * @param buddy The new buddy who gets added
3.670 - * @param contact The optional contact to place the buddy in.
3.671 - * @param group The group to add the new buddy to.
3.672 - * @param node The insertion point. Pass in NULL to add the node as
3.673 - * the first child in the given group.
3.674 - */
3.675 -void purple_blist_add_buddy(PurpleBuddy *buddy, PurpleContact *contact, PurpleGroup *group, PurpleBlistNode *node);
3.676 -
3.677 -/**
3.678 - * Creates a new group
3.679 - *
3.680 - * You can't have more than one group with the same name. Sorry. If you pass
3.681 - * this the name of a group that already exists, it will return that group.
3.682 - *
3.683 - * @param name The name of the new group
3.684 - * @return A new group struct
3.685 -*/
3.686 -PurpleGroup *purple_group_new(const char *name);
3.687 -
3.688 -/**
3.689 - * Destroys a group
3.690 - *
3.691 - * @param group The group to destroy
3.692 -*/
3.693 -void purple_group_destroy(PurpleGroup *group);
3.694 -
3.695 -/**
3.696 - * Adds a new group to the buddy list.
3.697 - *
3.698 - * The new group will be inserted after insert or prepended to the list if
3.699 - * node is NULL.
3.700 - *
3.701 - * @param group The group
3.702 - * @param node The insertion point
3.703 - */
3.704 -void purple_blist_add_group(PurpleGroup *group, PurpleBlistNode *node);
3.705 -
3.706 -/**
3.707 - * Creates a new contact
3.708 - *
3.709 - * @return A new contact struct
3.710 - */
3.711 -PurpleContact *purple_contact_new(void);
3.712 -
3.713 -/**
3.714 - * Destroys a contact
3.715 - *
3.716 - * @param contact The contact to destroy
3.717 - */
3.718 -void purple_contact_destroy(PurpleContact *contact);
3.719 -
3.720 -/**
3.721 - * Adds a new contact to the buddy list.
3.722 - *
3.723 - * The new contact will be inserted after insert or prepended to the list if
3.724 - * node is NULL.
3.725 - *
3.726 - * @param contact The contact
3.727 - * @param group The group to add the contact to
3.728 - * @param node The insertion point
3.729 - */
3.730 -void purple_blist_add_contact(PurpleContact *contact, PurpleGroup *group, PurpleBlistNode *node);
3.731 -
3.732 -/**
3.733 - * Merges two contacts
3.734 - *
3.735 - * All of the buddies from source will be moved to target
3.736 - *
3.737 - * @param source The contact to merge
3.738 - * @param node The place to merge to (a buddy or contact)
3.739 - */
3.740 -void purple_blist_merge_contact(PurpleContact *source, PurpleBlistNode *node);
3.741 -
3.742 -/**
3.743 - * Returns the highest priority buddy for a given contact.
3.744 - *
3.745 - * @param contact The contact
3.746 - * @return The highest priority buddy
3.747 - */
3.748 -PurpleBuddy *purple_contact_get_priority_buddy(PurpleContact *contact);
3.749 -
3.750 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_BLIST_C_)
3.751 -/**
3.752 - * Sets the alias for a contact.
3.753 - *
3.754 - * @param contact The contact
3.755 - * @param alias The alias to set, or NULL to unset
3.756 - *
3.757 - * @deprecated Use purple_blist_alias_contact() instead.
3.758 - */
3.759 -void purple_contact_set_alias(PurpleContact *contact, const char *alias);
3.760 -#endif
3.761 -
3.762 -/**
3.763 - * Gets the alias for a contact.
3.764 - *
3.765 - * @param contact The contact
3.766 - * @return The alias, or NULL if it is not set.
3.767 - */
3.768 -const char *purple_contact_get_alias(PurpleContact *contact);
3.769 -
3.770 -/**
3.771 - * Determines whether an account owns any buddies in a given contact
3.772 - *
3.773 - * @param contact The contact to search through.
3.774 - * @param account The account.
3.775 - *
3.776 - * @return TRUE if there are any buddies from account in the contact, or FALSE otherwise.
3.777 - */
3.778 -gboolean purple_contact_on_account(PurpleContact *contact, PurpleAccount *account);
3.779 -
3.780 -/**
3.781 - * Invalidates the priority buddy so that the next call to
3.782 - * purple_contact_get_priority_buddy recomputes it.
3.783 - *
3.784 - * @param contact The contact
3.785 - */
3.786 -void purple_contact_invalidate_priority_buddy(PurpleContact *contact);
3.787 -
3.788 -/**
3.789 - * Removes a buddy from the buddy list and frees the memory allocated to it.
3.790 - * This doesn't actually try to remove the buddy from the server list.
3.791 - *
3.792 - * @param buddy The buddy to be removed
3.793 - *
3.794 - * @see purple_account_remove_buddy
3.795 - */
3.796 -void purple_blist_remove_buddy(PurpleBuddy *buddy);
3.797 -
3.798 -/**
3.799 - * Removes a contact, and any buddies it contains, and frees the memory
3.800 - * allocated to it. This calls purple_blist_remove_buddy and therefore
3.801 - * doesn't remove the buddies from the server list.
3.802 - *
3.803 - * @param contact The contact to be removed
3.804 - *
3.805 - * @see purple_blist_remove_buddy
3.806 - */
3.807 -void purple_blist_remove_contact(PurpleContact *contact);
3.808 -
3.809 -/**
3.810 - * Removes a chat from the buddy list and frees the memory allocated to it.
3.811 - *
3.812 - * @param chat The chat to be removed
3.813 - */
3.814 -void purple_blist_remove_chat(PurpleChat *chat);
3.815 -
3.816 -/**
3.817 - * Removes a group from the buddy list and frees the memory allocated to it and to
3.818 - * its children
3.819 - *
3.820 - * @param group The group to be removed
3.821 - */
3.822 -void purple_blist_remove_group(PurpleGroup *group);
3.823 -
3.824 -/**
3.825 - * Returns the alias of a buddy.
3.826 - *
3.827 - * @param buddy The buddy whose name will be returned.
3.828 - * @return The alias (if set), server alias (if set),
3.829 - * or NULL.
3.830 - */
3.831 -const char *purple_buddy_get_alias_only(PurpleBuddy *buddy);
3.832 -
3.833 -/**
3.834 - * Gets the server alias for a buddy.
3.835 - *
3.836 - * @param buddy The buddy whose name will be returned
3.837 - * @return The server alias, or NULL if it is not set.
3.838 - */
3.839 -const char *purple_buddy_get_server_alias(PurpleBuddy *buddy);
3.840 -
3.841 -/**
3.842 - * Returns the correct name to display for a buddy, taking the contact alias
3.843 - * into account. In order of precedence: the buddy's alias; the buddy's
3.844 - * contact alias; the buddy's server alias; the buddy's user name.
3.845 - *
3.846 - * @param buddy The buddy whose name will be returned
3.847 - * @return The appropriate name or alias, or NULL.
3.848 - *
3.849 - */
3.850 -const char *purple_buddy_get_contact_alias(PurpleBuddy *buddy);
3.851 -
3.852 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_BLIST_C_)
3.853 -/**
3.854 - * Returns the correct alias for this user, ignoring server aliases. Used
3.855 - * when a user-recognizable name is required. In order: buddy's alias; buddy's
3.856 - * contact alias; buddy's user name.
3.857 - *
3.858 - * @param buddy The buddy whose alias will be returned.
3.859 - * @return The appropriate name or alias.
3.860 - * @deprecated Try purple_buddy_get_alias(), if server aliases are okay.
3.861 - */
3.862 -const char *purple_buddy_get_local_alias(PurpleBuddy *buddy);
3.863 -#endif
3.864 -
3.865 -/**
3.866 - * Returns the correct name to display for a buddy. In order of precedence:
3.867 - * the buddy's alias; the buddy's server alias; the buddy's contact alias;
3.868 - * the buddy's user name.
3.869 - *
3.870 - * @param buddy The buddy whose name will be returned.
3.871 - * @return The appropriate name or alias, or NULL
3.872 - */
3.873 -const char *purple_buddy_get_alias(PurpleBuddy *buddy);
3.874 -
3.875 -/**
3.876 - * Returns the local alias for the buddy, or @c NULL if none exists.
3.877 - *
3.878 - * @param buddy The buddy
3.879 - * @return The local alias for the buddy
3.880 - *
3.881 - * @since 2.6.0
3.882 - */
3.883 -const char *purple_buddy_get_local_buddy_alias(PurpleBuddy *buddy);
3.884 -
3.885 -/**
3.886 - * Returns the correct name to display for a blist chat.
3.887 - *
3.888 - * @param chat The chat whose name will be returned.
3.889 - * @return The alias (if set), or first component value.
3.890 - */
3.891 -const char *purple_chat_get_name(PurpleChat *chat);
3.892 -
3.893 -/**
3.894 - * Finds the buddy struct given a name and an account
3.895 - *
3.896 - * @param account The account this buddy belongs to
3.897 - * @param name The buddy's name
3.898 - * @return The buddy or NULL if the buddy does not exist
3.899 - */
3.900 -PurpleBuddy *purple_find_buddy(PurpleAccount *account, const char *name);
3.901 -
3.902 -/**
3.903 - * Finds the buddy struct given a name, an account, and a group
3.904 - *
3.905 - * @param account The account this buddy belongs to
3.906 - * @param name The buddy's name
3.907 - * @param group The group to look in
3.908 - * @return The buddy or NULL if the buddy does not exist in the group
3.909 - */
3.910 -PurpleBuddy *purple_find_buddy_in_group(PurpleAccount *account, const char *name,
3.911 - PurpleGroup *group);
3.912 -
3.913 -/**
3.914 - * Finds all PurpleBuddy structs given a name and an account
3.915 - *
3.916 - * @param account The account this buddy belongs to
3.917 - * @param name The buddy's name (or NULL to return all buddies for the account)
3.918 - *
3.919 - * @return A GSList of buddies (which must be freed), or NULL if the buddy doesn't exist
3.920 - */
3.921 -GSList *purple_find_buddies(PurpleAccount *account, const char *name);
3.922 -
3.923 -
3.924 -/**
3.925 - * Finds a group by name
3.926 - *
3.927 - * @param name The group's name
3.928 - * @return The group or NULL if the group does not exist
3.929 - */
3.930 -PurpleGroup *purple_find_group(const char *name);
3.931 -
3.932 -/**
3.933 - * Finds a chat by name.
3.934 - *
3.935 - * @param account The chat's account.
3.936 - * @param name The chat's name.
3.937 - *
3.938 - * @return The chat, or @c NULL if the chat does not exist.
3.939 - */
3.940 -PurpleChat *purple_blist_find_chat(PurpleAccount *account, const char *name);
3.941 -
3.942 -/**
3.943 - * Returns the group of which the chat is a member.
3.944 - *
3.945 - * @param chat The chat.
3.946 - *
3.947 - * @return The parent group, or @c NULL if the chat is not in a group.
3.948 - */
3.949 -PurpleGroup *purple_chat_get_group(PurpleChat *chat);
3.950 -
3.951 -/**
3.952 - * Returns the account the chat belongs to.
3.953 - *
3.954 - * @param chat The chat.
3.955 - *
3.956 - * @return The account the chat belongs to.
3.957 - *
3.958 - * @since 2.4.0
3.959 - */
3.960 -PurpleAccount *purple_chat_get_account(PurpleChat *chat);
3.961 -
3.962 -/**
3.963 - * Get a hashtable containing information about a chat.
3.964 - *
3.965 - * @param chat The chat.
3.966 - *
3.967 - * @constreturn The hashtable.
3.968 - *
3.969 - * @since 2.4.0
3.970 - */
3.971 -GHashTable *purple_chat_get_components(PurpleChat *chat);
3.972 -
3.973 -/**
3.974 - * Returns the group of which the buddy is a member.
3.975 - *
3.976 - * @param buddy The buddy
3.977 - * @return The group or NULL if the buddy is not in a group
3.978 - */
3.979 -PurpleGroup *purple_buddy_get_group(PurpleBuddy *buddy);
3.980 -
3.981 -
3.982 -/**
3.983 - * Returns a list of accounts that have buddies in this group
3.984 - *
3.985 - * @param g The group
3.986 - *
3.987 - * @return A GSList of accounts (which must be freed), or NULL if the group
3.988 - * has no accounts.
3.989 - */
3.990 -GSList *purple_group_get_accounts(PurpleGroup *g);
3.991 -
3.992 -/**
3.993 - * Determines whether an account owns any buddies in a given group
3.994 - *
3.995 - * @param g The group to search through.
3.996 - * @param account The account.
3.997 - *
3.998 - * @return TRUE if there are any buddies in the group, or FALSE otherwise.
3.999 - */
3.1000 -gboolean purple_group_on_account(PurpleGroup *g, PurpleAccount *account);
3.1001 -
3.1002 -/**
3.1003 - * Returns the name of a group.
3.1004 - *
3.1005 - * @param group The group.
3.1006 - *
3.1007 - * @return The name of the group.
3.1008 - */
3.1009 -const char *purple_group_get_name(PurpleGroup *group);
3.1010 -
3.1011 -/**
3.1012 - * Called when an account connects. Tells the UI to update all the
3.1013 - * buddies.
3.1014 - *
3.1015 - * @param account The account
3.1016 - */
3.1017 -void purple_blist_add_account(PurpleAccount *account);
3.1018 -
3.1019 -
3.1020 -/**
3.1021 - * Called when an account disconnects. Sets the presence of all the buddies to 0
3.1022 - * and tells the UI to update them.
3.1023 - *
3.1024 - * @param account The account
3.1025 - */
3.1026 -void purple_blist_remove_account(PurpleAccount *account);
3.1027 -
3.1028 -
3.1029 -/**
3.1030 - * Determines the total size of a group
3.1031 - *
3.1032 - * @param group The group
3.1033 - * @param offline Count buddies in offline accounts
3.1034 - * @return The number of buddies in the group
3.1035 - */
3.1036 -int purple_blist_get_group_size(PurpleGroup *group, gboolean offline);
3.1037 -
3.1038 -/**
3.1039 - * Determines the number of online buddies in a group
3.1040 - *
3.1041 - * @param group The group
3.1042 - * @return The number of online buddies in the group, or 0 if the group is NULL
3.1043 - */
3.1044 -int purple_blist_get_group_online_count(PurpleGroup *group);
3.1045 -
3.1046 -/*@}*/
3.1047 -
3.1048 -/****************************************************************************************/
3.1049 -/** @name Buddy list file management API */
3.1050 -/****************************************************************************************/
3.1051 -
3.1052 -/**
3.1053 - * Loads the buddy list from ~/.purple/blist.xml.
3.1054 - */
3.1055 -void purple_blist_load(void);
3.1056 -
3.1057 -/**
3.1058 - * Schedule a save of the blist.xml file. This is used by the privacy
3.1059 - * API whenever the privacy settings are changed. If you make a change
3.1060 - * to blist.xml using one of the functions in the buddy list API, then
3.1061 - * the buddy list is saved automatically, so you should not need to
3.1062 - * call this.
3.1063 - */
3.1064 -void purple_blist_schedule_save(void);
3.1065 -
3.1066 -/**
3.1067 - * Requests from the user information needed to add a buddy to the
3.1068 - * buddy list.
3.1069 - *
3.1070 - * @param account The account the buddy is added to.
3.1071 - * @param username The username of the buddy.
3.1072 - * @param group The name of the group to place the buddy in.
3.1073 - * @param alias The optional alias for the buddy.
3.1074 - */
3.1075 -void purple_blist_request_add_buddy(PurpleAccount *account, const char *username,
3.1076 - const char *group, const char *alias);
3.1077 -
3.1078 -/**
3.1079 - * Requests from the user information needed to add a chat to the
3.1080 - * buddy list.
3.1081 - *
3.1082 - * @param account The account the buddy is added to.
3.1083 - * @param group The optional group to add the chat to.
3.1084 - * @param alias The optional alias for the chat.
3.1085 - * @param name The required chat name.
3.1086 - */
3.1087 -void purple_blist_request_add_chat(PurpleAccount *account, PurpleGroup *group,
3.1088 - const char *alias, const char *name);
3.1089 -
3.1090 -/**
3.1091 - * Requests from the user information needed to add a group to the
3.1092 - * buddy list.
3.1093 - */
3.1094 -void purple_blist_request_add_group(void);
3.1095 -
3.1096 -/**
3.1097 - * Associates a boolean with a node in the buddy list
3.1098 - *
3.1099 - * @param node The node to associate the data with
3.1100 - * @param key The identifier for the data
3.1101 - * @param value The value to set
3.1102 - */
3.1103 -void purple_blist_node_set_bool(PurpleBlistNode *node, const char *key, gboolean value);
3.1104 -
3.1105 -/**
3.1106 - * Retrieves a named boolean setting from a node in the buddy list
3.1107 - *
3.1108 - * @param node The node to retrieve the data from
3.1109 - * @param key The identifier of the data
3.1110 - *
3.1111 - * @return The value, or FALSE if there is no setting
3.1112 - */
3.1113 -gboolean purple_blist_node_get_bool(PurpleBlistNode *node, const char *key);
3.1114 -
3.1115 -/**
3.1116 - * Associates an integer with a node in the buddy list
3.1117 - *
3.1118 - * @param node The node to associate the data with
3.1119 - * @param key The identifier for the data
3.1120 - * @param value The value to set
3.1121 - */
3.1122 -void purple_blist_node_set_int(PurpleBlistNode *node, const char *key, int value);
3.1123 -
3.1124 -/**
3.1125 - * Retrieves a named integer setting from a node in the buddy list
3.1126 - *
3.1127 - * @param node The node to retrieve the data from
3.1128 - * @param key The identifier of the data
3.1129 - *
3.1130 - * @return The value, or 0 if there is no setting
3.1131 - */
3.1132 -int purple_blist_node_get_int(PurpleBlistNode *node, const char *key);
3.1133 -
3.1134 -/**
3.1135 - * Associates a string with a node in the buddy list
3.1136 - *
3.1137 - * @param node The node to associate the data with
3.1138 - * @param key The identifier for the data
3.1139 - * @param value The value to set
3.1140 - */
3.1141 -void purple_blist_node_set_string(PurpleBlistNode *node, const char *key,
3.1142 - const char *value);
3.1143 -
3.1144 -/**
3.1145 - * Retrieves a named string setting from a node in the buddy list
3.1146 - *
3.1147 - * @param node The node to retrieve the data from
3.1148 - * @param key The identifier of the data
3.1149 - *
3.1150 - * @return The value, or NULL if there is no setting
3.1151 - */
3.1152 -const char *purple_blist_node_get_string(PurpleBlistNode *node, const char *key);
3.1153 -
3.1154 -/**
3.1155 - * Removes a named setting from a blist node
3.1156 - *
3.1157 - * @param node The node from which to remove the setting
3.1158 - * @param key The name of the setting
3.1159 - */
3.1160 -void purple_blist_node_remove_setting(PurpleBlistNode *node, const char *key);
3.1161 -
3.1162 -/**
3.1163 - * Set the flags for the given node. Setting a node's flags will overwrite
3.1164 - * the old flags, so if you want to save them, you must first call
3.1165 - * purple_blist_node_get_flags and modify that appropriately.
3.1166 - *
3.1167 - * @param node The node on which to set the flags.
3.1168 - * @param flags The flags to set. This is a bitmask.
3.1169 - */
3.1170 -void purple_blist_node_set_flags(PurpleBlistNode *node, PurpleBlistNodeFlags flags);
3.1171 -
3.1172 -/**
3.1173 - * Get the current flags on a given node.
3.1174 - *
3.1175 - * @param node The node from which to get the flags.
3.1176 - *
3.1177 - * @return The flags on the node. This is a bitmask.
3.1178 - */
3.1179 -PurpleBlistNodeFlags purple_blist_node_get_flags(PurpleBlistNode *node);
3.1180 -
3.1181 -/**
3.1182 - * Get the type of a given node.
3.1183 - *
3.1184 - * @param node The node.
3.1185 - *
3.1186 - * @return The type of the node.
3.1187 - *
3.1188 - * @since 2.1.0
3.1189 - */
3.1190 -PurpleBlistNodeType purple_blist_node_get_type(PurpleBlistNode *node);
3.1191 -
3.1192 -/*@}*/
3.1193 -
3.1194 -/**
3.1195 - * Retrieves the extended menu items for a buddy list node.
3.1196 - * @param n The blist node for which to obtain the extended menu items.
3.1197 - * @return A list of PurpleMenuAction items, as harvested by the
3.1198 - * blist-node-extended-menu signal.
3.1199 - */
3.1200 -GList *purple_blist_node_get_extended_menu(PurpleBlistNode *n);
3.1201 -
3.1202 -/**************************************************************************/
3.1203 -/** @name UI Registration Functions */
3.1204 -/**************************************************************************/
3.1205 -/*@{*/
3.1206 -
3.1207 -/**
3.1208 - * Sets the UI operations structure to be used for the buddy list.
3.1209 - *
3.1210 - * @param ops The ops struct.
3.1211 - */
3.1212 -void purple_blist_set_ui_ops(PurpleBlistUiOps *ops);
3.1213 -
3.1214 -/**
3.1215 - * Returns the UI operations structure to be used for the buddy list.
3.1216 - *
3.1217 - * @return The UI operations structure.
3.1218 - */
3.1219 -PurpleBlistUiOps *purple_blist_get_ui_ops(void);
3.1220 -
3.1221 -/*@}*/
3.1222 -
3.1223 -/**************************************************************************/
3.1224 -/** @name Buddy List Subsystem */
3.1225 -/**************************************************************************/
3.1226 -/*@{*/
3.1227 -
3.1228 -/**
3.1229 - * Returns the handle for the buddy list subsystem.
3.1230 - *
3.1231 - * @return The buddy list subsystem handle.
3.1232 - */
3.1233 -void *purple_blist_get_handle(void);
3.1234 -
3.1235 -/**
3.1236 - * Initializes the buddy list subsystem.
3.1237 - */
3.1238 -void purple_blist_init(void);
3.1239 -
3.1240 -/**
3.1241 - * Uninitializes the buddy list subsystem.
3.1242 - */
3.1243 -void purple_blist_uninit(void);
3.1244 -
3.1245 -/*@}*/
3.1246 -
3.1247 -#ifdef __cplusplus
3.1248 -}
3.1249 -#endif
3.1250 -
3.1251 -#endif /* _PURPLE_BLIST_H_ */
4.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/bosh.h Fri Aug 21 13:24:36 2009 -0700
4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3 @@ -1,40 +0,0 @@
4.4 -/**
4.5 - * @file bosh.h Bidirectional-streams over Synchronous HTTP (BOSH) (XEP-0124 and XEP-0206)
4.6 - *
4.7 - * purple
4.8 - *
4.9 - * Copyright (C) 2008, Tobias Markmann <tmarkmann@googlemail.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_BOSH_H_
4.26 -#define PURPLE_JABBER_BOSH_H_
4.27 -
4.28 -typedef struct _PurpleBOSHConnection PurpleBOSHConnection;
4.29 -
4.30 -#include "jabber.h"
4.31 -
4.32 -void jabber_bosh_init(void);
4.33 -void jabber_bosh_uninit(void);
4.34 -
4.35 -PurpleBOSHConnection* jabber_bosh_connection_init(JabberStream *js, const char *url);
4.36 -void jabber_bosh_connection_destroy(PurpleBOSHConnection *conn);
4.37 -
4.38 -gboolean jabber_bosh_connection_is_ssl(PurpleBOSHConnection *conn);
4.39 -
4.40 -void jabber_bosh_connection_connect(PurpleBOSHConnection *conn);
4.41 -void jabber_bosh_connection_close(PurpleBOSHConnection *conn);
4.42 -void jabber_bosh_connection_send_raw(PurpleBOSHConnection *conn, const char *data);
4.43 -#endif /* PURPLE_JABBER_BOSH_H_ */
5.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/buddy.h Fri Aug 21 13:24:36 2009 -0700
5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
5.3 @@ -1,132 +0,0 @@
5.4 -/**
5.5 - * @file buddy.h Buddy handlers
5.6 - *
5.7 - * purple
5.8 - *
5.9 - * Copyright (C) 2003 Nathan Walp <faceprint@faceprint.com>
5.10 - *
5.11 - * This program is free software; you can redistribute it and/or modify
5.12 - * it under the terms of the GNU General Public License as published by
5.13 - * the Free Software Foundation; either version 2 of the License, or
5.14 - * (at your option) any later version.
5.15 - *
5.16 - * This program is distributed in the hope that it will be useful,
5.17 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
5.18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5.19 - * GNU General Public License for more details.
5.20 - *
5.21 - * You should have received a copy of the GNU General Public License
5.22 - * along with this program; if not, write to the Free Software
5.23 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
5.24 - */
5.25 -#ifndef PURPLE_JABBER_BUDDY_H_
5.26 -#define PURPLE_JABBER_BUDDY_H_
5.27 -
5.28 -typedef enum {
5.29 - JABBER_BUDDY_STATE_UNKNOWN = -2,
5.30 - JABBER_BUDDY_STATE_ERROR = -1,
5.31 - JABBER_BUDDY_STATE_UNAVAILABLE = 0,
5.32 - JABBER_BUDDY_STATE_ONLINE,
5.33 - JABBER_BUDDY_STATE_CHAT,
5.34 - JABBER_BUDDY_STATE_AWAY,
5.35 - JABBER_BUDDY_STATE_XA,
5.36 - JABBER_BUDDY_STATE_DND
5.37 -} JabberBuddyState;
5.38 -
5.39 -typedef struct _JabberBuddy JabberBuddy;
5.40 -
5.41 -#include "jabber.h"
5.42 -#include "caps.h"
5.43 -
5.44 -struct _JabberBuddy {
5.45 - GList *resources;
5.46 - char *error_msg;
5.47 - enum {
5.48 - JABBER_INVISIBLE_NONE = 0,
5.49 - JABBER_INVISIBLE_SERVER = 1 << 1,
5.50 - JABBER_INVIS_BUDDY = 1 << 2
5.51 - } invisible;
5.52 - enum {
5.53 - JABBER_SUB_NONE = 0,
5.54 - JABBER_SUB_PENDING = 1 << 1,
5.55 - JABBER_SUB_TO = 1 << 2,
5.56 - JABBER_SUB_FROM = 1 << 3,
5.57 - JABBER_SUB_BOTH = (JABBER_SUB_TO | JABBER_SUB_FROM),
5.58 - JABBER_SUB_REMOVE = 1 << 4
5.59 - } subscription;
5.60 -};
5.61 -
5.62 -typedef struct _JabberAdHocCommands {
5.63 - char *jid;
5.64 - char *node;
5.65 - char *name;
5.66 -} JabberAdHocCommands;
5.67 -
5.68 -typedef struct _JabberBuddyResource {
5.69 - JabberBuddy *jb;
5.70 - char *name;
5.71 - int priority;
5.72 - JabberBuddyState state;
5.73 - char *status;
5.74 - time_t idle;
5.75 - JabberCapabilities capabilities;
5.76 - char *thread_id;
5.77 - enum {
5.78 - JABBER_CHAT_STATES_UNKNOWN,
5.79 - JABBER_CHAT_STATES_UNSUPPORTED,
5.80 - JABBER_CHAT_STATES_SUPPORTED
5.81 - } chat_states;
5.82 - struct {
5.83 - char *version;
5.84 - char *name;
5.85 - char *os;
5.86 - } client;
5.87 - /* tz_off == PURPLE_NO_TZ_OFF when unset */
5.88 - long tz_off;
5.89 - struct {
5.90 - JabberCapsClientInfo *info;
5.91 - GList *exts;
5.92 - } caps;
5.93 - GList *commands;
5.94 - gboolean commands_fetched;
5.95 -} JabberBuddyResource;
5.96 -
5.97 -void jabber_buddy_free(JabberBuddy *jb);
5.98 -JabberBuddy *jabber_buddy_find(JabberStream *js, const char *name,
5.99 - gboolean create);
5.100 -JabberBuddyResource *jabber_buddy_find_resource(JabberBuddy *jb,
5.101 - const char *resource);
5.102 -JabberBuddyResource *jabber_buddy_track_resource(JabberBuddy *jb, const char *resource,
5.103 - int priority, JabberBuddyState state, const char *status);
5.104 -void jabber_buddy_resource_free(JabberBuddyResource *jbr);
5.105 -void jabber_buddy_remove_resource(JabberBuddy *jb, const char *resource);
5.106 -void jabber_buddy_get_info(PurpleConnection *gc, const char *who);
5.107 -
5.108 -GList *jabber_blist_node_menu(PurpleBlistNode *node);
5.109 -
5.110 -void jabber_set_info(PurpleConnection *gc, const char *info);
5.111 -void jabber_setup_set_info(PurplePluginAction *action);
5.112 -void jabber_set_buddy_icon(PurpleConnection *gc, PurpleStoredImage *img);
5.113 -
5.114 -const char *jabber_buddy_state_get_name(JabberBuddyState state);
5.115 -const char *jabber_buddy_state_get_status_id(JabberBuddyState state);
5.116 -const char *jabber_buddy_state_get_show(JabberBuddyState state);
5.117 -JabberBuddyState jabber_buddy_status_id_get_state(const char *id);
5.118 -JabberBuddyState jabber_buddy_show_get_state(const char *id);
5.119 -
5.120 -void jabber_user_search(JabberStream *js, const char *directory);
5.121 -void jabber_user_search_begin(PurplePluginAction *);
5.122 -
5.123 -void jabber_buddy_remove_all_pending_buddy_info_requests(JabberStream *js);
5.124 -
5.125 -void jabber_vcard_fetch_mine(JabberStream *js);
5.126 -
5.127 -gboolean jabber_resource_has_capability(const JabberBuddyResource *jbr,
5.128 - const gchar *cap);
5.129 -gboolean jabber_buddy_has_capability(const JabberBuddy *jb, const gchar *cap);
5.130 -
5.131 -const gchar *
5.132 -jabber_resource_get_identity_category_type(const JabberBuddyResource *jbr,
5.133 - const gchar *category);
5.134 -
5.135 -#endif /* PURPLE_JABBER_BUDDY_H_ */
6.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/buddyicon.h Fri Aug 21 13:24:36 2009 -0700
6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
6.3 @@ -1,441 +0,0 @@
6.4 -/**
6.5 - * @file buddyicon.h Buddy Icon API
6.6 - * @ingroup core
6.7 - */
6.8 -
6.9 -/* purple
6.10 - *
6.11 - * Purple is the legal property of its developers, whose names are too numerous
6.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
6.13 - * source distribution.
6.14 - *
6.15 - * This program is free software; you can redistribute it and/or modify
6.16 - * it under the terms of the GNU General Public License as published by
6.17 - * the Free Software Foundation; either version 2 of the License, or
6.18 - * (at your option) any later version.
6.19 - *
6.20 - * This program is distributed in the hope that it will be useful,
6.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
6.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6.23 - * GNU General Public License for more details.
6.24 - *
6.25 - * You should have received a copy of the GNU General Public License
6.26 - * along with this program; if not, write to the Free Software
6.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
6.28 - */
6.29 -#ifndef _PURPLE_BUDDYICON_H_
6.30 -#define _PURPLE_BUDDYICON_H_
6.31 -
6.32 -/** An opaque structure representing a buddy icon for a particular user on a
6.33 - * particular #PurpleAccount. Instances are reference-counted; use
6.34 - * purple_buddy_icon_ref() and purple_buddy_icon_unref() to take and release
6.35 - * references.
6.36 - */
6.37 -typedef struct _PurpleBuddyIcon PurpleBuddyIcon;
6.38 -
6.39 -#include "account.h"
6.40 -#include "blist.h"
6.41 -#include "imgstore.h"
6.42 -#include "prpl.h"
6.43 -#include "util.h"
6.44 -
6.45 -#ifdef __cplusplus
6.46 -extern "C" {
6.47 -#endif
6.48 -
6.49 -
6.50 -/**************************************************************************/
6.51 -/** @name Buddy Icon API */
6.52 -/**************************************************************************/
6.53 -/*@{*/
6.54 -
6.55 -/**
6.56 - * Creates a new buddy icon structure and populates it.
6.57 - *
6.58 - * If the buddy icon already exists, you'll get a reference to that structure,
6.59 - * which will have been updated with the data supplied.
6.60 - *
6.61 - * @param account The account the user is on.
6.62 - * @param username The username the icon belongs to.
6.63 - * @param icon_data The buddy icon data.
6.64 - * @param icon_len The buddy icon length.
6.65 - * @param checksum A protocol checksum from the prpl or @c NULL.
6.66 - *
6.67 - * @return The buddy icon structure, with a reference for the caller.
6.68 - */
6.69 -PurpleBuddyIcon *purple_buddy_icon_new(PurpleAccount *account, const char *username,
6.70 - void *icon_data, size_t icon_len,
6.71 - const char *checksum);
6.72 -
6.73 -/**
6.74 - * Increments the reference count on a buddy icon.
6.75 - *
6.76 - * @param icon The buddy icon.
6.77 - *
6.78 - * @return @a icon.
6.79 - */
6.80 -PurpleBuddyIcon *purple_buddy_icon_ref(PurpleBuddyIcon *icon);
6.81 -
6.82 -/**
6.83 - * Decrements the reference count on a buddy icon.
6.84 - *
6.85 - * If the reference count reaches 0, the icon will be destroyed.
6.86 - *
6.87 - * @param icon The buddy icon.
6.88 - *
6.89 - * @return @a icon, or @c NULL if the reference count reached 0.
6.90 - */
6.91 -PurpleBuddyIcon *purple_buddy_icon_unref(PurpleBuddyIcon *icon);
6.92 -
6.93 -/**
6.94 - * Updates every instance of this icon.
6.95 - *
6.96 - * @param icon The buddy icon.
6.97 - */
6.98 -void purple_buddy_icon_update(PurpleBuddyIcon *icon);
6.99 -
6.100 -/**
6.101 - * Sets the buddy icon's data.
6.102 - *
6.103 - * @param icon The buddy icon.
6.104 - * @param data The buddy icon data, which the buddy icon code
6.105 - * takes ownership of and will free.
6.106 - * @param len The length of the data in @a data.
6.107 - * @param checksum A protocol checksum from the prpl or @c NULL.
6.108 - */
6.109 -void
6.110 -purple_buddy_icon_set_data(PurpleBuddyIcon *icon, guchar *data,
6.111 - size_t len, const char *checksum);
6.112 -
6.113 -/**
6.114 - * Returns the buddy icon's account.
6.115 - *
6.116 - * @param icon The buddy icon.
6.117 - *
6.118 - * @return The account.
6.119 - */
6.120 -PurpleAccount *purple_buddy_icon_get_account(const PurpleBuddyIcon *icon);
6.121 -
6.122 -/**
6.123 - * Returns the buddy icon's username.
6.124 - *
6.125 - * @param icon The buddy icon.
6.126 - *
6.127 - * @return The username.
6.128 - */
6.129 -const char *purple_buddy_icon_get_username(const PurpleBuddyIcon *icon);
6.130 -
6.131 -/**
6.132 - * Returns the buddy icon's checksum.
6.133 - *
6.134 - * This function is really only for prpl use.
6.135 - *
6.136 - * @param icon The buddy icon.
6.137 - *
6.138 - * @return The checksum.
6.139 - */
6.140 -const char *purple_buddy_icon_get_checksum(const PurpleBuddyIcon *icon);
6.141 -
6.142 -/**
6.143 - * Returns the buddy icon's data.
6.144 - *
6.145 - * @param icon The buddy icon.
6.146 - * @param len If not @c NULL, the length of the icon data returned will be
6.147 - * set in the location pointed to by this.
6.148 - *
6.149 - * @return A pointer to the icon data.
6.150 - */
6.151 -gconstpointer purple_buddy_icon_get_data(const PurpleBuddyIcon *icon, size_t *len);
6.152 -
6.153 -/**
6.154 - * Returns an extension corresponding to the buddy icon's file type.
6.155 - *
6.156 - * @param icon The buddy icon.
6.157 - *
6.158 - * @return The icon's extension, "icon" if unknown, or @c NULL if
6.159 - * the image data has disappeared.
6.160 - */
6.161 -const char *purple_buddy_icon_get_extension(const PurpleBuddyIcon *icon);
6.162 -
6.163 -/**
6.164 - * Returns a full path to an icon.
6.165 - *
6.166 - * If the icon has data and the file exists in the cache, this will return
6.167 - * a full path to the cache file.
6.168 - *
6.169 - * In general, it is not appropriate to be poking in the icon cache
6.170 - * directly. If you find yourself wanting to use this function, think
6.171 - * very long and hard about it, and then don't.
6.172 - *
6.173 - * @param icon The buddy icon
6.174 - *
6.175 - * @return A full path to the file, or @c NULL under various conditions.
6.176 - */
6.177 -char *purple_buddy_icon_get_full_path(PurpleBuddyIcon *icon);
6.178 -
6.179 -/*@}*/
6.180 -
6.181 -/**************************************************************************/
6.182 -/** @name Buddy Icon Subsystem API */
6.183 -/**************************************************************************/
6.184 -/*@{*/
6.185 -
6.186 -/**
6.187 - * Sets a buddy icon for a user.
6.188 - *
6.189 - * @param account The account the user is on.
6.190 - * @param username The username of the user.
6.191 - * @param icon_data The buddy icon data, which the buddy icon code
6.192 - * takes ownership of and will free.
6.193 - * @param icon_len The length of the icon data.
6.194 - * @param checksum A protocol checksum from the prpl or @c NULL.
6.195 - */
6.196 -void
6.197 -purple_buddy_icons_set_for_user(PurpleAccount *account, const char *username,
6.198 - void *icon_data, size_t icon_len,
6.199 - const char *checksum);
6.200 -
6.201 -/**
6.202 - * Returns the checksum for the buddy icon of a specified buddy.
6.203 - *
6.204 - * This avoids loading the icon image data from the cache if it's
6.205 - * not already loaded for some other reason.
6.206 - *
6.207 - * @param buddy The buddy
6.208 - *
6.209 - * @return The checksum.
6.210 - */
6.211 -const char *
6.212 -purple_buddy_icons_get_checksum_for_user(PurpleBuddy *buddy);
6.213 -
6.214 -/**
6.215 - * Returns the buddy icon information for a user.
6.216 - *
6.217 - * @param account The account the user is on.
6.218 - * @param username The username of the user.
6.219 - *
6.220 - * @return The icon (with a reference for the caller) if found, or @c NULL if
6.221 - * not found.
6.222 - */
6.223 -PurpleBuddyIcon *
6.224 -purple_buddy_icons_find(PurpleAccount *account, const char *username);
6.225 -
6.226 -/**
6.227 - * Returns the buddy icon image for an account.
6.228 - *
6.229 - * The caller owns a reference to the image in the store, and must dereference
6.230 - * the image with purple_imgstore_unref() for it to be freed.
6.231 - *
6.232 - * This function deals with loading the icon from the cache, if
6.233 - * needed, so it should be called in any case where you want the
6.234 - * appropriate icon.
6.235 - *
6.236 - * @param account The account
6.237 - *
6.238 - * @return The account's buddy icon image.
6.239 - */
6.240 -PurpleStoredImage *
6.241 -purple_buddy_icons_find_account_icon(PurpleAccount *account);
6.242 -
6.243 -/**
6.244 - * Sets a buddy icon for an account.
6.245 - *
6.246 - * This function will deal with saving a record of the icon,
6.247 - * caching the data, etc.
6.248 - *
6.249 - * @param account The account for which to set a custom icon.
6.250 - * @param icon_data The image data of the icon, which the
6.251 - * buddy icon code will free.
6.252 - * @param icon_len The length of the data in @a icon_data.
6.253 - *
6.254 - * @return The icon that was set. The caller does NOT own
6.255 - * a reference to this, and must call purple_imgstore_ref()
6.256 - * if it wants one.
6.257 - */
6.258 -PurpleStoredImage *
6.259 -purple_buddy_icons_set_account_icon(PurpleAccount *account,
6.260 - guchar *icon_data, size_t icon_len);
6.261 -
6.262 -/**
6.263 - * Returns the timestamp of when the icon was set.
6.264 - *
6.265 - * This is intended for use in protocols that require a timestamp for
6.266 - * buddy icon update reasons.
6.267 - *
6.268 - * @param account The account
6.269 - *
6.270 - * @return The time the icon was set, or 0 if an error occurred.
6.271 - */
6.272 -time_t
6.273 -purple_buddy_icons_get_account_icon_timestamp(PurpleAccount *account);
6.274 -
6.275 -/**
6.276 - * Returns a boolean indicating if a given blist node has a custom buddy icon.
6.277 - *
6.278 - * @param node The blist node.
6.279 - *
6.280 - * @return A boolean indicating if @a node has a custom buddy icon.
6.281 - * @since 2.5.0
6.282 - */
6.283 -gboolean
6.284 -purple_buddy_icons_node_has_custom_icon(PurpleBlistNode *node);
6.285 -
6.286 -/**
6.287 - * Returns the custom buddy icon image for a blist node.
6.288 - *
6.289 - * The caller owns a reference to the image in the store, and must dereference
6.290 - * the image with purple_imgstore_unref() for it to be freed.
6.291 - *
6.292 - * This function deals with loading the icon from the cache, if
6.293 - * needed, so it should be called in any case where you want the
6.294 - * appropriate icon.
6.295 - *
6.296 - * @param node The node.
6.297 - *
6.298 - * @return The custom buddy icon.
6.299 - * @since 2.5.0
6.300 - */
6.301 -PurpleStoredImage *
6.302 -purple_buddy_icons_node_find_custom_icon(PurpleBlistNode *node);
6.303 -
6.304 -/**
6.305 - * Sets a custom buddy icon for a blist node.
6.306 - *
6.307 - * This function will deal with saving a record of the icon, caching the data,
6.308 - * etc.
6.309 - *
6.310 - * @param node The blist node for which to set a custom icon.
6.311 - * @param icon_data The image data of the icon, which the buddy icon code will
6.312 - * free. Use NULL to unset the icon.
6.313 - * @param icon_len The length of the data in @a icon_data.
6.314 - *
6.315 - * @return The icon that was set. The caller does NOT own a reference to this,
6.316 - * and must call purple_imgstore_ref() if it wants one.
6.317 - * @since 2.5.0
6.318 - */
6.319 -PurpleStoredImage *
6.320 -purple_buddy_icons_node_set_custom_icon(PurpleBlistNode *node,
6.321 - guchar *icon_data, size_t icon_len);
6.322 -
6.323 -/**
6.324 - * Sets a custom buddy icon for a blist node.
6.325 - *
6.326 - * Convenience wrapper around purple_buddy_icons_node_set_custom_icon.
6.327 - * @see purple_buddy_icons_node_set_custom_icon()
6.328 - *
6.329 - * @param node The blist node for which to set a custom icon.
6.330 - * @param filename The path to the icon to set for the blist node. Use NULL
6.331 - * to unset the custom icon.
6.332 - *
6.333 - * @return The icon that was set. The caller does NOT own a reference to this,
6.334 - * and must call purple_imgstore_ref() if it wants one.
6.335 - * @since 2.5.0
6.336 - */
6.337 -PurpleStoredImage *
6.338 -purple_buddy_icons_node_set_custom_icon_from_file(PurpleBlistNode *node,
6.339 - const gchar *filename);
6.340 -
6.341 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_BUDDYICON_C_)
6.342 -/**
6.343 - * PurpleContact version of purple_buddy_icons_node_has_custom_icon.
6.344 - *
6.345 - * @copydoc purple_buddy_icons_node_has_custom_icon()
6.346 - *
6.347 - * @deprecated Use purple_buddy_icons_node_has_custom_icon instead.
6.348 - */
6.349 -gboolean
6.350 -purple_buddy_icons_has_custom_icon(PurpleContact *contact);
6.351 -
6.352 -/**
6.353 - * PurpleContact version of purple_buddy_icons_node_find_custom_icon.
6.354 - *
6.355 - * @copydoc purple_buddy_icons_node_find_custom_icon()
6.356 - *
6.357 - * @deprecated Use purple_buddy_icons_node_find_custom_icon instead.
6.358 - */
6.359 -PurpleStoredImage *
6.360 -purple_buddy_icons_find_custom_icon(PurpleContact *contact);
6.361 -
6.362 -/**
6.363 - * PurpleContact version of purple_buddy_icons_node_set_custom_icon.
6.364 - *
6.365 - * @copydoc purple_buddy_icons_node_set_custom_icon()
6.366 - *
6.367 - * @deprecated Use purple_buddy_icons_node_set_custom_icon instead.
6.368 - */
6.369 -PurpleStoredImage *
6.370 -purple_buddy_icons_set_custom_icon(PurpleContact *contact,
6.371 - guchar *icon_data, size_t icon_len);
6.372 -#endif
6.373 -
6.374 -/**
6.375 - * Sets whether or not buddy icon caching is enabled.
6.376 - *
6.377 - * @param caching TRUE of buddy icon caching should be enabled, or
6.378 - * FALSE otherwise.
6.379 - */
6.380 -void purple_buddy_icons_set_caching(gboolean caching);
6.381 -
6.382 -/**
6.383 - * Returns whether or not buddy icon caching should be enabled.
6.384 - *
6.385 - * The default is TRUE, unless otherwise specified by
6.386 - * purple_buddy_icons_set_caching().
6.387 - *
6.388 - * @return TRUE if buddy icon caching is enabled, or FALSE otherwise.
6.389 - */
6.390 -gboolean purple_buddy_icons_is_caching(void);
6.391 -
6.392 -/**
6.393 - * Sets the directory used to store buddy icon cache files.
6.394 - *
6.395 - * @param cache_dir The directory to store buddy icon cache files to.
6.396 - */
6.397 -void purple_buddy_icons_set_cache_dir(const char *cache_dir);
6.398 -
6.399 -/**
6.400 - * Returns the directory used to store buddy icon cache files.
6.401 - *
6.402 - * The default directory is PURPLEDIR/icons, unless otherwise specified
6.403 - * by purple_buddy_icons_set_cache_dir().
6.404 - *
6.405 - * @return The directory to store buddy icon cache files to.
6.406 - */
6.407 -const char *purple_buddy_icons_get_cache_dir(void);
6.408 -
6.409 -/**
6.410 - * Returns the buddy icon subsystem handle.
6.411 - *
6.412 - * @return The subsystem handle.
6.413 - */
6.414 -void *purple_buddy_icons_get_handle(void);
6.415 -
6.416 -/**
6.417 - * Initializes the buddy icon subsystem.
6.418 - */
6.419 -void purple_buddy_icons_init(void);
6.420 -
6.421 -/**
6.422 - * Uninitializes the buddy icon subsystem.
6.423 - */
6.424 -void purple_buddy_icons_uninit(void);
6.425 -
6.426 -/*@}*/
6.427 -
6.428 -/**************************************************************************/
6.429 -/** @name Buddy Icon Helper API */
6.430 -/**************************************************************************/
6.431 -/*@{*/
6.432 -
6.433 -/**
6.434 - * Gets display size for a buddy icon
6.435 - */
6.436 -void purple_buddy_icon_get_scale_size(PurpleBuddyIconSpec *spec, int *width, int *height);
6.437 -
6.438 -/*@}*/
6.439 -
6.440 -#ifdef __cplusplus
6.441 -}
6.442 -#endif
6.443 -
6.444 -#endif /* _PURPLE_BUDDYICON_H_ */
7.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/buddylist.h Fri Aug 21 13:24:36 2009 -0700
7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
7.3 @@ -1,57 +0,0 @@
7.4 -/**
7.5 - * @file buddylist.h
7.6 - *
7.7 - * purple
7.8 - *
7.9 - * Copyright (C) 2005 Bartosz Oler <bartosz@bzimage.us>
7.10 - *
7.11 - * This program is free software; you can redistribute it and/or modify
7.12 - * it under the terms of the GNU General Public License as published by
7.13 - * the Free Software Foundation; either version 2 of the License, or
7.14 - * (at your option) any later version.
7.15 - *
7.16 - * This program is distributed in the hope that it will be useful,
7.17 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
7.18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7.19 - * GNU General Public License for more details.
7.20 - *
7.21 - * You should have received a copy of the GNU General Public License
7.22 - * along with this program; if not, write to the Free Software
7.23 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
7.24 - */
7.25 -
7.26 -
7.27 -#ifndef _PURPLE_GG_BUDDYLIST_H
7.28 -#define _PURPLE_GG_BUDDYLIST_H
7.29 -
7.30 -#include "connection.h"
7.31 -#include "account.h"
7.32 -
7.33 -void
7.34 -ggp_buddylist_send(PurpleConnection *gc);
7.35 -
7.36 -/**
7.37 - * Load buddylist from server into the roster.
7.38 - *
7.39 - * @param gc PurpleConnection
7.40 - * @param buddylist Pointer to the buddylist that will be loaded.
7.41 - */
7.42 -/* void ggp_buddylist_load(PurpleConnection *gc, char *buddylist) {{{ */
7.43 -void
7.44 -ggp_buddylist_load(PurpleConnection *gc, char *buddylist);
7.45 -
7.46 -/**
7.47 - * Get all the buddies in the current account.
7.48 - *
7.49 - * @param account Current account.
7.50 - *
7.51 - * @return List of buddies.
7.52 - */
7.53 -char *
7.54 -ggp_buddylist_dump(PurpleAccount *account);
7.55 -
7.56 -
7.57 -#endif /* _PURPLE_GG_BUDDYLIST_H */
7.58 -
7.59 -
7.60 -/* vim: set ts=8 sts=0 sw=8 noet: */
8.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/caps.h Fri Aug 21 13:24:36 2009 -0700
8.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
8.3 @@ -1,116 +0,0 @@
8.4 -/*
8.5 - * purple - Jabber Protocol Plugin
8.6 - *
8.7 - * Copyright (C) 2007, Andreas Monitzer <andy@monitzer.com>
8.8 - *
8.9 - * This program is free software; you can redistribute it and/or modify
8.10 - * it under the terms of the GNU General Public License as published by
8.11 - * the Free Software Foundation; either version 2 of the License, or
8.12 - * (at your option) any later version.
8.13 - *
8.14 - * This program is distributed in the hope that it will be useful,
8.15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
8.16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8.17 - * GNU General Public License for more details.
8.18 - *
8.19 - * You should have received a copy of the GNU General Public License
8.20 - * along with this program; if not, write to the Free Software
8.21 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
8.22 - *
8.23 - */
8.24 -
8.25 -#ifndef PURPLE_JABBER_CAPS_H_
8.26 -#define PURPLE_JABBER_CAPS_H_
8.27 -
8.28 -typedef struct _JabberCapsClientInfo JabberCapsClientInfo;
8.29 -
8.30 -#include "jabber.h"
8.31 -
8.32 -/* Implementation of XEP-0115 - Entity Capabilities */
8.33 -
8.34 -typedef struct _JabberCapsNodeExts JabberCapsNodeExts;
8.35 -
8.36 -typedef struct _JabberCapsTuple {
8.37 - const char *node;
8.38 - const char *ver;
8.39 - const char *hash;
8.40 -} JabberCapsTuple;
8.41 -
8.42 -struct _JabberCapsClientInfo {
8.43 - GList *identities; /* JabberIdentity */
8.44 - GList *features; /* char * */
8.45 - GList *forms; /* xmlnode * */
8.46 - JabberCapsNodeExts *exts;
8.47 -
8.48 - const JabberCapsTuple tuple;
8.49 -};
8.50 -
8.51 -/*
8.52 - * This stores a set of exts "known" for a specific node (which indicates
8.53 - * a specific client -- for reference, Pidgin, Finch, Meebo, et al share one
8.54 - * node.) In XEP-0115 v1.3, exts are used for features that may or may not be
8.55 - * present at a given time (PEP things, buzz might be disabled, etc).
8.56 - *
8.57 - * This structure is shared among all JabberCapsClientInfo instances matching
8.58 - * a specific node (if the capstable key->hash == NULL, which indicates that
8.59 - * the ClientInfo is using v1.3 caps as opposed to v1.5 caps).
8.60 - *
8.61 - * It's only exposed so that jabber_resource_has_capability can use it.
8.62 - * Everyone else, STAY AWAY!
8.63 - */
8.64 -struct _JabberCapsNodeExts {
8.65 - guint ref;
8.66 - GHashTable *exts; /* char *ext_name -> GList *features */
8.67 -};
8.68 -
8.69 -typedef void (*jabber_caps_get_info_cb)(JabberCapsClientInfo *info, GList *exts, gpointer user_data);
8.70 -
8.71 -void jabber_caps_init(void);
8.72 -void jabber_caps_uninit(void);
8.73 -
8.74 -/**
8.75 - * Check whether all of the exts in a char* array are known to the given info.
8.76 - */
8.77 -gboolean jabber_caps_exts_known(const JabberCapsClientInfo *info, char **exts);
8.78 -
8.79 -/**
8.80 - * Main entity capabilites function to get the capabilities of a contact.
8.81 - *
8.82 - * The callback will be called synchronously if we already have the
8.83 - * capabilities for the specified (node,ver,hash) (and, if exts are specified,
8.84 - * if we know what each means)
8.85 - *
8.86 - * @param exts A g_strsplit'd (NULL-terminated) array of strings. This
8.87 - * function is responsible for freeing it.
8.88 - */
8.89 -void jabber_caps_get_info(JabberStream *js, const char *who, const char *node,
8.90 - const char *ver, const char *hash,
8.91 - char **exts, jabber_caps_get_info_cb cb,
8.92 - gpointer user_data);
8.93 -
8.94 -/**
8.95 - * Takes a JabberCapsClientInfo pointer and returns the caps hash according to
8.96 - * XEP-0115 Version 1.5.
8.97 - *
8.98 - * @param info A JabberCapsClientInfo pointer.
8.99 - * @param hash Hash cipher to be used. Either sha-1 or md5.
8.100 - * @return The base64 encoded SHA-1 hash; must be freed by caller
8.101 - */
8.102 -gchar *jabber_caps_calculate_hash(JabberCapsClientInfo *info, const char *hash);
8.103 -
8.104 -/**
8.105 - * Calculate SHA1 hash for own featureset.
8.106 - */
8.107 -void jabber_caps_calculate_own_hash(JabberStream *js);
8.108 -
8.109 -/** Get the current caps hash.
8.110 - * @ret hash
8.111 -**/
8.112 -const gchar* jabber_caps_get_own_hash(JabberStream *js);
8.113 -
8.114 -/**
8.115 - * Broadcast a new calculated hash using a <presence> stanza.
8.116 - */
8.117 -void jabber_caps_broadcast_change(void);
8.118 -
8.119 -#endif /* PURPLE_JABBER_CAPS_H_ */
9.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/certificate.h Fri Aug 21 13:24:36 2009 -0700
9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
9.3 @@ -1,826 +0,0 @@
9.4 -/**
9.5 - * @file certificate.h Public-Key Certificate API
9.6 - * @ingroup core
9.7 - * @see @ref certificate-signals
9.8 - * @since 2.2.0
9.9 - */
9.10 -
9.11 -/*
9.12 - *
9.13 - * purple
9.14 - *
9.15 - * Purple is the legal property of its developers, whose names are too numerous
9.16 - * to list here. Please refer to the COPYRIGHT file distributed with this
9.17 - * source distribution.
9.18 - *
9.19 - * This program is free software; you can redistribute it and/or modify
9.20 - * it under the terms of the GNU General Public License as published by
9.21 - * the Free Software Foundation; either version 2 of the License, or
9.22 - * (at your option) any later version.
9.23 - *
9.24 - * This program is distributed in the hope that it will be useful,
9.25 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
9.26 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9.27 - * GNU General Public License for more details.
9.28 - *
9.29 - * You should have received a copy of the GNU General Public License
9.30 - * along with this program; if not, write to the Free Software
9.31 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
9.32 - */
9.33 -
9.34 -#ifndef _PURPLE_CERTIFICATE_H
9.35 -#define _PURPLE_CERTIFICATE_H
9.36 -
9.37 -#include <time.h>
9.38 -
9.39 -#include <glib.h>
9.40 -
9.41 -#ifdef __cplusplus
9.42 -extern "C" {
9.43 -#endif /* __cplusplus */
9.44 -
9.45 -
9.46 -typedef enum
9.47 -{
9.48 - PURPLE_CERTIFICATE_INVALID = 0,
9.49 - PURPLE_CERTIFICATE_VALID = 1
9.50 -} PurpleCertificateVerificationStatus;
9.51 -
9.52 -typedef struct _PurpleCertificate PurpleCertificate;
9.53 -typedef struct _PurpleCertificatePool PurpleCertificatePool;
9.54 -typedef struct _PurpleCertificateScheme PurpleCertificateScheme;
9.55 -typedef struct _PurpleCertificateVerifier PurpleCertificateVerifier;
9.56 -typedef struct _PurpleCertificateVerificationRequest PurpleCertificateVerificationRequest;
9.57 -
9.58 -/**
9.59 - * Callback function for the results of a verification check
9.60 - * @param st Status code
9.61 - * @param userdata User-defined data
9.62 - */
9.63 -typedef void (*PurpleCertificateVerifiedCallback)
9.64 - (PurpleCertificateVerificationStatus st,
9.65 - gpointer userdata);
9.66 -
9.67 -/** A certificate instance
9.68 - *
9.69 - * An opaque data structure representing a single certificate under some
9.70 - * CertificateScheme
9.71 - */
9.72 -struct _PurpleCertificate
9.73 -{
9.74 - /** Scheme this certificate is under */
9.75 - PurpleCertificateScheme * scheme;
9.76 - /** Opaque pointer to internal data */
9.77 - gpointer data;
9.78 -};
9.79 -
9.80 -/**
9.81 - * Database for retrieval or storage of Certificates
9.82 - *
9.83 - * More or less a hash table; all lookups and writes are controlled by a string
9.84 - * key.
9.85 - */
9.86 -struct _PurpleCertificatePool
9.87 -{
9.88 - /** Scheme this Pool operates for */
9.89 - gchar *scheme_name;
9.90 - /** Internal name to refer to the pool by */
9.91 - gchar *name;
9.92 -
9.93 - /** User-friendly name for this type
9.94 - * ex: N_("SSL Servers")
9.95 - * When this is displayed anywhere, it should be i18ned
9.96 - * ex: _(pool->fullname)
9.97 - */
9.98 - gchar *fullname;
9.99 -
9.100 - /** Internal pool data */
9.101 - gpointer data;
9.102 -
9.103 - /**
9.104 - * Set up the Pool's internal state
9.105 - *
9.106 - * Upon calling purple_certificate_register_pool() , this function will
9.107 - * be called. May be NULL.
9.108 - * @return TRUE if the initialization succeeded, otherwise FALSE
9.109 - */
9.110 - gboolean (* init)(void);
9.111 -
9.112 - /**
9.113 - * Uninit the Pool's internal state
9.114 - *
9.115 - * Will be called by purple_certificate_unregister_pool() . May be NULL
9.116 - */
9.117 - void (* uninit)(void);
9.118 -
9.119 - /** Check for presence of a certificate in the pool using unique ID */
9.120 - gboolean (* cert_in_pool)(const gchar *id);
9.121 - /** Retrieve a PurpleCertificate from the pool */
9.122 - PurpleCertificate * (* get_cert)(const gchar *id);
9.123 - /** Add a certificate to the pool. Must overwrite any other
9.124 - * certificates sharing the same ID in the pool.
9.125 - * @return TRUE if the operation succeeded, otherwise FALSE
9.126 - */
9.127 - gboolean (* put_cert)(const gchar *id, PurpleCertificate *crt);
9.128 - /** Delete a certificate from the pool */
9.129 - gboolean (* delete_cert)(const gchar *id);
9.130 -
9.131 - /** Returns a list of IDs stored in the pool */
9.132 - GList * (* get_idlist)(void);
9.133 -
9.134 - void (*_purple_reserved1)(void);
9.135 - void (*_purple_reserved2)(void);
9.136 - void (*_purple_reserved3)(void);
9.137 - void (*_purple_reserved4)(void);
9.138 -};
9.139 -
9.140 -/** A certificate type
9.141 - *
9.142 - * A CertificateScheme must implement all of the fields in the structure,
9.143 - * and register it using purple_certificate_register_scheme()
9.144 - *
9.145 - * There may be only ONE CertificateScheme provided for each certificate
9.146 - * type, as specified by the "name" field.
9.147 - */
9.148 -struct _PurpleCertificateScheme
9.149 -{
9.150 - /** Name of the certificate type
9.151 - * ex: "x509", "pgp", etc.
9.152 - * This must be globally unique - you may not register more than one
9.153 - * CertificateScheme of the same name at a time.
9.154 - */
9.155 - gchar * name;
9.156 -
9.157 - /** User-friendly name for this type
9.158 - * ex: N_("X.509 Certificates")
9.159 - * When this is displayed anywhere, it should be i18ned
9.160 - * ex: _(scheme->fullname)
9.161 - */
9.162 - gchar * fullname;
9.163 -
9.164 - /** Imports a certificate from a file
9.165 - *
9.166 - * @param filename File to import the certificate from
9.167 - * @return Pointer to the newly allocated Certificate struct
9.168 - * or NULL on failure.
9.169 - */
9.170 - PurpleCertificate * (* import_certificate)(const gchar * filename);
9.171 -
9.172 - /**
9.173 - * Exports a certificate to a file
9.174 - *
9.175 - * @param filename File to export the certificate to
9.176 - * @param crt Certificate to export
9.177 - * @return TRUE if the export succeeded, otherwise FALSE
9.178 - * @see purple_certificate_export()
9.179 - */
9.180 - gboolean (* export_certificate)(const gchar *filename, PurpleCertificate *crt);
9.181 -
9.182 - /**
9.183 - * Duplicates a certificate
9.184 - *
9.185 - * Certificates are generally assumed to be read-only, so feel free to
9.186 - * do any sort of reference-counting magic you want here. If this ever
9.187 - * changes, please remember to change the magic accordingly.
9.188 - * @return Reference to the new copy
9.189 - */
9.190 - PurpleCertificate * (* copy_certificate)(PurpleCertificate *crt);
9.191 -
9.192 - /** Destroys and frees a Certificate structure
9.193 - *
9.194 - * Destroys a Certificate's internal data structures and calls
9.195 - * free(crt)
9.196 - *
9.197 - * @param crt Certificate instance to be destroyed. It WILL NOT be
9.198 - * destroyed if it is not of the correct
9.199 - * CertificateScheme. Can be NULL
9.200 - */
9.201 - void (* destroy_certificate)(PurpleCertificate * crt);
9.202 -
9.203 - /** Find whether "crt" has a valid signature from issuer "issuer"
9.204 - * @see purple_certificate_signed_by() */
9.205 - gboolean (*signed_by)(PurpleCertificate *crt, PurpleCertificate *issuer);
9.206 - /**
9.207 - * Retrieves the certificate public key fingerprint using SHA1
9.208 - *
9.209 - * @param crt Certificate instance
9.210 - * @return Binary representation of SHA1 hash - must be freed using
9.211 - * g_byte_array_free()
9.212 - */
9.213 - GByteArray * (* get_fingerprint_sha1)(PurpleCertificate *crt);
9.214 -
9.215 - /**
9.216 - * Retrieves a unique certificate identifier
9.217 - *
9.218 - * @param crt Certificate instance
9.219 - * @return Newly allocated string that can be used to uniquely
9.220 - * identify the certificate.
9.221 - */
9.222 - gchar * (* get_unique_id)(PurpleCertificate *crt);
9.223 -
9.224 - /**
9.225 - * Retrieves a unique identifier for the certificate's issuer
9.226 - *
9.227 - * @param crt Certificate instance
9.228 - * @return Newly allocated string that can be used to uniquely
9.229 - * identify the issuer's certificate.
9.230 - */
9.231 - gchar * (* get_issuer_unique_id)(PurpleCertificate *crt);
9.232 -
9.233 - /**
9.234 - * Gets the certificate subject's name
9.235 - *
9.236 - * For X.509, this is the "Common Name" field, as we're only using it
9.237 - * for hostname verification at the moment
9.238 - *
9.239 - * @see purple_certificate_get_subject_name()
9.240 - *
9.241 - * @param crt Certificate instance
9.242 - * @return Newly allocated string with the certificate subject.
9.243 - */
9.244 - gchar * (* get_subject_name)(PurpleCertificate *crt);
9.245 -
9.246 - /**
9.247 - * Check the subject name against that on the certificate
9.248 - * @see purple_certificate_check_subject_name()
9.249 - * @return TRUE if it is a match, else FALSE
9.250 - */
9.251 - gboolean (* check_subject_name)(PurpleCertificate *crt, const gchar *name);
9.252 -
9.253 - /** Retrieve the certificate activation/expiration times */
9.254 - gboolean (* get_times)(PurpleCertificate *crt, time_t *activation, time_t *expiration);
9.255 -
9.256 - void (*_purple_reserved1)(void);
9.257 - void (*_purple_reserved2)(void);
9.258 - void (*_purple_reserved3)(void);
9.259 - void (*_purple_reserved4)(void);
9.260 -};
9.261 -
9.262 -/** A set of operations used to provide logic for verifying a Certificate's
9.263 - * authenticity.
9.264 - *
9.265 - * A Verifier provider must fill out these fields, then register it using
9.266 - * purple_certificate_register_verifier()
9.267 - *
9.268 - * The (scheme_name, name) value must be unique for each Verifier - you may not
9.269 - * register more than one Verifier of the same name for each Scheme
9.270 - */
9.271 -struct _PurpleCertificateVerifier
9.272 -{
9.273 - /** Name of the scheme this Verifier operates on
9.274 - *
9.275 - * The scheme will be looked up by name when a Request is generated
9.276 - * using this Verifier
9.277 - */
9.278 - gchar *scheme_name;
9.279 -
9.280 - /** Name of the Verifier - case insensitive */
9.281 - gchar *name;
9.282 -
9.283 - /**
9.284 - * Start the verification process
9.285 - *
9.286 - * To be called from purple_certificate_verify once it has
9.287 - * constructed the request. This will use the information in the
9.288 - * given VerificationRequest to check the certificate and callback
9.289 - * the requester with the verification results.
9.290 - *
9.291 - * @param vrq Request to process
9.292 - */
9.293 - void (* start_verification)(PurpleCertificateVerificationRequest *vrq);
9.294 -
9.295 - /**
9.296 - * Destroy a completed Request under this Verifier
9.297 - * The function pointed to here is only responsible for cleaning up
9.298 - * whatever PurpleCertificateVerificationRequest::data points to.
9.299 - * It should not call free(vrq)
9.300 - *
9.301 - * @param vrq Request to destroy
9.302 - */
9.303 - void (* destroy_request)(PurpleCertificateVerificationRequest *vrq);
9.304 -
9.305 - void (*_purple_reserved1)(void);
9.306 - void (*_purple_reserved2)(void);
9.307 - void (*_purple_reserved3)(void);
9.308 - void (*_purple_reserved4)(void);
9.309 -};
9.310 -
9.311 -/** Structure for a single certificate request
9.312 - *
9.313 - * Useful for keeping track of the state of a verification that involves
9.314 - * several steps
9.315 - */
9.316 -struct _PurpleCertificateVerificationRequest
9.317 -{
9.318 - /** Reference to the verification logic used */
9.319 - PurpleCertificateVerifier *verifier;
9.320 - /** Reference to the scheme used.
9.321 - *
9.322 - * This is looked up from the Verifier when the Request is generated
9.323 - */
9.324 - PurpleCertificateScheme *scheme;
9.325 -
9.326 - /**
9.327 - * Name to check that the certificate is issued to
9.328 - *
9.329 - * For X.509 certificates, this is the Common Name
9.330 - */
9.331 - gchar *subject_name;
9.332 -
9.333 - /** List of certificates in the chain to be verified (such as that returned by purple_ssl_get_peer_certificates )
9.334 - *
9.335 - * This is most relevant for X.509 certificates used in SSL sessions.
9.336 - * The list order should be: certificate, issuer, issuer's issuer, etc.
9.337 - */
9.338 - GList *cert_chain;
9.339 -
9.340 - /** Internal data used by the Verifier code */
9.341 - gpointer data;
9.342 -
9.343 - /** Function to call with the verification result */
9.344 - PurpleCertificateVerifiedCallback cb;
9.345 - /** Data to pass to the post-verification callback */
9.346 - gpointer cb_data;
9.347 -};
9.348 -
9.349 -/*****************************************************************************/
9.350 -/** @name Certificate Verification Functions */
9.351 -/*****************************************************************************/
9.352 -/*@{*/
9.353 -
9.354 -/**
9.355 - * Constructs a verification request and passed control to the specified Verifier
9.356 - *
9.357 - * It is possible that the callback will be called immediately upon calling
9.358 - * this function. Plan accordingly.
9.359 - *
9.360 - * @param verifier Verification logic to use.
9.361 - * @see purple_certificate_find_verifier()
9.362 - *
9.363 - * @param subject_name Name that should match the first certificate in the
9.364 - * chain for the certificate to be valid. Will be strdup'd
9.365 - * into the Request struct
9.366 - *
9.367 - * @param cert_chain Certificate chain to check. If there is more than one
9.368 - * certificate in the chain (X.509), the peer's
9.369 - * certificate comes first, then the issuer/signer's
9.370 - * certificate, etc. The whole list is duplicated into the
9.371 - * Request struct.
9.372 - *
9.373 - * @param cb Callback function to be called with whether the
9.374 - * certificate was approved or not.
9.375 - * @param cb_data User-defined data for the above.
9.376 - */
9.377 -void
9.378 -purple_certificate_verify (PurpleCertificateVerifier *verifier,
9.379 - const gchar *subject_name, GList *cert_chain,
9.380 - PurpleCertificateVerifiedCallback cb,
9.381 - gpointer cb_data);
9.382 -
9.383 -/**
9.384 - * Completes and destroys a VerificationRequest
9.385 - *
9.386 - * @param vrq Request to conclude
9.387 - * @param st Success/failure code to pass to the request's
9.388 - * completion callback.
9.389 - */
9.390 -void
9.391 -purple_certificate_verify_complete(PurpleCertificateVerificationRequest *vrq,
9.392 - PurpleCertificateVerificationStatus st);
9.393 -
9.394 -/*@}*/
9.395 -
9.396 -/*****************************************************************************/
9.397 -/** @name Certificate Functions */
9.398 -/*****************************************************************************/
9.399 -/*@{*/
9.400 -
9.401 -/**
9.402 - * Makes a duplicate of a certificate
9.403 - *
9.404 - * @param crt Instance to duplicate
9.405 - * @return Pointer to new instance
9.406 - */
9.407 -PurpleCertificate *
9.408 -purple_certificate_copy(PurpleCertificate *crt);
9.409 -
9.410 -/**
9.411 - * Duplicates an entire list of certificates
9.412 - *
9.413 - * @param crt_list List to duplicate
9.414 - * @return New list copy
9.415 - */
9.416 -GList *
9.417 -purple_certificate_copy_list(GList *crt_list);
9.418 -
9.419 -/**
9.420 - * Destroys and free()'s a Certificate
9.421 - *
9.422 - * @param crt Instance to destroy. May be NULL.
9.423 - */
9.424 -void
9.425 -purple_certificate_destroy (PurpleCertificate *crt);
9.426 -
9.427 -/**
9.428 - * Destroy an entire list of Certificate instances and the containing list
9.429 - *
9.430 - * @param crt_list List of certificates to destroy. May be NULL.
9.431 - */
9.432 -void
9.433 -purple_certificate_destroy_list (GList * crt_list);
9.434 -
9.435 -/**
9.436 - * Check whether 'crt' has a valid signature made by 'issuer'
9.437 - *
9.438 - * @param crt Certificate instance to check signature of
9.439 - * @param issuer Certificate thought to have signed 'crt'
9.440 - *
9.441 - * @return TRUE if 'crt' has a valid signature made by 'issuer',
9.442 - * otherwise FALSE
9.443 - * @todo Find a way to give the reason (bad signature, not the issuer, etc.)
9.444 - */
9.445 -gboolean
9.446 -purple_certificate_signed_by(PurpleCertificate *crt, PurpleCertificate *issuer);
9.447 -
9.448 -/**
9.449 - * Check that a certificate chain is valid and, if not, the failing certificate.
9.450 - *
9.451 - * Uses purple_certificate_signed_by() to verify that each PurpleCertificate
9.452 - * in the chain carries a valid signature from the next. A single-certificate
9.453 - * chain is considered to be valid.
9.454 - *
9.455 - * @param chain List of PurpleCertificate instances comprising the chain,
9.456 - * in the order certificate, issuer, issuer's issuer, etc.
9.457 - * @param failing A pointer to a PurpleCertificate*. If not NULL, if the
9.458 - * chain fails to validate, this will be set to the
9.459 - * certificate whose signature could not be validated.
9.460 - * @return TRUE if the chain is valid. See description.
9.461 - *
9.462 - * @since 2.6.0
9.463 - * @deprecated This function will become
9.464 - * purple_certificate_check_signature_chain in 3.0.0
9.465 - */
9.466 -gboolean
9.467 -purple_certificate_check_signature_chain_with_failing(GList *chain,
9.468 - PurpleCertificate **failing);
9.469 -
9.470 -/**
9.471 - * Check that a certificate chain is valid
9.472 - *
9.473 - * Uses purple_certificate_signed_by() to verify that each PurpleCertificate
9.474 - * in the chain carries a valid signature from the next. A single-certificate
9.475 - * chain is considered to be valid.
9.476 - *
9.477 - * @param chain List of PurpleCertificate instances comprising the chain,
9.478 - * in the order certificate, issuer, issuer's issuer, etc.
9.479 - * @return TRUE if the chain is valid. See description.
9.480 - * @todo Specify which certificate in the chain caused a failure
9.481 - * @deprecated This function will be removed in 3.0.0 and replaced with
9.482 - * purple_certificate_check_signature_chain_with_failing
9.483 - */
9.484 -gboolean
9.485 -purple_certificate_check_signature_chain(GList *chain);
9.486 -
9.487 -/**
9.488 - * Imports a PurpleCertificate from a file
9.489 - *
9.490 - * @param scheme Scheme to import under
9.491 - * @param filename File path to import from
9.492 - * @return Pointer to a new PurpleCertificate, or NULL on failure
9.493 - */
9.494 -PurpleCertificate *
9.495 -purple_certificate_import(PurpleCertificateScheme *scheme, const gchar *filename);
9.496 -
9.497 -/**
9.498 - * Exports a PurpleCertificate to a file
9.499 - *
9.500 - * @param filename File to export the certificate to
9.501 - * @param crt Certificate to export
9.502 - * @return TRUE if the export succeeded, otherwise FALSE
9.503 - */
9.504 -gboolean
9.505 -purple_certificate_export(const gchar *filename, PurpleCertificate *crt);
9.506 -
9.507 -
9.508 -/**
9.509 - * Retrieves the certificate public key fingerprint using SHA1.
9.510 - *
9.511 - * @param crt Certificate instance
9.512 - * @return Binary representation of the hash. You are responsible for free()ing
9.513 - * this.
9.514 - * @see purple_base16_encode_chunked()
9.515 - */
9.516 -GByteArray *
9.517 -purple_certificate_get_fingerprint_sha1(PurpleCertificate *crt);
9.518 -
9.519 -/**
9.520 - * Get a unique identifier for the certificate
9.521 - *
9.522 - * @param crt Certificate instance
9.523 - * @return String representing the certificate uniquely. Must be g_free()'ed
9.524 - */
9.525 -gchar *
9.526 -purple_certificate_get_unique_id(PurpleCertificate *crt);
9.527 -
9.528 -/**
9.529 - * Get a unique identifier for the certificate's issuer
9.530 - *
9.531 - * @param crt Certificate instance
9.532 - * @return String representing the certificate's issuer uniquely. Must be
9.533 - * g_free()'ed
9.534 - */
9.535 -gchar *
9.536 -purple_certificate_get_issuer_unique_id(PurpleCertificate *crt);
9.537 -
9.538 -/**
9.539 - * Gets the certificate subject's name
9.540 - *
9.541 - * For X.509, this is the "Common Name" field, as we're only using it
9.542 - * for hostname verification at the moment
9.543 - *
9.544 - * @param crt Certificate instance
9.545 - * @return Newly allocated string with the certificate subject.
9.546 - */
9.547 -gchar *
9.548 -purple_certificate_get_subject_name(PurpleCertificate *crt);
9.549 -
9.550 -/**
9.551 - * Check the subject name against that on the certificate
9.552 - * @param crt Certificate instance
9.553 - * @param name Name to check.
9.554 - * @return TRUE if it is a match, else FALSE
9.555 - */
9.556 -gboolean
9.557 -purple_certificate_check_subject_name(PurpleCertificate *crt, const gchar *name);
9.558 -
9.559 -/**
9.560 - * Get the expiration/activation times.
9.561 - *
9.562 - * @param crt Certificate instance
9.563 - * @param activation Reference to store the activation time at. May be NULL
9.564 - * if you don't actually want it.
9.565 - * @param expiration Reference to store the expiration time at. May be NULL
9.566 - * if you don't actually want it.
9.567 - * @return TRUE if the requested values were obtained, otherwise FALSE.
9.568 - */
9.569 -gboolean
9.570 -purple_certificate_get_times(PurpleCertificate *crt, time_t *activation, time_t *expiration);
9.571 -
9.572 -/*@}*/
9.573 -
9.574 -/*****************************************************************************/
9.575 -/** @name Certificate Pool Functions */
9.576 -/*****************************************************************************/
9.577 -/*@{*/
9.578 -/**
9.579 - * Helper function for generating file paths in ~/.purple/certificates for
9.580 - * CertificatePools that use them.
9.581 - *
9.582 - * All components will be escaped for filesystem friendliness.
9.583 - *
9.584 - * @param pool CertificatePool to build a path for
9.585 - * @param id Key to look up a Certificate by. May be NULL.
9.586 - * @return A newly allocated path of the form
9.587 - * ~/.purple/certificates/scheme_name/pool_name/unique_id
9.588 - */
9.589 -gchar *
9.590 -purple_certificate_pool_mkpath(PurpleCertificatePool *pool, const gchar *id);
9.591 -
9.592 -/**
9.593 - * Determines whether a pool can be used.
9.594 - *
9.595 - * Checks whether the associated CertificateScheme is loaded.
9.596 - *
9.597 - * @param pool Pool to check
9.598 - *
9.599 - * @return TRUE if the pool can be used, otherwise FALSE
9.600 - */
9.601 -gboolean
9.602 -purple_certificate_pool_usable(PurpleCertificatePool *pool);
9.603 -
9.604 -/**
9.605 - * Looks up the scheme the pool operates under
9.606 - *
9.607 - * @param pool Pool to get the scheme of
9.608 - *
9.609 - * @return Pointer to the pool's scheme, or NULL if it isn't loaded.
9.610 - * @see purple_certificate_pool_usable()
9.611 - */
9.612 -PurpleCertificateScheme *
9.613 -purple_certificate_pool_get_scheme(PurpleCertificatePool *pool);
9.614 -
9.615 -/**
9.616 - * Check for presence of an ID in a pool.
9.617 - * @param pool Pool to look in
9.618 - * @param id ID to look for
9.619 - * @return TRUE if the ID is in the pool, else FALSE
9.620 - */
9.621 -gboolean
9.622 -purple_certificate_pool_contains(PurpleCertificatePool *pool, const gchar *id);
9.623 -
9.624 -/**
9.625 - * Retrieve a certificate from a pool.
9.626 - * @param pool Pool to fish in
9.627 - * @param id ID to look up
9.628 - * @return Retrieved certificate, or NULL if it wasn't there
9.629 - */
9.630 -PurpleCertificate *
9.631 -purple_certificate_pool_retrieve(PurpleCertificatePool *pool, const gchar *id);
9.632 -
9.633 -/**
9.634 - * Add a certificate to a pool
9.635 - *
9.636 - * Any pre-existing certificate of the same ID will be overwritten.
9.637 - *
9.638 - * @param pool Pool to add to
9.639 - * @param id ID to store the certificate with
9.640 - * @param crt Certificate to store
9.641 - * @return TRUE if the operation succeeded, otherwise FALSE
9.642 - */
9.643 -gboolean
9.644 -purple_certificate_pool_store(PurpleCertificatePool *pool, const gchar *id, PurpleCertificate *crt);
9.645 -
9.646 -/**
9.647 - * Remove a certificate from a pool
9.648 - *
9.649 - * @param pool Pool to remove from
9.650 - * @param id ID to remove
9.651 - * @return TRUE if the operation succeeded, otherwise FALSE
9.652 - */
9.653 -gboolean
9.654 -purple_certificate_pool_delete(PurpleCertificatePool *pool, const gchar *id);
9.655 -
9.656 -/**
9.657 - * Get the list of IDs currently in the pool.
9.658 - *
9.659 - * @param pool Pool to enumerate
9.660 - * @return GList pointing to newly-allocated id strings. Free using
9.661 - * purple_certificate_pool_destroy_idlist()
9.662 - */
9.663 -GList *
9.664 -purple_certificate_pool_get_idlist(PurpleCertificatePool *pool);
9.665 -
9.666 -/**
9.667 - * Destroys the result given by purple_certificate_pool_get_idlist()
9.668 - *
9.669 - * @param idlist ID List to destroy
9.670 - */
9.671 -void
9.672 -purple_certificate_pool_destroy_idlist(GList *idlist);
9.673 -
9.674 -/*@}*/
9.675 -
9.676 -/*****************************************************************************/
9.677 -/** @name Certificate Subsystem API */
9.678 -/*****************************************************************************/
9.679 -/*@{*/
9.680 -
9.681 -/**
9.682 - * Initialize the certificate system
9.683 - */
9.684 -void
9.685 -purple_certificate_init(void);
9.686 -
9.687 -/**
9.688 - * Un-initialize the certificate system
9.689 - */
9.690 -void
9.691 -purple_certificate_uninit(void);
9.692 -
9.693 -/**
9.694 - * Get the Certificate subsystem handle for signalling purposes
9.695 - */
9.696 -gpointer
9.697 -purple_certificate_get_handle(void);
9.698 -
9.699 -/** Look up a registered CertificateScheme by name
9.700 - * @param name The scheme name. Case insensitive.
9.701 - * @return Pointer to the located Scheme, or NULL if it isn't found.
9.702 - */
9.703 -PurpleCertificateScheme *
9.704 -purple_certificate_find_scheme(const gchar *name);
9.705 -
9.706 -/**
9.707 - * Get all registered CertificateSchemes
9.708 - *
9.709 - * @return GList pointing to all registered CertificateSchemes . This value
9.710 - * is owned by libpurple
9.711 - */
9.712 -GList *
9.713 -purple_certificate_get_schemes(void);
9.714 -
9.715 -/** Register a CertificateScheme with libpurple
9.716 - *
9.717 - * No two schemes can be registered with the same name; this function enforces
9.718 - * that.
9.719 - *
9.720 - * @param scheme Pointer to the scheme to register.
9.721 - * @return TRUE if the scheme was successfully added, otherwise FALSE
9.722 - */
9.723 -gboolean
9.724 -purple_certificate_register_scheme(PurpleCertificateScheme *scheme);
9.725 -
9.726 -/** Unregister a CertificateScheme from libpurple
9.727 - *
9.728 - * @param scheme Scheme to unregister.
9.729 - * If the scheme is not registered, this is a no-op.
9.730 - *
9.731 - * @return TRUE if the unregister completed successfully
9.732 - */
9.733 -gboolean
9.734 -purple_certificate_unregister_scheme(PurpleCertificateScheme *scheme);
9.735 -
9.736 -/** Look up a registered PurpleCertificateVerifier by scheme and name
9.737 - * @param scheme_name Scheme name. Case insensitive.
9.738 - * @param ver_name The verifier name. Case insensitive.
9.739 - * @return Pointer to the located Verifier, or NULL if it isn't found.
9.740 - */
9.741 -PurpleCertificateVerifier *
9.742 -purple_certificate_find_verifier(const gchar *scheme_name, const gchar *ver_name);
9.743 -
9.744 -/**
9.745 - * Get the list of registered CertificateVerifiers
9.746 - *
9.747 - * @return GList of all registered PurpleCertificateVerifier. This value
9.748 - * is owned by libpurple
9.749 - */
9.750 -GList *
9.751 -purple_certificate_get_verifiers(void);
9.752 -
9.753 -/**
9.754 - * Register a CertificateVerifier with libpurple
9.755 - *
9.756 - * @param vr Verifier to register.
9.757 - * @return TRUE if register succeeded, otherwise FALSE
9.758 - */
9.759 -gboolean
9.760 -purple_certificate_register_verifier(PurpleCertificateVerifier *vr);
9.761 -
9.762 -/**
9.763 - * Unregister a CertificateVerifier with libpurple
9.764 - *
9.765 - * @param vr Verifier to unregister.
9.766 - * @return TRUE if unregister succeeded, otherwise FALSE
9.767 - */
9.768 -gboolean
9.769 -purple_certificate_unregister_verifier(PurpleCertificateVerifier *vr);
9.770 -
9.771 -/** Look up a registered PurpleCertificatePool by scheme and name
9.772 - * @param scheme_name Scheme name. Case insensitive.
9.773 - * @param pool_name Pool name. Case insensitive.
9.774 - * @return Pointer to the located Pool, or NULL if it isn't found.
9.775 - */
9.776 -PurpleCertificatePool *
9.777 -purple_certificate_find_pool(const gchar *scheme_name, const gchar *pool_name);
9.778 -
9.779 -/**
9.780 - * Get the list of registered Pools
9.781 - *
9.782 - * @return GList of all registered PurpleCertificatePool s. This value
9.783 - * is owned by libpurple
9.784 - */
9.785 -GList *
9.786 -purple_certificate_get_pools(void);
9.787 -
9.788 -/**
9.789 - * Register a CertificatePool with libpurple and call its init function
9.790 - *
9.791 - * @param pool Pool to register.
9.792 - * @return TRUE if the register succeeded, otherwise FALSE
9.793 - */
9.794 -gboolean
9.795 -purple_certificate_register_pool(PurpleCertificatePool *pool);
9.796 -
9.797 -/**
9.798 - * Unregister a CertificatePool with libpurple and call its uninit function
9.799 - *
9.800 - * @param pool Pool to unregister.
9.801 - * @return TRUE if the unregister succeeded, otherwise FALSE
9.802 - */
9.803 -gboolean
9.804 -purple_certificate_unregister_pool(PurpleCertificatePool *pool);
9.805 -
9.806 -/*@}*/
9.807 -
9.808 -
9.809 -/**
9.810 - * Displays a window showing X.509 certificate information
9.811 - *
9.812 - * @param crt Certificate under an "x509" Scheme
9.813 - * @todo Will break on CA certs, as they have no Common Name
9.814 - */
9.815 -void
9.816 -purple_certificate_display_x509(PurpleCertificate *crt);
9.817 -
9.818 -/**
9.819 - * Add a search path for certificates.
9.820 - *
9.821 - * @param path Path to search for certificates.
9.822 - */
9.823 -void purple_certificate_add_ca_search_path(const char *path);
9.824 -
9.825 -#ifdef __cplusplus
9.826 -}
9.827 -#endif /* __cplusplus */
9.828 -
9.829 -#endif /* _PURPLE_CERTIFICATE_H */
10.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/cipher.h Fri Aug 21 13:24:36 2009 -0700
10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
10.3 @@ -1,505 +0,0 @@
10.4 -/**
10.5 - * @file cipher.h Purple Cipher API
10.6 - * @ingroup core
10.7 - * @see @ref cipher-signals
10.8 - */
10.9 -
10.10 -/* purple
10.11 - *
10.12 - * Purple is the legal property of its developers, whose names are too numerous
10.13 - * to list here. Please refer to the COPYRIGHT file distributed with this
10.14 - * source distribution.
10.15 - *
10.16 - * This program is free software; you can redistribute it and/or modify
10.17 - * it under the terms of the GNU General Public License as published by
10.18 - * the Free Software Foundation; either version 2 of the License, or
10.19 - * (at your option) any later version.
10.20 - *
10.21 - * This program is distributed in the hope that it will be useful,
10.22 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
10.23 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10.24 - * GNU General Public License for more details.
10.25 - *
10.26 - * You should have received a copy of the GNU General Public License
10.27 - * along with this program; if not, write to the Free Software
10.28 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
10.29 - */
10.30 -#ifndef PURPLE_CIPHER_H
10.31 -#define PURPLE_CIPHER_H
10.32 -
10.33 -#include <glib.h>
10.34 -
10.35 -#define PURPLE_CIPHER(obj) ((PurpleCipher *)(obj)) /**< PurpleCipher typecast helper */
10.36 -#define PURPLE_CIPHER_OPS(obj) ((PurpleCipherOps *)(obj)) /**< PurpleCipherInfo typecase helper */
10.37 -#define PURPLE_CIPHER_CONTEXT(obj) ((PurpleCipherContext *)(obj)) /**< PurpleCipherContext typecast helper */
10.38 -
10.39 -typedef struct _PurpleCipher PurpleCipher; /**< A handle to a PurpleCipher */
10.40 -typedef struct _PurpleCipherOps PurpleCipherOps; /**< Ops for a PurpleCipher */
10.41 -typedef struct _PurpleCipherContext PurpleCipherContext; /**< A context for a PurpleCipher */
10.42 -
10.43 -/**
10.44 - * Modes for batch encrypters
10.45 - */
10.46 -typedef enum _PurpleCipherBatchMode {
10.47 - PURPLE_CIPHER_BATCH_MODE_ECB,
10.48 - PURPLE_CIPHER_BATCH_MODE_CBC
10.49 -} PurpleCipherBatchMode;
10.50 -
10.51 -/**
10.52 - * The operation flags for a cipher
10.53 - */
10.54 -typedef enum _PurpleCipherCaps {
10.55 - PURPLE_CIPHER_CAPS_SET_OPT = 1 << 1, /**< Set option flag */
10.56 - PURPLE_CIPHER_CAPS_GET_OPT = 1 << 2, /**< Get option flag */
10.57 - PURPLE_CIPHER_CAPS_INIT = 1 << 3, /**< Init flag */
10.58 - PURPLE_CIPHER_CAPS_RESET = 1 << 4, /**< Reset flag */
10.59 - PURPLE_CIPHER_CAPS_UNINIT = 1 << 5, /**< Uninit flag */
10.60 - PURPLE_CIPHER_CAPS_SET_IV = 1 << 6, /**< Set IV flag */
10.61 - PURPLE_CIPHER_CAPS_APPEND = 1 << 7, /**< Append flag */
10.62 - PURPLE_CIPHER_CAPS_DIGEST = 1 << 8, /**< Digest flag */
10.63 - PURPLE_CIPHER_CAPS_ENCRYPT = 1 << 9, /**< Encrypt flag */
10.64 - PURPLE_CIPHER_CAPS_DECRYPT = 1 << 10, /**< Decrypt flag */
10.65 - PURPLE_CIPHER_CAPS_SET_SALT = 1 << 11, /**< Set salt flag */
10.66 - PURPLE_CIPHER_CAPS_GET_SALT_SIZE = 1 << 12, /**< Get salt size flag */
10.67 - PURPLE_CIPHER_CAPS_SET_KEY = 1 << 13, /**< Set key flag */
10.68 - PURPLE_CIPHER_CAPS_GET_KEY_SIZE = 1 << 14, /**< Get key size flag */
10.69 - PURPLE_CIPHER_CAPS_SET_BATCH_MODE = 1 << 15, /**< Set batch mode flag */
10.70 - PURPLE_CIPHER_CAPS_GET_BATCH_MODE = 1 << 16, /**< Get batch mode flag */
10.71 - PURPLE_CIPHER_CAPS_GET_BLOCK_SIZE = 1 << 17, /**< The get block size flag */
10.72 - PURPLE_CIPHER_CAPS_SET_KEY_WITH_LEN = 1 << 18, /**< The set key with length flag */
10.73 - PURPLE_CIPHER_CAPS_UNKNOWN = 1 << 19 /**< Unknown */
10.74 -} PurpleCipherCaps;
10.75 -
10.76 -/**
10.77 - * The operations of a cipher. Every cipher must implement one of these.
10.78 - */
10.79 -struct _PurpleCipherOps {
10.80 - /** The set option function */
10.81 - void (*set_option)(PurpleCipherContext *context, const gchar *name, void *value);
10.82 -
10.83 - /** The get option function */
10.84 - void *(*get_option)(PurpleCipherContext *context, const gchar *name);
10.85 -
10.86 - /** The init function */
10.87 - void (*init)(PurpleCipherContext *context, void *extra);
10.88 -
10.89 - /** The reset function */
10.90 - void (*reset)(PurpleCipherContext *context, void *extra);
10.91 -
10.92 - /** The uninit function */
10.93 - void (*uninit)(PurpleCipherContext *context);
10.94 -
10.95 - /** The set initialization vector function */
10.96 - void (*set_iv)(PurpleCipherContext *context, guchar *iv, size_t len);
10.97 -
10.98 - /** The append data function */
10.99 - void (*append)(PurpleCipherContext *context, const guchar *data, size_t len);
10.100 -
10.101 - /** The digest function */
10.102 - gboolean (*digest)(PurpleCipherContext *context, size_t in_len, guchar digest[], size_t *out_len);
10.103 -
10.104 - /** The encrypt function */
10.105 - int (*encrypt)(PurpleCipherContext *context, const guchar data[], size_t len, guchar output[], size_t *outlen);
10.106 -
10.107 - /** The decrypt function */
10.108 - int (*decrypt)(PurpleCipherContext *context, const guchar data[], size_t len, guchar output[], size_t *outlen);
10.109 -
10.110 - /** The set salt function */
10.111 - void (*set_salt)(PurpleCipherContext *context, guchar *salt);
10.112 -
10.113 - /** The get salt size function */
10.114 - size_t (*get_salt_size)(PurpleCipherContext *context);
10.115 -
10.116 - /** The set key function */
10.117 - void (*set_key)(PurpleCipherContext *context, const guchar *key);
10.118 -
10.119 - /** The get key size function */
10.120 - size_t (*get_key_size)(PurpleCipherContext *context);
10.121 -
10.122 - /** The set batch mode function */
10.123 - void (*set_batch_mode)(PurpleCipherContext *context, PurpleCipherBatchMode mode);
10.124 -
10.125 - /** The get batch mode function */
10.126 - PurpleCipherBatchMode (*get_batch_mode)(PurpleCipherContext *context);
10.127 -
10.128 - /** The get block size function */
10.129 - size_t (*get_block_size)(PurpleCipherContext *context);
10.130 -
10.131 - /** The set key with length function */
10.132 - void (*set_key_with_len)(PurpleCipherContext *context, const guchar *key, size_t len);
10.133 -};
10.134 -
10.135 -#ifdef __cplusplus
10.136 -extern "C" {
10.137 -#endif /* __cplusplus */
10.138 -
10.139 -/*****************************************************************************/
10.140 -/** @name PurpleCipher API */
10.141 -/*****************************************************************************/
10.142 -/*@{*/
10.143 -
10.144 -/**
10.145 - * Gets a cipher's name
10.146 - *
10.147 - * @param cipher The cipher handle
10.148 - *
10.149 - * @return The cipher's name
10.150 - */
10.151 -const gchar *purple_cipher_get_name(PurpleCipher *cipher);
10.152 -
10.153 -/**
10.154 - * Gets a cipher's capabilities
10.155 - *
10.156 - * @param cipher The cipher handle
10.157 - *
10.158 - * @return The cipher's info
10.159 - */
10.160 -guint purple_cipher_get_capabilities(PurpleCipher *cipher);
10.161 -
10.162 -/**
10.163 - * Gets a digest from a cipher
10.164 - *
10.165 - * @param name The cipher's name
10.166 - * @param data The data to hash
10.167 - * @param data_len The length of the data
10.168 - * @param in_len The length of the buffer
10.169 - * @param digest The returned digest
10.170 - * @param out_len The length written
10.171 - *
10.172 - * @return @c TRUE if successful, @c FALSE otherwise
10.173 - */
10.174 -gboolean purple_cipher_digest_region(const gchar *name, const guchar *data, size_t data_len, size_t in_len, guchar digest[], size_t *out_len);
10.175 -
10.176 -/*@}*/
10.177 -/******************************************************************************/
10.178 -/** @name PurpleCiphers API */
10.179 -/******************************************************************************/
10.180 -/*@{*/
10.181 -
10.182 -/**
10.183 - * Finds a cipher by it's name
10.184 - *
10.185 - * @param name The name of the cipher to find
10.186 - *
10.187 - * @return The cipher handle or @c NULL
10.188 - */
10.189 -PurpleCipher *purple_ciphers_find_cipher(const gchar *name);
10.190 -
10.191 -/**
10.192 - * Registers a cipher as a usable cipher
10.193 - *
10.194 - * @param name The name of the new cipher
10.195 - * @param ops The cipher ops to register
10.196 - *
10.197 - * @return The handle to the new cipher or @c NULL if it failed
10.198 - */
10.199 -PurpleCipher *purple_ciphers_register_cipher(const gchar *name, PurpleCipherOps *ops);
10.200 -
10.201 -/**
10.202 - * Unregisters a cipher
10.203 - *
10.204 - * @param cipher The cipher handle to unregister
10.205 - *
10.206 - * @return Whether or not the cipher was successfully unloaded
10.207 - */
10.208 -gboolean purple_ciphers_unregister_cipher(PurpleCipher *cipher);
10.209 -
10.210 -/**
10.211 - * Gets the list of ciphers
10.212 - *
10.213 - * @return The list of available ciphers
10.214 - * @note This list should not be modified, it is owned by the cipher core
10.215 - */
10.216 -GList *purple_ciphers_get_ciphers(void);
10.217 -
10.218 -/*@}*/
10.219 -/******************************************************************************/
10.220 -/** @name PurpleCipher Subsystem API */
10.221 -/******************************************************************************/
10.222 -/*@{*/
10.223 -
10.224 -/**
10.225 - * Gets the handle to the cipher subsystem
10.226 - *
10.227 - * @return The handle to the cipher subsystem
10.228 - */
10.229 -gpointer purple_ciphers_get_handle(void);
10.230 -
10.231 -/**
10.232 - * Initializes the cipher core
10.233 - */
10.234 -void purple_ciphers_init(void);
10.235 -
10.236 -/**
10.237 - * Uninitializes the cipher core
10.238 - */
10.239 -void purple_ciphers_uninit(void);
10.240 -
10.241 -/*@}*/
10.242 -/******************************************************************************/
10.243 -/** @name PurpleCipherContext API */
10.244 -/******************************************************************************/
10.245 -/*@{*/
10.246 -
10.247 -/**
10.248 - * Sets the value an option on a cipher context
10.249 - *
10.250 - * @param context The cipher context
10.251 - * @param name The name of the option
10.252 - * @param value The value to set
10.253 - */
10.254 -void purple_cipher_context_set_option(PurpleCipherContext *context, const gchar *name, gpointer value);
10.255 -
10.256 -/**
10.257 - * Gets the vale of an option on a cipher context
10.258 - *
10.259 - * @param context The cipher context
10.260 - * @param name The name of the option
10.261 - * @return The value of the option
10.262 - */
10.263 -gpointer purple_cipher_context_get_option(PurpleCipherContext *context, const gchar *name);
10.264 -
10.265 -/**
10.266 - * Creates a new cipher context and initializes it
10.267 - *
10.268 - * @param cipher The cipher to use
10.269 - * @param extra Extra data for the specific cipher
10.270 - *
10.271 - * @return The new cipher context
10.272 - */
10.273 -PurpleCipherContext *purple_cipher_context_new(PurpleCipher *cipher, void *extra);
10.274 -
10.275 -/**
10.276 - * Creates a new cipher context by the cipher name and initializes it
10.277 - *
10.278 - * @param name The cipher's name
10.279 - * @param extra Extra data for the specific cipher
10.280 - *
10.281 - * @return The new cipher context
10.282 - */
10.283 -PurpleCipherContext *purple_cipher_context_new_by_name(const gchar *name, void *extra);
10.284 -
10.285 -/**
10.286 - * Resets a cipher context to it's default value
10.287 - * @note If you have set an IV you will have to set it after resetting
10.288 - *
10.289 - * @param context The context to reset
10.290 - * @param extra Extra data for the specific cipher
10.291 - */
10.292 -void purple_cipher_context_reset(PurpleCipherContext *context, gpointer extra);
10.293 -
10.294 -/**
10.295 - * Destorys a cipher context and deinitializes it
10.296 - *
10.297 - * @param context The cipher context to destory
10.298 - */
10.299 -void purple_cipher_context_destroy(PurpleCipherContext *context);
10.300 -
10.301 -/**
10.302 - * Sets the initialization vector for a context
10.303 - * @note This should only be called right after a cipher context is created or reset
10.304 - *
10.305 - * @param context The context to set the IV to
10.306 - * @param iv The initialization vector to set
10.307 - * @param len The len of the IV
10.308 - */
10.309 -void purple_cipher_context_set_iv(PurpleCipherContext *context, guchar *iv, size_t len);
10.310 -
10.311 -/**
10.312 - * Appends data to the context
10.313 - *
10.314 - * @param context The context to append data to
10.315 - * @param data The data to append
10.316 - * @param len The length of the data
10.317 - */
10.318 -void purple_cipher_context_append(PurpleCipherContext *context, const guchar *data, size_t len);
10.319 -
10.320 -/**
10.321 - * Digests a context
10.322 - *
10.323 - * @param context The context to digest
10.324 - * @param in_len The length of the buffer
10.325 - * @param digest The return buffer for the digest
10.326 - * @param out_len The length of the returned value
10.327 - */
10.328 -gboolean purple_cipher_context_digest(PurpleCipherContext *context, size_t in_len, guchar digest[], size_t *out_len);
10.329 -
10.330 -/**
10.331 - * Converts a guchar digest into a hex string
10.332 - *
10.333 - * @param context The context to get a digest from
10.334 - * @param in_len The length of the buffer
10.335 - * @param digest_s The return buffer for the string digest
10.336 - * @param out_len The length of the returned value
10.337 - */
10.338 -gboolean purple_cipher_context_digest_to_str(PurpleCipherContext *context, size_t in_len, gchar digest_s[], size_t *out_len);
10.339 -
10.340 -/**
10.341 - * Encrypts data using the context
10.342 - *
10.343 - * @param context The context
10.344 - * @param data The data to encrypt
10.345 - * @param len The length of the data
10.346 - * @param output The output buffer
10.347 - * @param outlen The len of data that was outputed
10.348 - *
10.349 - * @return A cipher specific status code
10.350 - */
10.351 -gint purple_cipher_context_encrypt(PurpleCipherContext *context, const guchar data[], size_t len, guchar output[], size_t *outlen);
10.352 -
10.353 -/**
10.354 - * Decrypts data using the context
10.355 - *
10.356 - * @param context The context
10.357 - * @param data The data to encrypt
10.358 - * @param len The length of the returned value
10.359 - * @param output The output buffer
10.360 - * @param outlen The len of data that was outputed
10.361 - *
10.362 - * @return A cipher specific status code
10.363 - */
10.364 -gint purple_cipher_context_decrypt(PurpleCipherContext *context, const guchar data[], size_t len, guchar output[], size_t *outlen);
10.365 -
10.366 -/**
10.367 - * Sets the salt on a context
10.368 - *
10.369 - * @param context The context whose salt to set
10.370 - * @param salt The salt
10.371 - */
10.372 -void purple_cipher_context_set_salt(PurpleCipherContext *context, guchar *salt);
10.373 -
10.374 -/**
10.375 - * Gets the size of the salt if the cipher supports it
10.376 - *
10.377 - * @param context The context whose salt size to get
10.378 - *
10.379 - * @return The size of the salt
10.380 - */
10.381 -size_t purple_cipher_context_get_salt_size(PurpleCipherContext *context);
10.382 -
10.383 -/**
10.384 - * Sets the key on a context
10.385 - *
10.386 - * @param context The context whose key to set
10.387 - * @param key The key
10.388 - */
10.389 -void purple_cipher_context_set_key(PurpleCipherContext *context, const guchar *key);
10.390 -
10.391 -/**
10.392 - * Gets the key size for a context
10.393 - *
10.394 - * @param context The context whose key size to get
10.395 - *
10.396 - * @return The size of the key
10.397 - */
10.398 -size_t purple_cipher_context_get_key_size(PurpleCipherContext *context);
10.399 -
10.400 -/**
10.401 - * Sets the batch mode of a context
10.402 - *
10.403 - * @param context The context whose batch mode to set
10.404 - * @param mode The batch mode under which the cipher should operate
10.405 - *
10.406 - */
10.407 -void purple_cipher_context_set_batch_mode(PurpleCipherContext *context, PurpleCipherBatchMode mode);
10.408 -
10.409 -/**
10.410 - * Gets the batch mode of a context
10.411 - *
10.412 - * @param context The context whose batch mode to get
10.413 - *
10.414 - * @return The batch mode under which the cipher is operating
10.415 - */
10.416 -PurpleCipherBatchMode purple_cipher_context_get_batch_mode(PurpleCipherContext *context);
10.417 -
10.418 -/**
10.419 - * Gets the block size of a context
10.420 - *
10.421 - * @param context The context whose block size to get
10.422 - *
10.423 - * @return The block size of the context
10.424 - */
10.425 -size_t purple_cipher_context_get_block_size(PurpleCipherContext *context);
10.426 -
10.427 -/**
10.428 - * Sets the key with a given length on a context
10.429 - *
10.430 - * @param context The context whose key to set
10.431 - * @param key The key
10.432 - * @param len The length of the key
10.433 - *
10.434 - */
10.435 -void purple_cipher_context_set_key_with_len(PurpleCipherContext *context, const guchar *key, size_t len);
10.436 -
10.437 -/**
10.438 - * Sets the cipher data for a context
10.439 - *
10.440 - * @param context The context whose cipher data to set
10.441 - * @param data The cipher data to set
10.442 - */
10.443 -void purple_cipher_context_set_data(PurpleCipherContext *context, gpointer data);
10.444 -
10.445 -/**
10.446 - * Gets the cipher data for a context
10.447 - *
10.448 - * @param context The context whose cipher data to get
10.449 - *
10.450 - * @return The cipher data
10.451 - */
10.452 -gpointer purple_cipher_context_get_data(PurpleCipherContext *context);
10.453 -
10.454 -/*@}*/
10.455 -/*****************************************************************************/
10.456 -/** @name Purple Cipher HTTP Digest Helper Functions */
10.457 -/*****************************************************************************/
10.458 -/*@{*/
10.459 -
10.460 -/**
10.461 - * Calculates a session key for HTTP Digest authentation
10.462 - *
10.463 - * See RFC 2617 for more information.
10.464 - *
10.465 - * @param algorithm The hash algorithm to use
10.466 - * @param username The username provided by the user
10.467 - * @param realm The authentication realm provided by the server
10.468 - * @param password The password provided by the user
10.469 - * @param nonce The nonce provided by the server
10.470 - * @param client_nonce The nonce provided by the client
10.471 - *
10.472 - * @return The session key, or @c NULL if an error occurred.
10.473 - */
10.474 -gchar *purple_cipher_http_digest_calculate_session_key(
10.475 - const gchar *algorithm, const gchar *username,
10.476 - const gchar *realm, const gchar *password,
10.477 - const gchar *nonce, const gchar *client_nonce);
10.478 -
10.479 -/** Calculate a response for HTTP Digest authentication
10.480 - *
10.481 - * See RFC 2617 for more information.
10.482 - *
10.483 - * @param algorithm The hash algorithm to use
10.484 - * @param method The HTTP method in use
10.485 - * @param digest_uri The URI from the initial request
10.486 - * @param qop The "quality of protection"
10.487 - * @param entity The entity body
10.488 - * @param nonce The nonce provided by the server
10.489 - * @param nonce_count The nonce count
10.490 - * @param client_nonce The nonce provided by the client
10.491 - * @param session_key The session key from purple_cipher_http_digest_calculate_session_key()
10.492 - *
10.493 - * @return The hashed response, or @c NULL if an error occurred.
10.494 - */
10.495 -gchar *purple_cipher_http_digest_calculate_response(
10.496 - const gchar *algorithm, const gchar *method,
10.497 - const gchar *digest_uri, const gchar *qop,
10.498 - const gchar *entity, const gchar *nonce,
10.499 - const gchar *nonce_count, const gchar *client_nonce,
10.500 - const gchar *session_key);
10.501 -
10.502 -/*@}*/
10.503 -
10.504 -#ifdef __cplusplus
10.505 -}
10.506 -#endif /* __cplusplus */
10.507 -
10.508 -#endif /* PURPLE_CIPHER_H */
11.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/circbuffer.h Fri Aug 21 13:24:36 2009 -0700
11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
11.3 @@ -1,118 +0,0 @@
11.4 -/**
11.5 - * @file circbuffer.h Buffer Utility Functions
11.6 - * @ingroup core
11.7 - */
11.8 -
11.9 -/* Purple is the legal property of its developers, whose names are too numerous
11.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
11.11 - * source distribution.
11.12 - *
11.13 - * This program is free software; you can redistribute it and/or modify
11.14 - * it under the terms of the GNU General Public License as published by
11.15 - * the Free Software Foundation; either version 2 of the License, or
11.16 - * (at your option) any later version.
11.17 - *
11.18 - * This program is distributed in the hope that it will be useful,
11.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
11.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11.21 - * GNU General Public License for more details.
11.22 - *
11.23 - * You should have received a copy of the GNU General Public License
11.24 - * along with this program; if not, write to the Free Software
11.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
11.26 - */
11.27 -#ifndef _CIRCBUFFER_H
11.28 -#define _CIRCBUFFER_H
11.29 -
11.30 -#include <glib.h>
11.31 -
11.32 -#ifdef __cplusplus
11.33 -extern "C" {
11.34 -#endif
11.35 -
11.36 -typedef struct _PurpleCircBuffer {
11.37 -
11.38 - /** A pointer to the starting address of our chunk of memory. */
11.39 - gchar *buffer;
11.40 -
11.41 - /** The incremental amount to increase this buffer by when
11.42 - * the buffer is not big enough to hold incoming data, in bytes. */
11.43 - gsize growsize;
11.44 -
11.45 - /** The length of this buffer, in bytes. */
11.46 - gsize buflen;
11.47 -
11.48 - /** The number of bytes of this buffer that contain unread data. */
11.49 - gsize bufused;
11.50 -
11.51 - /** A pointer to the next byte where new incoming data is
11.52 - * buffered to. */
11.53 - gchar *inptr;
11.54 -
11.55 - /** A pointer to the next byte of buffered data that should be
11.56 - * read by the consumer. */
11.57 - gchar *outptr;
11.58 -
11.59 -} PurpleCircBuffer;
11.60 -
11.61 -/**
11.62 - * Creates a new circular buffer. This will not allocate any memory for the
11.63 - * actual buffer until data is appended to it.
11.64 - *
11.65 - * @param growsize The amount that the buffer should grow the first time data
11.66 - * is appended and every time more space is needed. Pass in
11.67 - * "0" to use the default of 256 bytes.
11.68 - *
11.69 - * @return The new PurpleCircBuffer. This should be freed with
11.70 - * purple_circ_buffer_destroy when you are done with it
11.71 - */
11.72 -PurpleCircBuffer *purple_circ_buffer_new(gsize growsize);
11.73 -
11.74 -/**
11.75 - * Dispose of the PurpleCircBuffer and free any memory used by it (including any
11.76 - * memory used by the internal buffer).
11.77 - *
11.78 - * @param buf The PurpleCircBuffer to free
11.79 - */
11.80 -void purple_circ_buffer_destroy(PurpleCircBuffer *buf);
11.81 -
11.82 -/**
11.83 - * Append data to the PurpleCircBuffer. This will grow the internal
11.84 - * buffer to fit the added data, if needed.
11.85 - *
11.86 - * @param buf The PurpleCircBuffer to which to append the data
11.87 - * @param src pointer to the data to copy into the buffer
11.88 - * @param len number of bytes to copy into the buffer
11.89 - */
11.90 -void purple_circ_buffer_append(PurpleCircBuffer *buf, gconstpointer src, gsize len);
11.91 -
11.92 -/**
11.93 - * Determine the maximum number of contiguous bytes that can be read from the
11.94 - * PurpleCircBuffer.
11.95 - * Note: This may not be the total number of bytes that are buffered - a
11.96 - * subsequent call after calling purple_circ_buffer_mark_read() may indicate more
11.97 - * data is available to read.
11.98 - *
11.99 - * @param buf the PurpleCircBuffer for which to determine the maximum contiguous
11.100 - * bytes that can be read.
11.101 - *
11.102 - * @return the number of bytes that can be read from the PurpleCircBuffer
11.103 - */
11.104 -gsize purple_circ_buffer_get_max_read(const PurpleCircBuffer *buf);
11.105 -
11.106 -/**
11.107 - * Mark the number of bytes that have been read from the buffer.
11.108 - *
11.109 - * @param buf The PurpleCircBuffer to mark bytes read from
11.110 - * @param len The number of bytes to mark as read
11.111 - *
11.112 - * @return TRUE if we successfully marked the bytes as having been read, FALSE
11.113 - * otherwise.
11.114 - */
11.115 -gboolean purple_circ_buffer_mark_read(PurpleCircBuffer *buf, gsize len);
11.116 -
11.117 -#ifdef __cplusplus
11.118 -}
11.119 -#endif
11.120 -
11.121 -#endif /* _CIRCBUFFER_H */
12.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/cmdproc.h Fri Aug 21 13:24:36 2009 -0700
12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
12.3 @@ -1,76 +0,0 @@
12.4 -/**
12.5 - * @file cmdproc.h MSN command processor functions
12.6 - *
12.7 - * purple
12.8 - *
12.9 - * Purple is the legal property of its developers, whose names are too numerous
12.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
12.11 - * source distribution.
12.12 - *
12.13 - * This program is free software; you can redistribute it and/or modify
12.14 - * it under the terms of the GNU General Public License as published by
12.15 - * the Free Software Foundation; either version 2 of the License, or
12.16 - * (at your option) any later version.
12.17 - *
12.18 - * This program is distributed in the hope that it will be useful,
12.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
12.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12.21 - * GNU General Public License for more details.
12.22 - *
12.23 - * You should have received a copy of the GNU General Public License
12.24 - * along with this program; if not, write to the Free Software
12.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
12.26 - */
12.27 -#ifndef _MSN_CMDPROC_H_
12.28 -#define _MSN_CMDPROC_H_
12.29 -
12.30 -typedef struct _MsnCmdProc MsnCmdProc;
12.31 -
12.32 -#include "session.h"
12.33 -#include "servconn.h"
12.34 -#include "error.h"
12.35 -#include "command.h"
12.36 -#include "table.h"
12.37 -#include "history.h"
12.38 -
12.39 -struct _MsnCmdProc
12.40 -{
12.41 - MsnSession *session;
12.42 - MsnServConn *servconn;
12.43 -
12.44 - GQueue *txqueue;
12.45 -
12.46 - MsnCommand *last_cmd;
12.47 -
12.48 - MsnTable *cbs_table;
12.49 -
12.50 - MsnHistory *history;
12.51 -
12.52 - GHashTable *multiparts; /**< Multi-part message ID's */
12.53 -
12.54 - void *data; /**< Extra data, like the switchboard. */
12.55 -};
12.56 -
12.57 -MsnCmdProc *msn_cmdproc_new(MsnSession *session);
12.58 -void msn_cmdproc_destroy(MsnCmdProc *cmdproc);
12.59 -
12.60 -void msn_cmdproc_process_queue(MsnCmdProc *cmdproc);
12.61 -
12.62 -void msn_cmdproc_send_trans(MsnCmdProc *cmdproc, MsnTransaction *trans);
12.63 -void msn_cmdproc_queue_trans(MsnCmdProc *cmdproc,
12.64 - MsnTransaction *trans);
12.65 -void msn_cmdproc_send(MsnCmdProc *cmdproc, const char *command,
12.66 - const char *format, ...);
12.67 -void msn_cmdproc_send_quick(MsnCmdProc *cmdproc, const char *command,
12.68 - const char *format, ...);
12.69 -
12.70 -void msn_cmdproc_process_msg(MsnCmdProc *cmdproc,
12.71 - MsnMessage *msg);
12.72 -void msn_cmdproc_process_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd);
12.73 -void msn_cmdproc_process_cmd_text(MsnCmdProc *cmdproc, const char *command);
12.74 -void msn_cmdproc_process_payload(MsnCmdProc *cmdproc,
12.75 - char *payload, int payload_len);
12.76 -
12.77 -void msn_cmdproc_disconnect(MsnCmdProc *cmdproc);
12.78 -
12.79 -#endif /* _MSN_CMDPROC_H_ */
13.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/cmds.h Fri Aug 21 13:24:36 2009 -0700
13.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
13.3 @@ -1,250 +0,0 @@
13.4 -/**
13.5 - * @file cmds.h Commands API
13.6 - * @ingroup core
13.7 - * @see @ref cmd-signals
13.8 - */
13.9 -
13.10 -/* Copyright (C) 2003 Timothy Ringenbach <omarvo@hotmail.com>
13.11 - *
13.12 - * This program is free software; you can redistribute it and/or modify
13.13 - * it under the terms of the GNU General Public License as published by
13.14 - * the Free Software Foundation; either version 2 of the License, or
13.15 - * (at your option) any later version.
13.16 - *
13.17 - * This program is distributed in the hope that it will be useful,
13.18 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
13.19 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13.20 - * GNU General Public License for more details.
13.21 - *
13.22 - * You should have received a copy of the GNU General Public License
13.23 - * along with this program; if not, write to the Free Software
13.24 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
13.25 - *
13.26 - */
13.27 -#ifndef _PURPLE_CMDS_H_
13.28 -#define _PURPLE_CMDS_H_
13.29 -
13.30 -#include "conversation.h"
13.31 -
13.32 -/**************************************************************************/
13.33 -/** @name Structures */
13.34 -/**************************************************************************/
13.35 -/*@{*/
13.36 -
13.37 -/** The possible results of running a command with purple_cmd_do_command(). */
13.38 -typedef enum _PurpleCmdStatus {
13.39 - PURPLE_CMD_STATUS_OK,
13.40 - PURPLE_CMD_STATUS_FAILED,
13.41 - PURPLE_CMD_STATUS_NOT_FOUND,
13.42 - PURPLE_CMD_STATUS_WRONG_ARGS,
13.43 - PURPLE_CMD_STATUS_WRONG_PRPL,
13.44 - PURPLE_CMD_STATUS_WRONG_TYPE
13.45 -} PurpleCmdStatus;
13.46 -
13.47 -/** Commands registered with the core return one of these values when run.
13.48 - * Normally, a command will want to return one of the first two; in some
13.49 - * unusual cases, you might want to have several functions called for a
13.50 - * particular command; in this case, they should return
13.51 - * #PURPLE_CMD_RET_CONTINUE to cause the core to fall through to other
13.52 - * commands with the same name.
13.53 - */
13.54 -typedef enum _PurpleCmdRet {
13.55 - PURPLE_CMD_RET_OK, /**< Everything's okay; Don't look for another command to call. */
13.56 - PURPLE_CMD_RET_FAILED, /**< The command failed, but stop looking.*/
13.57 - PURPLE_CMD_RET_CONTINUE /**< Continue, looking for other commands with the same name to call. */
13.58 -} PurpleCmdRet;
13.59 -
13.60 -#define PURPLE_CMD_FUNC(func) ((PurpleCmdFunc)func)
13.61 -
13.62 -/** A function implementing a command, as passed to purple_cmd_register().
13.63 - *
13.64 - * @todo document the arguments to these functions.
13.65 - * */
13.66 -typedef PurpleCmdRet (*PurpleCmdFunc)(PurpleConversation *, const gchar *cmd,
13.67 - gchar **args, gchar **error, void *data);
13.68 -/** A unique integer representing a command registered with
13.69 - * purple_cmd_register(), which can subsequently be passed to
13.70 - * purple_cmd_unregister() to unregister that command.
13.71 - */
13.72 -typedef guint PurpleCmdId;
13.73 -
13.74 -typedef enum _PurpleCmdPriority {
13.75 - PURPLE_CMD_P_VERY_LOW = -1000,
13.76 - PURPLE_CMD_P_LOW = 0,
13.77 - PURPLE_CMD_P_DEFAULT = 1000,
13.78 - PURPLE_CMD_P_PRPL = 2000,
13.79 - PURPLE_CMD_P_PLUGIN = 3000,
13.80 - PURPLE_CMD_P_ALIAS = 4000,
13.81 - PURPLE_CMD_P_HIGH = 5000,
13.82 - PURPLE_CMD_P_VERY_HIGH = 6000
13.83 -} PurpleCmdPriority;
13.84 -
13.85 -/** Flags used to set various properties of commands. Every command should
13.86 - * have at least one of #PURPLE_CMD_FLAG_IM and #PURPLE_CMD_FLAG_CHAT set in
13.87 - * order to be even slighly useful.
13.88 - *
13.89 - * @see purple_cmd_register
13.90 - */
13.91 -typedef enum _PurpleCmdFlag {
13.92 - /** Command is usable in IMs. */
13.93 - PURPLE_CMD_FLAG_IM = 0x01,
13.94 - /** Command is usable in multi-user chats. */
13.95 - PURPLE_CMD_FLAG_CHAT = 0x02,
13.96 - /** Command is usable only for a particular prpl. */
13.97 - PURPLE_CMD_FLAG_PRPL_ONLY = 0x04,
13.98 - /** Incorrect arguments to this command should be accepted anyway. */
13.99 - PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS = 0x08
13.100 -} PurpleCmdFlag;
13.101 -
13.102 -
13.103 -/*@}*/
13.104 -
13.105 -#ifdef __cplusplus
13.106 -extern "C" {
13.107 -#endif
13.108 -
13.109 -/**************************************************************************/
13.110 -/** @name Commands API */
13.111 -/**************************************************************************/
13.112 -/*@{*/
13.113 -
13.114 -/**
13.115 - * Register a new command with the core.
13.116 - *
13.117 - * The command will only happen if commands are enabled,
13.118 - * which is a UI pref. UIs don't have to support commands at all.
13.119 - *
13.120 - * @param cmd The command. This should be a UTF-8 (or ASCII) string, with no spaces
13.121 - * or other white space.
13.122 - * @param args A string of characters describing to libpurple how to parse this
13.123 - * command's arguments. If what the user types doesn't match this
13.124 - * pattern, libpurple will keep looking for another command, unless
13.125 - * the flag #PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS is passed in @a f.
13.126 - * This string should contain no whitespace, and use a single
13.127 - * character for each argument. The recognized characters are:
13.128 - * <ul>
13.129 - * <li><tt>'w'</tt>: Matches a single word.</li>
13.130 - * <li><tt>'W'</tt>: Matches a single word, with formatting.</li>
13.131 - * <li><tt>'s'</tt>: Matches the rest of the arguments after this
13.132 - * point, as a single string.</li>
13.133 - * <li><tt>'S'</tt>: Same as <tt>'s'</tt> but with formatting.</li>
13.134 - * </ul>
13.135 - * If args is the empty string, then the command accepts no arguments.
13.136 - * The args passed to the callback @a func will be a @c NULL
13.137 - * terminated array of @c NULL terminated strings, and will always
13.138 - * match the number of arguments asked for, unless
13.139 - * #PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS is passed.
13.140 - * @param p This is the priority. Higher priority commands will be run first,
13.141 - * and usually the first command will stop any others from being
13.142 - * called.
13.143 - * @param f Flags specifying various options about this command, combined with
13.144 - * <tt>|</tt> (bitwise OR). You need to at least pass one of
13.145 - * #PURPLE_CMD_FLAG_IM or #PURPLE_CMD_FLAG_CHAT (you may pass both) in
13.146 - * order for the command to ever actually be called.
13.147 - * @param prpl_id If the #PURPLE_CMD_FLAG_PRPL_ONLY flag is set, this is the id
13.148 - * of the prpl to which the command applies (such as
13.149 - * <tt>"prpl-msn"</tt>). If the flag is not set, this parameter
13.150 - * is ignored; pass @c NULL (or a humourous string of your
13.151 - * choice!).
13.152 - * @param func This is the function to call when someone enters this command.
13.153 - * @param helpstr a whitespace sensitive, UTF-8, HTML string describing how to
13.154 - * use the command. The preferred format of this string is the
13.155 - * command's name, followed by a space and any arguments it
13.156 - * accepts (if it takes any arguments, otherwise no space),
13.157 - * followed by a colon, two spaces, and a description of the
13.158 - * command in sentence form. Do not include a slash before the
13.159 - * command name.
13.160 - * @param data User defined data to pass to the #PurpleCmdFunc @a f.
13.161 - * @return A #PurpleCmdId, which is only used for calling
13.162 - * #purple_cmd_unregister, or @a 0 on failure.
13.163 - */
13.164 -PurpleCmdId purple_cmd_register(const gchar *cmd, const gchar *args, PurpleCmdPriority p, PurpleCmdFlag f,
13.165 - const gchar *prpl_id, PurpleCmdFunc func, const gchar *helpstr, void *data);
13.166 -
13.167 -/**
13.168 - * Unregister a command with the core.
13.169 - *
13.170 - * All registered commands must be unregistered, if they're registered by a plugin
13.171 - * or something else that might go away. Normally this is called when the plugin
13.172 - * unloads itself.
13.173 - *
13.174 - * @param id The #PurpleCmdId to unregister, as returned by #purple_cmd_register.
13.175 - */
13.176 -void purple_cmd_unregister(PurpleCmdId id);
13.177 -
13.178 -/**
13.179 - * Do a command.
13.180 - *
13.181 - * Normally the UI calls this to perform a command. This might also be useful
13.182 - * if aliases are ever implemented.
13.183 - *
13.184 - * @param conv The conversation the command was typed in.
13.185 - * @param cmdline The command the user typed (including all arguments) as a single string.
13.186 - * The caller doesn't have to do any parsing, except removing the command
13.187 - * prefix, which the core has no knowledge of. cmd should not contain any
13.188 - * formatting, and should be in plain text (no html entities).
13.189 - * @param markup This is the same as cmd, but is the formatted version. It should be in
13.190 - * HTML, with < > and &, at least, escaped to html entities, and should
13.191 - * include both the default formatting and any extra manual formatting.
13.192 - * @param errormsg If the command failed errormsg is filled in with the appropriate error
13.193 - * message. It must be freed by the caller with g_free().
13.194 - * @return A #PurpleCmdStatus indicating if the command succeeded or failed.
13.195 - */
13.196 -PurpleCmdStatus purple_cmd_do_command(PurpleConversation *conv, const gchar *cmdline,
13.197 - const gchar *markup, gchar **errormsg);
13.198 -
13.199 -/**
13.200 - * List registered commands.
13.201 - *
13.202 - * Returns a <tt>GList</tt> (which must be freed by the caller) of all commands
13.203 - * that are valid in the context of @a conv, or all commands, if @a conv is @c
13.204 - * NULL. Don't keep this list around past the main loop, or anything else that
13.205 - * might unregister a command, as the <tt>const char *</tt>'s used get freed
13.206 - * then.
13.207 - *
13.208 - * @param conv The conversation, or @c NULL.
13.209 - * @return A @c GList of <tt>const char *</tt>, which must be freed with
13.210 - * <tt>g_list_free()</tt>.
13.211 - */
13.212 -GList *purple_cmd_list(PurpleConversation *conv);
13.213 -
13.214 -/**
13.215 - * Get the help string for a command.
13.216 - *
13.217 - * Returns the help strings for a given command in the form of a GList,
13.218 - * one node for each matching command.
13.219 - *
13.220 - * @param conv The conversation, or @c NULL for no context.
13.221 - * @param cmd The command. No wildcards accepted, but returns help for all
13.222 - * commands if @c NULL.
13.223 - * @return A <tt>GList</tt> of <tt>const char *</tt>s, which is the help string
13.224 - * for that command.
13.225 - */
13.226 -GList *purple_cmd_help(PurpleConversation *conv, const gchar *cmd);
13.227 -
13.228 -/**
13.229 - * Get the handle for the commands API
13.230 - * @return The handle
13.231 - * @since 2.5.0
13.232 - */
13.233 -gpointer purple_cmds_get_handle(void);
13.234 -
13.235 -/**
13.236 - * Initialize the commands subsystem.
13.237 - * @since 2.5.0
13.238 - */
13.239 -void purple_cmds_init(void);
13.240 -
13.241 -/**
13.242 - * Uninitialize the commands subsystem.
13.243 - * @since 2.5.0
13.244 - */
13.245 -void purple_cmds_uninit(void);
13.246 -
13.247 -/*@}*/
13.248 -
13.249 -#ifdef __cplusplus
13.250 -}
13.251 -#endif
13.252 -
13.253 -#endif /* _PURPLE_CMDS_H_ */
14.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/command.h Fri Aug 21 13:24:36 2009 -0700
14.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
14.3 @@ -1,62 +0,0 @@
14.4 -/**
14.5 - * @file command.h MSN command functions
14.6 - *
14.7 - * purple
14.8 - *
14.9 - * Purple is the legal property of its developers, whose names are too numerous
14.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
14.11 - * source distribution.
14.12 - *
14.13 - * This program is free software; you can redistribute it and/or modify
14.14 - * it under the terms of the GNU General Public License as published by
14.15 - * the Free Software Foundation; either version 2 of the License, or
14.16 - * (at your option) any later version.
14.17 - *
14.18 - * This program is distributed in the hope that it will be useful,
14.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
14.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14.21 - * GNU General Public License for more details.
14.22 - *
14.23 - * You should have received a copy of the GNU General Public License
14.24 - * along with this program; if not, write to the Free Software
14.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
14.26 - */
14.27 -#ifndef _MSN_COMMAND_H
14.28 -#define _MSN_COMMAND_H
14.29 -
14.30 -typedef struct _MsnCommand MsnCommand;
14.31 -
14.32 -#include "cmdproc.h"
14.33 -#include "transaction.h"
14.34 -
14.35 -typedef void (*MsnPayloadCb)(MsnCmdProc *cmdproc, MsnCommand *cmd,
14.36 - char *payload, size_t len);
14.37 -
14.38 -/**
14.39 - * A received command.
14.40 - */
14.41 -struct _MsnCommand
14.42 -{
14.43 - unsigned int trId;
14.44 -
14.45 - char *command;
14.46 - char **params;
14.47 - int param_count;
14.48 -
14.49 - int ref_count;
14.50 -
14.51 - MsnTransaction *trans;
14.52 -
14.53 - char *payload;
14.54 - size_t payload_len;
14.55 -
14.56 - MsnPayloadCb payload_cb;
14.57 - void *payload_cbdata;
14.58 -};
14.59 -
14.60 -MsnCommand *msn_command_from_string(const char *string);
14.61 -void msn_command_destroy(MsnCommand *cmd);
14.62 -MsnCommand *msn_command_ref(MsnCommand *cmd);
14.63 -MsnCommand *msn_command_unref(MsnCommand *cmd);
14.64 -
14.65 -#endif /* _MSN_COMMAND_H */
15.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/connection.h Fri Aug 21 13:24:36 2009 -0700
15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
15.3 @@ -1,625 +0,0 @@
15.4 -/**
15.5 - * @file connection.h Connection API
15.6 - * @ingroup core
15.7 - * @see @ref connection-signals
15.8 - */
15.9 -
15.10 -/* purple
15.11 - *
15.12 - * Purple is the legal property of its developers, whose names are too numerous
15.13 - * to list here. Please refer to the COPYRIGHT file distributed with this
15.14 - * source distribution.
15.15 - *
15.16 - * This program is free software; you can redistribute it and/or modify
15.17 - * it under the terms of the GNU General Public License as published by
15.18 - * the Free Software Foundation; either version 2 of the License, or
15.19 - * (at your option) any later version.
15.20 - *
15.21 - * This program is distributed in the hope that it will be useful,
15.22 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
15.23 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15.24 - * GNU General Public License for more details.
15.25 - *
15.26 - * You should have received a copy of the GNU General Public License
15.27 - * along with this program; if not, write to the Free Software
15.28 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
15.29 - */
15.30 -#ifndef _PURPLE_CONNECTION_H_
15.31 -#define _PURPLE_CONNECTION_H_
15.32 -
15.33 -/** @copydoc _PurpleConnection */
15.34 -typedef struct _PurpleConnection PurpleConnection;
15.35 -
15.36 -/**
15.37 - * Flags to change behavior of the client for a given connection.
15.38 - */
15.39 -typedef enum
15.40 -{
15.41 - PURPLE_CONNECTION_HTML = 0x0001, /**< Connection sends/receives in 'HTML'. */
15.42 - PURPLE_CONNECTION_NO_BGCOLOR = 0x0002, /**< Connection does not send/receive
15.43 - background colors. */
15.44 - PURPLE_CONNECTION_AUTO_RESP = 0x0004, /**< Send auto responses when away. */
15.45 - PURPLE_CONNECTION_FORMATTING_WBFO = 0x0008, /**< The text buffer must be formatted as a whole */
15.46 - PURPLE_CONNECTION_NO_NEWLINES = 0x0010, /**< No new lines are allowed in outgoing messages */
15.47 - PURPLE_CONNECTION_NO_FONTSIZE = 0x0020, /**< Connection does not send/receive font sizes */
15.48 - PURPLE_CONNECTION_NO_URLDESC = 0x0040, /**< Connection does not support descriptions with links */
15.49 - PURPLE_CONNECTION_NO_IMAGES = 0x0080, /**< Connection does not support sending of images */
15.50 - PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY = 0x0100 /**< Connection supports sending and receiving custom smileys */
15.51 -
15.52 -} PurpleConnectionFlags;
15.53 -
15.54 -typedef enum
15.55 -{
15.56 - PURPLE_DISCONNECTED = 0, /**< Disconnected. */
15.57 - PURPLE_CONNECTED, /**< Connected. */
15.58 - PURPLE_CONNECTING /**< Connecting. */
15.59 -
15.60 -} PurpleConnectionState;
15.61 -
15.62 -/**
15.63 - * Possible errors that can cause a connection to be closed.
15.64 - *
15.65 - * @since 2.3.0
15.66 - */
15.67 -typedef enum
15.68 -{
15.69 - /** There was an error sending or receiving on the network socket, or
15.70 - * there was some protocol error (such as the server sending malformed
15.71 - * data).
15.72 - */
15.73 - PURPLE_CONNECTION_ERROR_NETWORK_ERROR = 0,
15.74 - /** The username supplied was not valid. */
15.75 - PURPLE_CONNECTION_ERROR_INVALID_USERNAME = 1,
15.76 - /** The username, password or some other credential was incorrect. Use
15.77 - * #PURPLE_CONNECTION_ERROR_INVALID_USERNAME instead if the username
15.78 - * is known to be invalid.
15.79 - */
15.80 - PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED = 2,
15.81 - /** libpurple doesn't speak any of the authentication methods the
15.82 - * server offered.
15.83 - */
15.84 - PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE = 3,
15.85 - /** libpurple was built without SSL support, and the connection needs
15.86 - * SSL.
15.87 - */
15.88 - PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT = 4,
15.89 - /** There was an error negotiating SSL on this connection, or the
15.90 - * server does not support encryption but an account option was set to
15.91 - * require it.
15.92 - */
15.93 - PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR = 5,
15.94 - /** Someone is already connected to the server using the name you are
15.95 - * trying to connect with.
15.96 - */
15.97 - PURPLE_CONNECTION_ERROR_NAME_IN_USE = 6,
15.98 -
15.99 - /** The username/server/other preference for the account isn't valid.
15.100 - * For instance, on IRC the username cannot contain white space.
15.101 - * This reason should not be used for incorrect passwords etc: use
15.102 - * #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED for that.
15.103 - *
15.104 - * @todo This reason really shouldn't be necessary. Usernames and
15.105 - * other account preferences should be validated when the
15.106 - * account is created.
15.107 - */
15.108 - PURPLE_CONNECTION_ERROR_INVALID_SETTINGS = 7,
15.109 -
15.110 - /** The server did not provide a SSL certificate. */
15.111 - PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED = 8,
15.112 - /** The server's SSL certificate could not be trusted. */
15.113 - PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED = 9,
15.114 - /** The server's SSL certificate has expired. */
15.115 - PURPLE_CONNECTION_ERROR_CERT_EXPIRED = 10,
15.116 - /** The server's SSL certificate is not yet valid. */
15.117 - PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED = 11,
15.118 - /** The server's SSL certificate did not match its hostname. */
15.119 - PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH = 12,
15.120 - /** The server's SSL certificate does not have the expected
15.121 - * fingerprint.
15.122 - */
15.123 - PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH = 13,
15.124 - /** The server's SSL certificate is self-signed. */
15.125 - PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED = 14,
15.126 - /** There was some other error validating the server's SSL certificate.
15.127 - */
15.128 - PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR = 15,
15.129 -
15.130 - /** Some other error occurred which fits into none of the other
15.131 - * categories.
15.132 - */
15.133 - /* purple_connection_error_reason() in connection.c uses the fact that
15.134 - * this is the last member of the enum when sanity-checking; if other
15.135 - * reasons are added after it, the check must be updated.
15.136 - */
15.137 - PURPLE_CONNECTION_ERROR_OTHER_ERROR = 16
15.138 -} PurpleConnectionError;
15.139 -
15.140 -/** Holds the type of an error along with its description. */
15.141 -typedef struct
15.142 -{
15.143 - /** The type of error. */
15.144 - PurpleConnectionError type;
15.145 - /** A localised, human-readable description of the error. */
15.146 - char *description;
15.147 -} PurpleConnectionErrorInfo;
15.148 -
15.149 -#include <time.h>
15.150 -
15.151 -#include "account.h"
15.152 -#include "plugin.h"
15.153 -#include "status.h"
15.154 -#include "sslconn.h"
15.155 -
15.156 -/**
15.157 - * Connection UI operations. Used to notify the user of changes to
15.158 - * connections, such as being disconnected, and to respond to the
15.159 - * underlying network connection appearing and disappearing. UIs should
15.160 - * call #purple_connections_set_ui_ops() with an instance of this struct.
15.161 - *
15.162 - * @see @ref ui-ops
15.163 - */
15.164 -typedef struct
15.165 -{
15.166 - /**
15.167 - * When an account is connecting, this operation is called to notify
15.168 - * the UI of what is happening, as well as which @a step out of @a
15.169 - * step_count has been reached (which might be displayed as a progress
15.170 - * bar).
15.171 - * @see #purple_connection_update_progress
15.172 - */
15.173 - void (*connect_progress)(PurpleConnection *gc,
15.174 - const char *text,
15.175 - size_t step,
15.176 - size_t step_count);
15.177 -
15.178 - /**
15.179 - * Called when a connection is established (just before the
15.180 - * @ref signed-on signal).
15.181 - */
15.182 - void (*connected)(PurpleConnection *gc);
15.183 -
15.184 - /**
15.185 - * Called when a connection is ended (between the @ref signing-off
15.186 - * and @ref signed-off signals).
15.187 - */
15.188 - void (*disconnected)(PurpleConnection *gc);
15.189 -
15.190 - /**
15.191 - * Used to display connection-specific notices. (Pidgin's Gtk user
15.192 - * interface implements this as a no-op; #purple_connection_notice(),
15.193 - * which uses this operation, is not used by any of the protocols
15.194 - * shipped with libpurple.)
15.195 - */
15.196 - void (*notice)(PurpleConnection *gc, const char *text);
15.197 -
15.198 - /**
15.199 - * Called when an error causes a connection to be disconnected.
15.200 - * Called before #disconnected.
15.201 - * @param text a localized error message.
15.202 - * @see #purple_connection_error
15.203 - * @deprecated in favour of
15.204 - * #PurpleConnectionUiOps.report_disconnect_reason.
15.205 - */
15.206 - void (*report_disconnect)(PurpleConnection *gc, const char *text);
15.207 -
15.208 - /**
15.209 - * Called when libpurple discovers that the computer's network
15.210 - * connection is active. On Linux, this uses Network Manager if
15.211 - * available; on Windows, it uses Win32's network change notification
15.212 - * infrastructure.
15.213 - */
15.214 - void (*network_connected)(void);
15.215 -
15.216 - /**
15.217 - * Called when libpurple discovers that the computer's network
15.218 - * connection has gone away.
15.219 - */
15.220 - void (*network_disconnected)(void);
15.221 -
15.222 - /**
15.223 - * Called when an error causes a connection to be disconnected.
15.224 - * Called before #disconnected. This op is intended to replace
15.225 - * #report_disconnect. If both are implemented, this will be called
15.226 - * first; however, there's no real reason to implement both.
15.227 - *
15.228 - * @param reason why the connection ended, if known, or
15.229 - * #PURPLE_CONNECTION_ERROR_OTHER_ERROR, if not.
15.230 - * @param text a localized message describing the disconnection
15.231 - * in more detail to the user.
15.232 - * @see #purple_connection_error_reason
15.233 - *
15.234 - * @since 2.3.0
15.235 - */
15.236 - void (*report_disconnect_reason)(PurpleConnection *gc,
15.237 - PurpleConnectionError reason,
15.238 - const char *text);
15.239 -
15.240 - void (*_purple_reserved1)(void);
15.241 - void (*_purple_reserved2)(void);
15.242 - void (*_purple_reserved3)(void);
15.243 -} PurpleConnectionUiOps;
15.244 -
15.245 -
15.246 -/* Represents an active connection on an account. */
15.247 -struct _PurpleConnection
15.248 -{
15.249 - PurplePlugin *prpl; /**< The protocol plugin. */
15.250 - PurpleConnectionFlags flags; /**< Connection flags. */
15.251 -
15.252 - PurpleConnectionState state; /**< The connection state. */
15.253 -
15.254 - PurpleAccount *account; /**< The account being connected to. */
15.255 - char *password; /**< The password used. */
15.256 - int inpa; /**< The input watcher. */
15.257 -
15.258 - GSList *buddy_chats; /**< A list of active chats
15.259 - (#PurpleConversation structs of type
15.260 - #PURPLE_CONV_TYPE_CHAT). */
15.261 - void *proto_data; /**< Protocol-specific data. */
15.262 -
15.263 - char *display_name; /**< How you appear to other people. */
15.264 - guint keepalive; /**< Keep-alive. */
15.265 -
15.266 - /** Wants to Die state. This is set when the user chooses to log out, or
15.267 - * when the protocol is disconnected and should not be automatically
15.268 - * reconnected (incorrect password, etc.). prpls should rely on
15.269 - * purple_connection_error_reason() to set this for them rather than
15.270 - * setting it themselves.
15.271 - * @see purple_connection_error_is_fatal
15.272 - */
15.273 - gboolean wants_to_die;
15.274 -
15.275 - guint disconnect_timeout; /**< Timer used for nasty stack tricks */
15.276 - time_t last_received; /**< When we last received a packet. Set by the
15.277 - prpl to avoid sending unneeded keepalives */
15.278 -};
15.279 -
15.280 -#ifdef __cplusplus
15.281 -extern "C" {
15.282 -#endif
15.283 -
15.284 -/**************************************************************************/
15.285 -/** @name Connection API */
15.286 -/**************************************************************************/
15.287 -/*@{*/
15.288 -
15.289 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_CONNECTION_C_)
15.290 -/**
15.291 - * This function should only be called by purple_account_connect()
15.292 - * in account.c. If you're trying to sign on an account, use that
15.293 - * function instead.
15.294 - *
15.295 - * Creates a connection to the specified account and either connects
15.296 - * or attempts to register a new account. If you are logging in,
15.297 - * the connection uses the current active status for this account.
15.298 - * So if you want to sign on as "away," for example, you need to
15.299 - * have called purple_account_set_status(account, "away").
15.300 - * (And this will call purple_account_connect() automatically).
15.301 - *
15.302 - * @param account The account the connection should be connecting to.
15.303 - * @param regist Whether we are registering a new account or just
15.304 - * trying to do a normal signon.
15.305 - * @param password The password to use.
15.306 - *
15.307 - * @deprecated As this is internal, we should make it private in 3.0.0.
15.308 - */
15.309 -void purple_connection_new(PurpleAccount *account, gboolean regist,
15.310 - const char *password);
15.311 -#endif
15.312 -
15.313 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_CONNECTION_C_)
15.314 -/**
15.315 - * This function should only be called by purple_account_unregister()
15.316 - * in account.c.
15.317 - *
15.318 - * Tries to unregister the account on the server. If the account is not
15.319 - * connected, also creates a new connection.
15.320 - *
15.321 - * @param account The account to unregister
15.322 - * @param password The password to use.
15.323 - * @param cb Optional callback to be called when unregistration is complete
15.324 - * @param user_data user data to pass to the callback
15.325 - *
15.326 - * @deprecated As this is internal, we should make it private in 3.0.0.
15.327 - */
15.328 -void purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data);
15.329 -#endif
15.330 -
15.331 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_CONNECTION_C_)
15.332 -/**
15.333 - * Disconnects and destroys a PurpleConnection.
15.334 - *
15.335 - * This function should only be called by purple_account_disconnect()
15.336 - * in account.c. If you're trying to sign off an account, use that
15.337 - * function instead.
15.338 - *
15.339 - * @param gc The purple connection to destroy.
15.340 - *
15.341 - * @deprecated As this is internal, we should make it private in 3.0.0.
15.342 - */
15.343 -void purple_connection_destroy(PurpleConnection *gc);
15.344 -#endif
15.345 -
15.346 -/**
15.347 - * Sets the connection state. PRPLs should call this and pass in
15.348 - * the state #PURPLE_CONNECTED when the account is completely
15.349 - * signed on. What does it mean to be completely signed on? If
15.350 - * the core can call prpl->set_status, and it successfully changes
15.351 - * your status, then the account is online.
15.352 - *
15.353 - * @param gc The connection.
15.354 - * @param state The connection state.
15.355 - */
15.356 -void purple_connection_set_state(PurpleConnection *gc, PurpleConnectionState state);
15.357 -
15.358 -/**
15.359 - * Sets the connection's account.
15.360 - *
15.361 - * @param gc The connection.
15.362 - * @param account The account.
15.363 - */
15.364 -void purple_connection_set_account(PurpleConnection *gc, PurpleAccount *account);
15.365 -
15.366 -/**
15.367 - * Sets the connection's displayed name.
15.368 - *
15.369 - * @param gc The connection.
15.370 - * @param name The displayed name.
15.371 - */
15.372 -void purple_connection_set_display_name(PurpleConnection *gc, const char *name);
15.373 -
15.374 -/**
15.375 - * Sets the protocol data for a connection.
15.376 - *
15.377 - * @param connection The PurpleConnection.
15.378 - * @param proto_data The protocol data to set for the connection.
15.379 - *
15.380 - * @since 2.6.0
15.381 - */
15.382 -void purple_connection_set_protocol_data(PurpleConnection *connection, void *proto_data);
15.383 -
15.384 -/**
15.385 - * Returns the connection state.
15.386 - *
15.387 - * @param gc The connection.
15.388 - *
15.389 - * @return The connection state.
15.390 - */
15.391 -PurpleConnectionState purple_connection_get_state(const PurpleConnection *gc);
15.392 -
15.393 -/**
15.394 - * Returns TRUE if the account is connected, otherwise returns FALSE.
15.395 - *
15.396 - * @return TRUE if the account is connected, otherwise returns FALSE.
15.397 - */
15.398 -#define PURPLE_CONNECTION_IS_CONNECTED(gc) \
15.399 - (purple_connection_get_state(gc) == PURPLE_CONNECTED)
15.400 -
15.401 -/**
15.402 - * Returns the connection's account.
15.403 - *
15.404 - * @param gc The connection.
15.405 - *
15.406 - * @return The connection's account.
15.407 - */
15.408 -PurpleAccount *purple_connection_get_account(const PurpleConnection *gc);
15.409 -
15.410 -/**
15.411 - * Returns the protocol plugin managing a connection.
15.412 - *
15.413 - * @param gc The connection.
15.414 - *
15.415 - * @return The protocol plugin.
15.416 - *
15.417 - * @since 2.4.0
15.418 - */
15.419 -PurplePlugin * purple_connection_get_prpl(const PurpleConnection *gc);
15.420 -
15.421 -/**
15.422 - * Returns the connection's password.
15.423 - *
15.424 - * @param gc The connection.
15.425 - *
15.426 - * @return The connection's password.
15.427 - */
15.428 -const char *purple_connection_get_password(const PurpleConnection *gc);
15.429 -
15.430 -/**
15.431 - * Returns the connection's displayed name.
15.432 - *
15.433 - * @param gc The connection.
15.434 - *
15.435 - * @return The connection's displayed name.
15.436 - */
15.437 -const char *purple_connection_get_display_name(const PurpleConnection *gc);
15.438 -
15.439 -/**
15.440 - * Gets the protocol data from a connection.
15.441 - *
15.442 - * @param connection The PurpleConnection.
15.443 - *
15.444 - * @return The protocol data for the connection.
15.445 - *
15.446 - * @since 2.6.0
15.447 - */
15.448 -void *purple_connection_get_protocol_data(const PurpleConnection *connection);
15.449 -
15.450 -/**
15.451 - * Updates the connection progress.
15.452 - *
15.453 - * @param gc The connection.
15.454 - * @param text Information on the current step.
15.455 - * @param step The current step.
15.456 - * @param count The total number of steps.
15.457 - */
15.458 -void purple_connection_update_progress(PurpleConnection *gc, const char *text,
15.459 - size_t step, size_t count);
15.460 -
15.461 -/**
15.462 - * Displays a connection-specific notice.
15.463 - *
15.464 - * @param gc The connection.
15.465 - * @param text The notice text.
15.466 - */
15.467 -void purple_connection_notice(PurpleConnection *gc, const char *text);
15.468 -
15.469 -/**
15.470 - * Closes a connection with an error.
15.471 - *
15.472 - * @param gc The connection.
15.473 - * @param reason The error text, which may not be @c NULL.
15.474 - * @deprecated in favour of #purple_connection_error_reason. Calling
15.475 - * @c purple_connection_error(gc, text) is equivalent to calling
15.476 - * @c purple_connection_error_reason(gc, reason, text) where @c reason is
15.477 - * #PURPLE_CONNECTION_ERROR_OTHER_ERROR if @c gc->wants_to_die is @c TRUE, and
15.478 - * #PURPLE_CONNECTION_ERROR_NETWORK_ERROR if not. (This is to keep
15.479 - * auto-reconnection behaviour the same when using old prpls which don't use
15.480 - * reasons yet.)
15.481 - */
15.482 -void purple_connection_error(PurpleConnection *gc, const char *reason);
15.483 -
15.484 -/**
15.485 - * Closes a connection with an error and a human-readable description of the
15.486 - * error. It also sets @c gc->wants_to_die to the value of
15.487 - * #purple_connection_error_is_fatal(@a reason), mainly for
15.488 - * backwards-compatibility.
15.489 - *
15.490 - * @param gc the connection which is closing.
15.491 - * @param reason why the connection is closing.
15.492 - * @param description a non-@c NULL localized description of the error.
15.493 - *
15.494 - * @since 2.3.0
15.495 - */
15.496 -void
15.497 -purple_connection_error_reason (PurpleConnection *gc,
15.498 - PurpleConnectionError reason,
15.499 - const char *description);
15.500 -
15.501 -/**
15.502 - * Closes a connection due to an SSL error; this is basically a shortcut to
15.503 - * turning the #PurpleSslErrorType into a #PurpleConnectionError and a
15.504 - * human-readable string and then calling purple_connection_error_reason().
15.505 - *
15.506 - * @since 2.3.0
15.507 - */
15.508 -void
15.509 -purple_connection_ssl_error (PurpleConnection *gc,
15.510 - PurpleSslErrorType ssl_error);
15.511 -
15.512 -/**
15.513 - * Reports whether a disconnection reason is fatal (in which case the account
15.514 - * should probably not be automatically reconnected) or transient (so
15.515 - * auto-reconnection is a good idea).
15.516 - * For instance, #PURPLE_CONNECTION_ERROR_NETWORK_ERROR is a temporary error,
15.517 - * which might be caused by losing the network connection, so <tt>
15.518 - * purple_connection_error_is_fatal (PURPLE_CONNECTION_ERROR_NETWORK_ERROR)</tt>
15.519 - * is @c FALSE. On the other hand,
15.520 - * #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED probably indicates a
15.521 - * misconfiguration of the account which needs the user to go fix it up, so
15.522 - * <tt> purple_connection_error_is_fatal
15.523 - * (PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED)</tt> is @c TRUE.
15.524 - *
15.525 - * (This function is meant to replace checking PurpleConnection.wants_to_die.)
15.526 - *
15.527 - * @return @c TRUE if the account should not be automatically reconnected, and
15.528 - * @c FALSE otherwise.
15.529 - *
15.530 - * @since 2.3.0
15.531 - */
15.532 -gboolean
15.533 -purple_connection_error_is_fatal (PurpleConnectionError reason);
15.534 -
15.535 -/*@}*/
15.536 -
15.537 -/**************************************************************************/
15.538 -/** @name Connections API */
15.539 -/**************************************************************************/
15.540 -/*@{*/
15.541 -
15.542 -/**
15.543 - * Disconnects from all connections.
15.544 - */
15.545 -void purple_connections_disconnect_all(void);
15.546 -
15.547 -/**
15.548 - * Returns a list of all active connections. This does not
15.549 - * include connections that are in the process of connecting.
15.550 - *
15.551 - * @constreturn A list of all active connections.
15.552 - */
15.553 -GList *purple_connections_get_all(void);
15.554 -
15.555 -/**
15.556 - * Returns a list of all connections in the process of connecting.
15.557 - *
15.558 - * @constreturn A list of connecting connections.
15.559 - */
15.560 -GList *purple_connections_get_connecting(void);
15.561 -
15.562 -/**
15.563 - * Checks if gc is still a valid pointer to a gc.
15.564 - *
15.565 - * @return @c TRUE if gc is valid.
15.566 - *
15.567 - * @deprecated Do not use this. Instead, cancel your asynchronous request
15.568 - * when the PurpleConnection is destroyed.
15.569 - */
15.570 -/*
15.571 - * TODO: Eventually this bad boy will be removed, because it is
15.572 - * a gross fix for a crashy problem.
15.573 - */
15.574 -#define PURPLE_CONNECTION_IS_VALID(gc) (g_list_find(purple_connections_get_all(), (gc)) != NULL)
15.575 -
15.576 -/*@}*/
15.577 -
15.578 -/**************************************************************************/
15.579 -/** @name UI Registration Functions */
15.580 -/**************************************************************************/
15.581 -/*@{*/
15.582 -
15.583 -/**
15.584 - * Sets the UI operations structure to be used for connections.
15.585 - *
15.586 - * @param ops The UI operations structure.
15.587 - */
15.588 -void purple_connections_set_ui_ops(PurpleConnectionUiOps *ops);
15.589 -
15.590 -/**
15.591 - * Returns the UI operations structure used for connections.
15.592 - *
15.593 - * @return The UI operations structure in use.
15.594 - */
15.595 -PurpleConnectionUiOps *purple_connections_get_ui_ops(void);
15.596 -
15.597 -/*@}*/
15.598 -
15.599 -/**************************************************************************/
15.600 -/** @name Connections Subsystem */
15.601 -/**************************************************************************/
15.602 -/*@{*/
15.603 -
15.604 -/**
15.605 - * Initializes the connections subsystem.
15.606 - */
15.607 -void purple_connections_init(void);
15.608 -
15.609 -/**
15.610 - * Uninitializes the connections subsystem.
15.611 - */
15.612 -void purple_connections_uninit(void);
15.613 -
15.614 -/**
15.615 - * Returns the handle to the connections subsystem.
15.616 - *
15.617 - * @return The connections subsystem handle.
15.618 - */
15.619 -void *purple_connections_get_handle(void);
15.620 -
15.621 -/*@}*/
15.622 -
15.623 -
15.624 -#ifdef __cplusplus
15.625 -}
15.626 -#endif
15.627 -
15.628 -#endif /* _PURPLE_CONNECTION_H_ */
16.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/contact.h Fri Aug 21 13:24:36 2009 -0700
16.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
16.3 @@ -1,711 +0,0 @@
16.4 -/**
16.5 - * @file contact.h Header file for contact.c
16.6 - * Author
16.7 - * MaYuan<mayuan2006@gmail.com>
16.8 - * purple
16.9 - *
16.10 - * Purple is the legal property of its developers, whose names are too numerous
16.11 - * to list here. Please refer to the COPYRIGHT file distributed with this
16.12 - * source distribution.
16.13 - *
16.14 - * This program is free software; you can redistribute it and/or modify
16.15 - * it under the terms of the GNU General Public License as published by
16.16 - * the Free Software Foundation; either version 2 of the License, or
16.17 - * (at your option) any later version.
16.18 - *
16.19 - * This program is distributed in the hope that it will be useful,
16.20 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
16.21 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16.22 - * GNU General Public License for more details.
16.23 - *
16.24 - * You should have received a copy of the GNU General Public License
16.25 - * along with this program; if not, write to the Free Software
16.26 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16.27 - */
16.28 -#ifndef _MSN_CONTACT_H_
16.29 -#define _MSN_CONTACT_H_
16.30 -
16.31 -#include "session.h"
16.32 -#include "soap.h"
16.33 -
16.34 -#define MSN_APPLICATION_ID "CFE80F9D-180F-4399-82AB-413F33A1FA11"
16.35 -
16.36 -#define MSN_CONTACT_SERVER "omega.contacts.msn.com"
16.37 -
16.38 -/* Get Contact List */
16.39 -
16.40 -#define MSN_GET_CONTACT_POST_URL "/abservice/SharingService.asmx"
16.41 -#define MSN_GET_CONTACT_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/FindMembership"
16.42 -
16.43 -#define MSN_GET_CONTACT_UPDATE_XML \
16.44 - "<View>Full</View>"\
16.45 - "<deltasOnly>true</deltasOnly>"\
16.46 - "<lastChange>%s</lastChange>"
16.47 -
16.48 -#define MSN_GET_CONTACT_TEMPLATE "<?xml version='1.0' encoding='utf-8'?>"\
16.49 -"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
16.50 - "<soap:Header xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
16.51 - "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.52 - "<ApplicationId xmlns=\"http://www.msn.com/webservices/AddressBook\">" MSN_APPLICATION_ID "</ApplicationId>"\
16.53 - "<IsMigration xmlns=\"http://www.msn.com/webservices/AddressBook\">false</IsMigration>"\
16.54 - "<PartnerScenario xmlns=\"http://www.msn.com/webservices/AddressBook\">%s</PartnerScenario>"\
16.55 - "</ABApplicationHeader>"\
16.56 - "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.57 - "<ManagedGroupRequest xmlns=\"http://www.msn.com/webservices/AddressBook\">false</ManagedGroupRequest>"\
16.58 - "<TicketToken>EMPTY</TicketToken>"\
16.59 - "</ABAuthHeader>"\
16.60 - "</soap:Header>"\
16.61 - "<soap:Body xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
16.62 - "<FindMembership xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.63 - "<serviceFilter xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.64 - "<Types xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.65 - "<ServiceType xmlns=\"http://www.msn.com/webservices/AddressBook\">Messenger</ServiceType>"\
16.66 - "<ServiceType xmlns=\"http://www.msn.com/webservices/AddressBook\">Invitation</ServiceType>"\
16.67 - "<ServiceType xmlns=\"http://www.msn.com/webservices/AddressBook\">SocialNetwork</ServiceType>"\
16.68 - "<ServiceType xmlns=\"http://www.msn.com/webservices/AddressBook\">Space</ServiceType>"\
16.69 - "<ServiceType xmlns=\"http://www.msn.com/webservices/AddressBook\">Profile</ServiceType>"\
16.70 - "</Types>"\
16.71 - "</serviceFilter>"\
16.72 - "%s"\
16.73 - "</FindMembership>"\
16.74 - "</soap:Body>"\
16.75 -"</soap:Envelope>"
16.76 -
16.77 -/************************************************
16.78 - * Address Book SOAP
16.79 - * *********************************************/
16.80 -
16.81 -#define MSN_ADDRESS_BOOK_POST_URL "/abservice/abservice.asmx"
16.82 -
16.83 -/* Create AddressBook template */
16.84 -#define MSN_ADD_ADDRESSBOOK_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABAdd"
16.85 -
16.86 -#define MSN_ADD_ADDRESSBOOK_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
16.87 -"<soap:Envelope"\
16.88 - " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
16.89 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
16.90 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
16.91 - " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
16.92 - "<soap:Header>"\
16.93 - "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.94 - "<ApplicationId>" MSN_APPLICATION_ID "</ApplicationId>"\
16.95 - "<IsMigration>false</IsMigration>"\
16.96 - "<PartnerScenario>Initial</PartnerScenario>"\
16.97 - "</ABApplicationHeader>"\
16.98 - "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.99 - "<ManagedGroupRequest>false</ManagedGroupRequest>"\
16.100 - "<TicketToken>EMPTY</TicketToken>"\
16.101 - "</ABAuthHeader>"\
16.102 - "</soap:Header>"\
16.103 - "<soap:Body>"\
16.104 - "<ABAdd xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.105 - "<abInfo>"\
16.106 - "<name/>"\
16.107 - "<ownerPuid>0</ownerPuid>"\
16.108 - "<ownerEmail>%s</ownerEmail>"\
16.109 - "<fDefault>true</fDefault>"\
16.110 - "</abInfo>"\
16.111 - "</ABAdd>"\
16.112 - "</soap:Body>"\
16.113 -"</soap:Envelope>"
16.114 -
16.115 -/* Get AddressBook */
16.116 -#define MSN_GET_ADDRESS_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABFindAll"
16.117 -#define MSN_GET_ADDRESS_FULL_TIME "0001-01-01T00:00:00.0000000-08:00"
16.118 -#define MSN_GET_ADDRESS_UPDATE_XML \
16.119 - "<deltasOnly>true</deltasOnly>"\
16.120 - "<lastChange>%s</lastChange>"
16.121 -
16.122 -#define MSN_GET_GLEAM_UPDATE_XML \
16.123 - "%s"\
16.124 - "<dynamicItemView>Gleam</dynamicItemView>"\
16.125 - "<dynamicItemLastChange>%s</dynamicItemLastChange>"
16.126 -
16.127 -#define MSN_GET_ADDRESS_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
16.128 -"<soap:Envelope"\
16.129 - " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
16.130 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
16.131 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
16.132 - " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
16.133 - "<soap:Header>"\
16.134 - "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.135 - "<ApplicationId>" MSN_APPLICATION_ID "</ApplicationId>"\
16.136 - "<IsMigration>false</IsMigration>"\
16.137 - "<PartnerScenario>%s</PartnerScenario>"\
16.138 - "</ABApplicationHeader>"\
16.139 - "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.140 - "<ManagedGroupRequest>false</ManagedGroupRequest>"\
16.141 - "<TicketToken>EMPTY</TicketToken>"\
16.142 - "</ABAuthHeader>"\
16.143 - "</soap:Header>"\
16.144 - "<soap:Body>"\
16.145 - "<ABFindAll xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.146 - "<abId>00000000-0000-0000-0000-000000000000</abId>"\
16.147 - "<abView>Full</abView>"\
16.148 - "%s"\
16.149 - "</ABFindAll>"\
16.150 - "</soap:Body>"\
16.151 -"</soap:Envelope>"
16.152 -
16.153 -
16.154 -/*Gleams SOAP request template*/
16.155 -#define MSN_GET_GLEAMS_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABFindAll"
16.156 -#define MSN_GLEAMS_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
16.157 -"<soap:Envelope"\
16.158 - " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
16.159 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
16.160 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
16.161 - " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
16.162 - "<soap:Header>"\
16.163 - "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.164 - "<ApplicationId>" MSN_APPLICATION_ID "</ApplicationId>"\
16.165 - "<IsMigration>false</IsMigration>"\
16.166 - "<PartnerScenario>Initial</PartnerScenario>"\
16.167 - "</ABApplicationHeader>"\
16.168 - "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.169 - "<ManagedGroupRequest>false</ManagedGroupRequest>"\
16.170 - "<TicketToken>EMPTY</TicketToken>"\
16.171 - "</ABAuthHeader>"\
16.172 - "</soap:Header>"\
16.173 - "<soap:Body>"\
16.174 - "<ABFindAll xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.175 - "<abId>00000000-0000-0000-0000-000000000000</abId>"\
16.176 - "<abView>Full</abView>"\
16.177 - "<dynamicItemView>Gleam</dynamicItemView>"\
16.178 - "<dynamicItemLastChange>0001-01-01T00:00:00.0000000-08:00</dynamicItemLastChange>"\
16.179 - "</ABFindAll>"\
16.180 - "</soap:Body>"\
16.181 -"</soap:Envelope>"
16.182 -
16.183 -
16.184 -/*******************************************************
16.185 - * Contact Management SOAP actions
16.186 - *******************************************************/
16.187 -
16.188 -/* Add a new contact */
16.189 -#define MSN_CONTACT_ADD_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABContactAdd"
16.190 -#define MSN_CONTACT_LIVE_PENDING_XML \
16.191 - "<Contact xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.192 - "<contactInfo>"\
16.193 - "<contactType>LivePending</contactType>"\
16.194 - "<passportName>%s</passportName>"\
16.195 - "<isMessengerUser>true</isMessengerUser>"\
16.196 - "</contactInfo>"\
16.197 - "</Contact>"
16.198 -
16.199 -#define MSN_CONTACT_XML \
16.200 - "<Contact xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.201 - "<contactInfo>"\
16.202 - "<passportName>%s</passportName>"\
16.203 - "<isSmtp>false</isSmtp>"\
16.204 - "<isMessengerUser>true</isMessengerUser>"\
16.205 - "</contactInfo>"\
16.206 - "</Contact>"
16.207 -
16.208 -#define MSN_CONTACT_DISPLAYNAME_XML \
16.209 - "<Contact xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.210 - "<contactInfo>"\
16.211 - "<displayName>%s</displayName>"\
16.212 - "<passportName>%s</passportName>"\
16.213 - "<isMessengerUser>true</isMessengerUser>"\
16.214 - "</contactInfo>"\
16.215 - "</Contact>"
16.216 -
16.217 -#define MSN_CONTACT_ID_XML \
16.218 - "<Contact>"\
16.219 - "<contactId>%s</contactId>"\
16.220 - "</Contact>"
16.221 -
16.222 -#define MSN_CONTACT_EMAIL_XML \
16.223 - "<Contact>"\
16.224 - "<contactInfo>"\
16.225 - "<emails>"\
16.226 - "<ContactEmail>"\
16.227 - "<contactEmailType>%s</contactEmailType>"\
16.228 - "<email>%s</email>"\
16.229 - "<isMessengerEnabled>true</isMessengerEnabled>"\
16.230 - "<Capability>%d</Capability>"\
16.231 - "<MessengerEnabledExternally>false</MessengerEnabledExternally>"\
16.232 - "<propertiesChanged/>"\
16.233 - "</ContactEmail>"\
16.234 - "</emails>"\
16.235 - "</contactInfo>"\
16.236 - "</Contact>"
16.237 -
16.238 -#define MSN_CONTACT_INVITE_MESSAGE_XML \
16.239 - "<MessengerMemberInfo>"\
16.240 - "<PendingAnnotations>"\
16.241 - "<Annotation>"\
16.242 - "<Name>MSN.IM.InviteMessage</Name>"\
16.243 - "<Value>%s</Value>"\
16.244 - "</Annotation>"\
16.245 - "</PendingAnnotations>"\
16.246 - "<DisplayName>%s</DisplayName>"\
16.247 - "</MessengerMemberInfo>"
16.248 -
16.249 -#define MSN_ADD_CONTACT_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
16.250 -"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
16.251 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
16.252 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
16.253 - " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
16.254 - "<soap:Header>"\
16.255 - "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.256 - "<ApplicationId>" MSN_APPLICATION_ID "</ApplicationId>"\
16.257 - "<IsMigration>false</IsMigration>"\
16.258 - "<PartnerScenario>ContactSave</PartnerScenario>"\
16.259 - "</ABApplicationHeader>"\
16.260 - "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.261 - "<ManagedGroupRequest>false</ManagedGroupRequest>"\
16.262 - "<TicketToken>EMPTY</TicketToken>"\
16.263 - "</ABAuthHeader>"\
16.264 - "</soap:Header>"\
16.265 - "<soap:Body>"\
16.266 - "<ABContactAdd xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.267 - "<abId>00000000-0000-0000-0000-000000000000</abId>"\
16.268 - "<contacts>%s</contacts>"\
16.269 - "<options>"\
16.270 - "<EnableAllowListManagement>true</EnableAllowListManagement>"\
16.271 - "</options>"\
16.272 - "</ABContactAdd>"\
16.273 - "</soap:Body>"\
16.274 -"</soap:Envelope>"
16.275 -
16.276 -/* Add a contact to a group */
16.277 -#define MSN_ADD_CONTACT_GROUP_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABGroupContactAdd"
16.278 -#define MSN_ADD_CONTACT_GROUP_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
16.279 -"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
16.280 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
16.281 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
16.282 - " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
16.283 - "<soap:Header>"\
16.284 - "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.285 - "<ApplicationId>" MSN_APPLICATION_ID "</ApplicationId>"\
16.286 - "<IsMigration>false</IsMigration>"\
16.287 - "<PartnerScenario>ContactSave</PartnerScenario>"\
16.288 - "</ABApplicationHeader>"\
16.289 - "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.290 - "<ManagedGroupRequest>false</ManagedGroupRequest>"\
16.291 - "<TicketToken>EMPTY</TicketToken>"\
16.292 - "</ABAuthHeader>"\
16.293 - "</soap:Header>"\
16.294 - "<soap:Body>"\
16.295 - "<ABGroupContactAdd xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.296 - "<abId>00000000-0000-0000-0000-000000000000</abId>"\
16.297 - "<groupFilter>"\
16.298 - "<groupIds>"\
16.299 - "<guid>%s</guid>"\
16.300 - "</groupIds>"\
16.301 - "</groupFilter>"\
16.302 - "<contacts>%s</contacts>"\
16.303 - "<groupContactAddOptions>"\
16.304 - "<fGenerateMissingQuickName>true</fGenerateMissingQuickName>"\
16.305 - "<EnableAllowListManagement>true</EnableAllowListManagement>"\
16.306 - "</groupContactAddOptions>"\
16.307 - "%s"\
16.308 - "</ABGroupContactAdd>"\
16.309 - "</soap:Body>"\
16.310 -"</soap:Envelope>"
16.311 -
16.312 -/* Delete a contact from the Contact List */
16.313 -#define MSN_CONTACT_DEL_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABContactDelete"
16.314 -#define MSN_DEL_CONTACT_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
16.315 -"<soap:Envelope"\
16.316 - " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
16.317 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
16.318 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
16.319 - " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
16.320 - "<soap:Header>"\
16.321 - "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.322 - "<ApplicationId>" MSN_APPLICATION_ID "</ApplicationId>"\
16.323 - "<IsMigration>false</IsMigration>"\
16.324 - "<PartnerScenario>Timer</PartnerScenario>"\
16.325 - "</ABApplicationHeader>"\
16.326 - "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.327 - "<ManagedGroupRequest>false</ManagedGroupRequest>"\
16.328 - "<TicketToken>EMPTY</TicketToken>"\
16.329 - "</ABAuthHeader>"\
16.330 - "</soap:Header>"\
16.331 - "<soap:Body>"\
16.332 - "<ABContactDelete xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.333 - "<abId>00000000-0000-0000-0000-000000000000</abId>"\
16.334 - "<contacts>%s</contacts>"\
16.335 - "</ABContactDelete>"\
16.336 - "</soap:Body>"\
16.337 -"</soap:Envelope>"
16.338 -
16.339 -/* Remove a contact from a group */
16.340 -#define MSN_CONTACT_DEL_GROUP_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABGroupContactDelete"
16.341 -#define MSN_CONTACT_DEL_GROUP_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
16.342 -"<soap:Envelope"\
16.343 - " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
16.344 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
16.345 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
16.346 - " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
16.347 - "<soap:Header>"\
16.348 - "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.349 - "<ApplicationId>" MSN_APPLICATION_ID "</ApplicationId>"\
16.350 - "<IsMigration>false</IsMigration>"\
16.351 - "<PartnerScenario>Timer</PartnerScenario>"\
16.352 - "</ABApplicationHeader>"\
16.353 - "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.354 - "<ManagedGroupRequest>false</ManagedGroupRequest>"\
16.355 - "<TicketToken>EMPTY</TicketToken>"\
16.356 - "</ABAuthHeader>"\
16.357 - "</soap:Header>"\
16.358 - "<soap:Body>"\
16.359 - "<ABGroupContactDelete xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.360 - "<abId>00000000-0000-0000-0000-000000000000</abId>"\
16.361 - "<contacts>%s</contacts>"\
16.362 - "<groupFilter>"\
16.363 - "<groupIds>"\
16.364 - "<guid>%s</guid>"\
16.365 - "</groupIds>"\
16.366 - "</groupFilter>"\
16.367 - "</ABGroupContactDelete>"\
16.368 - "</soap:Body>"\
16.369 -"</soap:Envelope>"
16.370 -
16.371 -
16.372 -/* Update Contact Information */
16.373 -#define MSN_CONTACT_UPDATE_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABContactUpdate"
16.374 -#define MSN_CONTACT_UPDATE_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
16.375 -"<soap:Envelope"\
16.376 - " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
16.377 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
16.378 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
16.379 - " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
16.380 - "<soap:Header>"\
16.381 - "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.382 - "<ApplicationId>" MSN_APPLICATION_ID "</ApplicationId>"\
16.383 - "<IsMigration>false</IsMigration>"\
16.384 - "<PartnerScenario>Timer</PartnerScenario>"\
16.385 - "</ABApplicationHeader>"\
16.386 - "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.387 - "<ManagedGroupRequest>false</ManagedGroupRequest>"\
16.388 - "<TicketToken>EMPTY</TicketToken>"\
16.389 - "</ABAuthHeader>"\
16.390 - "</soap:Header>"\
16.391 - "<soap:Body>"\
16.392 - "<ABContactUpdate xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.393 - "<abId>00000000-0000-0000-0000-000000000000</abId>"\
16.394 - "<contacts>"\
16.395 - "<Contact xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.396 - ""\
16.397 - "</Contact>"\
16.398 - "</contacts>"\
16.399 - "</ABContactUpdate>"\
16.400 - "</soap:Body>"\
16.401 -"</soap:Envelope>"
16.402 -
16.403 -/*******************************************************
16.404 - * Add/Delete contact from lists SOAP actions
16.405 - *******************************************************/
16.406 -
16.407 -/* block means delete from allow list and add contact to block list */
16.408 -#define MSN_SHARE_POST_URL "/abservice/SharingService.asmx"
16.409 -
16.410 -#define MSN_ADD_MEMBER_TO_LIST_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/AddMember"
16.411 -#define MSN_DELETE_MEMBER_FROM_LIST_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/DeleteMember"
16.412 -
16.413 -#define MSN_MEMBER_PASSPORT_XML \
16.414 - "<Member xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"%s\">"\
16.415 - "<Type>%s</Type>"\
16.416 - "<State>Accepted</State>"\
16.417 - "<%s>%s</%s>"\
16.418 - "</Member>"
16.419 -
16.420 -#define MSN_MEMBER_MEMBERSHIPID_XML \
16.421 - "<Member xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"%s\">"\
16.422 - "<Type>%s</Type>"\
16.423 - "<MembershipId>%u</MembershipId>"\
16.424 - "<State>Accepted</State>"\
16.425 - "</Member>"
16.426 -
16.427 -/* first delete contact from allow list */
16.428 -
16.429 -#define MSN_CONTACT_DELETE_FROM_LIST_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
16.430 -"<soap:Envelope"\
16.431 - " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
16.432 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
16.433 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
16.434 - " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
16.435 - "<soap:Header>"\
16.436 - "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.437 - "<ApplicationId>" MSN_APPLICATION_ID "</ApplicationId>"\
16.438 - "<IsMigration>false</IsMigration>"\
16.439 - "<PartnerScenario>%s</PartnerScenario>"\
16.440 - "</ABApplicationHeader>"\
16.441 - "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.442 - "<ManagedGroupRequest>false</ManagedGroupRequest>"\
16.443 - "<TicketToken>EMPTY</TicketToken>"\
16.444 - "</ABAuthHeader>"\
16.445 - "</soap:Header>"\
16.446 - "<soap:Body>"\
16.447 - "<DeleteMember xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.448 - "<serviceHandle>"\
16.449 - "<Id>0</Id>"\
16.450 - "<Type>Messenger</Type>"\
16.451 - "<ForeignId></ForeignId>"\
16.452 - "</serviceHandle>"\
16.453 - "<memberships>"\
16.454 - "<Membership>"\
16.455 - "<MemberRole>%s</MemberRole>"\
16.456 - "<Members>"\
16.457 - "%s"\
16.458 - "</Members>"\
16.459 - "</Membership>"\
16.460 - "</memberships>"\
16.461 - "</DeleteMember>"\
16.462 - "</soap:Body>"\
16.463 -"</soap:Envelope>"
16.464 -
16.465 -#define MSN_CONTACT_ADD_TO_LIST_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
16.466 -"<soap:Envelope"\
16.467 - " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
16.468 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
16.469 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
16.470 - " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
16.471 - "<soap:Header>"\
16.472 - "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.473 - "<ApplicationId>" MSN_APPLICATION_ID "</ApplicationId>"\
16.474 - "<IsMigration>false</IsMigration>"\
16.475 - "<PartnerScenario>%s</PartnerScenario>"\
16.476 - "</ABApplicationHeader>"\
16.477 - "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.478 - "<ManagedGroupRequest>false</ManagedGroupRequest>"\
16.479 - "<TicketToken>EMPTY</TicketToken>"\
16.480 - "</ABAuthHeader>"\
16.481 - "</soap:Header>"\
16.482 - "<soap:Body>"\
16.483 - "<AddMember xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.484 - "<serviceHandle>"\
16.485 - "<Id>0</Id>"\
16.486 - "<Type>Messenger</Type>"\
16.487 - "<ForeignId></ForeignId>"\
16.488 - "</serviceHandle>"\
16.489 - "<memberships>"\
16.490 - "<Membership>"\
16.491 - "<MemberRole>%s</MemberRole>"\
16.492 - "<Members>"\
16.493 - "%s"\
16.494 - "</Members>"\
16.495 - "</Membership>"\
16.496 - "</memberships>"\
16.497 - "</AddMember>"\
16.498 - "</soap:Body>"\
16.499 -"</soap:Envelope>"
16.500 -
16.501 -
16.502 -
16.503 -/*******************************************************
16.504 - * Group management SOAP actions
16.505 - *******************************************************/
16.506 -
16.507 -/* add a group */
16.508 -#define MSN_GROUP_ADD_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABGroupAdd"
16.509 -#define MSN_GROUP_ADD_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
16.510 -"<soap:Envelope"\
16.511 - " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
16.512 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
16.513 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
16.514 - " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
16.515 - "<soap:Header>"\
16.516 - "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.517 - "<ApplicationId>" MSN_APPLICATION_ID "</ApplicationId>"\
16.518 - "<IsMigration>false</IsMigration>"\
16.519 - "<PartnerScenario>GroupSave</PartnerScenario>"\
16.520 - "</ABApplicationHeader>"\
16.521 - "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.522 - "<ManagedGroupRequest>false</ManagedGroupRequest>"\
16.523 - "<TicketToken>EMPTY</TicketToken>"\
16.524 - "</ABAuthHeader>"\
16.525 - "</soap:Header>"\
16.526 - "<soap:Body>"\
16.527 - "<ABGroupAdd xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.528 - "<abId>00000000-0000-0000-0000-000000000000</abId>"\
16.529 - "<groupAddOptions>"\
16.530 - "<fRenameOnMsgrConflict>false</fRenameOnMsgrConflict>"\
16.531 - "</groupAddOptions>"\
16.532 - "<groupInfo>"\
16.533 - "<GroupInfo>"\
16.534 - "<name>%s</name>"\
16.535 - "<groupType>C8529CE2-6EAD-434d-881F-341E17DB3FF8</groupType>"\
16.536 - "<fMessenger>false</fMessenger>"\
16.537 - "<annotations>"\
16.538 - "<Annotation>"\
16.539 - "<Name>MSN.IM.Display</Name>"\
16.540 - "<Value>1</Value>"\
16.541 - "</Annotation>"\
16.542 - "</annotations>"\
16.543 - "</GroupInfo>"\
16.544 - "</groupInfo>"\
16.545 - "</ABGroupAdd>"\
16.546 - "</soap:Body>"\
16.547 -"</soap:Envelope>"
16.548 -
16.549 -/* delete a group */
16.550 -#define MSN_GROUP_DEL_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABGroupDelete"
16.551 -#define MSN_GROUP_DEL_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
16.552 -"<soap:Envelope"\
16.553 - " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
16.554 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
16.555 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
16.556 - " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
16.557 - "<soap:Header>"\
16.558 - "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.559 - "<ApplicationId>" MSN_APPLICATION_ID "</ApplicationId>"\
16.560 - "<IsMigration>false</IsMigration>"\
16.561 - "<PartnerScenario>Timer</PartnerScenario>"\
16.562 - "</ABApplicationHeader>"\
16.563 - "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.564 - "<ManagedGroupRequest>false</ManagedGroupRequest>"\
16.565 - "<TicketToken>EMPTY</TicketToken>"\
16.566 - "</ABAuthHeader>"\
16.567 - "</soap:Header>"\
16.568 - "<soap:Body>"\
16.569 - "<ABGroupDelete xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.570 - "<abId>00000000-0000-0000-0000-000000000000</abId>"\
16.571 - "<groupFilter>"\
16.572 - "<groupIds>"\
16.573 - "<guid>%s</guid>"\
16.574 - "</groupIds>"\
16.575 - "</groupFilter>"\
16.576 - "</ABGroupDelete>"\
16.577 - "</soap:Body>"\
16.578 -"</soap:Envelope>"
16.579 -
16.580 -/* change a group's name */
16.581 -#define MSN_GROUP_RENAME_SOAP_ACTION "http://www.msn.com/webservices/AddressBook/ABGroupUpdate"
16.582 -#define MSN_GROUP_RENAME_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
16.583 -"<soap:Envelope"\
16.584 - " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\""\
16.585 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
16.586 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
16.587 - " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">"\
16.588 - "<soap:Header>"\
16.589 - "<ABApplicationHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.590 - "<ApplicationId>" MSN_APPLICATION_ID "</ApplicationId>"\
16.591 - "<IsMigration>false</IsMigration>"\
16.592 - "<PartnerScenario>Timer</PartnerScenario>"\
16.593 - "</ABApplicationHeader>"\
16.594 - "<ABAuthHeader xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.595 - "<ManagedGroupRequest>false</ManagedGroupRequest>"\
16.596 - "<TicketToken>EMPTY</TicketToken>"\
16.597 - "</ABAuthHeader>"\
16.598 - "</soap:Header>"\
16.599 - "<soap:Body>"\
16.600 - "<ABGroupUpdate xmlns=\"http://www.msn.com/webservices/AddressBook\">"\
16.601 - "<abId>00000000-0000-0000-0000-000000000000</abId>"\
16.602 - "<groups>"\
16.603 - "<Group>"\
16.604 - "<groupId>%s</groupId>"\
16.605 - "<groupInfo>"\
16.606 - "<name>%s</name>"\
16.607 - "</groupInfo>"\
16.608 - "<propertiesChanged>GroupName </propertiesChanged>"\
16.609 - "</Group>"\
16.610 - "</groups>"\
16.611 - "</ABGroupUpdate>"\
16.612 - "</soap:Body>"\
16.613 -"</soap:Envelope>"
16.614 -
16.615 -typedef enum
16.616 -{
16.617 - MSN_ADD_BUDDY = 0x01,
16.618 - MSN_MOVE_BUDDY = 0x02,
16.619 - MSN_ACCEPTED_BUDDY = 0x04,
16.620 - MSN_DENIED_BUDDY = 0x08,
16.621 - MSN_ADD_GROUP = 0x10,
16.622 - MSN_DEL_GROUP = 0x20,
16.623 - MSN_RENAME_GROUP = 0x40,
16.624 - MSN_UPDATE_INFO = 0x80
16.625 -} MsnCallbackAction;
16.626 -
16.627 -typedef enum
16.628 -{
16.629 - MSN_PS_INITIAL,
16.630 - MSN_PS_SAVE_CONTACT,
16.631 - MSN_PS_PENDING_LIST,
16.632 - MSN_PS_CONTACT_API,
16.633 - MSN_PS_BLOCK_UNBLOCK
16.634 -} MsnSoapPartnerScenario;
16.635 -
16.636 -typedef struct _MsnCallbackState MsnCallbackState;
16.637 -
16.638 -struct _MsnCallbackState
16.639 -{
16.640 - gchar * who;
16.641 - gchar * uid;
16.642 - gchar * old_group_name;
16.643 - gchar * new_group_name;
16.644 - gchar * guid;
16.645 - MsnListId list_id;
16.646 - MsnCallbackAction action;
16.647 - MsnSession *session;
16.648 - xmlnode *body;
16.649 - xmlnode *token;
16.650 - const gchar *post_action;
16.651 - const gchar *post_url;
16.652 - MsnSoapCallback cb;
16.653 - /* For msn_get_contact_list only */
16.654 - MsnSoapPartnerScenario partner_scenario;
16.655 -};
16.656 -
16.657 -typedef enum
16.658 -{
16.659 - MSN_UPDATE_DISPLAY, /* Real display name */
16.660 - MSN_UPDATE_ALIAS, /* Aliased display name */
16.661 - MSN_UPDATE_COMMENT
16.662 -} MsnContactUpdateType;
16.663 -
16.664 -/************************************************
16.665 - * function prototype
16.666 - ************************************************/
16.667 -MsnCallbackState * msn_callback_state_new(MsnSession *session);
16.668 -MsnCallbackState * msn_callback_state_dup(MsnCallbackState *state);
16.669 -void msn_callback_state_free(MsnCallbackState *state);
16.670 -void msn_callback_state_set_who(MsnCallbackState *state, const gchar *who);
16.671 -void msn_callback_state_set_uid(MsnCallbackState *state, const gchar *uid);
16.672 -void msn_callback_state_set_old_group_name(MsnCallbackState *state,
16.673 - const gchar *old_group_name);
16.674 -void msn_callback_state_set_new_group_name(MsnCallbackState *state,
16.675 - const gchar *new_group_name);
16.676 -void msn_callback_state_set_guid(MsnCallbackState *state, const gchar *guid);
16.677 -void msn_callback_state_set_list_id(MsnCallbackState *state, MsnListId list_id);
16.678 -void msn_callback_state_set_action(MsnCallbackState *state,
16.679 - MsnCallbackAction action);
16.680 -
16.681 -void msn_contact_connect(MsnSession *session);
16.682 -void msn_get_contact_list(MsnSession *session,
16.683 - const MsnSoapPartnerScenario partner_scenario,
16.684 - const char *update);
16.685 -void msn_get_address_book(MsnSession *session,
16.686 - const MsnSoapPartnerScenario partner_scenario,
16.687 - const char * update, const char * gupdate);
16.688 -
16.689 -/* contact SOAP operations */
16.690 -void msn_update_contact(MsnSession *session, const char *passport, MsnContactUpdateType type, const char* value);
16.691 -
16.692 -void msn_add_contact(MsnSession *session, MsnCallbackState *state,
16.693 - const char *passport);
16.694 -void msn_delete_contact(MsnSession *session, MsnUser *user);
16.695 -
16.696 -void msn_add_contact_to_group(MsnSession *session, MsnCallbackState *state,
16.697 - const char *passport, const char *groupId);
16.698 -void msn_del_contact_from_group(MsnSession *session, const char *passport,
16.699 - const char *group_name);
16.700 -/* group operations */
16.701 -void msn_add_group(MsnSession *session, MsnCallbackState *state,
16.702 - const char* group_name);
16.703 -void msn_del_group(MsnSession *session, const gchar *group_name);
16.704 -void msn_contact_rename_group(MsnSession *session, const char *old_group_name,
16.705 - const char *new_group_name);
16.706 -
16.707 -/* lists operations */
16.708 -void msn_add_contact_to_list(MsnSession *session, MsnCallbackState *state,
16.709 - const gchar *passport, const MsnListId list);
16.710 -void msn_del_contact_from_list(MsnSession *session, MsnCallbackState *state,
16.711 - const gchar *passport, const MsnListId list);
16.712 -
16.713 -#endif /* _MSN_CONTACT_H_ */
16.714 -
17.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/conversation.h Fri Aug 21 13:24:36 2009 -0700
17.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
17.3 @@ -1,1468 +0,0 @@
17.4 -/**
17.5 - * @file conversation.h Conversation API
17.6 - * @ingroup core
17.7 - * @see @ref conversation-signals
17.8 - */
17.9 -
17.10 -/* purple
17.11 - *
17.12 - * Purple is the legal property of its developers, whose names are too numerous
17.13 - * to list here. Please refer to the COPYRIGHT file distributed with this
17.14 - * source distribution.
17.15 - *
17.16 - * This program is free software; you can redistribute it and/or modify
17.17 - * it under the terms of the GNU General Public License as published by
17.18 - * the Free Software Foundation; either version 2 of the License, or
17.19 - * (at your option) any later version.
17.20 - *
17.21 - * This program is distributed in the hope that it will be useful,
17.22 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
17.23 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17.24 - * GNU General Public License for more details.
17.25 - *
17.26 - * You should have received a copy of the GNU General Public License
17.27 - * along with this program; if not, write to the Free Software
17.28 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
17.29 - */
17.30 -#ifndef _PURPLE_CONVERSATION_H_
17.31 -#define _PURPLE_CONVERSATION_H_
17.32 -
17.33 -/**************************************************************************/
17.34 -/** Data Structures */
17.35 -/**************************************************************************/
17.36 -
17.37 -
17.38 -/** @copydoc _PurpleConversationUiOps */
17.39 -typedef struct _PurpleConversationUiOps PurpleConversationUiOps;
17.40 -/** @copydoc _PurpleConversation */
17.41 -typedef struct _PurpleConversation PurpleConversation;
17.42 -/** @copydoc _PurpleConvIm */
17.43 -typedef struct _PurpleConvIm PurpleConvIm;
17.44 -/** @copydoc _PurpleConvChat */
17.45 -typedef struct _PurpleConvChat PurpleConvChat;
17.46 -/** @copydoc _PurpleConvChatBuddy */
17.47 -typedef struct _PurpleConvChatBuddy PurpleConvChatBuddy;
17.48 -/** @copydoc _PurpleConvMessage */
17.49 -typedef struct _PurpleConvMessage PurpleConvMessage;
17.50 -
17.51 -/**
17.52 - * A type of conversation.
17.53 - */
17.54 -typedef enum
17.55 -{
17.56 - PURPLE_CONV_TYPE_UNKNOWN = 0, /**< Unknown conversation type. */
17.57 - PURPLE_CONV_TYPE_IM, /**< Instant Message. */
17.58 - PURPLE_CONV_TYPE_CHAT, /**< Chat room. */
17.59 - PURPLE_CONV_TYPE_MISC, /**< A misc. conversation. */
17.60 - PURPLE_CONV_TYPE_ANY /**< Any type of conversation. */
17.61 -
17.62 -} PurpleConversationType;
17.63 -
17.64 -/**
17.65 - * Conversation update type.
17.66 - */
17.67 -typedef enum
17.68 -{
17.69 - PURPLE_CONV_UPDATE_ADD = 0, /**< The buddy associated with the conversation
17.70 - was added. */
17.71 - PURPLE_CONV_UPDATE_REMOVE, /**< The buddy associated with the conversation
17.72 - was removed. */
17.73 - PURPLE_CONV_UPDATE_ACCOUNT, /**< The purple_account was changed. */
17.74 - PURPLE_CONV_UPDATE_TYPING, /**< The typing state was updated. */
17.75 - PURPLE_CONV_UPDATE_UNSEEN, /**< The unseen state was updated. */
17.76 - PURPLE_CONV_UPDATE_LOGGING, /**< Logging for this conversation was
17.77 - enabled or disabled. */
17.78 - PURPLE_CONV_UPDATE_TOPIC, /**< The topic for a chat was updated. */
17.79 - /*
17.80 - * XXX These need to go when we implement a more generic core/UI event
17.81 - * system.
17.82 - */
17.83 - PURPLE_CONV_ACCOUNT_ONLINE, /**< One of the user's accounts went online. */
17.84 - PURPLE_CONV_ACCOUNT_OFFLINE, /**< One of the user's accounts went offline. */
17.85 - PURPLE_CONV_UPDATE_AWAY, /**< The other user went away. */
17.86 - PURPLE_CONV_UPDATE_ICON, /**< The other user's buddy icon changed. */
17.87 - PURPLE_CONV_UPDATE_TITLE,
17.88 - PURPLE_CONV_UPDATE_CHATLEFT,
17.89 -
17.90 - PURPLE_CONV_UPDATE_FEATURES /**< The features for a chat have changed */
17.91 -
17.92 -} PurpleConvUpdateType;
17.93 -
17.94 -/**
17.95 - * The typing state of a user.
17.96 - */
17.97 -typedef enum
17.98 -{
17.99 - PURPLE_NOT_TYPING = 0, /**< Not typing. */
17.100 - PURPLE_TYPING, /**< Currently typing. */
17.101 - PURPLE_TYPED /**< Stopped typing momentarily. */
17.102 -
17.103 -} PurpleTypingState;
17.104 -
17.105 -/**
17.106 - * Flags applicable to a message. Most will have send, recv or system.
17.107 - */
17.108 -typedef enum
17.109 -{
17.110 - PURPLE_MESSAGE_SEND = 0x0001, /**< Outgoing message. */
17.111 - PURPLE_MESSAGE_RECV = 0x0002, /**< Incoming message. */
17.112 - PURPLE_MESSAGE_SYSTEM = 0x0004, /**< System message. */
17.113 - PURPLE_MESSAGE_AUTO_RESP = 0x0008, /**< Auto response. */
17.114 - PURPLE_MESSAGE_ACTIVE_ONLY = 0x0010, /**< Hint to the UI that this
17.115 - message should not be
17.116 - shown in conversations
17.117 - which are only open for
17.118 - internal UI purposes
17.119 - (e.g. for contact-aware
17.120 - conversations). */
17.121 - PURPLE_MESSAGE_NICK = 0x0020, /**< Contains your nick. */
17.122 - PURPLE_MESSAGE_NO_LOG = 0x0040, /**< Do not log. */
17.123 - PURPLE_MESSAGE_WHISPER = 0x0080, /**< Whispered message. */
17.124 - PURPLE_MESSAGE_ERROR = 0x0200, /**< Error message. */
17.125 - PURPLE_MESSAGE_DELAYED = 0x0400, /**< Delayed message. */
17.126 - PURPLE_MESSAGE_RAW = 0x0800, /**< "Raw" message - don't
17.127 - apply formatting */
17.128 - PURPLE_MESSAGE_IMAGES = 0x1000, /**< Message contains images */
17.129 - PURPLE_MESSAGE_NOTIFY = 0x2000, /**< Message is a notification */
17.130 - PURPLE_MESSAGE_NO_LINKIFY = 0x4000, /**< Message should not be auto-
17.131 - linkified @since 2.1.0 */
17.132 - PURPLE_MESSAGE_INVISIBLE = 0x8000 /**< Message should not be displayed */
17.133 -} PurpleMessageFlags;
17.134 -
17.135 -/**
17.136 - * Flags applicable to users in Chats.
17.137 - */
17.138 -typedef enum
17.139 -{
17.140 - PURPLE_CBFLAGS_NONE = 0x0000, /**< No flags */
17.141 - PURPLE_CBFLAGS_VOICE = 0x0001, /**< Voiced user or "Participant" */
17.142 - PURPLE_CBFLAGS_HALFOP = 0x0002, /**< Half-op */
17.143 - PURPLE_CBFLAGS_OP = 0x0004, /**< Channel Op or Moderator */
17.144 - PURPLE_CBFLAGS_FOUNDER = 0x0008, /**< Channel Founder */
17.145 - PURPLE_CBFLAGS_TYPING = 0x0010, /**< Currently typing */
17.146 - PURPLE_CBFLAGS_AWAY = 0x0020 /**< Currently away */
17.147 -} PurpleConvChatBuddyFlags;
17.148 -
17.149 -#include "account.h"
17.150 -#include "buddyicon.h"
17.151 -#include "log.h"
17.152 -#include "server.h"
17.153 -
17.154 -/**
17.155 - * Conversation operations and events.
17.156 - *
17.157 - * Any UI representing a conversation must assign a filled-out
17.158 - * PurpleConversationUiOps structure to the PurpleConversation.
17.159 - */
17.160 -struct _PurpleConversationUiOps
17.161 -{
17.162 - /** Called when @a conv is created (but before the @ref
17.163 - * conversation-created signal is emitted).
17.164 - */
17.165 - void (*create_conversation)(PurpleConversation *conv);
17.166 -
17.167 - /** Called just before @a conv is freed. */
17.168 - void (*destroy_conversation)(PurpleConversation *conv);
17.169 - /** Write a message to a chat. If this field is @c NULL, libpurple will
17.170 - * fall back to using #write_conv.
17.171 - * @see purple_conv_chat_write()
17.172 - */
17.173 - void (*write_chat)(PurpleConversation *conv, const char *who,
17.174 - const char *message, PurpleMessageFlags flags,
17.175 - time_t mtime);
17.176 - /** Write a message to an IM conversation. If this field is @c NULL,
17.177 - * libpurple will fall back to using #write_conv.
17.178 - * @see purple_conv_im_write()
17.179 - */
17.180 - void (*write_im)(PurpleConversation *conv, const char *who,
17.181 - const char *message, PurpleMessageFlags flags,
17.182 - time_t mtime);
17.183 - /** Write a message to a conversation. This is used rather than the
17.184 - * chat- or im-specific ops for errors, system messages (such as "x is
17.185 - * now know as y"), and as the fallback if #write_im and #write_chat
17.186 - * are not implemented. It should be implemented, or the UI will miss
17.187 - * conversation error messages and your users will hate you.
17.188 - *
17.189 - * @see purple_conversation_write()
17.190 - */
17.191 - void (*write_conv)(PurpleConversation *conv,
17.192 - const char *name,
17.193 - const char *alias,
17.194 - const char *message,
17.195 - PurpleMessageFlags flags,
17.196 - time_t mtime);
17.197 -
17.198 - /** Add @a cbuddies to a chat.
17.199 - * @param cbuddies A @c GList of #PurpleConvChatBuddy structs.
17.200 - * @param new_arrivals Whether join notices should be shown.
17.201 - * (Join notices are actually written to the
17.202 - * conversation by #purple_conv_chat_add_users().)
17.203 - */
17.204 - void (*chat_add_users)(PurpleConversation *conv,
17.205 - GList *cbuddies,
17.206 - gboolean new_arrivals);
17.207 - /** Rename the user in this chat named @a old_name to @a new_name. (The
17.208 - * rename message is written to the conversation by libpurple.)
17.209 - * @param new_alias @a new_name's new alias, if they have one.
17.210 - * @see purple_conv_chat_add_users()
17.211 - */
17.212 - void (*chat_rename_user)(PurpleConversation *conv, const char *old_name,
17.213 - const char *new_name, const char *new_alias);
17.214 - /** Remove @a users from a chat.
17.215 - * @param users A @c GList of <tt>const char *</tt>s.
17.216 - * @see purple_conv_chat_rename_user()
17.217 - */
17.218 - void (*chat_remove_users)(PurpleConversation *conv, GList *users);
17.219 - /** Called when a user's flags are changed.
17.220 - * @see purple_conv_chat_user_set_flags()
17.221 - */
17.222 - void (*chat_update_user)(PurpleConversation *conv, const char *user);
17.223 -
17.224 - /** Present this conversation to the user; for example, by displaying
17.225 - * the IM dialog.
17.226 - */
17.227 - void (*present)(PurpleConversation *conv);
17.228 -
17.229 - /** If this UI has a concept of focus (as in a windowing system) and
17.230 - * this conversation has the focus, return @c TRUE; otherwise, return
17.231 - * @c FALSE.
17.232 - */
17.233 - gboolean (*has_focus)(PurpleConversation *conv);
17.234 -
17.235 - /* Custom Smileys */
17.236 - gboolean (*custom_smiley_add)(PurpleConversation *conv, const char *smile, gboolean remote);
17.237 - void (*custom_smiley_write)(PurpleConversation *conv, const char *smile,
17.238 - const guchar *data, gsize size);
17.239 - void (*custom_smiley_close)(PurpleConversation *conv, const char *smile);
17.240 -
17.241 - /** Prompt the user for confirmation to send @a message. This function
17.242 - * should arrange for the message to be sent if the user accepts. If
17.243 - * this field is @c NULL, libpurple will fall back to using
17.244 - * #purple_request_action().
17.245 - */
17.246 - void (*send_confirm)(PurpleConversation *conv, const char *message);
17.247 -
17.248 - void (*_purple_reserved1)(void);
17.249 - void (*_purple_reserved2)(void);
17.250 - void (*_purple_reserved3)(void);
17.251 - void (*_purple_reserved4)(void);
17.252 -};
17.253 -
17.254 -/**
17.255 - * Data specific to Instant Messages.
17.256 - */
17.257 -struct _PurpleConvIm
17.258 -{
17.259 - PurpleConversation *conv; /**< The parent conversation. */
17.260 -
17.261 - PurpleTypingState typing_state; /**< The current typing state. */
17.262 - guint typing_timeout; /**< The typing timer handle. */
17.263 - time_t type_again; /**< The type again time. */
17.264 - guint send_typed_timeout; /**< The type again timer handle. */
17.265 -
17.266 - PurpleBuddyIcon *icon; /**< The buddy icon. */
17.267 -};
17.268 -
17.269 -/**
17.270 - * Data specific to Chats.
17.271 - */
17.272 -struct _PurpleConvChat
17.273 -{
17.274 - PurpleConversation *conv; /**< The parent conversation. */
17.275 -
17.276 - GList *in_room; /**< The users in the room. */
17.277 - GList *ignored; /**< Ignored users. */
17.278 - char *who; /**< The person who set the topic. */
17.279 - char *topic; /**< The topic. */
17.280 - int id; /**< The chat ID. */
17.281 - char *nick; /**< Your nick in this chat. */
17.282 -
17.283 - gboolean left; /**< We left the chat and kept the window open */
17.284 -};
17.285 -
17.286 -/**
17.287 - * Data for "Chat Buddies"
17.288 - */
17.289 -struct _PurpleConvChatBuddy
17.290 -{
17.291 - char *name; /**< The chat participant's name in the chat. */
17.292 - char *collate_key; /**< A string by which this buddy can be compared with other collate keys. */
17.293 - char *alias; /**< The chat participant's alias, if known;
17.294 - * @a NULL otherwise.
17.295 - */
17.296 - char *alias_key; /**< A string by which this buddy will be sorted,
17.297 - * or @c NULL if the buddy should be sorted by
17.298 - * its @c name. (This is currently always @c
17.299 - * NULL.)
17.300 - */
17.301 - gboolean buddy; /**< @a TRUE if this chat participant is on the
17.302 - * buddy list; @a FALSE otherwise.
17.303 - */
17.304 - PurpleConvChatBuddyFlags flags; /**< A bitwise OR of flags for this participant,
17.305 - * such as whether they are a channel operator.
17.306 - */
17.307 - GHashTable *attributes; /**< A hash table of attributes about the user, such as
17.308 - * real name, user@host, etc.
17.309 - */
17.310 -};
17.311 -
17.312 -/**
17.313 - * Description of a conversation message
17.314 - *
17.315 - * @since 2.2.0
17.316 - */
17.317 -struct _PurpleConvMessage
17.318 -{
17.319 - char *who;
17.320 - char *what;
17.321 - PurpleMessageFlags flags;
17.322 - time_t when;
17.323 - PurpleConversation *conv; /**< @since 2.3.0 */
17.324 - char *alias; /**< @since 2.3.0 */
17.325 -};
17.326 -
17.327 -/**
17.328 - * A core representation of a conversation between two or more people.
17.329 - *
17.330 - * The conversation can be an IM or a chat.
17.331 - */
17.332 -struct _PurpleConversation
17.333 -{
17.334 - PurpleConversationType type; /**< The type of conversation. */
17.335 -
17.336 - PurpleAccount *account; /**< The user using this conversation. */
17.337 -
17.338 -
17.339 - char *name; /**< The name of the conversation. */
17.340 - char *title; /**< The window title. */
17.341 -
17.342 - gboolean logging; /**< The status of logging. */
17.343 -
17.344 - GList *logs; /**< This conversation's logs */
17.345 -
17.346 - union
17.347 - {
17.348 - PurpleConvIm *im; /**< IM-specific data. */
17.349 - PurpleConvChat *chat; /**< Chat-specific data. */
17.350 - void *misc; /**< Misc. data. */
17.351 -
17.352 - } u;
17.353 -
17.354 - PurpleConversationUiOps *ui_ops; /**< UI-specific operations. */
17.355 - void *ui_data; /**< UI-specific data. */
17.356 -
17.357 - GHashTable *data; /**< Plugin-specific data. */
17.358 -
17.359 - PurpleConnectionFlags features; /**< The supported features */
17.360 - GList *message_history; /**< Message history, as a GList of PurpleConvMessage's */
17.361 -};
17.362 -
17.363 -#ifdef __cplusplus
17.364 -extern "C" {
17.365 -#endif
17.366 -
17.367 -/**************************************************************************/
17.368 -/** @name Conversation API */
17.369 -/**************************************************************************/
17.370 -/*@{*/
17.371 -
17.372 -/**
17.373 - * Creates a new conversation of the specified type.
17.374 - *
17.375 - * @param type The type of conversation.
17.376 - * @param account The account opening the conversation window on the purple
17.377 - * user's end.
17.378 - * @param name The name of the conversation.
17.379 - *
17.380 - * @return The new conversation.
17.381 - */
17.382 -PurpleConversation *purple_conversation_new(PurpleConversationType type,
17.383 - PurpleAccount *account,
17.384 - const char *name);
17.385 -
17.386 -/**
17.387 - * Destroys the specified conversation and removes it from the parent
17.388 - * window.
17.389 - *
17.390 - * If this conversation is the only one contained in the parent window,
17.391 - * that window is also destroyed.
17.392 - *
17.393 - * @param conv The conversation to destroy.
17.394 - */
17.395 -void purple_conversation_destroy(PurpleConversation *conv);
17.396 -
17.397 -
17.398 -/**
17.399 - * Present a conversation to the user. This allows core code to initiate a
17.400 - * conversation by displaying the IM dialog.
17.401 - * @param conv The conversation to present
17.402 - */
17.403 -void purple_conversation_present(PurpleConversation *conv);
17.404 -
17.405 -
17.406 -/**
17.407 - * Returns the specified conversation's type.
17.408 - *
17.409 - * @param conv The conversation.
17.410 - *
17.411 - * @return The conversation's type.
17.412 - */
17.413 -PurpleConversationType purple_conversation_get_type(const PurpleConversation *conv);
17.414 -
17.415 -/**
17.416 - * Sets the specified conversation's UI operations structure.
17.417 - *
17.418 - * @param conv The conversation.
17.419 - * @param ops The UI conversation operations structure.
17.420 - */
17.421 -void purple_conversation_set_ui_ops(PurpleConversation *conv,
17.422 - PurpleConversationUiOps *ops);
17.423 -
17.424 -/**
17.425 - * Sets the default conversation UI operations structure.
17.426 - *
17.427 - * @param ops The UI conversation operations structure.
17.428 - */
17.429 -void purple_conversations_set_ui_ops(PurpleConversationUiOps *ops);
17.430 -
17.431 -/**
17.432 - * Returns the specified conversation's UI operations structure.
17.433 - *
17.434 - * @param conv The conversation.
17.435 - *
17.436 - * @return The operations structure.
17.437 - */
17.438 -PurpleConversationUiOps *purple_conversation_get_ui_ops(
17.439 - const PurpleConversation *conv);
17.440 -
17.441 -/**
17.442 - * Sets the specified conversation's purple_account.
17.443 - *
17.444 - * This purple_account represents the user using purple, not the person the user
17.445 - * is having a conversation/chat/flame with.
17.446 - *
17.447 - * @param conv The conversation.
17.448 - * @param account The purple_account.
17.449 - */
17.450 -void purple_conversation_set_account(PurpleConversation *conv,
17.451 - PurpleAccount *account);
17.452 -
17.453 -/**
17.454 - * Returns the specified conversation's purple_account.
17.455 - *
17.456 - * This purple_account represents the user using purple, not the person the user
17.457 - * is having a conversation/chat/flame with.
17.458 - *
17.459 - * @param conv The conversation.
17.460 - *
17.461 - * @return The conversation's purple_account.
17.462 - */
17.463 -PurpleAccount *purple_conversation_get_account(const PurpleConversation *conv);
17.464 -
17.465 -/**
17.466 - * Returns the specified conversation's purple_connection.
17.467 - *
17.468 - * This is the same as purple_conversation_get_user(conv)->gc.
17.469 - *
17.470 - * @param conv The conversation.
17.471 - *
17.472 - * @return The conversation's purple_connection.
17.473 - */
17.474 -PurpleConnection *purple_conversation_get_gc(const PurpleConversation *conv);
17.475 -
17.476 -/**
17.477 - * Sets the specified conversation's title.
17.478 - *
17.479 - * @param conv The conversation.
17.480 - * @param title The title.
17.481 - */
17.482 -void purple_conversation_set_title(PurpleConversation *conv, const char *title);
17.483 -
17.484 -/**
17.485 - * Returns the specified conversation's title.
17.486 - *
17.487 - * @param conv The conversation.
17.488 - *
17.489 - * @return The title.
17.490 - */
17.491 -const char *purple_conversation_get_title(const PurpleConversation *conv);
17.492 -
17.493 -/**
17.494 - * Automatically sets the specified conversation's title.
17.495 - *
17.496 - * This function takes OPT_IM_ALIAS_TAB into account, as well as the
17.497 - * user's alias.
17.498 - *
17.499 - * @param conv The conversation.
17.500 - */
17.501 -void purple_conversation_autoset_title(PurpleConversation *conv);
17.502 -
17.503 -/**
17.504 - * Sets the specified conversation's name.
17.505 - *
17.506 - * @param conv The conversation.
17.507 - * @param name The conversation's name.
17.508 - */
17.509 -void purple_conversation_set_name(PurpleConversation *conv, const char *name);
17.510 -
17.511 -/**
17.512 - * Returns the specified conversation's name.
17.513 - *
17.514 - * @param conv The conversation.
17.515 - *
17.516 - * @return The conversation's name. If the conversation is an IM with a PurpleBuddy,
17.517 - * then it's the name of the PurpleBuddy.
17.518 - */
17.519 -const char *purple_conversation_get_name(const PurpleConversation *conv);
17.520 -
17.521 -/**
17.522 - * Enables or disables logging for this conversation.
17.523 - *
17.524 - * @param conv The conversation.
17.525 - * @param log @c TRUE if logging should be enabled, or @c FALSE otherwise.
17.526 - */
17.527 -void purple_conversation_set_logging(PurpleConversation *conv, gboolean log);
17.528 -
17.529 -/**
17.530 - * Returns whether or not logging is enabled for this conversation.
17.531 - *
17.532 - * @param conv The conversation.
17.533 - *
17.534 - * @return @c TRUE if logging is enabled, or @c FALSE otherwise.
17.535 - */
17.536 -gboolean purple_conversation_is_logging(const PurpleConversation *conv);
17.537 -
17.538 -/**
17.539 - * Closes any open logs for this conversation.
17.540 - *
17.541 - * Note that new logs will be opened as necessary (e.g. upon receipt of a
17.542 - * message, if the conversation has logging enabled. To disable logging for
17.543 - * the remainder of the conversation, use purple_conversation_set_logging().
17.544 - *
17.545 - * @param conv The conversation.
17.546 - */
17.547 -void purple_conversation_close_logs(PurpleConversation *conv);
17.548 -
17.549 -/**
17.550 - * Returns the specified conversation's IM-specific data.
17.551 - *
17.552 - * If the conversation type is not PURPLE_CONV_TYPE_IM, this will return @c NULL.
17.553 - *
17.554 - * @param conv The conversation.
17.555 - *
17.556 - * @return The IM-specific data.
17.557 - */
17.558 -PurpleConvIm *purple_conversation_get_im_data(const PurpleConversation *conv);
17.559 -
17.560 -#define PURPLE_CONV_IM(c) (purple_conversation_get_im_data(c))
17.561 -
17.562 -/**
17.563 - * Returns the specified conversation's chat-specific data.
17.564 - *
17.565 - * If the conversation type is not PURPLE_CONV_TYPE_CHAT, this will return @c NULL.
17.566 - *
17.567 - * @param conv The conversation.
17.568 - *
17.569 - * @return The chat-specific data.
17.570 - */
17.571 -PurpleConvChat *purple_conversation_get_chat_data(const PurpleConversation *conv);
17.572 -
17.573 -#define PURPLE_CONV_CHAT(c) (purple_conversation_get_chat_data(c))
17.574 -
17.575 -/**
17.576 - * Sets extra data for a conversation.
17.577 - *
17.578 - * @param conv The conversation.
17.579 - * @param key The unique key.
17.580 - * @param data The data to assign.
17.581 - */
17.582 -void purple_conversation_set_data(PurpleConversation *conv, const char *key,
17.583 - gpointer data);
17.584 -
17.585 -/**
17.586 - * Returns extra data in a conversation.
17.587 - *
17.588 - * @param conv The conversation.
17.589 - * @param key The unqiue key.
17.590 - *
17.591 - * @return The data associated with the key.
17.592 - */
17.593 -gpointer purple_conversation_get_data(PurpleConversation *conv, const char *key);
17.594 -
17.595 -/**
17.596 - * Returns a list of all conversations.
17.597 - *
17.598 - * This list includes both IMs and chats.
17.599 - *
17.600 - * @constreturn A GList of all conversations.
17.601 - */
17.602 -GList *purple_get_conversations(void);
17.603 -
17.604 -/**
17.605 - * Returns a list of all IMs.
17.606 - *
17.607 - * @constreturn A GList of all IMs.
17.608 - */
17.609 -GList *purple_get_ims(void);
17.610 -
17.611 -/**
17.612 - * Returns a list of all chats.
17.613 - *
17.614 - * @constreturn A GList of all chats.
17.615 - */
17.616 -GList *purple_get_chats(void);
17.617 -
17.618 -/**
17.619 - * Finds a conversation with the specified type, name, and Purple account.
17.620 - *
17.621 - * @param type The type of the conversation.
17.622 - * @param name The name of the conversation.
17.623 - * @param account The purple_account associated with the conversation.
17.624 - *
17.625 - * @return The conversation if found, or @c NULL otherwise.
17.626 - */
17.627 -PurpleConversation *purple_find_conversation_with_account(
17.628 - PurpleConversationType type, const char *name,
17.629 - const PurpleAccount *account);
17.630 -
17.631 -/**
17.632 - * Writes to a conversation window.
17.633 - *
17.634 - * This function should not be used to write IM or chat messages. Use
17.635 - * purple_conv_im_write() and purple_conv_chat_write() instead. Those functions will
17.636 - * most likely call this anyway, but they may do their own formatting,
17.637 - * sound playback, etc.
17.638 - *
17.639 - * This can be used to write generic messages, such as "so and so closed
17.640 - * the conversation window."
17.641 - *
17.642 - * @param conv The conversation.
17.643 - * @param who The user who sent the message.
17.644 - * @param message The message.
17.645 - * @param flags The message flags.
17.646 - * @param mtime The time the message was sent.
17.647 - *
17.648 - * @see purple_conv_im_write()
17.649 - * @see purple_conv_chat_write()
17.650 - */
17.651 -void purple_conversation_write(PurpleConversation *conv, const char *who,
17.652 - const char *message, PurpleMessageFlags flags,
17.653 - time_t mtime);
17.654 -
17.655 -
17.656 -/**
17.657 - Set the features as supported for the given conversation.
17.658 - @param conv The conversation
17.659 - @param features Bitset defining supported features
17.660 -*/
17.661 -void purple_conversation_set_features(PurpleConversation *conv,
17.662 - PurpleConnectionFlags features);
17.663 -
17.664 -
17.665 -/**
17.666 - Get the features supported by the given conversation.
17.667 - @param conv The conversation
17.668 -*/
17.669 -PurpleConnectionFlags purple_conversation_get_features(PurpleConversation *conv);
17.670 -
17.671 -/**
17.672 - * Determines if a conversation has focus
17.673 - *
17.674 - * @param conv The conversation.
17.675 - *
17.676 - * @return @c TRUE if the conversation has focus, @c FALSE if
17.677 - * it does not or the UI does not have a concept of conversation focus
17.678 - */
17.679 -gboolean purple_conversation_has_focus(PurpleConversation *conv);
17.680 -
17.681 -/**
17.682 - * Updates the visual status and UI of a conversation.
17.683 - *
17.684 - * @param conv The conversation.
17.685 - * @param type The update type.
17.686 - */
17.687 -void purple_conversation_update(PurpleConversation *conv, PurpleConvUpdateType type);
17.688 -
17.689 -/**
17.690 - * Calls a function on each conversation.
17.691 - *
17.692 - * @param func The function.
17.693 - */
17.694 -void purple_conversation_foreach(void (*func)(PurpleConversation *conv));
17.695 -
17.696 -/**
17.697 - * Retrieve the message history of a conversation.
17.698 - *
17.699 - * @param conv The conversation
17.700 - *
17.701 - * @return A GList of PurpleConvMessage's. The must not modify the list or the data within.
17.702 - * The list contains the newest message at the beginning, and the oldest message at
17.703 - * the end.
17.704 - *
17.705 - * @since 2.2.0
17.706 - */
17.707 -GList *purple_conversation_get_message_history(PurpleConversation *conv);
17.708 -
17.709 -/**
17.710 - * Clear the message history of a conversation.
17.711 - *
17.712 - * @param conv The conversation
17.713 - *
17.714 - * @since 2.2.0
17.715 - */
17.716 -void purple_conversation_clear_message_history(PurpleConversation *conv);
17.717 -
17.718 -/**
17.719 - * Get the sender from a PurpleConvMessage
17.720 - *
17.721 - * @param msg A PurpleConvMessage
17.722 - *
17.723 - * @return The name of the sender of the message
17.724 - *
17.725 - * @since 2.2.0
17.726 - */
17.727 -const char *purple_conversation_message_get_sender(PurpleConvMessage *msg);
17.728 -
17.729 -/**
17.730 - * Get the message from a PurpleConvMessage
17.731 - *
17.732 - * @param msg A PurpleConvMessage
17.733 - *
17.734 - * @return The name of the sender of the message
17.735 - *
17.736 - * @since 2.2.0
17.737 - */
17.738 -const char *purple_conversation_message_get_message(PurpleConvMessage *msg);
17.739 -
17.740 -/**
17.741 - * Get the message-flags of a PurpleConvMessage
17.742 - *
17.743 - * @param msg A PurpleConvMessage
17.744 - *
17.745 - * @return The message flags
17.746 - *
17.747 - * @since 2.2.0
17.748 - */
17.749 -PurpleMessageFlags purple_conversation_message_get_flags(PurpleConvMessage *msg);
17.750 -
17.751 -/**
17.752 - * Get the timestamp of a PurpleConvMessage
17.753 - *
17.754 - * @param msg A PurpleConvMessage
17.755 - *
17.756 - * @return The timestamp of the message
17.757 - *
17.758 - * @since 2.2.0
17.759 - */
17.760 -time_t purple_conversation_message_get_timestamp(PurpleConvMessage *msg);
17.761 -
17.762 -/*@}*/
17.763 -
17.764 -
17.765 -/**************************************************************************/
17.766 -/** @name IM Conversation API */
17.767 -/**************************************************************************/
17.768 -/*@{*/
17.769 -
17.770 -/**
17.771 - * Gets an IM's parent conversation.
17.772 - *
17.773 - * @param im The IM.
17.774 - *
17.775 - * @return The parent conversation.
17.776 - */
17.777 -PurpleConversation *purple_conv_im_get_conversation(const PurpleConvIm *im);
17.778 -
17.779 -/**
17.780 - * Sets the IM's buddy icon.
17.781 - *
17.782 - * This should only be called from within Purple. You probably want to
17.783 - * call purple_buddy_icon_set_data().
17.784 - *
17.785 - * @param im The IM.
17.786 - * @param icon The buddy icon.
17.787 - *
17.788 - * @see purple_buddy_icon_set_data()
17.789 - */
17.790 -void purple_conv_im_set_icon(PurpleConvIm *im, PurpleBuddyIcon *icon);
17.791 -
17.792 -/**
17.793 - * Returns the IM's buddy icon.
17.794 - *
17.795 - * @param im The IM.
17.796 - *
17.797 - * @return The buddy icon.
17.798 - */
17.799 -PurpleBuddyIcon *purple_conv_im_get_icon(const PurpleConvIm *im);
17.800 -
17.801 -/**
17.802 - * Sets the IM's typing state.
17.803 - *
17.804 - * @param im The IM.
17.805 - * @param state The typing state.
17.806 - */
17.807 -void purple_conv_im_set_typing_state(PurpleConvIm *im, PurpleTypingState state);
17.808 -
17.809 -/**
17.810 - * Returns the IM's typing state.
17.811 - *
17.812 - * @param im The IM.
17.813 - *
17.814 - * @return The IM's typing state.
17.815 - */
17.816 -PurpleTypingState purple_conv_im_get_typing_state(const PurpleConvIm *im);
17.817 -
17.818 -/**
17.819 - * Starts the IM's typing timeout.
17.820 - *
17.821 - * @param im The IM.
17.822 - * @param timeout The timeout.
17.823 - */
17.824 -void purple_conv_im_start_typing_timeout(PurpleConvIm *im, int timeout);
17.825 -
17.826 -/**
17.827 - * Stops the IM's typing timeout.
17.828 - *
17.829 - * @param im The IM.
17.830 - */
17.831 -void purple_conv_im_stop_typing_timeout(PurpleConvIm *im);
17.832 -
17.833 -/**
17.834 - * Returns the IM's typing timeout.
17.835 - *
17.836 - * @param im The IM.
17.837 - *
17.838 - * @return The timeout.
17.839 - */
17.840 -guint purple_conv_im_get_typing_timeout(const PurpleConvIm *im);
17.841 -
17.842 -/**
17.843 - * Sets the quiet-time when no PURPLE_TYPING messages will be sent.
17.844 - * Few protocols need this (maybe only MSN). If the user is still
17.845 - * typing after this quiet-period, then another PURPLE_TYPING message
17.846 - * will be sent.
17.847 - *
17.848 - * @param im The IM.
17.849 - * @param val The number of seconds to wait before allowing another
17.850 - * PURPLE_TYPING message to be sent to the user. Or 0 to
17.851 - * not send another PURPLE_TYPING message.
17.852 - */
17.853 -void purple_conv_im_set_type_again(PurpleConvIm *im, unsigned int val);
17.854 -
17.855 -/**
17.856 - * Returns the time after which another PURPLE_TYPING message should be sent.
17.857 - *
17.858 - * @param im The IM.
17.859 - *
17.860 - * @return The time in seconds since the epoch. Or 0 if no additional
17.861 - * PURPLE_TYPING message should be sent.
17.862 - */
17.863 -time_t purple_conv_im_get_type_again(const PurpleConvIm *im);
17.864 -
17.865 -/**
17.866 - * Starts the IM's type again timeout.
17.867 - *
17.868 - * @param im The IM.
17.869 - */
17.870 -void purple_conv_im_start_send_typed_timeout(PurpleConvIm *im);
17.871 -
17.872 -/**
17.873 - * Stops the IM's type again timeout.
17.874 - *
17.875 - * @param im The IM.
17.876 - */
17.877 -void purple_conv_im_stop_send_typed_timeout(PurpleConvIm *im);
17.878 -
17.879 -/**
17.880 - * Returns the IM's type again timeout interval.
17.881 - *
17.882 - * @param im The IM.
17.883 - *
17.884 - * @return The type again timeout interval.
17.885 - */
17.886 -guint purple_conv_im_get_send_typed_timeout(const PurpleConvIm *im);
17.887 -
17.888 -/**
17.889 - * Updates the visual typing notification for an IM conversation.
17.890 - *
17.891 - * @param im The IM.
17.892 - */
17.893 -void purple_conv_im_update_typing(PurpleConvIm *im);
17.894 -
17.895 -/**
17.896 - * Writes to an IM.
17.897 - *
17.898 - * @param im The IM.
17.899 - * @param who The user who sent the message.
17.900 - * @param message The message to write.
17.901 - * @param flags The message flags.
17.902 - * @param mtime The time the message was sent.
17.903 - */
17.904 -void purple_conv_im_write(PurpleConvIm *im, const char *who,
17.905 - const char *message, PurpleMessageFlags flags,
17.906 - time_t mtime);
17.907 -
17.908 -/**
17.909 - * Presents an IM-error to the user
17.910 - *
17.911 - * This is a helper function to find a conversation, write an error to it, and
17.912 - * raise the window. If a conversation with this user doesn't already exist,
17.913 - * the function will return FALSE and the calling function can attempt to present
17.914 - * the error another way (purple_notify_error, most likely)
17.915 - *
17.916 - * @param who The user this error is about
17.917 - * @param account The account this error is on
17.918 - * @param what The error
17.919 - * @return TRUE if the error was presented, else FALSE
17.920 - */
17.921 -gboolean purple_conv_present_error(const char *who, PurpleAccount *account, const char *what);
17.922 -
17.923 -/**
17.924 - * Sends a message to this IM conversation.
17.925 - *
17.926 - * @param im The IM.
17.927 - * @param message The message to send.
17.928 - */
17.929 -void purple_conv_im_send(PurpleConvIm *im, const char *message);
17.930 -
17.931 -/**
17.932 - * Sends a message to a conversation after confirming with
17.933 - * the user.
17.934 - *
17.935 - * This function is intended for use in cases where the user
17.936 - * hasn't explicitly and knowingly caused a message to be sent.
17.937 - * The confirmation ensures that the user isn't sending a
17.938 - * message by mistake.
17.939 - *
17.940 - * @param conv The conversation.
17.941 - * @param message The message to send.
17.942 - */
17.943 -void purple_conv_send_confirm(PurpleConversation *conv, const char *message);
17.944 -
17.945 -/**
17.946 - * Sends a message to this IM conversation with specified flags.
17.947 - *
17.948 - * @param im The IM.
17.949 - * @param message The message to send.
17.950 - * @param flags The PurpleMessageFlags flags to use in addition to PURPLE_MESSAGE_SEND.
17.951 - */
17.952 -void purple_conv_im_send_with_flags(PurpleConvIm *im, const char *message, PurpleMessageFlags flags);
17.953 -
17.954 -/**
17.955 - * Adds a smiley to the conversation's smiley tree. If this returns
17.956 - * @c TRUE you should call purple_conv_custom_smiley_write() one or more
17.957 - * times, and then purple_conv_custom_smiley_close(). If this returns
17.958 - * @c FALSE, either the conv or smile were invalid, or the icon was
17.959 - * found in the cache. In either case, calling write or close would
17.960 - * be an error.
17.961 - *
17.962 - * @param conv The conversation to associate the smiley with.
17.963 - * @param smile The text associated with the smiley
17.964 - * @param cksum_type The type of checksum.
17.965 - * @param chksum The checksum, as a NUL terminated base64 string.
17.966 - * @param remote @c TRUE if the custom smiley is set by the remote user (buddy).
17.967 - * @return @c TRUE if an icon is expected, else FALSE. Note that
17.968 - * it is an error to never call purple_conv_custom_smiley_close if
17.969 - * this function returns @c TRUE, but an error to call it if
17.970 - * @c FALSE is returned.
17.971 - */
17.972 -
17.973 -gboolean purple_conv_custom_smiley_add(PurpleConversation *conv, const char *smile,
17.974 - const char *cksum_type, const char *chksum,
17.975 - gboolean remote);
17.976 -
17.977 -
17.978 -/**
17.979 - * Updates the image associated with the current smiley.
17.980 - *
17.981 - * @param conv The conversation associated with the smiley.
17.982 - * @param smile The text associated with the smiley.
17.983 - * @param data The actual image data.
17.984 - * @param size The length of the data.
17.985 - */
17.986 -
17.987 -void purple_conv_custom_smiley_write(PurpleConversation *conv,
17.988 - const char *smile,
17.989 - const guchar *data,
17.990 - gsize size);
17.991 -
17.992 -/**
17.993 - * Close the custom smiley, all data has been written with
17.994 - * purple_conv_custom_smiley_write, and it is no longer valid
17.995 - * to call that function on that smiley.
17.996 - *
17.997 - * @param conv The purple conversation associated with the smiley.
17.998 - * @param smile The text associated with the smiley
17.999 - */
17.1000 -
17.1001 -void purple_conv_custom_smiley_close(PurpleConversation *conv, const char *smile);
17.1002 -
17.1003 -/*@}*/
17.1004 -
17.1005 -
17.1006 -/**************************************************************************/
17.1007 -/** @name Chat Conversation API */
17.1008 -/**************************************************************************/
17.1009 -/*@{*/
17.1010 -
17.1011 -/**
17.1012 - * Gets a chat's parent conversation.
17.1013 - *
17.1014 - * @param chat The chat.
17.1015 - *
17.1016 - * @return The parent conversation.
17.1017 - */
17.1018 -PurpleConversation *purple_conv_chat_get_conversation(const PurpleConvChat *chat);
17.1019 -
17.1020 -/**
17.1021 - * Sets the list of users in the chat room.
17.1022 - *
17.1023 - * @note Calling this function will not update the display of the users.
17.1024 - * Please use purple_conv_chat_add_user(), purple_conv_chat_add_users(),
17.1025 - * purple_conv_chat_remove_user(), and purple_conv_chat_remove_users() instead.
17.1026 - *
17.1027 - * @param chat The chat.
17.1028 - * @param users The list of users.
17.1029 - *
17.1030 - * @return The list passed.
17.1031 - */
17.1032 -GList *purple_conv_chat_set_users(PurpleConvChat *chat, GList *users);
17.1033 -
17.1034 -/**
17.1035 - * Returns a list of users in the chat room.
17.1036 - *
17.1037 - * @param chat The chat.
17.1038 - *
17.1039 - * @constreturn The list of users.
17.1040 - */
17.1041 -GList *purple_conv_chat_get_users(const PurpleConvChat *chat);
17.1042 -
17.1043 -/**
17.1044 - * Ignores a user in a chat room.
17.1045 - *
17.1046 - * @param chat The chat.
17.1047 - * @param name The name of the user.
17.1048 - */
17.1049 -void purple_conv_chat_ignore(PurpleConvChat *chat, const char *name);
17.1050 -
17.1051 -/**
17.1052 - * Unignores a user in a chat room.
17.1053 - *
17.1054 - * @param chat The chat.
17.1055 - * @param name The name of the user.
17.1056 - */
17.1057 -void purple_conv_chat_unignore(PurpleConvChat *chat, const char *name);
17.1058 -
17.1059 -/**
17.1060 - * Sets the list of ignored users in the chat room.
17.1061 - *
17.1062 - * @param chat The chat.
17.1063 - * @param ignored The list of ignored users.
17.1064 - *
17.1065 - * @return The list passed.
17.1066 - */
17.1067 -GList *purple_conv_chat_set_ignored(PurpleConvChat *chat, GList *ignored);
17.1068 -
17.1069 -/**
17.1070 - * Returns the list of ignored users in the chat room.
17.1071 - *
17.1072 - * @param chat The chat.
17.1073 - *
17.1074 - * @constreturn The list of ignored users.
17.1075 - */
17.1076 -GList *purple_conv_chat_get_ignored(const PurpleConvChat *chat);
17.1077 -
17.1078 -/**
17.1079 - * Returns the actual name of the specified ignored user, if it exists in
17.1080 - * the ignore list.
17.1081 - *
17.1082 - * If the user found contains a prefix, such as '+' or '\@', this is also
17.1083 - * returned. The username passed to the function does not have to have this
17.1084 - * formatting.
17.1085 - *
17.1086 - * @param chat The chat.
17.1087 - * @param user The user to check in the ignore list.
17.1088 - *
17.1089 - * @return The ignored user if found, complete with prefixes, or @c NULL
17.1090 - * if not found.
17.1091 - */
17.1092 -const char *purple_conv_chat_get_ignored_user(const PurpleConvChat *chat,
17.1093 - const char *user);
17.1094 -
17.1095 -/**
17.1096 - * Returns @c TRUE if the specified user is ignored.
17.1097 - *
17.1098 - * @param chat The chat.
17.1099 - * @param user The user.
17.1100 - *
17.1101 - * @return @c TRUE if the user is in the ignore list; @c FALSE otherwise.
17.1102 - */
17.1103 -gboolean purple_conv_chat_is_user_ignored(const PurpleConvChat *chat,
17.1104 - const char *user);
17.1105 -
17.1106 -/**
17.1107 - * Sets the chat room's topic.
17.1108 - *
17.1109 - * @param chat The chat.
17.1110 - * @param who The user that set the topic.
17.1111 - * @param topic The topic.
17.1112 - */
17.1113 -void purple_conv_chat_set_topic(PurpleConvChat *chat, const char *who,
17.1114 - const char *topic);
17.1115 -
17.1116 -/**
17.1117 - * Returns the chat room's topic.
17.1118 - *
17.1119 - * @param chat The chat.
17.1120 - *
17.1121 - * @return The chat's topic.
17.1122 - */
17.1123 -const char *purple_conv_chat_get_topic(const PurpleConvChat *chat);
17.1124 -
17.1125 -/**
17.1126 - * Sets the chat room's ID.
17.1127 - *
17.1128 - * @param chat The chat.
17.1129 - * @param id The ID.
17.1130 - */
17.1131 -void purple_conv_chat_set_id(PurpleConvChat *chat, int id);
17.1132 -
17.1133 -/**
17.1134 - * Returns the chat room's ID.
17.1135 - *
17.1136 - * @param chat The chat.
17.1137 - *
17.1138 - * @return The ID.
17.1139 - */
17.1140 -int purple_conv_chat_get_id(const PurpleConvChat *chat);
17.1141 -
17.1142 -/**
17.1143 - * Writes to a chat.
17.1144 - *
17.1145 - * @param chat The chat.
17.1146 - * @param who The user who sent the message.
17.1147 - * @param message The message to write.
17.1148 - * @param flags The flags.
17.1149 - * @param mtime The time the message was sent.
17.1150 - */
17.1151 -void purple_conv_chat_write(PurpleConvChat *chat, const char *who,
17.1152 - const char *message, PurpleMessageFlags flags,
17.1153 - time_t mtime);
17.1154 -
17.1155 -/**
17.1156 - * Sends a message to this chat conversation.
17.1157 - *
17.1158 - * @param chat The chat.
17.1159 - * @param message The message to send.
17.1160 - */
17.1161 -void purple_conv_chat_send(PurpleConvChat *chat, const char *message);
17.1162 -
17.1163 -/**
17.1164 - * Sends a message to this chat conversation with specified flags.
17.1165 - *
17.1166 - * @param chat The chat.
17.1167 - * @param message The message to send.
17.1168 - * @param flags The PurpleMessageFlags flags to use.
17.1169 - */
17.1170 -void purple_conv_chat_send_with_flags(PurpleConvChat *chat, const char *message, PurpleMessageFlags flags);
17.1171 -
17.1172 -/**
17.1173 - * Adds a user to a chat.
17.1174 - *
17.1175 - * @param chat The chat.
17.1176 - * @param user The user to add.
17.1177 - * @param extra_msg An extra message to display with the join message.
17.1178 - * @param flags The users flags
17.1179 - * @param new_arrival Decides whether or not to show a join notice.
17.1180 - */
17.1181 -void purple_conv_chat_add_user(PurpleConvChat *chat, const char *user,
17.1182 - const char *extra_msg, PurpleConvChatBuddyFlags flags,
17.1183 - gboolean new_arrival);
17.1184 -
17.1185 -/**
17.1186 - * Adds a list of users to a chat.
17.1187 - *
17.1188 - * The data is copied from @a users, @a extra_msgs, and @a flags, so it is up to
17.1189 - * the caller to free this list after calling this function.
17.1190 - *
17.1191 - * @param chat The chat.
17.1192 - * @param users The list of users to add.
17.1193 - * @param extra_msgs An extra message to display with the join message for each
17.1194 - * user. This list may be shorter than @a users, in which
17.1195 - * case, the users after the end of extra_msgs will not have
17.1196 - * an extra message. By extension, this means that extra_msgs
17.1197 - * can simply be @c NULL and none of the users will have an
17.1198 - * extra message.
17.1199 - * @param flags The list of flags for each user.
17.1200 - * @param new_arrivals Decides whether or not to show join notices.
17.1201 - */
17.1202 -void purple_conv_chat_add_users(PurpleConvChat *chat, GList *users, GList *extra_msgs,
17.1203 - GList *flags, gboolean new_arrivals);
17.1204 -
17.1205 -/**
17.1206 - * Renames a user in a chat.
17.1207 - *
17.1208 - * @param chat The chat.
17.1209 - * @param old_user The old username.
17.1210 - * @param new_user The new username.
17.1211 - */
17.1212 -void purple_conv_chat_rename_user(PurpleConvChat *chat, const char *old_user,
17.1213 - const char *new_user);
17.1214 -
17.1215 -/**
17.1216 - * Removes a user from a chat, optionally with a reason.
17.1217 - *
17.1218 - * It is up to the developer to free this list after calling this function.
17.1219 - *
17.1220 - * @param chat The chat.
17.1221 - * @param user The user that is being removed.
17.1222 - * @param reason The optional reason given for the removal. Can be @c NULL.
17.1223 - */
17.1224 -void purple_conv_chat_remove_user(PurpleConvChat *chat, const char *user,
17.1225 - const char *reason);
17.1226 -
17.1227 -/**
17.1228 - * Removes a list of users from a chat, optionally with a single reason.
17.1229 - *
17.1230 - * @param chat The chat.
17.1231 - * @param users The users that are being removed.
17.1232 - * @param reason The optional reason given for the removal. Can be @c NULL.
17.1233 - */
17.1234 -void purple_conv_chat_remove_users(PurpleConvChat *chat, GList *users,
17.1235 - const char *reason);
17.1236 -
17.1237 -/**
17.1238 - * Finds a user in a chat
17.1239 - *
17.1240 - * @param chat The chat.
17.1241 - * @param user The user to look for.
17.1242 - *
17.1243 - * @return TRUE if the user is in the chat, FALSE if not
17.1244 - */
17.1245 -gboolean purple_conv_chat_find_user(PurpleConvChat *chat, const char *user);
17.1246 -
17.1247 -/**
17.1248 - * Set a users flags in a chat
17.1249 - *
17.1250 - * @param chat The chat.
17.1251 - * @param user The user to update.
17.1252 - * @param flags The new flags.
17.1253 - */
17.1254 -void purple_conv_chat_user_set_flags(PurpleConvChat *chat, const char *user,
17.1255 - PurpleConvChatBuddyFlags flags);
17.1256 -
17.1257 -/**
17.1258 - * Get the flags for a user in a chat
17.1259 - *
17.1260 - * @param chat The chat.
17.1261 - * @param user The user to find the flags for
17.1262 - *
17.1263 - * @return The flags for the user
17.1264 - */
17.1265 -PurpleConvChatBuddyFlags purple_conv_chat_user_get_flags(PurpleConvChat *chat,
17.1266 - const char *user);
17.1267 -
17.1268 -/**
17.1269 - * Clears all users from a chat.
17.1270 - *
17.1271 - * @param chat The chat.
17.1272 - */
17.1273 -void purple_conv_chat_clear_users(PurpleConvChat *chat);
17.1274 -
17.1275 -/**
17.1276 - * Sets your nickname (used for hilighting) for a chat.
17.1277 - *
17.1278 - * @param chat The chat.
17.1279 - * @param nick The nick.
17.1280 - */
17.1281 -void purple_conv_chat_set_nick(PurpleConvChat *chat, const char *nick);
17.1282 -
17.1283 -/**
17.1284 - * Gets your nickname (used for hilighting) for a chat.
17.1285 - *
17.1286 - * @param chat The chat.
17.1287 - * @return The nick.
17.1288 - */
17.1289 -const char *purple_conv_chat_get_nick(PurpleConvChat *chat);
17.1290 -
17.1291 -/**
17.1292 - * Finds a chat with the specified chat ID.
17.1293 - *
17.1294 - * @param gc The purple_connection.
17.1295 - * @param id The chat ID.
17.1296 - *
17.1297 - * @return The chat conversation.
17.1298 - */
17.1299 -PurpleConversation *purple_find_chat(const PurpleConnection *gc, int id);
17.1300 -
17.1301 -/**
17.1302 - * Lets the core know we left a chat, without destroying it.
17.1303 - * Called from serv_got_chat_left().
17.1304 - *
17.1305 - * @param chat The chat.
17.1306 - */
17.1307 -void purple_conv_chat_left(PurpleConvChat *chat);
17.1308 -
17.1309 -/**
17.1310 - * Invite a user to a chat.
17.1311 - * The user will be prompted to enter the user's name or a message if one is
17.1312 - * not given.
17.1313 - *
17.1314 - * @param chat The chat.
17.1315 - * @param user The user to invite to the chat.
17.1316 - * @param message The message to send with the invitation.
17.1317 - * @param confirm Prompt before sending the invitation. The user is always
17.1318 - * prompted if either #user or #message is @c NULL.
17.1319 - *
17.1320 - * @since 2.6.0
17.1321 - */
17.1322 -void purple_conv_chat_invite_user(PurpleConvChat *chat, const char *user,
17.1323 - const char *message, gboolean confirm);
17.1324 -
17.1325 -/**
17.1326 - * Returns true if we're no longer in this chat,
17.1327 - * and just left the window open.
17.1328 - *
17.1329 - * @param chat The chat.
17.1330 - *
17.1331 - * @return @c TRUE if we left the chat already, @c FALSE if
17.1332 - * we're still there.
17.1333 - */
17.1334 -gboolean purple_conv_chat_has_left(PurpleConvChat *chat);
17.1335 -
17.1336 -/**
17.1337 - * Creates a new chat buddy
17.1338 - *
17.1339 - * @param name The name.
17.1340 - * @param alias The alias.
17.1341 - * @param flags The flags.
17.1342 - *
17.1343 - * @return The new chat buddy
17.1344 - */
17.1345 -PurpleConvChatBuddy *purple_conv_chat_cb_new(const char *name, const char *alias,
17.1346 - PurpleConvChatBuddyFlags flags);
17.1347 -
17.1348 -/**
17.1349 - * Find a chat buddy in a chat
17.1350 - *
17.1351 - * @param chat The chat.
17.1352 - * @param name The name of the chat buddy to find.
17.1353 - */
17.1354 -PurpleConvChatBuddy *purple_conv_chat_cb_find(PurpleConvChat *chat, const char *name);
17.1355 -
17.1356 -/**
17.1357 - * Get the name of a chat buddy
17.1358 - *
17.1359 - * @param cb The chat buddy.
17.1360 - *
17.1361 - * @return The name of the chat buddy.
17.1362 - */
17.1363 -const char *purple_conv_chat_cb_get_name(PurpleConvChatBuddy *cb);
17.1364 -
17.1365 -/**
17.1366 - * Get an attribute of a chat buddy
17.1367 - *
17.1368 - * @param cb The chat buddy.
17.1369 - * @param key The key of the attribute.
17.1370 - *
17.1371 - * @return The value of the attribute key.
17.1372 - */
17.1373 -const char *purple_conv_chat_cb_get_attribute(PurpleConvChatBuddy *cb, const char *key);
17.1374 -
17.1375 -/**
17.1376 - * Get the keys of all atributes of a chat buddy
17.1377 - *
17.1378 - * @param cb The chat buddy.
17.1379 - *
17.1380 - * @return A list of the attributes of a chat buddy.
17.1381 - */
17.1382 -GList *purple_conv_chat_cb_get_attribute_keys(PurpleConvChatBuddy *cb);
17.1383 -
17.1384 -/**
17.1385 - * Set an attribute of a chat buddy
17.1386 - *
17.1387 - * @param chat The chat.
17.1388 - * @param cb The chat buddy.
17.1389 - * @param key The key of the attribute.
17.1390 - * @param value The value of the attribute.
17.1391 - */
17.1392 -void purple_conv_chat_cb_set_attribute(PurpleConvChat *chat, PurpleConvChatBuddy *cb, const char *key, const char *value);
17.1393 -
17.1394 -/**
17.1395 - * Set attributes of a chat buddy
17.1396 - *
17.1397 - * @param chat The chat.
17.1398 - * @param cb The chat buddy.
17.1399 - * @param keys A GList of the keys.
17.1400 - * @param values A GList of the values.
17.1401 - */
17.1402 -void
17.1403 -purple_conv_chat_cb_set_attributes(PurpleConvChat *chat, PurpleConvChatBuddy *cb, GList *keys, GList *values);
17.1404 -
17.1405 -
17.1406 -/**
17.1407 - * Destroys a chat buddy
17.1408 - *
17.1409 - * @param cb The chat buddy to destroy
17.1410 - */
17.1411 -void purple_conv_chat_cb_destroy(PurpleConvChatBuddy *cb);
17.1412 -
17.1413 -/**
17.1414 - * Retrieves the extended menu items for the conversation.
17.1415 - *
17.1416 - * @param conv The conversation.
17.1417 - *
17.1418 - * @return A list of PurpleMenuAction items, harvested by the
17.1419 - * chat-extended-menu signal. The list and the menuaction
17.1420 - * items should be freed by the caller.
17.1421 - *
17.1422 - * @since 2.1.0
17.1423 - */
17.1424 -GList * purple_conversation_get_extended_menu(PurpleConversation *conv);
17.1425 -
17.1426 -/**
17.1427 - * Perform a command in a conversation. Similar to @see purple_cmd_do_command
17.1428 - *
17.1429 - * @param conv The conversation.
17.1430 - * @param cmdline The entire command including the arguments.
17.1431 - * @param markup @c NULL, or the formatted command line.
17.1432 - * @param error If the command failed errormsg is filled in with the appropriate error
17.1433 - * message, if not @c NULL. It must be freed by the caller with g_free().
17.1434 - *
17.1435 - * @return @c TRUE if the command was executed successfully, @c FALSE otherwise.
17.1436 - *
17.1437 - * @since 2.1.0
17.1438 - */
17.1439 -gboolean purple_conversation_do_command(PurpleConversation *conv, const gchar *cmdline, const gchar *markup, gchar **error);
17.1440 -
17.1441 -/*@}*/
17.1442 -
17.1443 -/**************************************************************************/
17.1444 -/** @name Conversations Subsystem */
17.1445 -/**************************************************************************/
17.1446 -/*@{*/
17.1447 -
17.1448 -/**
17.1449 - * Returns the conversation subsystem handle.
17.1450 - *
17.1451 - * @return The conversation subsystem handle.
17.1452 - */
17.1453 -void *purple_conversations_get_handle(void);
17.1454 -
17.1455 -/**
17.1456 - * Initializes the conversation subsystem.
17.1457 - */
17.1458 -void purple_conversations_init(void);
17.1459 -
17.1460 -/**
17.1461 - * Uninitializes the conversation subsystem.
17.1462 - */
17.1463 -void purple_conversations_uninit(void);
17.1464 -
17.1465 -/*@}*/
17.1466 -
17.1467 -#ifdef __cplusplus
17.1468 -}
17.1469 -#endif
17.1470 -
17.1471 -#endif /* _PURPLE_CONVERSATION_H_ */
18.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/core.h Fri Aug 21 13:24:36 2009 -0700
18.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
18.3 @@ -1,241 +0,0 @@
18.4 -/**
18.5 - * @file core.h Startup and shutdown of libpurple
18.6 - * @defgroup core libpurple
18.7 - * @see @ref core-signals
18.8 - */
18.9 -
18.10 -/* purple
18.11 - *
18.12 - * Purple is the legal property of its developers, whose names are too numerous
18.13 - * to list here. Please refer to the COPYRIGHT file distributed with this
18.14 - * source distribution.
18.15 - *
18.16 - * This program is free software; you can redistribute it and/or modify
18.17 - * it under the terms of the GNU General Public License as published by
18.18 - * the Free Software Foundation; either version 2 of the License, or
18.19 - * (at your option) any later version.
18.20 - *
18.21 - * This program is distributed in the hope that it will be useful,
18.22 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
18.23 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18.24 - * GNU General Public License for more details.
18.25 - *
18.26 - * You should have received a copy of the GNU General Public License
18.27 - * along with this program; if not, write to the Free Software
18.28 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
18.29 - */
18.30 -#ifndef _PURPLE_CORE_H_
18.31 -#define _PURPLE_CORE_H_
18.32 -
18.33 -typedef struct PurpleCore PurpleCore;
18.34 -
18.35 -/** Callbacks that fire at different points of the initialization and teardown
18.36 - * of libpurple, along with a hook to return descriptive information about the
18.37 - * UI.
18.38 - */
18.39 -typedef struct
18.40 -{
18.41 - /** Called just after the preferences subsystem is initialized; the UI
18.42 - * could use this callback to add some preferences it needs to be in
18.43 - * place when other subsystems are initialized.
18.44 - */
18.45 - void (*ui_prefs_init)(void);
18.46 - /** Called just after the debug subsystem is initialized, but before
18.47 - * just about every other component's initialization. The UI should
18.48 - * use this hook to call purple_debug_set_ui_ops() so that debugging
18.49 - * information for other components can be logged during their
18.50 - * initialization.
18.51 - */
18.52 - void (*debug_ui_init)(void);
18.53 - /** Called after all of libpurple has been initialized. The UI should
18.54 - * use this hook to set all other necessary UiOps structures.
18.55 - *
18.56 - * @see @ref ui-ops
18.57 - */
18.58 - void (*ui_init)(void);
18.59 - /** Called after most of libpurple has been uninitialized. */
18.60 - void (*quit)(void);
18.61 -
18.62 - /** Called by purple_core_get_ui_info(); should return the information
18.63 - * documented there.
18.64 - */
18.65 - GHashTable* (*get_ui_info)(void);
18.66 -
18.67 - void (*_purple_reserved1)(void);
18.68 - void (*_purple_reserved2)(void);
18.69 - void (*_purple_reserved3)(void);
18.70 -} PurpleCoreUiOps;
18.71 -
18.72 -#ifdef __cplusplus
18.73 -extern "C" {
18.74 -#endif
18.75 -
18.76 -/**
18.77 - * Initializes the core of purple.
18.78 - *
18.79 - * This will setup preferences for all the core subsystems.
18.80 - *
18.81 - * @param ui The ID of the UI using the core. This should be a
18.82 - * unique ID, registered with the purple team.
18.83 - *
18.84 - * @return @c TRUE if successful, or @c FALSE otherwise.
18.85 - */
18.86 -gboolean purple_core_init(const char *ui);
18.87 -
18.88 -/**
18.89 - * Quits the core of purple, which, depending on the UI, may quit the
18.90 - * application using the purple core.
18.91 - */
18.92 -void purple_core_quit(void);
18.93 -
18.94 -/**
18.95 - * <p>
18.96 - * Calls purple_core_quit(). This can be used as the function
18.97 - * passed to purple_timeout_add() when you want to shutdown Purple
18.98 - * in a specified amount of time. When shutting down Purple
18.99 - * from a plugin, you must use this instead of purple_core_quit();
18.100 - * for an immediate exit, use a timeout value of 0:
18.101 - * </p>
18.102 - *
18.103 - * <code>purple_timeout_add(0, purple_core_quitcb, NULL);</code>
18.104 - *
18.105 - * <p>
18.106 - * This is ensures that code from your plugin is not being
18.107 - * executed when purple_core_quit() is called. If the plugin
18.108 - * called purple_core_quit() directly, you would get a core dump
18.109 - * after purple_core_quit() executes and control returns to your
18.110 - * plugin because purple_core_quit() frees all plugins.
18.111 - * </p>
18.112 - */
18.113 -gboolean purple_core_quit_cb(gpointer unused);
18.114 -
18.115 -/**
18.116 - * Returns the version of the core library.
18.117 - *
18.118 - * @return The version of the core library.
18.119 - */
18.120 -const char *purple_core_get_version(void);
18.121 -
18.122 -/**
18.123 - * Returns the ID of the UI that is using the core, as passed to
18.124 - * purple_core_init().
18.125 - *
18.126 - * @return The ID of the UI that is currently using the core.
18.127 - */
18.128 -const char *purple_core_get_ui(void);
18.129 -
18.130 -/**
18.131 - * Returns a handle to the purple core.
18.132 - *
18.133 - * This is used to connect to @ref core-signals "core signals".
18.134 - */
18.135 -PurpleCore *purple_get_core(void);
18.136 -
18.137 -/**
18.138 - * Sets the UI ops for the core.
18.139 - *
18.140 - * @param ops A UI ops structure for the core.
18.141 - */
18.142 -void purple_core_set_ui_ops(PurpleCoreUiOps *ops);
18.143 -
18.144 -/**
18.145 - * Returns the UI ops for the core.
18.146 - *
18.147 - * @return The core's UI ops structure.
18.148 - */
18.149 -PurpleCoreUiOps *purple_core_get_ui_ops(void);
18.150 -
18.151 -/**
18.152 - * Migrates from <tt>.gaim</tt> to <tt>.purple</tt>.
18.153 - *
18.154 - * UIs <strong>must not</strong> call this if they have been told to use a
18.155 - * custom user directory.
18.156 - *
18.157 - * @return A boolean indicating success or migration failure. On failure,
18.158 - * the application must display an error to the user and then exit.
18.159 - */
18.160 -gboolean purple_core_migrate(void);
18.161 -
18.162 -/**
18.163 - * Ensures that only one instance is running. If libpurple is built with D-Bus
18.164 - * support, this checks if another process owns the libpurple bus name and if
18.165 - * so whether that process is using the same configuration directory as this
18.166 - * process.
18.167 - *
18.168 - * @return @c TRUE if this is the first instance of libpurple running;
18.169 - * @c FALSE if there is another instance running.
18.170 - *
18.171 - * @since 2.1.0
18.172 - */
18.173 -gboolean purple_core_ensure_single_instance(void);
18.174 -
18.175 -/**
18.176 - * Returns a hash table containing various information about the UI. The
18.177 - * following well-known entries may be in the table (along with any others the
18.178 - * UI might choose to include):
18.179 - *
18.180 - * <dl>
18.181 - * <dt><tt>name</tt></dt>
18.182 - * <dd>the user-readable name for the UI.</dd>
18.183 - *
18.184 - * <dt><tt>version</tt></dt>
18.185 - * <dd>a user-readable description of the current version of the UI.</dd>
18.186 - *
18.187 - * <dt><tt>website</tt></dt>
18.188 - * <dd>the UI's website, such as http://pidgin.im.</dd>
18.189 - *
18.190 - * <dt><tt>dev_website</tt></dt>
18.191 - * <dd>the UI's development/support website, such as http://developer.pidgin.im.</dd>
18.192 - *
18.193 - * <dt><tt>client_type</tt></dt>
18.194 - * <dd>the type of UI. Possible values include 'pc', 'console', 'phone',
18.195 - * 'handheld', 'web', and 'bot'. These values are compared
18.196 - * programmatically and should not be localized.</dd>
18.197 - *
18.198 - * </dl>
18.199 - *
18.200 - * @return A GHashTable with strings for keys and values. This
18.201 - * hash table must not be freed and should not be modified.
18.202 - *
18.203 - * @since 2.1.0
18.204 - *
18.205 - */
18.206 -GHashTable* purple_core_get_ui_info(void);
18.207 -
18.208 -#ifdef __cplusplus
18.209 -}
18.210 -#endif
18.211 -
18.212 -#endif /* _PURPLE_CORE_H_ */
18.213 -
18.214 -/*
18.215 -
18.216 - /===-
18.217 - `//"\\ """"`---.___.-""
18.218 - ______-==| | | \\ _-"`
18.219 - __--""" ,-/-==\\ | | `\ ,'
18.220 - _-" /' | \\ ___ / / \ /
18.221 - .' / | \\ /" "\ /' / \ /'
18.222 - / ____ / | \`\.__/-"" D O \_/' / \/'
18.223 -/-'" """""---__ | "-/" O G R /' _--"`
18.224 - \_| / R __--_ t ), __--""
18.225 - '""--_/ T _-"_>--<_\ h '-" \
18.226 - {\__--_/} / \\__>--<__\ e B \
18.227 - /' (_/ _-" | |__>--<__| U |
18.228 - | _/) )-" | |__>--<__| R |
18.229 - / /" ,_/ / /__>---<__/ N |
18.230 - o-o _// /-"_>---<__-" I /
18.231 - (^(" /"_>---<__- N _-"
18.232 - ,/| /__>--<__/ A _-"
18.233 - ,//('( |__>--<__| T / .----_
18.234 - ( ( ')) |__>--<__| | /' _---_"\
18.235 - `-)) )) ( |__>--<__| O | /' / "\`\
18.236 - ,/,'//( ( \__>--<__\ R \ /' // ||
18.237 - ,( ( ((, )) "-__>--<_"-_ "--____---"' _/'/ /'
18.238 - `"/ )` ) ,/| "-_">--<_/-__ __-" _/
18.239 - ._-"//( )/ )) ` ""-'_/_/ /"""""""__--"
18.240 - ;'( ')/ ,)( """"""""""
18.241 - ' ') '( (/
18.242 - ' ' `
18.243 -
18.244 -*/
19.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/dbus-maybe.h Fri Aug 21 13:24:36 2009 -0700
19.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
19.3 @@ -1,35 +0,0 @@
19.4 -/* This file contains macros that wrap calls to the purple dbus module.
19.5 - These macros call the appropriate functions if the build includes
19.6 - dbus support and do nothing otherwise. See "dbus-server.h" for
19.7 - documentation. */
19.8 -
19.9 -#ifndef _PURPLE_DBUS_MAYBE_H_
19.10 -#define _PURPLE_DBUS_MAYBE_H_
19.11 -
19.12 -#ifdef HAVE_DBUS
19.13 -
19.14 -#ifndef DBUS_API_SUBJECT_TO_CHANGE
19.15 -#define DBUS_API_SUBJECT_TO_CHANGE
19.16 -#endif
19.17 -
19.18 -#include "dbus-server.h"
19.19 -
19.20 -/* this provides a type check */
19.21 -#define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
19.22 - type *typed_ptr = ptr; \
19.23 - purple_dbus_register_pointer(typed_ptr, PURPLE_DBUS_TYPE(type)); \
19.24 -}
19.25 -#define PURPLE_DBUS_UNREGISTER_POINTER(ptr) purple_dbus_unregister_pointer(ptr)
19.26 -
19.27 -#else /* !HAVE_DBUS */
19.28 -
19.29 -#define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
19.30 - if (ptr) {} \
19.31 -}
19.32 -
19.33 -#define PURPLE_DBUS_UNREGISTER_POINTER(ptr)
19.34 -#define DBUS_EXPORT
19.35 -
19.36 -#endif /* HAVE_DBUS */
19.37 -
19.38 -#endif
20.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/debug.h Fri Aug 21 13:24:36 2009 -0700
20.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
20.3 @@ -1,239 +0,0 @@
20.4 -/**
20.5 - * @file debug.h Debug API
20.6 - * @ingroup core
20.7 - */
20.8 -
20.9 -/* purple
20.10 - *
20.11 - * Purple is the legal property of its developers, whose names are too numerous
20.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
20.13 - * source distribution.
20.14 - *
20.15 - * This program is free software; you can redistribute it and/or modify
20.16 - * it under the terms of the GNU General Public License as published by
20.17 - * the Free Software Foundation; either version 2 of the License, or
20.18 - * (at your option) any later version.
20.19 - *
20.20 - * This program is distributed in the hope that it will be useful,
20.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
20.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20.23 - * GNU General Public License for more details.
20.24 - *
20.25 - * You should have received a copy of the GNU General Public License
20.26 - * along with this program; if not, write to the Free Software
20.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
20.28 - */
20.29 -#ifndef _PURPLE_DEBUG_H_
20.30 -#define _PURPLE_DEBUG_H_
20.31 -
20.32 -#include <glib.h>
20.33 -#include <stdarg.h>
20.34 -
20.35 -/**
20.36 - * Debug levels.
20.37 - */
20.38 -typedef enum
20.39 -{
20.40 - PURPLE_DEBUG_ALL = 0, /**< All debug levels. */
20.41 - PURPLE_DEBUG_MISC, /**< General chatter. */
20.42 - PURPLE_DEBUG_INFO, /**< General operation Information. */
20.43 - PURPLE_DEBUG_WARNING, /**< Warnings. */
20.44 - PURPLE_DEBUG_ERROR, /**< Errors. */
20.45 - PURPLE_DEBUG_FATAL /**< Fatal errors. */
20.46 -
20.47 -} PurpleDebugLevel;
20.48 -
20.49 -/**
20.50 - * Debug UI operations.
20.51 - */
20.52 -typedef struct
20.53 -{
20.54 - void (*print)(PurpleDebugLevel level, const char *category,
20.55 - const char *arg_s);
20.56 - gboolean (*is_enabled)(PurpleDebugLevel level,
20.57 - const char *category);
20.58 -
20.59 - void (*_purple_reserved1)(void);
20.60 - void (*_purple_reserved2)(void);
20.61 - void (*_purple_reserved3)(void);
20.62 - void (*_purple_reserved4)(void);
20.63 -} PurpleDebugUiOps;
20.64 -
20.65 -#ifdef __cplusplus
20.66 -extern "C" {
20.67 -#endif
20.68 -
20.69 -/**************************************************************************/
20.70 -/** @name Debug API */
20.71 -/**************************************************************************/
20.72 -/**
20.73 - * Outputs debug information.
20.74 - *
20.75 - * @param level The debug level.
20.76 - * @param category The category (or @c NULL).
20.77 - * @param format The format string.
20.78 - */
20.79 -void purple_debug(PurpleDebugLevel level, const char *category,
20.80 - const char *format, ...) G_GNUC_PRINTF(3, 4);
20.81 -
20.82 -/**
20.83 - * Outputs misc. level debug information.
20.84 - *
20.85 - * This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_MISC as
20.86 - * the level.
20.87 - *
20.88 - * @param category The category (or @c NULL).
20.89 - * @param format The format string.
20.90 - *
20.91 - * @see purple_debug()
20.92 - */
20.93 -void purple_debug_misc(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
20.94 -
20.95 -/**
20.96 - * Outputs info level debug information.
20.97 - *
20.98 - * This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_INFO as
20.99 - * the level.
20.100 - *
20.101 - * @param category The category (or @c NULL).
20.102 - * @param format The format string.
20.103 - *
20.104 - * @see purple_debug()
20.105 - */
20.106 -void purple_debug_info(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
20.107 -
20.108 -/**
20.109 - * Outputs warning level debug information.
20.110 - *
20.111 - * This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_WARNING as
20.112 - * the level.
20.113 - *
20.114 - * @param category The category (or @c NULL).
20.115 - * @param format The format string.
20.116 - *
20.117 - * @see purple_debug()
20.118 - */
20.119 -void purple_debug_warning(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
20.120 -
20.121 -/**
20.122 - * Outputs error level debug information.
20.123 - *
20.124 - * This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_ERROR as
20.125 - * the level.
20.126 - *
20.127 - * @param category The category (or @c NULL).
20.128 - * @param format The format string.
20.129 - *
20.130 - * @see purple_debug()
20.131 - */
20.132 -void purple_debug_error(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
20.133 -
20.134 -/**
20.135 - * Outputs fatal error level debug information.
20.136 - *
20.137 - * This is a wrapper for purple_debug(), and uses PURPLE_DEBUG_ERROR as
20.138 - * the level.
20.139 - *
20.140 - * @param category The category (or @c NULL).
20.141 - * @param format The format string.
20.142 - *
20.143 - * @see purple_debug()
20.144 - */
20.145 -void purple_debug_fatal(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3);
20.146 -
20.147 -/**
20.148 - * Enable or disable printing debug output to the console.
20.149 - *
20.150 - * @param enabled TRUE to enable debug output or FALSE to disable it.
20.151 - */
20.152 -void purple_debug_set_enabled(gboolean enabled);
20.153 -
20.154 -/**
20.155 - * Check if console debug output is enabled.
20.156 - *
20.157 - * @return TRUE if debugging is enabled, FALSE if it is not.
20.158 - */
20.159 -gboolean purple_debug_is_enabled(void);
20.160 -
20.161 -/**
20.162 - * Enable or disable verbose debugging. This ordinarily should only be called
20.163 - * by #purple_debug_init, but there are cases where this can be useful for
20.164 - * plugins.
20.165 - *
20.166 - * @param verbose TRUE to enable verbose debugging or FALSE to disable it.
20.167 - *
20.168 - * @since 2.6.0
20.169 - */
20.170 -void purple_debug_set_verbose(gboolean verbose);
20.171 -
20.172 -/**
20.173 - * Check if verbose logging is enabled.
20.174 - *
20.175 - * @return TRUE if verbose debugging is enabled, FALSE if it is not.
20.176 - *
20.177 - * @since 2.6.0
20.178 - */
20.179 -gboolean purple_debug_is_verbose(void);
20.180 -
20.181 -/**
20.182 - * Enable or disable verbose debugging. This ordinarily should only be called
20.183 - * by #purple_debug_init, but there are cases where this can be useful for
20.184 - * plugins.
20.185 - *
20.186 - * @param unsafe TRUE to enable verbose debugging or FALSE to disable it.
20.187 - *
20.188 - * @since 2.6.0
20.189 - */
20.190 -void purple_debug_set_unsafe(gboolean unsafe);
20.191 -
20.192 -/**
20.193 - * Check if unsafe debugging is enabled.
20.194 - *
20.195 - * @return TRUE if verbose debugging is enabled, FALSE if it is not.
20.196 - *
20.197 - * @since 2.6.0
20.198 - */
20.199 -gboolean purple_debug_is_unsafe(void);
20.200 -
20.201 -/*@}*/
20.202 -
20.203 -/**************************************************************************/
20.204 -/** @name UI Registration Functions */
20.205 -/**************************************************************************/
20.206 -/*@{*/
20.207 -
20.208 -/**
20.209 - * Sets the UI operations structure to be used when outputting debug
20.210 - * information.
20.211 - *
20.212 - * @param ops The UI operations structure.
20.213 - */
20.214 -void purple_debug_set_ui_ops(PurpleDebugUiOps *ops);
20.215 -
20.216 -/**
20.217 - * Returns the UI operations structure used when outputting debug
20.218 - * information.
20.219 - *
20.220 - * @return The UI operations structure in use.
20.221 - */
20.222 -PurpleDebugUiOps *purple_debug_get_ui_ops(void);
20.223 -
20.224 -/*@}*/
20.225 -
20.226 -/**************************************************************************/
20.227 -/** @name Debug Subsystem */
20.228 -/**************************************************************************/
20.229 -/*@{*/
20.230 -
20.231 -/**
20.232 - * Initializes the debug subsystem.
20.233 - */
20.234 -void purple_debug_init(void);
20.235 -
20.236 -/*@}*/
20.237 -
20.238 -#ifdef __cplusplus
20.239 -}
20.240 -#endif
20.241 -
20.242 -#endif /* _PURPLE_DEBUG_H_ */
21.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/desktopitem.h Fri Aug 21 13:24:36 2009 -0700
21.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
21.3 @@ -1,172 +0,0 @@
21.4 -/**
21.5 - * @file desktopitem.h Functions for managing .desktop files
21.6 - * @ingroup core
21.7 - */
21.8 -
21.9 -/* Purple is the legal property of its developers, whose names are too numerous
21.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
21.11 - * source distribution.
21.12 - *
21.13 - * This program is free software; you can redistribute it and/or modify
21.14 - * it under the terms of the GNU General Public License as published by
21.15 - * the Free Software Foundation; either version 2 of the License, or
21.16 - * (at your option) any later version.
21.17 - *
21.18 - * This program is distributed in the hope that it will be useful,
21.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
21.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21.21 - * GNU General Public License for more details.
21.22 - *
21.23 - * You should have received a copy of the GNU General Public License
21.24 - * along with this program; if not, write to the Free Software
21.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
21.26 - *
21.27 - */
21.28 -
21.29 -/*
21.30 - * The following code has been adapted from gnome-desktop-item.[ch],
21.31 - * as found on gnome-desktop-2.8.1.
21.32 - *
21.33 - * Copyright (C) 2004 by Alceste Scalas <alceste.scalas@gmx.net>.
21.34 - *
21.35 - * Original copyright notice:
21.36 - *
21.37 - * Copyright (C) 1999, 2000 Red Hat Inc.
21.38 - * Copyright (C) 2001 Sid Vicious
21.39 - * All rights reserved.
21.40 - *
21.41 - * This file is part of the Gnome Library.
21.42 - *
21.43 - * The Gnome Library is free software; you can redistribute it and/or
21.44 - * modify it under the terms of the GNU Library General Public License as
21.45 - * published by the Free Software Foundation; either version 2 of the
21.46 - * License, or (at your option) any later version.
21.47 - *
21.48 - * The Gnome Library is distributed in the hope that it will be useful,
21.49 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
21.50 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21.51 - * Library General Public License for more details.
21.52 - *
21.53 - * You should have received a copy of the GNU Library General Public
21.54 - * License along with the Gnome Library; see the file COPYING.LIB. If not,
21.55 - * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21.56 - * Boston, MA 02111-1301, USA.
21.57 - */
21.58 -
21.59 -#ifndef _PURPLE_DESKTOP_ITEM_H_
21.60 -#define _PURPLE_DESKTOP_ITEM_H_
21.61 -
21.62 -#include <glib.h>
21.63 -#include <glib-object.h>
21.64 -
21.65 -G_BEGIN_DECLS
21.66 -
21.67 -typedef enum {
21.68 - PURPLE_DESKTOP_ITEM_TYPE_NULL = 0 /* This means its NULL, that is, not
21.69 - * set */,
21.70 - PURPLE_DESKTOP_ITEM_TYPE_OTHER /* This means it's not one of the below
21.71 - strings types, and you must get the
21.72 - Type attribute. */,
21.73 -
21.74 - /* These are the standard compliant types: */
21.75 - PURPLE_DESKTOP_ITEM_TYPE_APPLICATION,
21.76 - PURPLE_DESKTOP_ITEM_TYPE_LINK,
21.77 - PURPLE_DESKTOP_ITEM_TYPE_FSDEVICE,
21.78 - PURPLE_DESKTOP_ITEM_TYPE_MIME_TYPE,
21.79 - PURPLE_DESKTOP_ITEM_TYPE_DIRECTORY,
21.80 - PURPLE_DESKTOP_ITEM_TYPE_SERVICE,
21.81 - PURPLE_DESKTOP_ITEM_TYPE_SERVICE_TYPE
21.82 -} PurpleDesktopItemType;
21.83 -
21.84 -typedef struct _PurpleDesktopItem PurpleDesktopItem;
21.85 -
21.86 -#define PURPLE_TYPE_DESKTOP_ITEM (purple_desktop_item_get_type ())
21.87 -GType purple_desktop_item_get_type (void);
21.88 -
21.89 -/* standard */
21.90 -#define PURPLE_DESKTOP_ITEM_ENCODING "Encoding" /* string */
21.91 -#define PURPLE_DESKTOP_ITEM_VERSION "Version" /* numeric */
21.92 -#define PURPLE_DESKTOP_ITEM_NAME "Name" /* localestring */
21.93 -#define PURPLE_DESKTOP_ITEM_GENERIC_NAME "GenericName" /* localestring */
21.94 -#define PURPLE_DESKTOP_ITEM_TYPE "Type" /* string */
21.95 -#define PURPLE_DESKTOP_ITEM_FILE_PATTERN "FilePattern" /* regexp(s) */
21.96 -#define PURPLE_DESKTOP_ITEM_TRY_EXEC "TryExec" /* string */
21.97 -#define PURPLE_DESKTOP_ITEM_NO_DISPLAY "NoDisplay" /* boolean */
21.98 -#define PURPLE_DESKTOP_ITEM_COMMENT "Comment" /* localestring */
21.99 -#define PURPLE_DESKTOP_ITEM_EXEC "Exec" /* string */
21.100 -#define PURPLE_DESKTOP_ITEM_ACTIONS "Actions" /* strings */
21.101 -#define PURPLE_DESKTOP_ITEM_ICON "Icon" /* string */
21.102 -#define PURPLE_DESKTOP_ITEM_MINI_ICON "MiniIcon" /* string */
21.103 -#define PURPLE_DESKTOP_ITEM_HIDDEN "Hidden" /* boolean */
21.104 -#define PURPLE_DESKTOP_ITEM_PATH "Path" /* string */
21.105 -#define PURPLE_DESKTOP_ITEM_TERMINAL "Terminal" /* boolean */
21.106 -#define PURPLE_DESKTOP_ITEM_TERMINAL_OPTIONS "TerminalOptions" /* string */
21.107 -#define PURPLE_DESKTOP_ITEM_SWALLOW_TITLE "SwallowTitle" /* string */
21.108 -#define PURPLE_DESKTOP_ITEM_SWALLOW_EXEC "SwallowExec" /* string */
21.109 -#define PURPLE_DESKTOP_ITEM_MIME_TYPE "MimeType" /* regexp(s) */
21.110 -#define PURPLE_DESKTOP_ITEM_PATTERNS "Patterns" /* regexp(s) */
21.111 -#define PURPLE_DESKTOP_ITEM_DEFAULT_APP "DefaultApp" /* string */
21.112 -#define PURPLE_DESKTOP_ITEM_DEV "Dev" /* string */
21.113 -#define PURPLE_DESKTOP_ITEM_FS_TYPE "FSType" /* string */
21.114 -#define PURPLE_DESKTOP_ITEM_MOUNT_POINT "MountPoint" /* string */
21.115 -#define PURPLE_DESKTOP_ITEM_READ_ONLY "ReadOnly" /* boolean */
21.116 -#define PURPLE_DESKTOP_ITEM_UNMOUNT_ICON "UnmountIcon" /* string */
21.117 -#define PURPLE_DESKTOP_ITEM_SORT_ORDER "SortOrder" /* strings */
21.118 -#define PURPLE_DESKTOP_ITEM_URL "URL" /* string */
21.119 -#define PURPLE_DESKTOP_ITEM_DOC_PATH "X-GNOME-DocPath" /* string */
21.120 -
21.121 -/**
21.122 - * This function loads 'filename' and turns it into a PurpleDesktopItem.
21.123 - *
21.124 - * @param filename The filename or directory path to load the PurpleDesktopItem from
21.125 - *
21.126 - * @return The newly loaded item, or NULL on error.
21.127 - */
21.128 -PurpleDesktopItem *purple_desktop_item_new_from_file (const char *filename);
21.129 -
21.130 -/**
21.131 - * Gets the type attribute (the 'Type' field) of the item. This should
21.132 - * usually be 'Application' for an application, but it can be 'Directory'
21.133 - * for a directory description. There are other types available as well.
21.134 - * The type usually indicates how the desktop item should be handeled and
21.135 - * how the 'Exec' field should be handeled.
21.136 - *
21.137 - * @param item A desktop item
21.138 - *
21.139 - * @return The type of the specified 'item'. The returned memory
21.140 - * remains owned by the PurpleDesktopItem and should not be freed.
21.141 - */
21.142 -PurpleDesktopItemType purple_desktop_item_get_entry_type (const PurpleDesktopItem *item);
21.143 -
21.144 -/**
21.145 - * Gets the value of an attribute of the item, as a string.
21.146 - *
21.147 - * @param item A desktop item
21.148 - * @param attr The attribute to look for
21.149 - *
21.150 - * @return The value of the specified item attribute.
21.151 - */
21.152 -const char *purple_desktop_item_get_string (const PurpleDesktopItem *item,
21.153 - const char *attr);
21.154 -
21.155 -/**
21.156 - * Creates a copy of a PurpleDesktopItem. The new copy has a refcount of 1.
21.157 - * Note: Section stack is NOT copied.
21.158 - *
21.159 - * @param item The item to be copied
21.160 - *
21.161 - * @return The new copy
21.162 - */
21.163 -PurpleDesktopItem *purple_desktop_item_copy (const PurpleDesktopItem *item);
21.164 -
21.165 -/**
21.166 - * Decreases the reference count of the specified item, and destroys
21.167 - * the item if there are no more references left.
21.168 - *
21.169 - * @param item A desktop item
21.170 - */
21.171 -void purple_desktop_item_unref (PurpleDesktopItem *item);
21.172 -
21.173 -G_END_DECLS
21.174 -
21.175 -#endif /* _PURPLE_DESKTOP_ITEM_H_ */
22.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/dialog.h Fri Aug 21 13:24:36 2009 -0700
22.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
22.3 @@ -1,30 +0,0 @@
22.4 -/**
22.5 - * @file dialog.h Dialog functions
22.6 - *
22.7 - * purple
22.8 - *
22.9 - * Purple is the legal property of its developers, whose names are too numerous
22.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
22.11 - * source distribution.
22.12 - *
22.13 - * This program is free software; you can redistribute it and/or modify
22.14 - * it under the terms of the GNU General Public License as published by
22.15 - * the Free Software Foundation; either version 2 of the License, or
22.16 - * (at your option) any later version.
22.17 - *
22.18 - * This program is distributed in the hope that it will be useful,
22.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
22.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22.21 - * GNU General Public License for more details.
22.22 - *
22.23 - * You should have received a copy of the GNU General Public License
22.24 - * along with this program; if not, write to the Free Software
22.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
22.26 - */
22.27 -#ifndef _MSN_DIALOG_H_
22.28 -#define _MSN_DIALOG_H_
22.29 -
22.30 -void msn_show_sync_issue(MsnSession *session, const char *passport,
22.31 - const char *group_name);
22.32 -
22.33 -#endif /* _MSN_DIALOG_H_ */
23.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/directconn.h Fri Aug 21 13:24:36 2009 -0700
23.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
23.3 @@ -1,61 +0,0 @@
23.4 -/**
23.5 - * @file directconn.h MSN direct connection functions
23.6 - *
23.7 - * purple
23.8 - *
23.9 - * Purple is the legal property of its developers, whose names are too numerous
23.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
23.11 - * source distribution.
23.12 - *
23.13 - * This program is free software; you can redistribute it and/or modify
23.14 - * it under the terms of the GNU General Public License as published by
23.15 - * the Free Software Foundation; either version 2 of the License, or
23.16 - * (at your option) any later version.
23.17 - *
23.18 - * This program is distributed in the hope that it will be useful,
23.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
23.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23.21 - * GNU General Public License for more details.
23.22 - *
23.23 - * You should have received a copy of the GNU General Public License
23.24 - * along with this program; if not, write to the Free Software
23.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
23.26 - */
23.27 -#ifndef _MSN_DIRECTCONN_H_
23.28 -#define _MSN_DIRECTCONN_H_
23.29 -
23.30 -typedef struct _MsnDirectConn MsnDirectConn;
23.31 -
23.32 -#include "slplink.h"
23.33 -#include "slp.h"
23.34 -#include "msg.h"
23.35 -
23.36 -struct _MsnDirectConn
23.37 -{
23.38 - MsnSlpLink *slplink;
23.39 - MsnSlpCall *initial_call;
23.40 -
23.41 - PurpleProxyConnectData *connect_data;
23.42 -
23.43 - gboolean acked;
23.44 -
23.45 - char *nonce;
23.46 -
23.47 - int fd;
23.48 -
23.49 - int port;
23.50 - int inpa;
23.51 -
23.52 - int c;
23.53 -};
23.54 -
23.55 -MsnDirectConn *msn_directconn_new(MsnSlpLink *slplink);
23.56 -gboolean msn_directconn_connect(MsnDirectConn *directconn,
23.57 - const char *host, int port);
23.58 -void msn_directconn_listen(MsnDirectConn *directconn);
23.59 -void msn_directconn_send_msg(MsnDirectConn *directconn, MsnMessage *msg);
23.60 -void msn_directconn_parse_nonce(MsnDirectConn *directconn, const char *nonce);
23.61 -void msn_directconn_destroy(MsnDirectConn *directconn);
23.62 -void msn_directconn_send_handshake(MsnDirectConn *directconn);
23.63 -
23.64 -#endif /* _MSN_DIRECTCONN_H_ */
24.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/dnsquery.h Fri Aug 21 13:24:36 2009 -0700
24.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
24.3 @@ -1,153 +0,0 @@
24.4 -/**
24.5 - * @file dnsquery.h DNS query API
24.6 - * @ingroup core
24.7 - */
24.8 -
24.9 -/* purple
24.10 - *
24.11 - * Purple is the legal property of its developers, whose names are too numerous
24.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
24.13 - * source distribution.
24.14 - *
24.15 - * This program is free software; you can redistribute it and/or modify
24.16 - * it under the terms of the GNU General Public License as published by
24.17 - * the Free Software Foundation; either version 2 of the License, or
24.18 - * (at your option) any later version.
24.19 - *
24.20 - * This program is distributed in the hope that it will be useful,
24.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
24.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24.23 - * GNU General Public License for more details.
24.24 - *
24.25 - * You should have received a copy of the GNU General Public License
24.26 - * along with this program; if not, write to the Free Software
24.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
24.28 - */
24.29 -#ifndef _PURPLE_DNSQUERY_H_
24.30 -#define _PURPLE_DNSQUERY_H_
24.31 -
24.32 -#include <glib.h>
24.33 -#include "eventloop.h"
24.34 -#include "account.h"
24.35 -
24.36 -typedef struct _PurpleDnsQueryData PurpleDnsQueryData;
24.37 -
24.38 -/**
24.39 - * The "hosts" parameter is a linked list containing pairs of
24.40 - * one size_t addrlen and one struct sockaddr *addr. It should
24.41 - * be free'd by the callback function.
24.42 - */
24.43 -typedef void (*PurpleDnsQueryConnectFunction)(GSList *hosts, gpointer data, const char *error_message);
24.44 -
24.45 -/**
24.46 - * Callbacks used by the UI if it handles resolving DNS
24.47 - */
24.48 -typedef void (*PurpleDnsQueryResolvedCallback) (PurpleDnsQueryData *query_data, GSList *hosts);
24.49 -typedef void (*PurpleDnsQueryFailedCallback) (PurpleDnsQueryData *query_data, const gchar *error_message);
24.50 -
24.51 -/**
24.52 - * DNS Request UI operations; UIs should implement this if they want to do DNS
24.53 - * lookups themselves, rather than relying on the core.
24.54 - *
24.55 - * @see @ref ui-ops
24.56 - */
24.57 -typedef struct
24.58 -{
24.59 - /** If implemented, the UI is responsible for DNS queries */
24.60 - gboolean (*resolve_host)(PurpleDnsQueryData *query_data,
24.61 - PurpleDnsQueryResolvedCallback resolved_cb,
24.62 - PurpleDnsQueryFailedCallback failed_cb);
24.63 -
24.64 - /** Called just before @a query_data is freed; this should cancel any
24.65 - * further use of @a query_data the UI would make. Unneeded if
24.66 - * #resolve_host is not implemented.
24.67 - */
24.68 - void (*destroy)(PurpleDnsQueryData *query_data);
24.69 -
24.70 - void (*_purple_reserved1)(void);
24.71 - void (*_purple_reserved2)(void);
24.72 - void (*_purple_reserved3)(void);
24.73 - void (*_purple_reserved4)(void);
24.74 -} PurpleDnsQueryUiOps;
24.75 -
24.76 -#ifdef __cplusplus
24.77 -extern "C" {
24.78 -#endif
24.79 -
24.80 -/**************************************************************************/
24.81 -/** @name DNS query API */
24.82 -/**************************************************************************/
24.83 -/*@{*/
24.84 -
24.85 -/**
24.86 - * Perform an asynchronous DNS query.
24.87 - *
24.88 - * @param hostname The hostname to resolve.
24.89 - * @param port A port number which is stored in the struct sockaddr.
24.90 - * @param callback The callback function to call after resolving.
24.91 - * @param data Extra data to pass to the callback function.
24.92 - *
24.93 - * @return NULL if there was an error, otherwise return a reference to
24.94 - * a data structure that can be used to cancel the pending
24.95 - * DNS query, if needed.
24.96 - */
24.97 -PurpleDnsQueryData *purple_dnsquery_a(const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data);
24.98 -
24.99 -/**
24.100 - * Cancel a DNS query and destroy the associated data structure.
24.101 - *
24.102 - * @param query_data The DNS query to cancel. This data structure
24.103 - * is freed by this function.
24.104 - */
24.105 -void purple_dnsquery_destroy(PurpleDnsQueryData *query_data);
24.106 -
24.107 -/**
24.108 - * Sets the UI operations structure to be used when doing a DNS
24.109 - * resolve. The UI operations need only be set if the UI wants to
24.110 - * handle the resolve itself; otherwise, leave it as NULL.
24.111 - *
24.112 - * @param ops The UI operations structure.
24.113 - */
24.114 -void purple_dnsquery_set_ui_ops(PurpleDnsQueryUiOps *ops);
24.115 -
24.116 -/**
24.117 - * Returns the UI operations structure to be used when doing a DNS
24.118 - * resolve.
24.119 - *
24.120 - * @return The UI operations structure.
24.121 - */
24.122 -PurpleDnsQueryUiOps *purple_dnsquery_get_ui_ops(void);
24.123 -
24.124 -/**
24.125 - * Get the host associated with a PurpleDnsQueryData
24.126 - *
24.127 - * @param query_data The DNS query
24.128 - * @return The host.
24.129 - */
24.130 -char *purple_dnsquery_get_host(PurpleDnsQueryData *query_data);
24.131 -
24.132 -/**
24.133 - * Get the port associated with a PurpleDnsQueryData
24.134 - *
24.135 - * @param query_data The DNS query
24.136 - * @return The port.
24.137 - */
24.138 -unsigned short purple_dnsquery_get_port(PurpleDnsQueryData *query_data);
24.139 -
24.140 -/**
24.141 - * Initializes the DNS query subsystem.
24.142 - */
24.143 -void purple_dnsquery_init(void);
24.144 -
24.145 -/**
24.146 - * Uninitializes the DNS query subsystem.
24.147 - */
24.148 -void purple_dnsquery_uninit(void);
24.149 -
24.150 -/*@}*/
24.151 -
24.152 -#ifdef __cplusplus
24.153 -}
24.154 -#endif
24.155 -
24.156 -#endif /* _PURPLE_DNSQUERY_H_ */
25.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/dnssrv.h Fri Aug 21 13:24:36 2009 -0700
25.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
25.3 @@ -1,119 +0,0 @@
25.4 -/**
25.5 - * @file dnssrv.h
25.6 - */
25.7 -
25.8 -/* purple
25.9 - *
25.10 - * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de>
25.11 - *
25.12 - * This program is free software; you can redistribute it and/or modify
25.13 - * it under the terms of the GNU General Public License as published by
25.14 - * the Free Software Foundation; either version 2 of the License, or
25.15 - * (at your option) any later version.
25.16 - *
25.17 - * This program is distributed in the hope that it will be useful,
25.18 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
25.19 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25.20 - * GNU General Public License for more details.
25.21 - *
25.22 - * You should have received a copy of the GNU General Public License
25.23 - * along with this program; if not, write to the Free Software
25.24 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25.25 - */
25.26 -
25.27 -#ifndef _PURPLE_DNSSRV_H
25.28 -#define _PURPLE_DNSSRV_H
25.29 -
25.30 -#ifdef __cplusplus
25.31 -extern "C" {
25.32 -#endif
25.33 -
25.34 -typedef struct _PurpleSrvQueryData PurpleSrvQueryData;
25.35 -typedef struct _PurpleSrvResponse PurpleSrvResponse;
25.36 -typedef struct _PurpleTxtResponse PurpleTxtResponse;
25.37 -
25.38 -#include <glib.h>
25.39 -
25.40 -struct _PurpleSrvResponse {
25.41 - char hostname[256];
25.42 - int port;
25.43 - int weight;
25.44 - int pref;
25.45 -};
25.46 -
25.47 -/**
25.48 - * @param resp An array of PurpleSrvResponse of size results. The array
25.49 - * is sorted based on the order described in the DNS SRV RFC.
25.50 - * Users of this API should try each record in resp in order,
25.51 - * starting at the beginning.
25.52 - */
25.53 -typedef void (*PurpleSrvCallback)(PurpleSrvResponse *resp, int results, gpointer data);
25.54 -
25.55 -/**
25.56 - * Callback that returns the data retrieved from a DNS TXT lookup.
25.57 - *
25.58 - * @param responses A GList of PurpleTxtResponse objects.
25.59 - * @param data The extra data passed to purple_txt_resolve.
25.60 - */
25.61 -typedef void (*PurpleTxtCallback)(GList *responses, gpointer data);
25.62 -
25.63 -/**
25.64 - * Queries an SRV record.
25.65 - *
25.66 - * @param protocol Name of the protocol (e.g. "sip")
25.67 - * @param transport Name of the transport ("tcp" or "udp")
25.68 - * @param domain Domain name to query (e.g. "blubb.com")
25.69 - * @param cb A callback which will be called with the results
25.70 - * @param extradata Extra data to be passed to the callback
25.71 - */
25.72 -PurpleSrvQueryData *purple_srv_resolve(const char *protocol, const char *transport, const char *domain, PurpleSrvCallback cb, gpointer extradata);
25.73 -
25.74 -/**
25.75 - * Cancel an SRV DNS query.
25.76 - *
25.77 - * @param query_data The request to cancel.
25.78 - */
25.79 -void purple_srv_cancel(PurpleSrvQueryData *query_data);
25.80 -
25.81 -/**
25.82 - * Queries an TXT record.
25.83 - *
25.84 - * @param owner Name of the protocol (e.g. "_xmppconnect")
25.85 - * @param domain Domain name to query (e.g. "blubb.com")
25.86 - * @param cb A callback which will be called with the results
25.87 - * @param extradata Extra data to be passed to the callback
25.88 - *
25.89 - * @since 2.6.0
25.90 - */
25.91 -PurpleSrvQueryData *purple_txt_resolve(const char *owner, const char *domain, PurpleTxtCallback cb, gpointer extradata);
25.92 -
25.93 -/**
25.94 - * Cancel an TXT DNS query.
25.95 - *
25.96 - * @param query_data The request to cancel.
25.97 - * @since 2.6.0
25.98 - */
25.99 -void purple_txt_cancel(PurpleSrvQueryData *query_data);
25.100 -
25.101 -/**
25.102 - * Get the value of the current TXT record.
25.103 - *
25.104 - * @param resp The TXT response record
25.105 - * @returns The value of the current TXT record.
25.106 - * @since 2.6.0
25.107 - */
25.108 -const gchar *purple_txt_response_get_content(PurpleTxtResponse *resp);
25.109 -
25.110 -/**
25.111 - * Destroy a TXT DNS response object.
25.112 - *
25.113 - * @param response The PurpleTxtResponse to destroy.
25.114 - * @since 2.6.0
25.115 - */
25.116 -void purple_txt_response_destroy(PurpleTxtResponse *resp);
25.117 -
25.118 -#ifdef __cplusplus
25.119 -}
25.120 -#endif
25.121 -
25.122 -#endif /* _PURPLE_DNSSRV_H */
26.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/error.h Fri Aug 21 13:24:36 2009 -0700
26.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
26.3 @@ -1,47 +0,0 @@
26.4 -/**
26.5 - * @file error.h Error functions
26.6 - *
26.7 - * purple
26.8 - *
26.9 - * Purple is the legal property of its developers, whose names are too numerous
26.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
26.11 - * source distribution.
26.12 - *
26.13 - * This program is free software; you can redistribute it and/or modify
26.14 - * it under the terms of the GNU General Public License as published by
26.15 - * the Free Software Foundation; either version 2 of the License, or
26.16 - * (at your option) any later version.
26.17 - *
26.18 - * This program is distributed in the hope that it will be useful,
26.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
26.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26.21 - * GNU General Public License for more details.
26.22 - *
26.23 - * You should have received a copy of the GNU General Public License
26.24 - * along with this program; if not, write to the Free Software
26.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
26.26 - */
26.27 -#ifndef _MSN_ERROR_H_
26.28 -#define _MSN_ERROR_H_
26.29 -
26.30 -#include "session.h"
26.31 -
26.32 -/**
26.33 - * Returns the string representation of an error type.
26.34 - *
26.35 - * @param type The error type.
26.36 - * @param debug Whether this should be treated as a debug log message or a user-visible error
26.37 - *
26.38 - * @return The string representation of the error type.
26.39 - */
26.40 -const char *msn_error_get_text(unsigned int type, gboolean *debug);
26.41 -
26.42 -/**
26.43 - * Handles an error.
26.44 - *
26.45 - * @param session The current session.
26.46 - * @param type The error type.
26.47 - */
26.48 -void msn_error_handle(MsnSession *session, unsigned int type);
26.49 -
26.50 -#endif /* _MSN_ERROR_H_ */
27.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/eventloop.h Fri Aug 21 13:24:36 2009 -0700
27.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
27.3 @@ -1,276 +0,0 @@
27.4 -/**
27.5 - * @file eventloop.h Purple Event Loop API
27.6 - * @ingroup core
27.7 - */
27.8 -
27.9 -/* purple
27.10 - *
27.11 - * Purple is the legal property of its developers, whose names are too numerous
27.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
27.13 - * source distribution.
27.14 - *
27.15 - * This program is free software; you can redistribute it and/or modify
27.16 - * it under the terms of the GNU General Public License as published by
27.17 - * the Free Software Foundation; either version 2 of the License, or
27.18 - * (at your option) any later version.
27.19 - *
27.20 - * This program is distributed in the hope that it will be useful,
27.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
27.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27.23 - * GNU General Public License for more details.
27.24 - *
27.25 - * You should have received a copy of the GNU General Public License
27.26 - * along with this program; if not, write to the Free Software
27.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
27.28 - */
27.29 -#ifndef _PURPLE_EVENTLOOP_H_
27.30 -#define _PURPLE_EVENTLOOP_H_
27.31 -
27.32 -#include <glib.h>
27.33 -
27.34 -#ifdef __cplusplus
27.35 -extern "C" {
27.36 -#endif
27.37 -
27.38 -/**
27.39 - * An input condition.
27.40 - */
27.41 -typedef enum
27.42 -{
27.43 - PURPLE_INPUT_READ = 1 << 0, /**< A read condition. */
27.44 - PURPLE_INPUT_WRITE = 1 << 1 /**< A write condition. */
27.45 -
27.46 -} PurpleInputCondition;
27.47 -
27.48 -/** The type of callbacks to handle events on file descriptors, as passed to
27.49 - * purple_input_add(). The callback will receive the @c user_data passed to
27.50 - * purple_input_add(), the file descriptor on which the event occurred, and the
27.51 - * condition that was satisfied to cause the callback to be invoked.
27.52 - */
27.53 -typedef void (*PurpleInputFunction)(gpointer, gint, PurpleInputCondition);
27.54 -
27.55 -/** @copydoc _PurpleEventLoopUiOps */
27.56 -typedef struct _PurpleEventLoopUiOps PurpleEventLoopUiOps;
27.57 -
27.58 -/** An abstraction of an application's mainloop; libpurple will use this to
27.59 - * watch file descriptors and schedule timed callbacks. If your application
27.60 - * uses the glib mainloop, there is an implementation of this struct in
27.61 - * <tt>libpurple/example/nullclient.c</tt> which you can use verbatim.
27.62 - */
27.63 -struct _PurpleEventLoopUiOps
27.64 -{
27.65 - /**
27.66 - * Should create a callback timer with an interval measured in
27.67 - * milliseconds. The supplied @a function should be called every @a
27.68 - * interval seconds until it returns @c FALSE, after which it should not
27.69 - * be called again.
27.70 - *
27.71 - * Analogous to g_timeout_add in glib.
27.72 - *
27.73 - * Note: On Win32, this function may be called from a thread other than
27.74 - * the libpurple thread. You should make sure to detect this situation
27.75 - * and to only call "function" from the libpurple thread.
27.76 - *
27.77 - * @param interval the interval in <em>milliseconds</em> between calls
27.78 - * to @a function.
27.79 - * @param data arbitrary data to be passed to @a function at each
27.80 - * call.
27.81 - * @todo Who is responsible for freeing @a data?
27.82 - *
27.83 - * @return a handle for the timeout, which can be passed to
27.84 - * #timeout_remove.
27.85 - *
27.86 - * @see purple_timeout_add
27.87 - **/
27.88 - guint (*timeout_add)(guint interval, GSourceFunc function, gpointer data);
27.89 -
27.90 - /**
27.91 - * Should remove a callback timer. Analogous to g_source_remove in glib.
27.92 - * @param handle an identifier for a timeout, as returned by
27.93 - * #timeout_add.
27.94 - * @return @c TRUE if the timeout identified by @a handle was
27.95 - * found and removed.
27.96 - * @see purple_timeout_remove
27.97 - */
27.98 - gboolean (*timeout_remove)(guint handle);
27.99 -
27.100 - /**
27.101 - * Should add an input handler. Analogous to g_io_add_watch_full in
27.102 - * glib.
27.103 - *
27.104 - * @param fd a file descriptor to watch for events
27.105 - * @param cond a bitwise OR of events on @a fd for which @a func
27.106 - * should be called.
27.107 - * @param func a callback to fire whenever a relevant event on @a
27.108 - * fd occurs.
27.109 - * @param user_data arbitrary data to pass to @a fd.
27.110 - * @return an identifier for this input handler, which can be
27.111 - * passed to #input_remove.
27.112 - *
27.113 - * @see purple_input_add
27.114 - */
27.115 - guint (*input_add)(int fd, PurpleInputCondition cond,
27.116 - PurpleInputFunction func, gpointer user_data);
27.117 -
27.118 - /**
27.119 - * Should remove an input handler. Analogous to g_source_remove in glib.
27.120 - * @param handle an identifier, as returned by #input_add.
27.121 - * @return @c TRUE if the input handler was found and removed.
27.122 - * @see purple_input_remove
27.123 - */
27.124 - gboolean (*input_remove)(guint handle);
27.125 -
27.126 -
27.127 - /**
27.128 - * If implemented, should get the current error status for an input.
27.129 - *
27.130 - * Implementation of this UI op is optional. Implement it if the UI's
27.131 - * sockets or event loop needs to customize determination of socket
27.132 - * error status. If unimplemented, <tt>getsockopt(2)</tt> will be used
27.133 - * instead.
27.134 - *
27.135 - * @see purple_input_get_error
27.136 - */
27.137 - int (*input_get_error)(int fd, int *error);
27.138 -
27.139 - /**
27.140 - * If implemented, should create a callback timer with an interval
27.141 - * measured in seconds. Analogous to g_timeout_add_seconds in glib.
27.142 - *
27.143 - * This allows UIs to group timers for better power efficiency. For
27.144 - * this reason, @a interval may be rounded by up to a second.
27.145 - *
27.146 - * Implementation of this UI op is optional. If it's not implemented,
27.147 - * calls to purple_timeout_add_seconds() will be serviced by
27.148 - * #timeout_add.
27.149 - *
27.150 - * @see purple_timeout_add_seconds()
27.151 - * @since 2.1.0
27.152 - **/
27.153 - guint (*timeout_add_seconds)(guint interval, GSourceFunc function,
27.154 - gpointer data);
27.155 -
27.156 - void (*_purple_reserved2)(void);
27.157 - void (*_purple_reserved3)(void);
27.158 - void (*_purple_reserved4)(void);
27.159 -};
27.160 -
27.161 -/**************************************************************************/
27.162 -/** @name Event Loop API */
27.163 -/**************************************************************************/
27.164 -/*@{*/
27.165 -/**
27.166 - * Creates a callback timer.
27.167 - *
27.168 - * The timer will repeat until the function returns @c FALSE. The
27.169 - * first call will be at the end of the first interval.
27.170 - *
27.171 - * If the timer is in a multiple of seconds, use purple_timeout_add_seconds()
27.172 - * instead as it allows UIs to group timers for power efficiency.
27.173 - *
27.174 - * @param interval The time between calls of the function, in
27.175 - * milliseconds.
27.176 - * @param function The function to call.
27.177 - * @param data data to pass to @a function.
27.178 - * @return A handle to the timer which can be passed to
27.179 - * purple_timeout_remove() to remove the timer.
27.180 - */
27.181 -guint purple_timeout_add(guint interval, GSourceFunc function, gpointer data);
27.182 -
27.183 -/**
27.184 - * Creates a callback timer.
27.185 - *
27.186 - * The timer will repeat until the function returns @c FALSE. The
27.187 - * first call will be at the end of the first interval.
27.188 - *
27.189 - * This function allows UIs to group timers for better power efficiency. For
27.190 - * this reason, @a interval may be rounded by up to a second.
27.191 - *
27.192 - * @param interval The time between calls of the function, in
27.193 - * seconds.
27.194 - * @param function The function to call.
27.195 - * @param data data to pass to @a function.
27.196 - * @return A handle to the timer which can be passed to
27.197 - * purple_timeout_remove() to remove the timer.
27.198 - *
27.199 - * @since 2.1.0
27.200 - */
27.201 -guint purple_timeout_add_seconds(guint interval, GSourceFunc function, gpointer data);
27.202 -
27.203 -/**
27.204 - * Removes a timeout handler.
27.205 - *
27.206 - * @param handle The handle, as returned by purple_timeout_add().
27.207 - *
27.208 - * @return @c TRUE if the handler was successfully removed.
27.209 - */
27.210 -gboolean purple_timeout_remove(guint handle);
27.211 -
27.212 -/**
27.213 - * Adds an input handler.
27.214 - *
27.215 - * @param fd The input file descriptor.
27.216 - * @param cond The condition type.
27.217 - * @param func The callback function for data.
27.218 - * @param user_data User-specified data.
27.219 - *
27.220 - * @return The resulting handle (will be greater than 0).
27.221 - * @see g_io_add_watch_full
27.222 - */
27.223 -guint purple_input_add(int fd, PurpleInputCondition cond,
27.224 - PurpleInputFunction func, gpointer user_data);
27.225 -
27.226 -/**
27.227 - * Removes an input handler.
27.228 - *
27.229 - * @param handle The handle of the input handler. Note that this is the return
27.230 - * value from purple_input_add(), <i>not</i> the file descriptor.
27.231 - */
27.232 -gboolean purple_input_remove(guint handle);
27.233 -
27.234 -/**
27.235 - * Get the current error status for an input.
27.236 - *
27.237 - * The return value and error follow getsockopt() with a level of SOL_SOCKET and an
27.238 - * option name of SO_ERROR, and this is how the error is determined if the UI does not
27.239 - * implement the input_get_error UI op.
27.240 - *
27.241 - * @param fd The input file descriptor.
27.242 - * @param error A pointer to an @c int which on return will have the error, or
27.243 - * @c 0 if no error.
27.244 - *
27.245 - * @return @c 0 if there is no error; @c -1 if there is an error, in which case
27.246 - * @a errno will be set.
27.247 - */
27.248 -int
27.249 -purple_input_get_error(int fd, int *error);
27.250 -
27.251 -
27.252 -/*@}*/
27.253 -
27.254 -
27.255 -/**************************************************************************/
27.256 -/** @name UI Registration Functions */
27.257 -/**************************************************************************/
27.258 -/*@{*/
27.259 -/**
27.260 - * Sets the UI operations structure to be used for accounts.
27.261 - *
27.262 - * @param ops The UI operations structure.
27.263 - */
27.264 -void purple_eventloop_set_ui_ops(PurpleEventLoopUiOps *ops);
27.265 -
27.266 -/**
27.267 - * Returns the UI operations structure used for accounts.
27.268 - *
27.269 - * @return The UI operations structure in use.
27.270 - */
27.271 -PurpleEventLoopUiOps *purple_eventloop_get_ui_ops(void);
27.272 -
27.273 -/*@}*/
27.274 -
27.275 -#ifdef __cplusplus
27.276 -}
27.277 -#endif
27.278 -
27.279 -#endif /* _PURPLE_EVENTLOOP_H_ */
28.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/fix_purple.h Fri Aug 21 13:24:36 2009 -0700
28.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
28.3 @@ -1,39 +0,0 @@
28.4 -/**
28.5 - * Copyright (C) 2007-2008 Felipe Contreras
28.6 - *
28.7 - * This program is free software; you can redistribute it and/or modify
28.8 - * it under the terms of the GNU General Public License as published by
28.9 - * the Free Software Foundation; either version 2 of the License, or
28.10 - * (at your option) any later version.
28.11 - *
28.12 - * This program is distributed in the hope that it will be useful,
28.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
28.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28.15 - * GNU General Public License for more details.
28.16 - *
28.17 - * You should have received a copy of the GNU General Public License along
28.18 - * with this program; if not, write to the Free Software Foundation, Inc.,
28.19 - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28.20 - */
28.21 -
28.22 -#ifndef FIX_PURPLE_H
28.23 -#define FIX_PURPLE_H
28.24 -
28.25 -struct _PurpleConnection;
28.26 -
28.27 -#include <glib.h>
28.28 -
28.29 -#if !GLIB_CHECK_VERSION(2,3,1)
28.30 -
28.31 -#if GLIB_SIZEOF_LONG == 8
28.32 -#define G_GSIZE_FORMAT "lu"
28.33 -#else
28.34 -#define G_GSIZE_FORMAT "u"
28.35 -#endif
28.36 -
28.37 -#endif /* !GLIB_CHECK_VERSION(2,3,1) */
28.38 -
28.39 -void purple_buddy_set_displayname (struct _PurpleConnection *gc, const gchar *who, const gchar *value);
28.40 -void purple_buddy_set_nickname (struct _PurpleConnection *gc, const gchar *who, const gchar *value);
28.41 -
28.42 -#endif /* FIX_PURPLE_H */
29.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/fix_purple_win32.h Fri Aug 21 13:24:36 2009 -0700
29.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
29.3 @@ -1,30 +0,0 @@
29.4 -/**
29.5 - * Copyright (C) 2007-2008 Felipe Contreras
29.6 - *
29.7 - * This program is free software; you can redistribute it and/or modify
29.8 - * it under the terms of the GNU General Public License as published by
29.9 - * the Free Software Foundation; either version 2 of the License, or
29.10 - * (at your option) any later version.
29.11 - *
29.12 - * This program is distributed in the hope that it will be useful,
29.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
29.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29.15 - * GNU General Public License for more details.
29.16 - *
29.17 - * You should have received a copy of the GNU General Public License along
29.18 - * with this program; if not, write to the Free Software Foundation, Inc.,
29.19 - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
29.20 - */
29.21 -
29.22 -#ifndef FIX_PURPLE_WIN32_H
29.23 -#define FIX_PURPLE_WIN32_H
29.24 -
29.25 -#ifndef G_GNUC_NULL_TERMINATED
29.26 -#if __GNUC__ >= 4
29.27 -#define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
29.28 -#else
29.29 -#define G_GNUC_NULL_TERMINATED
29.30 -#endif
29.31 -#endif
29.32 -
29.33 -#endif /* FIX_PURPLE_WIN32_H */
30.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/ft.h Fri Aug 21 13:24:36 2009 -0700
30.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
30.3 @@ -1,664 +0,0 @@
30.4 -/**
30.5 - * @file ft.h File Transfer API
30.6 - * @ingroup core
30.7 - * @see @ref xfer-signals
30.8 - */
30.9 -
30.10 -/* purple
30.11 - *
30.12 - * Purple is the legal property of its developers, whose names are too numerous
30.13 - * to list here. Please refer to the COPYRIGHT file distributed with this
30.14 - * source distribution.
30.15 - *
30.16 - * This program is free software; you can redistribute it and/or modify
30.17 - * it under the terms of the GNU General Public License as published by
30.18 - * the Free Software Foundation; either version 2 of the License, or
30.19 - * (at your option) any later version.
30.20 - *
30.21 - * This program is distributed in the hope that it will be useful,
30.22 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
30.23 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30.24 - * GNU General Public License for more details.
30.25 - *
30.26 - * You should have received a copy of the GNU General Public License
30.27 - * along with this program; if not, write to the Free Software
30.28 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
30.29 - */
30.30 -#ifndef _PURPLE_FT_H_
30.31 -#define _PURPLE_FT_H_
30.32 -
30.33 -/**************************************************************************/
30.34 -/** Data Structures */
30.35 -/**************************************************************************/
30.36 -typedef struct _PurpleXfer PurpleXfer;
30.37 -
30.38 -#include <glib.h>
30.39 -#include <stdio.h>
30.40 -
30.41 -#include "account.h"
30.42 -
30.43 -/**
30.44 - * Types of file transfers.
30.45 - */
30.46 -typedef enum
30.47 -{
30.48 - PURPLE_XFER_UNKNOWN = 0, /**< Unknown file transfer type. */
30.49 - PURPLE_XFER_SEND, /**< File sending. */
30.50 - PURPLE_XFER_RECEIVE /**< File receiving. */
30.51 -
30.52 -} PurpleXferType;
30.53 -
30.54 -/**
30.55 - * The different states of the xfer.
30.56 - */
30.57 -typedef enum
30.58 -{
30.59 - PURPLE_XFER_STATUS_UNKNOWN = 0, /**< Unknown, the xfer may be null. */
30.60 - PURPLE_XFER_STATUS_NOT_STARTED, /**< It hasn't started yet. */
30.61 - PURPLE_XFER_STATUS_ACCEPTED, /**< Receive accepted, but destination file not selected yet */
30.62 - PURPLE_XFER_STATUS_STARTED, /**< purple_xfer_start has been called. */
30.63 - PURPLE_XFER_STATUS_DONE, /**< The xfer completed successfully. */
30.64 - PURPLE_XFER_STATUS_CANCEL_LOCAL, /**< The xfer was canceled by us. */
30.65 - PURPLE_XFER_STATUS_CANCEL_REMOTE /**< The xfer was canceled by the other end, or we couldn't connect. */
30.66 -} PurpleXferStatusType;
30.67 -
30.68 -/**
30.69 - * File transfer UI operations.
30.70 - *
30.71 - * Any UI representing a file transfer must assign a filled-out
30.72 - * PurpleXferUiOps structure to the purple_xfer.
30.73 - */
30.74 -typedef struct
30.75 -{
30.76 - void (*new_xfer)(PurpleXfer *xfer);
30.77 - void (*destroy)(PurpleXfer *xfer);
30.78 - void (*add_xfer)(PurpleXfer *xfer);
30.79 - void (*update_progress)(PurpleXfer *xfer, double percent);
30.80 - void (*cancel_local)(PurpleXfer *xfer);
30.81 - void (*cancel_remote)(PurpleXfer *xfer);
30.82 -
30.83 - void (*_purple_reserved1)(void);
30.84 - void (*_purple_reserved2)(void);
30.85 - void (*_purple_reserved3)(void);
30.86 - void (*_purple_reserved4)(void);
30.87 -} PurpleXferUiOps;
30.88 -
30.89 -/**
30.90 - * A core representation of a file transfer.
30.91 - */
30.92 -struct _PurpleXfer
30.93 -{
30.94 - guint ref; /**< The reference count. */
30.95 - PurpleXferType type; /**< The type of transfer. */
30.96 -
30.97 - PurpleAccount *account; /**< The account. */
30.98 -
30.99 - char *who; /**< The person on the other end of the
30.100 - transfer. */
30.101 -
30.102 - char *message; /**< A message sent with the request */
30.103 - char *filename; /**< The name sent over the network. */
30.104 - char *local_filename; /**< The name on the local hard drive. */
30.105 - size_t size; /**< The size of the file. */
30.106 -
30.107 - FILE *dest_fp; /**< The destination file pointer. */
30.108 -
30.109 - char *remote_ip; /**< The remote IP address. */
30.110 - int local_port; /**< The local port. */
30.111 - int remote_port; /**< The remote port. */
30.112 -
30.113 - int fd; /**< The socket file descriptor. */
30.114 - int watcher; /**< Watcher. */
30.115 -
30.116 - size_t bytes_sent; /**< The number of bytes sent. */
30.117 - size_t bytes_remaining; /**< The number of bytes remaining. */
30.118 - time_t start_time; /**< When the transfer of data began. */
30.119 - time_t end_time; /**< When the transfer of data ended. */
30.120 -
30.121 - size_t current_buffer_size; /**< This gradually increases for fast
30.122 - network connections. */
30.123 -
30.124 - PurpleXferStatusType status; /**< File Transfer's status. */
30.125 -
30.126 - /* I/O operations. */
30.127 - struct
30.128 - {
30.129 - void (*init)(PurpleXfer *xfer);
30.130 - void (*request_denied)(PurpleXfer *xfer);
30.131 - void (*start)(PurpleXfer *xfer);
30.132 - void (*end)(PurpleXfer *xfer);
30.133 - void (*cancel_send)(PurpleXfer *xfer);
30.134 - void (*cancel_recv)(PurpleXfer *xfer);
30.135 - gssize (*read)(guchar **buffer, PurpleXfer *xfer);
30.136 - gssize (*write)(const guchar *buffer, size_t size, PurpleXfer *xfer);
30.137 - void (*ack)(PurpleXfer *xfer, const guchar *buffer, size_t size);
30.138 -
30.139 - } ops;
30.140 -
30.141 - PurpleXferUiOps *ui_ops; /**< UI-specific operations. */
30.142 - void *ui_data; /**< UI-specific data. */
30.143 -
30.144 - void *data; /**< prpl-specific data. */
30.145 -};
30.146 -
30.147 -#ifdef __cplusplus
30.148 -extern "C" {
30.149 -#endif
30.150 -
30.151 -/**************************************************************************/
30.152 -/** @name File Transfer API */
30.153 -/**************************************************************************/
30.154 -/*@{*/
30.155 -
30.156 -/**
30.157 - * Creates a new file transfer handle.
30.158 - * This is called by prpls.
30.159 - * The handle starts with a ref count of 1, and this reference
30.160 - * is owned by the core. The prpl normally does not need to
30.161 - * purple_xfer_ref or unref.
30.162 - *
30.163 - * @param account The account sending or receiving the file.
30.164 - * @param type The type of file transfer.
30.165 - * @param who The name of the remote user.
30.166 - *
30.167 - * @return A file transfer handle.
30.168 - */
30.169 -PurpleXfer *purple_xfer_new(PurpleAccount *account,
30.170 - PurpleXferType type, const char *who);
30.171 -
30.172 -/**
30.173 - * Returns all xfers
30.174 - *
30.175 - * @return all current xfers with refs
30.176 - */
30.177 -GList *purple_xfers_get_all(void);
30.178 -
30.179 -/**
30.180 - * Increases the reference count on a PurpleXfer.
30.181 - * Please call purple_xfer_unref later.
30.182 - *
30.183 - * @param xfer A file transfer handle.
30.184 - */
30.185 -void purple_xfer_ref(PurpleXfer *xfer);
30.186 -
30.187 -/**
30.188 - * Decreases the reference count on a PurpleXfer.
30.189 - * If the reference reaches 0, purple_xfer_destroy (an internal function)
30.190 - * will destroy the xfer. It calls the ui destroy cb first.
30.191 - * Since the core keeps a ref on the xfer, only an erroneous call to
30.192 - * this function will destroy the xfer while still in use.
30.193 - *
30.194 - * @param xfer A file transfer handle.
30.195 - */
30.196 -void purple_xfer_unref(PurpleXfer *xfer);
30.197 -
30.198 -/**
30.199 - * Requests confirmation for a file transfer from the user. If receiving
30.200 - * a file which is known at this point, this requests user to accept and
30.201 - * save the file. If the filename is unknown (not set) this only requests user
30.202 - * to accept the file transfer. In this case protocol must call this function
30.203 - * again once the filename is available.
30.204 - *
30.205 - * @param xfer The file transfer to request confirmation on.
30.206 - */
30.207 -void purple_xfer_request(PurpleXfer *xfer);
30.208 -
30.209 -/**
30.210 - * Called if the user accepts the file transfer request.
30.211 - *
30.212 - * @param xfer The file transfer.
30.213 - * @param filename The filename.
30.214 - */
30.215 -void purple_xfer_request_accepted(PurpleXfer *xfer, const char *filename);
30.216 -
30.217 -/**
30.218 - * Called if the user rejects the file transfer request.
30.219 - *
30.220 - * @param xfer The file transfer.
30.221 - */
30.222 -void purple_xfer_request_denied(PurpleXfer *xfer);
30.223 -
30.224 -/**
30.225 - * Returns the type of file transfer.
30.226 - *
30.227 - * @param xfer The file transfer.
30.228 - *
30.229 - * @return The type of the file transfer.
30.230 - */
30.231 -PurpleXferType purple_xfer_get_type(const PurpleXfer *xfer);
30.232 -
30.233 -/**
30.234 - * Returns the account the file transfer is using.
30.235 - *
30.236 - * @param xfer The file transfer.
30.237 - *
30.238 - * @return The account.
30.239 - */
30.240 -PurpleAccount *purple_xfer_get_account(const PurpleXfer *xfer);
30.241 -
30.242 -/**
30.243 - * Returns the name of the remote user.
30.244 - *
30.245 - * @param xfer The file transfer.
30.246 - *
30.247 - * @return The name of the remote user.
30.248 - *
30.249 - * @since 2.1.0
30.250 - */
30.251 -const char *purple_xfer_get_remote_user(const PurpleXfer *xfer);
30.252 -
30.253 -/**
30.254 - * Returns the status of the xfer.
30.255 - *
30.256 - * @param xfer The file transfer.
30.257 - *
30.258 - * @return The status.
30.259 - */
30.260 -PurpleXferStatusType purple_xfer_get_status(const PurpleXfer *xfer);
30.261 -
30.262 -/**
30.263 - * Returns true if the file transfer was canceled.
30.264 - *
30.265 - * @param xfer The file transfer.
30.266 - *
30.267 - * @return Whether or not the transfer was canceled.
30.268 - */
30.269 -gboolean purple_xfer_is_canceled(const PurpleXfer *xfer);
30.270 -
30.271 -/**
30.272 - * Returns the completed state for a file transfer.
30.273 - *
30.274 - * @param xfer The file transfer.
30.275 - *
30.276 - * @return The completed state.
30.277 - */
30.278 -gboolean purple_xfer_is_completed(const PurpleXfer *xfer);
30.279 -
30.280 -/**
30.281 - * Returns the name of the file being sent or received.
30.282 - *
30.283 - * @param xfer The file transfer.
30.284 - *
30.285 - * @return The filename.
30.286 - */
30.287 -const char *purple_xfer_get_filename(const PurpleXfer *xfer);
30.288 -
30.289 -/**
30.290 - * Returns the file's destination filename,
30.291 - *
30.292 - * @param xfer The file transfer.
30.293 - *
30.294 - * @return The destination filename.
30.295 - */
30.296 -const char *purple_xfer_get_local_filename(const PurpleXfer *xfer);
30.297 -
30.298 -/**
30.299 - * Returns the number of bytes sent (or received) so far.
30.300 - *
30.301 - * @param xfer The file transfer.
30.302 - *
30.303 - * @return The number of bytes sent.
30.304 - */
30.305 -size_t purple_xfer_get_bytes_sent(const PurpleXfer *xfer);
30.306 -
30.307 -/**
30.308 - * Returns the number of bytes remaining to send or receive.
30.309 - *
30.310 - * @param xfer The file transfer.
30.311 - *
30.312 - * @return The number of bytes remaining.
30.313 - */
30.314 -size_t purple_xfer_get_bytes_remaining(const PurpleXfer *xfer);
30.315 -
30.316 -/**
30.317 - * Returns the size of the file being sent or received.
30.318 - *
30.319 - * @param xfer The file transfer.
30.320 - *
30.321 - * @return The total size of the file.
30.322 - */
30.323 -size_t purple_xfer_get_size(const PurpleXfer *xfer);
30.324 -
30.325 -/**
30.326 - * Returns the current percentage of progress of the transfer.
30.327 - *
30.328 - * This is a number between 0 (0%) and 1 (100%).
30.329 - *
30.330 - * @param xfer The file transfer.
30.331 - *
30.332 - * @return The percentage complete.
30.333 - */
30.334 -double purple_xfer_get_progress(const PurpleXfer *xfer);
30.335 -
30.336 -/**
30.337 - * Returns the local port number in the file transfer.
30.338 - *
30.339 - * @param xfer The file transfer.
30.340 - *
30.341 - * @return The port number on this end.
30.342 - */
30.343 -unsigned int purple_xfer_get_local_port(const PurpleXfer *xfer);
30.344 -
30.345 -/**
30.346 - * Returns the remote IP address in the file transfer.
30.347 - *
30.348 - * @param xfer The file transfer.
30.349 - *
30.350 - * @return The IP address on the other end.
30.351 - */
30.352 -const char *purple_xfer_get_remote_ip(const PurpleXfer *xfer);
30.353 -
30.354 -/**
30.355 - * Returns the remote port number in the file transfer.
30.356 - *
30.357 - * @param xfer The file transfer.
30.358 - *
30.359 - * @return The port number on the other end.
30.360 - */
30.361 -unsigned int purple_xfer_get_remote_port(const PurpleXfer *xfer);
30.362 -
30.363 -/**
30.364 - * Returns the time the transfer of a file started.
30.365 - *
30.366 - * @param xfer The file transfer.
30.367 - *
30.368 - * @return The time when the transfer started.
30.369 - * @since 2.4.0
30.370 - */
30.371 -time_t purple_xfer_get_start_time(const PurpleXfer *xfer);
30.372 -
30.373 -/**
30.374 - * Returns the time the transfer of a file ended.
30.375 - *
30.376 - * @param xfer The file transfer.
30.377 - *
30.378 - * @return The time when the transfer ended.
30.379 - * @since 2.4.0
30.380 - */
30.381 -time_t purple_xfer_get_end_time(const PurpleXfer *xfer);
30.382 -
30.383 -/**
30.384 - * Sets the completed state for the file transfer.
30.385 - *
30.386 - * @param xfer The file transfer.
30.387 - * @param completed The completed state.
30.388 - */
30.389 -void purple_xfer_set_completed(PurpleXfer *xfer, gboolean completed);
30.390 -
30.391 -/**
30.392 - * Sets the filename for the file transfer.
30.393 - *
30.394 - * @param xfer The file transfer.
30.395 - * @param message The message.
30.396 - */
30.397 -void purple_xfer_set_message(PurpleXfer *xfer, const char *message);
30.398 -
30.399 -/**
30.400 - * Sets the filename for the file transfer.
30.401 - *
30.402 - * @param xfer The file transfer.
30.403 - * @param filename The filename.
30.404 - */
30.405 -void purple_xfer_set_filename(PurpleXfer *xfer, const char *filename);
30.406 -
30.407 -/**
30.408 - * Sets the local filename for the file transfer.
30.409 - *
30.410 - * @param xfer The file transfer.
30.411 - * @param filename The filename
30.412 - */
30.413 -void purple_xfer_set_local_filename(PurpleXfer *xfer, const char *filename);
30.414 -
30.415 -/**
30.416 - * Sets the size of the file in a file transfer.
30.417 - *
30.418 - * @param xfer The file transfer.
30.419 - * @param size The size of the file.
30.420 - */
30.421 -void purple_xfer_set_size(PurpleXfer *xfer, size_t size);
30.422 -
30.423 -/**
30.424 - * Sets the current working position in the active file transfer. This
30.425 - * can be used to jump backward in the file if the protocol detects
30.426 - * that some bit of data needs to be resent or has been sent twice.
30.427 - *
30.428 - * It's used for pausing and resuming an oscar file transfer.
30.429 - *
30.430 - * @param xfer The file transfer.
30.431 - * @param bytes_sent The new current position in the file. If we're
30.432 - * sending a file then this is the byte that we will
30.433 - * send. If we're receiving a file, this is the
30.434 - * next byte that we expect to receive.
30.435 - */
30.436 -void purple_xfer_set_bytes_sent(PurpleXfer *xfer, size_t bytes_sent);
30.437 -
30.438 -/**
30.439 - * Returns the UI operations structure for a file transfer.
30.440 - *
30.441 - * @param xfer The file transfer.
30.442 - *
30.443 - * @return The UI operations structure.
30.444 - */
30.445 -PurpleXferUiOps *purple_xfer_get_ui_ops(const PurpleXfer *xfer);
30.446 -
30.447 -/**
30.448 - * Sets the read function for the file transfer.
30.449 - *
30.450 - * @param xfer The file transfer.
30.451 - * @param fnc The read function.
30.452 - */
30.453 -void purple_xfer_set_read_fnc(PurpleXfer *xfer,
30.454 - gssize (*fnc)(guchar **, PurpleXfer *));
30.455 -
30.456 -/**
30.457 - * Sets the write function for the file transfer.
30.458 - *
30.459 - * @param xfer The file transfer.
30.460 - * @param fnc The write function.
30.461 - */
30.462 -void purple_xfer_set_write_fnc(PurpleXfer *xfer,
30.463 - gssize (*fnc)(const guchar *, size_t, PurpleXfer *));
30.464 -
30.465 -/**
30.466 - * Sets the acknowledge function for the file transfer.
30.467 - *
30.468 - * @param xfer The file transfer.
30.469 - * @param fnc The acknowledge function.
30.470 - */
30.471 -void purple_xfer_set_ack_fnc(PurpleXfer *xfer,
30.472 - void (*fnc)(PurpleXfer *, const guchar *, size_t));
30.473 -
30.474 -/**
30.475 - * Sets the function to be called if the request is denied.
30.476 - *
30.477 - * @param xfer The file transfer.
30.478 - * @param fnc The request denied prpl callback.
30.479 - */
30.480 -void purple_xfer_set_request_denied_fnc(PurpleXfer *xfer, void (*fnc)(PurpleXfer *));
30.481 -
30.482 -/**
30.483 - * Sets the transfer initialization function for the file transfer.
30.484 - *
30.485 - * This function is required, and must call purple_xfer_start() with
30.486 - * the necessary parameters. This will be called if the file transfer
30.487 - * is accepted by the user.
30.488 - *
30.489 - * @param xfer The file transfer.
30.490 - * @param fnc The transfer initialization function.
30.491 - */
30.492 -void purple_xfer_set_init_fnc(PurpleXfer *xfer, void (*fnc)(PurpleXfer *));
30.493 -
30.494 -/**
30.495 - * Sets the start transfer function for the file transfer.
30.496 - *
30.497 - * @param xfer The file transfer.
30.498 - * @param fnc The start transfer function.
30.499 - */
30.500 -void purple_xfer_set_start_fnc(PurpleXfer *xfer, void (*fnc)(PurpleXfer *));
30.501 -
30.502 -/**
30.503 - * Sets the end transfer function for the file transfer.
30.504 - *
30.505 - * @param xfer The file transfer.
30.506 - * @param fnc The end transfer function.
30.507 - */
30.508 -void purple_xfer_set_end_fnc(PurpleXfer *xfer, void (*fnc)(PurpleXfer *));
30.509 -
30.510 -/**
30.511 - * Sets the cancel send function for the file transfer.
30.512 - *
30.513 - * @param xfer The file transfer.
30.514 - * @param fnc The cancel send function.
30.515 - */
30.516 -void purple_xfer_set_cancel_send_fnc(PurpleXfer *xfer, void (*fnc)(PurpleXfer *));
30.517 -
30.518 -/**
30.519 - * Sets the cancel receive function for the file transfer.
30.520 - *
30.521 - * @param xfer The file transfer.
30.522 - * @param fnc The cancel receive function.
30.523 - */
30.524 -void purple_xfer_set_cancel_recv_fnc(PurpleXfer *xfer, void (*fnc)(PurpleXfer *));
30.525 -
30.526 -/**
30.527 - * Reads in data from a file transfer stream.
30.528 - *
30.529 - * @param xfer The file transfer.
30.530 - * @param buffer The buffer that will be created to contain the data.
30.531 - *
30.532 - * @return The number of bytes read, or -1.
30.533 - */
30.534 -gssize purple_xfer_read(PurpleXfer *xfer, guchar **buffer);
30.535 -
30.536 -/**
30.537 - * Writes data to a file transfer stream.
30.538 - *
30.539 - * @param xfer The file transfer.
30.540 - * @param buffer The buffer to read the data from.
30.541 - * @param size The number of bytes to write.
30.542 - *
30.543 - * @return The number of bytes written, or -1.
30.544 - */
30.545 -gssize purple_xfer_write(PurpleXfer *xfer, const guchar *buffer, gsize size);
30.546 -
30.547 -/**
30.548 - * Starts a file transfer.
30.549 - *
30.550 - * Either @a fd must be specified <i>or</i> @a ip and @a port on a
30.551 - * file receive transfer. On send, @a fd must be specified, and
30.552 - * @a ip and @a port are ignored.
30.553 - *
30.554 - * @param xfer The file transfer.
30.555 - * @param fd The file descriptor for the socket.
30.556 - * @param ip The IP address to connect to.
30.557 - * @param port The port to connect to.
30.558 - */
30.559 -void purple_xfer_start(PurpleXfer *xfer, int fd, const char *ip,
30.560 - unsigned int port);
30.561 -
30.562 -/**
30.563 - * Ends a file transfer.
30.564 - *
30.565 - * @param xfer The file transfer.
30.566 - */
30.567 -void purple_xfer_end(PurpleXfer *xfer);
30.568 -
30.569 -/**
30.570 - * Adds a new file transfer to the list of file transfers. Call this only
30.571 - * if you are not using purple_xfer_start.
30.572 - *
30.573 - * @param xfer The file transfer.
30.574 - */
30.575 -void purple_xfer_add(PurpleXfer *xfer);
30.576 -
30.577 -/**
30.578 - * Cancels a file transfer on the local end.
30.579 - *
30.580 - * @param xfer The file transfer.
30.581 - */
30.582 -void purple_xfer_cancel_local(PurpleXfer *xfer);
30.583 -
30.584 -/**
30.585 - * Cancels a file transfer from the remote end.
30.586 - *
30.587 - * @param xfer The file transfer.
30.588 - */
30.589 -void purple_xfer_cancel_remote(PurpleXfer *xfer);
30.590 -
30.591 -/**
30.592 - * Displays a file transfer-related error message.
30.593 - *
30.594 - * This is a wrapper around purple_notify_error(), which automatically
30.595 - * specifies a title ("File transfer to <i>user</i> failed" or
30.596 - * "File Transfer from <i>user</i> failed").
30.597 - *
30.598 - * @param type The type of file transfer.
30.599 - * @param account The account sending or receiving the file.
30.600 - * @param who The user on the other end of the transfer.
30.601 - * @param msg The message to display.
30.602 - */
30.603 -void purple_xfer_error(PurpleXferType type, PurpleAccount *account, const char *who, const char *msg);
30.604 -
30.605 -/**
30.606 - * Updates file transfer progress.
30.607 - *
30.608 - * @param xfer The file transfer.
30.609 - */
30.610 -void purple_xfer_update_progress(PurpleXfer *xfer);
30.611 -
30.612 -/**
30.613 - * Displays a file transfer-related message in the conversation window
30.614 - *
30.615 - * This is a wrapper around purple_conversation_write
30.616 - *
30.617 - * @param xfer The file transfer to which this message relates.
30.618 - * @param message The message to display.
30.619 - * @param is_error Is this an error message?.
30.620 - */
30.621 -void purple_xfer_conversation_write(PurpleXfer *xfer, char *message, gboolean is_error);
30.622 -
30.623 -/*@}*/
30.624 -
30.625 -/**************************************************************************/
30.626 -/** @name UI Registration Functions */
30.627 -/**************************************************************************/
30.628 -/*@{*/
30.629 -
30.630 -/**
30.631 - * Returns the handle to the file transfer subsystem
30.632 - *
30.633 - * @return The handle
30.634 - */
30.635 -void *purple_xfers_get_handle(void);
30.636 -
30.637 -/**
30.638 - * Initializes the file transfer subsystem
30.639 - */
30.640 -void purple_xfers_init(void);
30.641 -
30.642 -/**
30.643 - * Uninitializes the file transfer subsystem
30.644 - */
30.645 -void purple_xfers_uninit(void);
30.646 -
30.647 -/**
30.648 - * Sets the UI operations structure to be used in all purple file transfers.
30.649 - *
30.650 - * @param ops The UI operations structure.
30.651 - */
30.652 -void purple_xfers_set_ui_ops(PurpleXferUiOps *ops);
30.653 -
30.654 -/**
30.655 - * Returns the UI operations structure to be used in all purple file transfers.
30.656 - *
30.657 - * @return The UI operations structure.
30.658 - */
30.659 -PurpleXferUiOps *purple_xfers_get_ui_ops(void);
30.660 -
30.661 -/*@}*/
30.662 -
30.663 -#ifdef __cplusplus
30.664 -}
30.665 -#endif
30.666 -
30.667 -#endif /* _PURPLE_FT_H_ */
31.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/gaim-compat.h Fri Aug 21 13:24:36 2009 -0700
31.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
31.3 @@ -1,2317 +0,0 @@
31.4 -/**
31.5 - * @file gaim-compat.h Gaim Compat macros
31.6 - * @ingroup core
31.7 - */
31.8 -
31.9 -/* pidgin
31.10 - *
31.11 - * Pidgin is the legal property of its developers, whose names are too numerous
31.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
31.13 - * source distribution.
31.14 - *
31.15 - * This program is free software; you can redistribute it and/or modify
31.16 - * it under the terms of the GNU General Public License as published by
31.17 - * the Free Software Foundation; either version 2 of the License, or
31.18 - * (at your option) any later version.
31.19 - *
31.20 - * This program is distributed in the hope that it will be useful,
31.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
31.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31.23 - * GNU General Public License for more details.
31.24 - *
31.25 - * You should have received a copy of the GNU General Public License
31.26 - * along with this program; if not, write to the Free Software
31.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
31.28 - */
31.29 -#ifndef _GAIM_COMPAT_H_
31.30 -#define _GAIM_COMPAT_H_
31.31 -
31.32 -#include <glib.h>
31.33 -
31.34 -/* from account.h */
31.35 -#define GaimAccountUiOps PurpleAccountUiOps
31.36 -#define GaimAccount PurpleAccount
31.37 -
31.38 -#define GaimFilterAccountFunc PurpleFilterAccountFunc
31.39 -#define GaimAccountRequestAuthorizationCb PurpleAccountRequestAuthorizationCb
31.40 -
31.41 -#define gaim_account_new purple_account_new
31.42 -#define gaim_account_destroy purple_account_destroy
31.43 -#define gaim_account_connect purple_account_connect
31.44 -#define gaim_account_register purple_account_register
31.45 -#define gaim_account_disconnect purple_account_disconnect
31.46 -#define gaim_account_notify_added purple_account_notify_added
31.47 -#define gaim_account_request_add purple_account_request_add
31.48 -#define gaim_account_request_close purple_account_request_close
31.49 -
31.50 -#define gaim_account_request_authorization purple_account_request_authorization
31.51 -#define gaim_account_request_change_password purple_account_request_change_password
31.52 -#define gaim_account_request_change_user_info purple_account_request_change_user_info
31.53 -
31.54 -#define gaim_account_set_username purple_account_set_username
31.55 -#define gaim_account_set_password purple_account_set_password
31.56 -#define gaim_account_set_alias purple_account_set_alias
31.57 -#define gaim_account_set_user_info purple_account_set_user_info
31.58 -#define gaim_account_set_buddy_icon_path purple_account_set_buddy_icon_path
31.59 -#define gaim_account_set_protocol_id purple_account_set_protocol_id
31.60 -#define gaim_account_set_connection purple_account_set_connection
31.61 -#define gaim_account_set_remember_password purple_account_set_remember_password
31.62 -#define gaim_account_set_check_mail purple_account_set_check_mail
31.63 -#define gaim_account_set_enabled purple_account_set_enabled
31.64 -#define gaim_account_set_proxy_info purple_account_set_proxy_info
31.65 -#define gaim_account_set_status_types purple_account_set_status_types
31.66 -#define gaim_account_set_status purple_account_set_status
31.67 -#define gaim_account_set_status_list purple_account_set_status_list
31.68 -
31.69 -#define gaim_account_clear_settings purple_account_clear_settings
31.70 -
31.71 -#define gaim_account_set_int purple_account_set_int
31.72 -#define gaim_account_set_string purple_account_set_string
31.73 -#define gaim_account_set_bool purple_account_set_bool
31.74 -
31.75 -#define gaim_account_set_ui_int purple_account_set_ui_int
31.76 -#define gaim_account_set_ui_string purple_account_set_ui_string
31.77 -#define gaim_account_set_ui_bool purple_account_set_ui_bool
31.78 -
31.79 -#define gaim_account_is_connected purple_account_is_connected
31.80 -#define gaim_account_is_connecting purple_account_is_connecting
31.81 -#define gaim_account_is_disconnected purple_account_is_disconnected
31.82 -
31.83 -#define gaim_account_get_username purple_account_get_username
31.84 -#define gaim_account_get_password purple_account_get_password
31.85 -#define gaim_account_get_alias purple_account_get_alias
31.86 -#define gaim_account_get_user_info purple_account_get_user_info
31.87 -#define gaim_account_get_buddy_icon_path purple_account_get_buddy_icon_path
31.88 -#define gaim_account_get_protocol_id purple_account_get_protocol_id
31.89 -#define gaim_account_get_protocol_name purple_account_get_protocol_name
31.90 -#define gaim_account_get_connection purple_account_get_connection
31.91 -#define gaim_account_get_remember_password purple_account_get_remember_password
31.92 -#define gaim_account_get_check_mail purple_account_get_check_mail
31.93 -#define gaim_account_get_enabled purple_account_get_enabled
31.94 -#define gaim_account_get_proxy_info purple_account_get_proxy_info
31.95 -#define gaim_account_get_active_status purple_account_get_active_status
31.96 -#define gaim_account_get_status purple_account_get_status
31.97 -#define gaim_account_get_status_type purple_account_get_status_type
31.98 -#define gaim_account_get_status_type_with_primitive \
31.99 - purple_account_get_status_type_with_primitive
31.100 -
31.101 -#define gaim_account_get_presence purple_account_get_presence
31.102 -#define gaim_account_is_status_active purple_account_is_status_active
31.103 -#define gaim_account_get_status_types purple_account_get_status_types
31.104 -
31.105 -#define gaim_account_get_int purple_account_get_int
31.106 -#define gaim_account_get_string purple_account_get_string
31.107 -#define gaim_account_get_bool purple_account_get_bool
31.108 -
31.109 -#define gaim_account_get_ui_int purple_account_get_ui_int
31.110 -#define gaim_account_get_ui_string purple_account_get_ui_string
31.111 -#define gaim_account_get_ui_bool purple_account_get_ui_bool
31.112 -
31.113 -
31.114 -#define gaim_account_get_log purple_account_get_log
31.115 -#define gaim_account_destroy_log purple_account_destroy_log
31.116 -
31.117 -#define gaim_account_add_buddy purple_account_add_buddy
31.118 -#define gaim_account_add_buddies purple_account_add_buddies
31.119 -#define gaim_account_remove_buddy purple_account_remove_buddy
31.120 -#define gaim_account_remove_buddies purple_account_remove_buddies
31.121 -
31.122 -#define gaim_account_remove_group purple_account_remove_group
31.123 -
31.124 -#define gaim_account_change_password purple_account_change_password
31.125 -
31.126 -#define gaim_account_supports_offline_message purple_account_supports_offline_message
31.127 -
31.128 -#define gaim_accounts_add purple_accounts_add
31.129 -#define gaim_accounts_remove purple_accounts_remove
31.130 -#define gaim_accounts_delete purple_accounts_delete
31.131 -#define gaim_accounts_reorder purple_accounts_reorder
31.132 -
31.133 -#define gaim_accounts_get_all purple_accounts_get_all
31.134 -#define gaim_accounts_get_all_active purple_accounts_get_all_active
31.135 -
31.136 -#define gaim_accounts_find purple_accounts_find
31.137 -
31.138 -#define gaim_accounts_restore_current_statuses purple_accounts_restore_current_statuses
31.139 -
31.140 -#define gaim_accounts_set_ui_ops purple_accounts_set_ui_ops
31.141 -#define gaim_accounts_get_ui_ops purple_accounts_get_ui_ops
31.142 -
31.143 -#define gaim_accounts_get_handle purple_accounts_get_handle
31.144 -
31.145 -#define gaim_accounts_init purple_accounts_init
31.146 -#define gaim_accounts_uninit purple_accounts_uninit
31.147 -
31.148 -/* from accountopt.h */
31.149 -
31.150 -#define GaimAccountOption PurpleAccountOption
31.151 -#define GaimAccountUserSplit PurpleAccountUserSplit
31.152 -
31.153 -#define gaim_account_option_new purple_account_option_new
31.154 -#define gaim_account_option_bool_new purple_account_option_bool_new
31.155 -#define gaim_account_option_int_new purple_account_option_int_new
31.156 -#define gaim_account_option_string_new purple_account_option_string_new
31.157 -#define gaim_account_option_list_new purple_account_option_list_new
31.158 -
31.159 -#define gaim_account_option_destroy purple_account_option_destroy
31.160 -
31.161 -#define gaim_account_option_set_default_bool purple_account_option_set_default_bool
31.162 -#define gaim_account_option_set_default_int purple_account_option_set_default_int
31.163 -#define gaim_account_option_set_default_string purple_account_option_set_default_string
31.164 -
31.165 -#define gaim_account_option_set_masked purple_account_option_set_masked
31.166 -
31.167 -#define gaim_account_option_set_list purple_account_option_set_list
31.168 -
31.169 -#define gaim_account_option_add_list_item purple_account_option_add_list_item
31.170 -
31.171 -#define gaim_account_option_get_type purple_account_option_get_type
31.172 -#define gaim_account_option_get_text purple_account_option_get_text
31.173 -#define gaim_account_option_get_setting purple_account_option_get_setting
31.174 -
31.175 -#define gaim_account_option_get_default_bool purple_account_option_get_default_bool
31.176 -#define gaim_account_option_get_default_int purple_account_option_get_default_int
31.177 -#define gaim_account_option_get_default_string purple_account_option_get_default_string
31.178 -#define gaim_account_option_get_default_list_value purple_account_option_get_default_list_value
31.179 -
31.180 -#define gaim_account_option_get_masked purple_account_option_get_masked
31.181 -#define gaim_account_option_get_list purple_account_option_get_list
31.182 -
31.183 -#define gaim_account_user_split_new purple_account_user_split_new
31.184 -#define gaim_account_user_split_destroy purple_account_user_split_destroy
31.185 -
31.186 -#define gaim_account_user_split_get_text purple_account_user_split_get_text
31.187 -#define gaim_account_user_split_get_default_value purple_account_user_split_get_default_value
31.188 -#define gaim_account_user_split_get_separator purple_account_user_split_get_separator
31.189 -
31.190 -/* from blist.h */
31.191 -
31.192 -#define GaimBuddyList PurpleBuddyList
31.193 -#define GaimBlistUiOps PurpleBlistUiOps
31.194 -#define GaimBlistNode PurpleBlistNode
31.195 -
31.196 -#define GaimChat PurpleChat
31.197 -#define GaimGroup PurpleGroup
31.198 -#define GaimContact PurpleContact
31.199 -#define GaimBuddy PurpleBuddy
31.200 -
31.201 -#define GAIM_BLIST_GROUP_NODE PURPLE_BLIST_GROUP_NODE
31.202 -#define GAIM_BLIST_CONTACT_NODE PURPLE_BLIST_CONTACT_NODE
31.203 -#define GAIM_BLIST_BUDDY_NODE PURPLE_BLIST_BUDDY_NODE
31.204 -#define GAIM_BLIST_CHAT_NODE PURPLE_BLIST_CHAT_NODE
31.205 -#define GAIM_BLIST_OTHER_NODE PURPLE_BLIST_OTHER_NODE
31.206 -#define GaimBlistNodeType PurpleBlistNodeType
31.207 -
31.208 -#define GAIM_BLIST_NODE_IS_CHAT PURPLE_BLIST_NODE_IS_CHAT
31.209 -#define GAIM_BLIST_NODE_IS_BUDDY PURPLE_BLIST_NODE_IS_BUDDY
31.210 -#define GAIM_BLIST_NODE_IS_CONTACT PURPLE_BLIST_NODE_IS_CONTACT
31.211 -#define GAIM_BLIST_NODE_IS_GROUP PURPLE_BLIST_NODE_IS_GROUP
31.212 -
31.213 -#define GAIM_BUDDY_IS_ONLINE PURPLE_BUDDY_IS_ONLINE
31.214 -
31.215 -#define GAIM_BLIST_NODE_FLAG_NO_SAVE PURPLE_BLIST_NODE_FLAG_NO_SAVE
31.216 -#define GaimBlistNodeFlags PurpleBlistNodeFlags
31.217 -
31.218 -#define GAIM_BLIST_NODE_HAS_FLAG PURPLE_BLIST_NODE_HAS_FLAG
31.219 -#define GAIM_BLIST_NODE_SHOULD_SAVE PURPLE_BLIST_NODE_SHOULD_SAVE
31.220 -
31.221 -#define GAIM_BLIST_NODE_NAME PURPLE_BLIST_NODE_NAME
31.222 -
31.223 -
31.224 -#define gaim_blist_new purple_blist_new
31.225 -#define gaim_set_blist purple_set_blist
31.226 -#define gaim_get_blist purple_get_blist
31.227 -
31.228 -#define gaim_blist_get_root purple_blist_get_root
31.229 -#define gaim_blist_node_next purple_blist_node_next
31.230 -
31.231 -#define gaim_blist_show purple_blist_show
31.232 -
31.233 -#define gaim_blist_destroy purple_blist_destroy
31.234 -
31.235 -#define gaim_blist_set_visible purple_blist_set_visible
31.236 -
31.237 -#define gaim_blist_update_buddy_status purple_blist_update_buddy_status
31.238 -#define gaim_blist_update_buddy_icon purple_blist_update_buddy_icon
31.239 -
31.240 -
31.241 -#define gaim_blist_alias_contact purple_blist_alias_contact
31.242 -#define gaim_blist_alias_buddy purple_blist_alias_buddy
31.243 -#define gaim_blist_server_alias_buddy purple_blist_server_alias_buddy
31.244 -#define gaim_blist_alias_chat purple_blist_alias_chat
31.245 -
31.246 -#define gaim_blist_rename_buddy purple_blist_rename_buddy
31.247 -#define gaim_blist_rename_group purple_blist_rename_group
31.248 -
31.249 -#define gaim_chat_new purple_chat_new
31.250 -#define gaim_blist_add_chat purple_blist_add_chat
31.251 -
31.252 -#define gaim_buddy_new purple_buddy_new
31.253 -#define gaim_buddy_set_icon purple_buddy_set_icon
31.254 -#define gaim_buddy_get_account purple_buddy_get_account
31.255 -#define gaim_buddy_get_name purple_buddy_get_name
31.256 -#define gaim_buddy_get_icon purple_buddy_get_icon
31.257 -#define gaim_buddy_get_contact purple_buddy_get_contact
31.258 -#define gaim_buddy_get_presence purple_buddy_get_presence
31.259 -
31.260 -#define gaim_blist_add_buddy purple_blist_add_buddy
31.261 -
31.262 -#define gaim_group_new purple_group_new
31.263 -
31.264 -#define gaim_blist_add_group purple_blist_add_group
31.265 -
31.266 -#define gaim_contact_new purple_contact_new
31.267 -
31.268 -#define gaim_blist_add_contact purple_blist_add_contact
31.269 -#define gaim_blist_merge_contact purple_blist_merge_contact
31.270 -
31.271 -#define gaim_contact_get_priority_buddy purple_contact_get_priority_buddy
31.272 -#define gaim_contact_set_alias purple_contact_set_alias
31.273 -#define gaim_contact_get_alias purple_contact_get_alias
31.274 -#define gaim_contact_on_account purple_contact_on_account
31.275 -
31.276 -#define gaim_contact_invalidate_priority_buddy purple_contact_invalidate_priority_buddy
31.277 -
31.278 -#define gaim_blist_remove_buddy purple_blist_remove_buddy
31.279 -#define gaim_blist_remove_contact purple_blist_remove_contact
31.280 -#define gaim_blist_remove_chat purple_blist_remove_chat
31.281 -#define gaim_blist_remove_group purple_blist_remove_group
31.282 -
31.283 -#define gaim_buddy_get_alias_only purple_buddy_get_alias_only
31.284 -#define gaim_buddy_get_server_alias purple_buddy_get_server_alias
31.285 -#define gaim_buddy_get_contact_alias purple_buddy_get_contact_alias
31.286 -#define gaim_buddy_get_local_alias purple_buddy_get_local_alias
31.287 -#define gaim_buddy_get_alias purple_buddy_get_alias
31.288 -
31.289 -#define gaim_chat_get_name purple_chat_get_name
31.290 -
31.291 -#define gaim_find_buddy purple_find_buddy
31.292 -#define gaim_find_buddy_in_group purple_find_buddy_in_group
31.293 -#define gaim_find_buddies purple_find_buddies
31.294 -
31.295 -#define gaim_find_group purple_find_group
31.296 -
31.297 -#define gaim_blist_find_chat purple_blist_find_chat
31.298 -
31.299 -#define gaim_chat_get_group purple_chat_get_group
31.300 -#define gaim_buddy_get_group purple_buddy_get_group
31.301 -
31.302 -#define gaim_group_get_accounts purple_group_get_accounts
31.303 -#define gaim_group_on_account purple_group_on_account
31.304 -
31.305 -#define gaim_blist_add_account purple_blist_add_account
31.306 -#define gaim_blist_remove_account purple_blist_remove_account
31.307 -
31.308 -#define gaim_blist_get_group_size purple_blist_get_group_size
31.309 -#define gaim_blist_get_group_online_count purple_blist_get_group_online_count
31.310 -
31.311 -#define gaim_blist_load purple_blist_load
31.312 -#define gaim_blist_schedule_save purple_blist_schedule_save
31.313 -
31.314 -#define gaim_blist_request_add_buddy purple_blist_request_add_buddy
31.315 -#define gaim_blist_request_add_chat purple_blist_request_add_chat
31.316 -#define gaim_blist_request_add_group purple_blist_request_add_group
31.317 -
31.318 -#define gaim_blist_node_set_bool purple_blist_node_set_bool
31.319 -#define gaim_blist_node_get_bool purple_blist_node_get_bool
31.320 -#define gaim_blist_node_set_int purple_blist_node_set_int
31.321 -#define gaim_blist_node_get_int purple_blist_node_get_int
31.322 -#define gaim_blist_node_set_string purple_blist_node_set_string
31.323 -#define gaim_blist_node_get_string purple_blist_node_get_string
31.324 -
31.325 -#define gaim_blist_node_remove_setting purple_blist_node_remove_setting
31.326 -
31.327 -#define gaim_blist_node_set_flags purple_blist_node_set_flags
31.328 -#define gaim_blist_node_get_flags purple_blist_node_get_flags
31.329 -
31.330 -#define gaim_blist_node_get_extended_menu purple_blist_node_get_extended_menu
31.331 -
31.332 -#define gaim_blist_set_ui_ops purple_blist_set_ui_ops
31.333 -#define gaim_blist_get_ui_ops purple_blist_get_ui_ops
31.334 -
31.335 -#define gaim_blist_get_handle purple_blist_get_handle
31.336 -
31.337 -#define gaim_blist_init purple_blist_init
31.338 -#define gaim_blist_uninit purple_blist_uninit
31.339 -
31.340 -
31.341 -#define GaimBuddyIcon PurpleBuddyIcon
31.342 -
31.343 -#define gaim_buddy_icon_new(account, username, icon_data, icon_len)\
31.344 - purple_buddy_icon_new(account, username, g_memdup(icon_data, icon_len), icon_len)
31.345 -#define gaim_buddy_icon_ref purple_buddy_icon_ref
31.346 -#define gaim_buddy_icon_unref purple_buddy_icon_unref
31.347 -#define gaim_buddy_icon_update purple_buddy_icon_update
31.348 -
31.349 -#define gaim_buddy_icon_set_data(icon, data, len) \
31.350 - purple_buddy_icon_set_data(icon, g_memdup(data, len), len, NULL);
31.351 -
31.352 -#define gaim_buddy_icon_get_account purple_buddy_icon_get_account
31.353 -#define gaim_buddy_icon_get_username purple_buddy_icon_get_username
31.354 -#define gaim_buddy_icon_get_data purple_buddy_icon_get_data
31.355 -#define gaim_buddy_icon_get_type purple_buddy_icon_get_extension
31.356 -
31.357 -#define gaim_buddy_icons_set_for_user(icon, data, len) \
31.358 - purple_buddy_icons_set_for_user(icon, g_memdup(data, len), len, NULL)
31.359 -#define gaim_buddy_icons_set_caching purple_buddy_icons_set_caching
31.360 -#define gaim_buddy_icons_is_caching purple_buddy_icons_is_caching
31.361 -#define gaim_buddy_icons_set_cache_dir purple_buddy_icons_set_cache_dir
31.362 -#define gaim_buddy_icons_get_cache_dir purple_buddy_icons_get_cache_dir
31.363 -#define gaim_buddy_icons_get_handle purple_buddy_icons_get_handle
31.364 -
31.365 -#define gaim_buddy_icons_init purple_buddy_icons_init
31.366 -#define gaim_buddy_icons_uninit purple_buddy_icons_uninit
31.367 -
31.368 -#define gaim_buddy_icon_get_scale_size purple_buddy_icon_get_scale_size
31.369 -
31.370 -/* from cipher.h */
31.371 -
31.372 -#define GAIM_CIPHER PURPLE_CIPHER
31.373 -#define GAIM_CIPHER_OPS PURPLE_CIPHER_OPS
31.374 -#define GAIM_CIPHER_CONTEXT PURPLE_CIPHER_CONTEXT
31.375 -
31.376 -#define GaimCipher PurpleCipher
31.377 -#define GaimCipherOps PurpleCipherOps
31.378 -#define GaimCipherContext PurpleCipherContext
31.379 -
31.380 -#define GAIM_CIPHER_CAPS_SET_OPT PURPLE_CIPHER_CAPS_SET_OPT
31.381 -#define GAIM_CIPHER_CAPS_GET_OPT PURPLE_CIPHER_CAPS_GET_OPT
31.382 -#define GAIM_CIPHER_CAPS_INIT PURPLE_CIPHER_CAPS_INIT
31.383 -#define GAIM_CIPHER_CAPS_RESET PURPLE_CIPHER_CAPS_RESET
31.384 -#define GAIM_CIPHER_CAPS_UNINIT PURPLE_CIPHER_CAPS_UNINIT
31.385 -#define GAIM_CIPHER_CAPS_SET_IV PURPLE_CIPHER_CAPS_SET_IV
31.386 -#define GAIM_CIPHER_CAPS_APPEND PURPLE_CIPHER_CAPS_APPEND
31.387 -#define GAIM_CIPHER_CAPS_DIGEST PURPLE_CIPHER_CAPS_DIGEST
31.388 -#define GAIM_CIPHER_CAPS_ENCRYPT PURPLE_CIPHER_CAPS_ENCRYPT
31.389 -#define GAIM_CIPHER_CAPS_DECRYPT PURPLE_CIPHER_CAPS_DECRYPT
31.390 -#define GAIM_CIPHER_CAPS_SET_SALT PURPLE_CIPHER_CAPS_SET_SALT
31.391 -#define GAIM_CIPHER_CAPS_GET_SALT_SIZE PURPLE_CIPHER_CAPS_GET_SALT_SIZE
31.392 -#define GAIM_CIPHER_CAPS_SET_KEY PURPLE_CIPHER_CAPS_SET_KEY
31.393 -#define GAIM_CIPHER_CAPS_GET_KEY_SIZE PURPLE_CIPHER_CAPS_GET_KEY_SIZE
31.394 -#define GAIM_CIPHER_CAPS_UNKNOWN PURPLE_CIPHER_CAPS_UNKNOWN
31.395 -
31.396 -#define gaim_cipher_get_name purple_cipher_get_name
31.397 -#define gaim_cipher_get_capabilities purple_cipher_get_capabilities
31.398 -#define gaim_cipher_digest_region purple_cipher_digest_region
31.399 -
31.400 -#define gaim_ciphers_find_cipher purple_ciphers_find_cipher
31.401 -#define gaim_ciphers_register_cipher purple_ciphers_register_cipher
31.402 -#define gaim_ciphers_unregister_cipher purple_ciphers_unregister_cipher
31.403 -#define gaim_ciphers_get_ciphers purple_ciphers_get_ciphers
31.404 -
31.405 -#define gaim_ciphers_get_handle purple_ciphers_get_handle
31.406 -#define gaim_ciphers_init purple_ciphers_init
31.407 -#define gaim_ciphers_uninit purple_ciphers_uninit
31.408 -
31.409 -#define gaim_cipher_context_set_option purple_cipher_context_set_option
31.410 -#define gaim_cipher_context_get_option purple_cipher_context_get_option
31.411 -
31.412 -#define gaim_cipher_context_new purple_cipher_context_new
31.413 -#define gaim_cipher_context_new_by_name purple_cipher_context_new_by_name
31.414 -#define gaim_cipher_context_reset purple_cipher_context_reset
31.415 -#define gaim_cipher_context_destroy purple_cipher_context_destroy
31.416 -#define gaim_cipher_context_set_iv purple_cipher_context_set_iv
31.417 -#define gaim_cipher_context_append purple_cipher_context_append
31.418 -#define gaim_cipher_context_digest purple_cipher_context_digest
31.419 -#define gaim_cipher_context_digest_to_str purple_cipher_context_digest_to_str
31.420 -#define gaim_cipher_context_encrypt purple_cipher_context_encrypt
31.421 -#define gaim_cipher_context_decrypt purple_cipher_context_decrypt
31.422 -#define gaim_cipher_context_set_salt purple_cipher_context_set_salt
31.423 -#define gaim_cipher_context_get_salt_size purple_cipher_context_get_salt_size
31.424 -#define gaim_cipher_context_set_key purple_cipher_context_set_key
31.425 -#define gaim_cipher_context_get_key_size purple_cipher_context_get_key_size
31.426 -#define gaim_cipher_context_set_data purple_cipher_context_set_data
31.427 -#define gaim_cipher_context_get_data purple_cipher_context_get_data
31.428 -
31.429 -#define gaim_cipher_http_digest_calculate_session_key \
31.430 - purple_cipher_http_digest_calculate_session_key
31.431 -
31.432 -#define gaim_cipher_http_digest_calculate_response \
31.433 - purple_cipher_http_digest_calculate_response
31.434 -
31.435 -/* from circbuffer.h */
31.436 -
31.437 -#define GaimCircBuffer PurpleCircBuffer
31.438 -
31.439 -#define gaim_circ_buffer_new purple_circ_buffer_new
31.440 -#define gaim_circ_buffer_destroy purple_circ_buffer_destroy
31.441 -#define gaim_circ_buffer_append purple_circ_buffer_append
31.442 -#define gaim_circ_buffer_get_max_read purple_circ_buffer_get_max_read
31.443 -#define gaim_circ_buffer_mark_read purple_circ_buffer_mark_read
31.444 -
31.445 -/* from cmds.h */
31.446 -
31.447 -#define GaimCmdPriority PurpleCmdPriority
31.448 -#define GaimCmdFlag PurpleCmdFlag
31.449 -#define GaimCmdStatus PurpleCmdStatus
31.450 -#define GaimCmdRet PurpleCmdRet
31.451 -
31.452 -#define GAIM_CMD_STATUS_OK PURPLE_CMD_STATUS_OK
31.453 -#define GAIM_CMD_STATUS_FAILED PURPLE_CMD_STATUS_FAILED
31.454 -#define GAIM_CMD_STATUS_NOT_FOUND PURPLE_CMD_STATUS_NOT_FOUND
31.455 -#define GAIM_CMD_STATUS_WRONG_ARGS PURPLE_CMD_STATUS_WRONG_ARGS
31.456 -#define GAIM_CMD_STATUS_WRONG_PRPL PURPLE_CMD_STATUS_WRONG_PRPL
31.457 -#define GAIM_CMD_STATUS_WRONG_TYPE PURPLE_CMD_STATUS_WRONG_TYPE
31.458 -
31.459 -#define GAIM_CMD_FUNC PURPLE_CMD_FUNC
31.460 -
31.461 -#define GAIM_CMD_RET_OK PURPLE_CMD_RET_OK
31.462 -#define GAIM_CMD_RET_FAILED PURPLE_CMD_RET_FAILED
31.463 -#define GAIM_CMD_RET_CONTINUE PURPLE_CMD_RET_CONTINUE
31.464 -
31.465 -#define GAIM_CMD_P_VERY_LOW PURPLE_CMD_P_VERY_LOW
31.466 -#define GAIM_CMD_P_LOW PURPLE_CMD_P_LOW
31.467 -#define GAIM_CMD_P_DEFAULT PURPLE_CMD_P_DEFAULT
31.468 -#define GAIM_CMD_P_PRPL PURPLE_CMD_P_PRPL
31.469 -#define GAIM_CMD_P_PLUGIN PURPLE_CMD_P_PLUGIN
31.470 -#define GAIM_CMD_P_ALIAS PURPLE_CMD_P_ALIAS
31.471 -#define GAIM_CMD_P_HIGH PURPLE_CMD_P_HIGH
31.472 -#define GAIM_CMD_P_VERY_HIGH PURPLE_CMD_P_VERY_HIGH
31.473 -
31.474 -#define GAIM_CMD_FLAG_IM PURPLE_CMD_FLAG_IM
31.475 -#define GAIM_CMD_FLAG_CHAT PURPLE_CMD_FLAG_CHAT
31.476 -#define GAIM_CMD_FLAG_PRPL_ONLY PURPLE_CMD_FLAG_PRPL_ONLY
31.477 -#define GAIM_CMD_FLAG_ALLOW_WRONG_ARGS PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS
31.478 -
31.479 -
31.480 -#define GaimCmdFunc PurpleCmdFunc
31.481 -
31.482 -#define GaimCmdId PurpleCmdId
31.483 -
31.484 -#define gaim_cmd_register purple_cmd_register
31.485 -#define gaim_cmd_unregister purple_cmd_unregister
31.486 -#define gaim_cmd_do_command purple_cmd_do_command
31.487 -#define gaim_cmd_list purple_cmd_list
31.488 -#define gaim_cmd_help purple_cmd_help
31.489 -
31.490 -/* from connection.h */
31.491 -
31.492 -#define GaimConnection PurpleConnection
31.493 -
31.494 -#define GAIM_CONNECTION_HTML PURPLE_CONNECTION_HTML
31.495 -#define GAIM_CONNECTION_NO_BGCOLOR PURPLE_CONNECTION_NO_BGCOLOR
31.496 -#define GAIM_CONNECTION_AUTO_RESP PURPLE_CONNECTION_AUTO_RESP
31.497 -#define GAIM_CONNECTION_FORMATTING_WBFO PURPLE_CONNECTION_FORMATTING_WBFO
31.498 -#define GAIM_CONNECTION_NO_NEWLINES PURPLE_CONNECTION_NO_NEWLINES
31.499 -#define GAIM_CONNECTION_NO_FONTSIZE PURPLE_CONNECTION_NO_FONTSIZE
31.500 -#define GAIM_CONNECTION_NO_URLDESC PURPLE_CONNECTION_NO_URLDESC
31.501 -#define GAIM_CONNECTION_NO_IMAGES PURPLE_CONNECTION_NO_IMAGES
31.502 -
31.503 -#define GaimConnectionFlags PurpleConnectionFlags
31.504 -
31.505 -#define GAIM_DISCONNECTED PURPLE_DISCONNECTED
31.506 -#define GAIM_CONNECTED PURPLE_CONNECTED
31.507 -#define GAIM_CONNECTING PURPLE_CONNECTING
31.508 -
31.509 -#define GaimConnectionState PurpleConnectionState
31.510 -
31.511 -#define GaimConnectionUiOps PurpleConnectionUiOps
31.512 -
31.513 -#define gaim_connection_new purple_connection_new
31.514 -#define gaim_connection_destroy purple_connection_destroy
31.515 -
31.516 -#define gaim_connection_set_state purple_connection_set_state
31.517 -#define gaim_connection_set_account purple_connection_set_account
31.518 -#define gaim_connection_set_display_name purple_connection_set_display_name
31.519 -#define gaim_connection_get_state purple_connection_get_state
31.520 -
31.521 -#define GAIM_CONNECTION_IS_CONNECTED PURPLE_CONNECTION_IS_CONNECTED
31.522 -
31.523 -#define gaim_connection_get_account purple_connection_get_account
31.524 -#define gaim_connection_get_password purple_connection_get_password
31.525 -#define gaim_connection_get_display_name purple_connection_get_display_name
31.526 -
31.527 -#define gaim_connection_update_progress purple_connection_update_progress
31.528 -
31.529 -#define gaim_connection_notice purple_connection_notice
31.530 -#define gaim_connection_error purple_connection_error
31.531 -
31.532 -#define gaim_connections_disconnect_all purple_connections_disconnect_all
31.533 -
31.534 -#define gaim_connections_get_all purple_connections_get_all
31.535 -#define gaim_connections_get_connecting purple_connections_get_connecting
31.536 -
31.537 -#define GAIM_CONNECTION_IS_VALID PURPLE_CONNECTION_IS_VALID
31.538 -
31.539 -#define gaim_connections_set_ui_ops purple_connections_set_ui_ops
31.540 -#define gaim_connections_get_ui_ops purple_connections_get_ui_ops
31.541 -
31.542 -#define gaim_connections_init purple_connections_init
31.543 -#define gaim_connections_uninit purple_connections_uninit
31.544 -#define gaim_connections_get_handle purple_connections_get_handle
31.545 -
31.546 -
31.547 -/* from conversation.h */
31.548 -
31.549 -#define GaimConversationUiOps PurpleConversationUiOps
31.550 -#define GaimConversation PurpleConversation
31.551 -#define GaimConvIm PurpleConvIm
31.552 -#define GaimConvChat PurpleConvChat
31.553 -#define GaimConvChatBuddy PurpleConvChatBuddy
31.554 -
31.555 -#define GAIM_CONV_TYPE_UNKNOWN PURPLE_CONV_TYPE_UNKNOWN
31.556 -#define GAIM_CONV_TYPE_IM PURPLE_CONV_TYPE_IM
31.557 -#define GAIM_CONV_TYPE_CHAT PURPLE_CONV_TYPE_CHAT
31.558 -#define GAIM_CONV_TYPE_MISC PURPLE_CONV_TYPE_MISC
31.559 -#define GAIM_CONV_TYPE_ANY PURPLE_CONV_TYPE_ANY
31.560 -
31.561 -#define GaimConversationType PurpleConversationType
31.562 -
31.563 -#define GAIM_CONV_UPDATE_ADD PURPLE_CONV_UPDATE_ADD
31.564 -#define GAIM_CONV_UPDATE_REMOVE PURPLE_CONV_UPDATE_REMOVE
31.565 -#define GAIM_CONV_UPDATE_ACCOUNT PURPLE_CONV_UPDATE_ACCOUNT
31.566 -#define GAIM_CONV_UPDATE_TYPING PURPLE_CONV_UPDATE_TYPING
31.567 -#define GAIM_CONV_UPDATE_UNSEEN PURPLE_CONV_UPDATE_UNSEEN
31.568 -#define GAIM_CONV_UPDATE_LOGGING PURPLE_CONV_UPDATE_LOGGING
31.569 -#define GAIM_CONV_UPDATE_TOPIC PURPLE_CONV_UPDATE_TOPIC
31.570 -#define GAIM_CONV_ACCOUNT_ONLINE PURPLE_CONV_ACCOUNT_ONLINE
31.571 -#define GAIM_CONV_ACCOUNT_OFFLINE PURPLE_CONV_ACCOUNT_OFFLINE
31.572 -#define GAIM_CONV_UPDATE_AWAY PURPLE_CONV_UPDATE_AWAY
31.573 -#define GAIM_CONV_UPDATE_ICON PURPLE_CONV_UPDATE_ICON
31.574 -#define GAIM_CONV_UPDATE_TITLE PURPLE_CONV_UPDATE_TITLE
31.575 -#define GAIM_CONV_UPDATE_CHATLEFT PURPLE_CONV_UPDATE_CHATLEFT
31.576 -#define GAIM_CONV_UPDATE_FEATURES PURPLE_CONV_UPDATE_FEATURES
31.577 -
31.578 -#define GaimConvUpdateType PurpleConvUpdateType
31.579 -
31.580 -#define GAIM_NOT_TYPING PURPLE_NOT_TYPING
31.581 -#define GAIM_TYPING PURPLE_TYPING
31.582 -#define GAIM_TYPED PURPLE_TYPED
31.583 -
31.584 -#define GaimTypingState PurpleTypingState
31.585 -
31.586 -#define GAIM_MESSAGE_SEND PURPLE_MESSAGE_SEND
31.587 -#define GAIM_MESSAGE_RECV PURPLE_MESSAGE_RECV
31.588 -#define GAIM_MESSAGE_SYSTEM PURPLE_MESSAGE_SYSTEM
31.589 -#define GAIM_MESSAGE_AUTO_RESP PURPLE_MESSAGE_AUTO_RESP
31.590 -#define GAIM_MESSAGE_ACTIVE_ONLY PURPLE_MESSAGE_ACTIVE_ONLY
31.591 -#define GAIM_MESSAGE_NICK PURPLE_MESSAGE_NICK
31.592 -#define GAIM_MESSAGE_NO_LOG PURPLE_MESSAGE_NO_LOG
31.593 -#define GAIM_MESSAGE_WHISPER PURPLE_MESSAGE_WHISPER
31.594 -#define GAIM_MESSAGE_ERROR PURPLE_MESSAGE_ERROR
31.595 -#define GAIM_MESSAGE_DELAYED PURPLE_MESSAGE_DELAYED
31.596 -#define GAIM_MESSAGE_RAW PURPLE_MESSAGE_RAW
31.597 -#define GAIM_MESSAGE_IMAGES PURPLE_MESSAGE_IMAGES
31.598 -
31.599 -#define GaimMessageFlags PurpleMessageFlags
31.600 -
31.601 -#define GAIM_CBFLAGS_NONE PURPLE_CBFLAGS_NONE
31.602 -#define GAIM_CBFLAGS_VOICE PURPLE_CBFLAGS_VOICE
31.603 -#define GAIM_CBFLAGS_HALFOP PURPLE_CBFLAGS_HALFOP
31.604 -#define GAIM_CBFLAGS_OP PURPLE_CBFLAGS_OP
31.605 -#define GAIM_CBFLAGS_FOUNDER PURPLE_CBFLAGS_FOUNDER
31.606 -#define GAIM_CBFLAGS_TYPING PURPLE_CBFLAGS_TYPING
31.607 -
31.608 -#define GaimConvChatBuddyFlags PurpleConvChatBuddyFlags
31.609 -
31.610 -#define gaim_conversations_set_ui_ops purple_conversations_set_ui_ops
31.611 -
31.612 -#define gaim_conversation_new purple_conversation_new
31.613 -#define gaim_conversation_destroy purple_conversation_destroy
31.614 -#define gaim_conversation_present purple_conversation_present
31.615 -#define gaim_conversation_get_type purple_conversation_get_type
31.616 -#define gaim_conversation_set_ui_ops purple_conversation_set_ui_ops
31.617 -#define gaim_conversation_get_ui_ops purple_conversation_get_ui_ops
31.618 -#define gaim_conversation_set_account purple_conversation_set_account
31.619 -#define gaim_conversation_get_account purple_conversation_get_account
31.620 -#define gaim_conversation_get_gc purple_conversation_get_gc
31.621 -#define gaim_conversation_set_title purple_conversation_set_title
31.622 -#define gaim_conversation_get_title purple_conversation_get_title
31.623 -#define gaim_conversation_autoset_title purple_conversation_autoset_title
31.624 -#define gaim_conversation_set_name purple_conversation_set_name
31.625 -#define gaim_conversation_get_name purple_conversation_get_name
31.626 -#define gaim_conversation_set_logging purple_conversation_set_logging
31.627 -#define gaim_conversation_is_logging purple_conversation_is_logging
31.628 -#define gaim_conversation_close_logs purple_conversation_close_logs
31.629 -#define gaim_conversation_get_im_data purple_conversation_get_im_data
31.630 -
31.631 -#define GAIM_CONV_IM PURPLE_CONV_IM
31.632 -
31.633 -#define gaim_conversation_get_chat_data purple_conversation_get_chat_data
31.634 -
31.635 -#define GAIM_CONV_CHAT PURPLE_CONV_CHAT
31.636 -
31.637 -#define gaim_conversation_set_data purple_conversation_set_data
31.638 -#define gaim_conversation_get_data purple_conversation_get_data
31.639 -
31.640 -#define gaim_get_conversations purple_get_conversations
31.641 -#define gaim_get_ims purple_get_ims
31.642 -#define gaim_get_chats purple_get_chats
31.643 -
31.644 -#define gaim_find_conversation_with_account \
31.645 - purple_find_conversation_with_account
31.646 -
31.647 -#define gaim_conversation_write purple_conversation_write
31.648 -#define gaim_conversation_set_features purple_conversation_set_features
31.649 -#define gaim_conversation_get_features purple_conversation_get_features
31.650 -#define gaim_conversation_has_focus purple_conversation_has_focus
31.651 -#define gaim_conversation_update purple_conversation_update
31.652 -#define gaim_conversation_foreach purple_conversation_foreach
31.653 -
31.654 -#define gaim_conv_im_get_conversation purple_conv_im_get_conversation
31.655 -#define gaim_conv_im_set_icon purple_conv_im_set_icon
31.656 -#define gaim_conv_im_get_icon purple_conv_im_get_icon
31.657 -#define gaim_conv_im_set_typing_state purple_conv_im_set_typing_state
31.658 -#define gaim_conv_im_get_typing_state purple_conv_im_get_typing_state
31.659 -
31.660 -#define gaim_conv_im_start_typing_timeout purple_conv_im_start_typing_timeout
31.661 -#define gaim_conv_im_stop_typing_timeout purple_conv_im_stop_typing_timeout
31.662 -#define gaim_conv_im_get_typing_timeout purple_conv_im_get_typing_timeout
31.663 -#define gaim_conv_im_set_type_again purple_conv_im_set_type_again
31.664 -#define gaim_conv_im_get_type_again purple_conv_im_get_type_again
31.665 -
31.666 -#define gaim_conv_im_start_send_typed_timeout \
31.667 - purple_conv_im_start_send_typed_timeout
31.668 -
31.669 -#define gaim_conv_im_stop_send_typed_timeout \
31.670 - purple_conv_im_stop_send_typed_timeout
31.671 -
31.672 -#define gaim_conv_im_get_send_typed_timeout \
31.673 - purple_conv_im_get_send_typed_timeout
31.674 -
31.675 -#define gaim_conv_present_error purple_conv_present_error
31.676 -#define gaim_conv_send_confirm purple_conv_send_confirm
31.677 -
31.678 -#define gaim_conv_im_update_typing purple_conv_im_update_typing
31.679 -#define gaim_conv_im_write purple_conv_im_write
31.680 -#define gaim_conv_im_send purple_conv_im_send
31.681 -#define gaim_conv_im_send_with_flags purple_conv_im_send_with_flags
31.682 -
31.683 -#define gaim_conv_custom_smiley_add purple_conv_custom_smiley_add
31.684 -#define gaim_conv_custom_smiley_write purple_conv_custom_smiley_write
31.685 -#define gaim_conv_custom_smiley_close purple_conv_custom_smiley_close
31.686 -
31.687 -#define gaim_conv_chat_get_conversation purple_conv_chat_get_conversation
31.688 -#define gaim_conv_chat_set_users purple_conv_chat_set_users
31.689 -#define gaim_conv_chat_get_users purple_conv_chat_get_users
31.690 -#define gaim_conv_chat_ignore purple_conv_chat_ignore
31.691 -#define gaim_conv_chat_unignore purple_conv_chat_unignore
31.692 -#define gaim_conv_chat_set_ignored purple_conv_chat_set_ignored
31.693 -#define gaim_conv_chat_get_ignored purple_conv_chat_get_ignored
31.694 -#define gaim_conv_chat_get_ignored_user purple_conv_chat_get_ignored_user
31.695 -#define gaim_conv_chat_is_user_ignored purple_conv_chat_is_user_ignored
31.696 -#define gaim_conv_chat_set_topic purple_conv_chat_set_topic
31.697 -#define gaim_conv_chat_get_topic purple_conv_chat_get_topic
31.698 -#define gaim_conv_chat_set_id purple_conv_chat_set_id
31.699 -#define gaim_conv_chat_get_id purple_conv_chat_get_id
31.700 -#define gaim_conv_chat_write purple_conv_chat_write
31.701 -#define gaim_conv_chat_send purple_conv_chat_send
31.702 -#define gaim_conv_chat_send_with_flags purple_conv_chat_send_with_flags
31.703 -#define gaim_conv_chat_add_user purple_conv_chat_add_user
31.704 -#define gaim_conv_chat_add_users purple_conv_chat_add_users
31.705 -#define gaim_conv_chat_rename_user purple_conv_chat_rename_user
31.706 -#define gaim_conv_chat_remove_user purple_conv_chat_remove_user
31.707 -#define gaim_conv_chat_remove_users purple_conv_chat_remove_users
31.708 -#define gaim_conv_chat_find_user purple_conv_chat_find_user
31.709 -#define gaim_conv_chat_user_set_flags purple_conv_chat_user_set_flags
31.710 -#define gaim_conv_chat_user_get_flags purple_conv_chat_user_get_flags
31.711 -#define gaim_conv_chat_clear_users purple_conv_chat_clear_users
31.712 -#define gaim_conv_chat_set_nick purple_conv_chat_set_nick
31.713 -#define gaim_conv_chat_get_nick purple_conv_chat_get_nick
31.714 -#define gaim_conv_chat_left purple_conv_chat_left
31.715 -#define gaim_conv_chat_has_left purple_conv_chat_has_left
31.716 -
31.717 -#define gaim_find_chat purple_find_chat
31.718 -
31.719 -#define gaim_conv_chat_cb_new purple_conv_chat_cb_new
31.720 -#define gaim_conv_chat_cb_find purple_conv_chat_cb_find
31.721 -#define gaim_conv_chat_cb_get_name purple_conv_chat_cb_get_name
31.722 -#define gaim_conv_chat_cb_destroy purple_conv_chat_cb_destroy
31.723 -
31.724 -#define gaim_conversations_get_handle purple_conversations_get_handle
31.725 -#define gaim_conversations_init purple_conversations_init
31.726 -#define gaim_conversations_uninit purple_conversations_uninit
31.727 -
31.728 -/* from core.h */
31.729 -
31.730 -#define GaimCore PurpleCore
31.731 -
31.732 -#define GaimCoreUiOps PurpleCoreUiOps
31.733 -
31.734 -#define gaim_core_init purple_core_init
31.735 -#define gaim_core_quit purple_core_quit
31.736 -
31.737 -#define gaim_core_quit_cb purple_core_quit_cb
31.738 -#define gaim_core_get_version purple_core_get_version
31.739 -#define gaim_core_get_ui purple_core_get_ui
31.740 -#define gaim_get_core purple_get_core
31.741 -#define gaim_core_set_ui_ops purple_core_set_ui_ops
31.742 -#define gaim_core_get_ui_ops purple_core_get_ui_ops
31.743 -
31.744 -/* from debug.h */
31.745 -
31.746 -#define GAIM_DEBUG_ALL PURPLE_DEBUG_ALL
31.747 -#define GAIM_DEBUG_MISC PURPLE_DEBUG_MISC
31.748 -#define GAIM_DEBUG_INFO PURPLE_DEBUG_INFO
31.749 -#define GAIM_DEBUG_WARNING PURPLE_DEBUG_WARNING
31.750 -#define GAIM_DEBUG_ERROR PURPLE_DEBUG_ERROR
31.751 -#define GAIM_DEBUG_FATAL PURPLE_DEBUG_FATAL
31.752 -
31.753 -#define GaimDebugLevel PurpleDebugLevel
31.754 -
31.755 -#define GaimDebugUiOps PurpleDebugUiOps
31.756 -
31.757 -
31.758 -#define gaim_debug purple_debug
31.759 -#define gaim_debug_misc purple_debug_misc
31.760 -#define gaim_debug_info purple_debug_info
31.761 -#define gaim_debug_warning purple_debug_warning
31.762 -#define gaim_debug_error purple_debug_error
31.763 -#define gaim_debug_fatal purple_debug_fatal
31.764 -
31.765 -#define gaim_debug_set_enabled purple_debug_set_enabled
31.766 -#define gaim_debug_is_enabled purple_debug_is_enabled
31.767 -
31.768 -#define gaim_debug_set_ui_ops purple_debug_set_ui_ops
31.769 -#define gaim_debug_get_ui_ops purple_debug_get_ui_ops
31.770 -
31.771 -#define gaim_debug_init purple_debug_init
31.772 -
31.773 -/* from desktopitem.h */
31.774 -
31.775 -#define GAIM_DESKTOP_ITEM_TYPE_NULL PURPLE_DESKTOP_ITEM_TYPE_NULL
31.776 -#define GAIM_DESKTOP_ITEM_TYPE_OTHER PURPLE_DESKTOP_ITEM_TYPE_OTHER
31.777 -#define GAIM_DESKTOP_ITEM_TYPE_APPLICATION PURPLE_DESKTOP_ITEM_TYPE_APPLICATION
31.778 -#define GAIM_DESKTOP_ITEM_TYPE_LINK PURPLE_DESKTOP_ITEM_TYPE_LINK
31.779 -#define GAIM_DESKTOP_ITEM_TYPE_FSDEVICE PURPLE_DESKTOP_ITEM_TYPE_FSDEVICE
31.780 -#define GAIM_DESKTOP_ITEM_TYPE_MIME_TYPE PURPLE_DESKTOP_ITEM_TYPE_MIME_TYPE
31.781 -#define GAIM_DESKTOP_ITEM_TYPE_DIRECTORY PURPLE_DESKTOP_ITEM_TYPE_DIRECTORY
31.782 -#define GAIM_DESKTOP_ITEM_TYPE_SERVICE PURPLE_DESKTOP_ITEM_TYPE_SERVICE
31.783 -#define GAIM_DESKTOP_ITEM_TYPE_SERVICE_TYPE PURPLE_DESKTOP_ITEM_TYPE_SERVICE_TYPE
31.784 -
31.785 -#define GaimDesktopItemType PurpleDesktopItemType
31.786 -
31.787 -#define GaimDesktopItem PurpleDesktopItem
31.788 -
31.789 -#define GAIM_TYPE_DESKTOP_ITEM PURPLE_TYPE_DESKTOP_ITEM
31.790 -#define gaim_desktop_item_get_type purple_desktop_item_get_type
31.791 -
31.792 -/* standard */
31.793 -/* ugh, i'm just copying these as strings, rather than pidginifying them */
31.794 -#define GAIM_DESKTOP_ITEM_ENCODING "Encoding" /* string */
31.795 -#define GAIM_DESKTOP_ITEM_VERSION "Version" /* numeric */
31.796 -#define GAIM_DESKTOP_ITEM_NAME "Name" /* localestring */
31.797 -#define GAIM_DESKTOP_ITEM_GENERIC_NAME "GenericName" /* localestring */
31.798 -#define GAIM_DESKTOP_ITEM_TYPE "Type" /* string */
31.799 -#define GAIM_DESKTOP_ITEM_FILE_PATTERN "FilePattern" /* regexp(s) */
31.800 -#define GAIM_DESKTOP_ITEM_TRY_EXEC "TryExec" /* string */
31.801 -#define GAIM_DESKTOP_ITEM_NO_DISPLAY "NoDisplay" /* boolean */
31.802 -#define GAIM_DESKTOP_ITEM_COMMENT "Comment" /* localestring */
31.803 -#define GAIM_DESKTOP_ITEM_EXEC "Exec" /* string */
31.804 -#define GAIM_DESKTOP_ITEM_ACTIONS "Actions" /* strings */
31.805 -#define GAIM_DESKTOP_ITEM_ICON "Icon" /* string */
31.806 -#define GAIM_DESKTOP_ITEM_MINI_ICON "MiniIcon" /* string */
31.807 -#define GAIM_DESKTOP_ITEM_HIDDEN "Hidden" /* boolean */
31.808 -#define GAIM_DESKTOP_ITEM_PATH "Path" /* string */
31.809 -#define GAIM_DESKTOP_ITEM_TERMINAL "Terminal" /* boolean */
31.810 -#define GAIM_DESKTOP_ITEM_TERMINAL_OPTIONS "TerminalOptions" /* string */
31.811 -#define GAIM_DESKTOP_ITEM_SWALLOW_TITLE "SwallowTitle" /* string */
31.812 -#define GAIM_DESKTOP_ITEM_SWALLOW_EXEC "SwallowExec" /* string */
31.813 -#define GAIM_DESKTOP_ITEM_MIME_TYPE "MimeType" /* regexp(s) */
31.814 -#define GAIM_DESKTOP_ITEM_PATTERNS "Patterns" /* regexp(s) */
31.815 -#define GAIM_DESKTOP_ITEM_DEFAULT_APP "DefaultApp" /* string */
31.816 -#define GAIM_DESKTOP_ITEM_DEV "Dev" /* string */
31.817 -#define GAIM_DESKTOP_ITEM_FS_TYPE "FSType" /* string */
31.818 -#define GAIM_DESKTOP_ITEM_MOUNT_POINT "MountPoint" /* string */
31.819 -#define GAIM_DESKTOP_ITEM_READ_ONLY "ReadOnly" /* boolean */
31.820 -#define GAIM_DESKTOP_ITEM_UNMOUNT_ICON "UnmountIcon" /* string */
31.821 -#define GAIM_DESKTOP_ITEM_SORT_ORDER "SortOrder" /* strings */
31.822 -#define GAIM_DESKTOP_ITEM_URL "URL" /* string */
31.823 -#define GAIM_DESKTOP_ITEM_DOC_PATH "X-GNOME-DocPath" /* string */
31.824 -
31.825 -#define gaim_desktop_item_new_from_file purple_desktop_item_new_from_file
31.826 -#define gaim_desktop_item_get_entry_type purple_desktop_item_get_entry_type
31.827 -#define gaim_desktop_item_get_string purple_desktop_item_get_string
31.828 -#define gaim_desktop_item_copy purple_desktop_item_copy
31.829 -#define gaim_desktop_item_unref purple_desktop_item_unref
31.830 -
31.831 -/* from dnsquery.h */
31.832 -
31.833 -#define GaimDnsQueryData PurpleDnsQueryData
31.834 -#define GaimDnsQueryConnectFunction PurpleDnsQueryConnectFunction
31.835 -
31.836 -#define gaim_dnsquery_a purple_dnsquery_a
31.837 -#define gaim_dnsquery_destroy purple_dnsquery_destroy
31.838 -#define gaim_dnsquery_init purple_dnsquery_init
31.839 -#define gaim_dnsquery_uninit purple_dnsquery_uninit
31.840 -#define gaim_dnsquery_set_ui_ops purple_dnsquery_set_ui_ops
31.841 -#define gaim_dnsquery_get_host purple_dnsquery_get_host
31.842 -#define gaim_dnsquery_get_port purple_dnsquery_get_port
31.843 -
31.844 -/* from dnssrv.h */
31.845 -
31.846 -#define GaimSrvResponse PurpleSrvResponse
31.847 -#define GaimSrvQueryData PurpleSrvQueryData
31.848 -#define GaimSrvCallback PurpleSrvCallback
31.849 -
31.850 -#define gaim_srv_resolve purple_srv_resolve
31.851 -#define gaim_srv_cancel purple_srv_cancel
31.852 -
31.853 -/* from eventloop.h */
31.854 -
31.855 -#define GAIM_INPUT_READ PURPLE_INPUT_READ
31.856 -#define GAIM_INPUT_WRITE PURPLE_INPUT_WRITE
31.857 -
31.858 -#define GaimInputCondition PurpleInputCondition
31.859 -#define GaimInputFunction PurpleInputFunction
31.860 -#define GaimEventLoopUiOps PurpleEventLoopUiOps
31.861 -
31.862 -#define gaim_timeout_add purple_timeout_add
31.863 -#define gaim_timeout_remove purple_timeout_remove
31.864 -#define gaim_input_add purple_input_add
31.865 -#define gaim_input_remove purple_input_remove
31.866 -
31.867 -#define gaim_eventloop_set_ui_ops purple_eventloop_set_ui_ops
31.868 -#define gaim_eventloop_get_ui_ops purple_eventloop_get_ui_ops
31.869 -
31.870 -/* from ft.h */
31.871 -
31.872 -#define GaimXfer PurpleXfer
31.873 -
31.874 -#define GAIM_XFER_UNKNOWN PURPLE_XFER_UNKNOWN
31.875 -#define GAIM_XFER_SEND PURPLE_XFER_SEND
31.876 -#define GAIM_XFER_RECEIVE PURPLE_XFER_RECEIVE
31.877 -
31.878 -#define GaimXferType PurpleXferType
31.879 -
31.880 -#define GAIM_XFER_STATUS_UNKNOWN PURPLE_XFER_STATUS_UNKNOWN
31.881 -#define GAIM_XFER_STATUS_NOT_STARTED PURPLE_XFER_STATUS_NOT_STARTED
31.882 -#define GAIM_XFER_STATUS_ACCEPTED PURPLE_XFER_STATUS_ACCEPTED
31.883 -#define GAIM_XFER_STATUS_STARTED PURPLE_XFER_STATUS_STARTED
31.884 -#define GAIM_XFER_STATUS_DONE PURPLE_XFER_STATUS_DONE
31.885 -#define GAIM_XFER_STATUS_CANCEL_LOCAL PURPLE_XFER_STATUS_CANCEL_LOCAL
31.886 -#define GAIM_XFER_STATUS_CANCEL_REMOTE PURPLE_XFER_STATUS_CANCEL_REMOTE
31.887 -
31.888 -#define GaimXferStatusType PurpleXferStatusType
31.889 -
31.890 -#define GaimXferUiOps PurpleXferUiOps
31.891 -
31.892 -#define gaim_xfer_new purple_xfer_new
31.893 -#define gaim_xfer_ref purple_xfer_ref
31.894 -#define gaim_xfer_unref purple_xfer_unref
31.895 -#define gaim_xfer_request purple_xfer_request
31.896 -#define gaim_xfer_request_accepted purple_xfer_request_accepted
31.897 -#define gaim_xfer_request_denied purple_xfer_request_denied
31.898 -#define gaim_xfer_get_type purple_xfer_get_type
31.899 -#define gaim_xfer_get_account purple_xfer_get_account
31.900 -#define gaim_xfer_get_status purple_xfer_get_status
31.901 -#define gaim_xfer_is_canceled purple_xfer_is_canceled
31.902 -#define gaim_xfer_is_completed purple_xfer_is_completed
31.903 -#define gaim_xfer_get_filename purple_xfer_get_filename
31.904 -#define gaim_xfer_get_local_filename purple_xfer_get_local_filename
31.905 -#define gaim_xfer_get_bytes_sent purple_xfer_get_bytes_sent
31.906 -#define gaim_xfer_get_bytes_remaining purple_xfer_get_bytes_remaining
31.907 -#define gaim_xfer_get_size purple_xfer_get_size
31.908 -#define gaim_xfer_get_progress purple_xfer_get_progress
31.909 -#define gaim_xfer_get_local_port purple_xfer_get_local_port
31.910 -#define gaim_xfer_get_remote_ip purple_xfer_get_remote_ip
31.911 -#define gaim_xfer_get_remote_port purple_xfer_get_remote_port
31.912 -#define gaim_xfer_set_completed purple_xfer_set_completed
31.913 -#define gaim_xfer_set_message purple_xfer_set_message
31.914 -#define gaim_xfer_set_filename purple_xfer_set_filename
31.915 -#define gaim_xfer_set_local_filename purple_xfer_set_local_filename
31.916 -#define gaim_xfer_set_size purple_xfer_set_size
31.917 -#define gaim_xfer_set_bytes_sent purple_xfer_set_bytes_sent
31.918 -#define gaim_xfer_get_ui_ops purple_xfer_get_ui_ops
31.919 -#define gaim_xfer_set_read_fnc purple_xfer_set_read_fnc
31.920 -#define gaim_xfer_set_write_fnc purple_xfer_set_write_fnc
31.921 -#define gaim_xfer_set_ack_fnc purple_xfer_set_ack_fnc
31.922 -#define gaim_xfer_set_request_denied_fnc purple_xfer_set_request_denied_fnc
31.923 -#define gaim_xfer_set_init_fnc purple_xfer_set_init_fnc
31.924 -#define gaim_xfer_set_start_fnc purple_xfer_set_start_fnc
31.925 -#define gaim_xfer_set_end_fnc purple_xfer_set_end_fnc
31.926 -#define gaim_xfer_set_cancel_send_fnc purple_xfer_set_cancel_send_fnc
31.927 -#define gaim_xfer_set_cancel_recv_fnc purple_xfer_set_cancel_recv_fnc
31.928 -
31.929 -#define gaim_xfer_read purple_xfer_read
31.930 -#define gaim_xfer_write purple_xfer_write
31.931 -#define gaim_xfer_start purple_xfer_start
31.932 -#define gaim_xfer_end purple_xfer_end
31.933 -#define gaim_xfer_add purple_xfer_add
31.934 -#define gaim_xfer_cancel_local purple_xfer_cancel_local
31.935 -#define gaim_xfer_cancel_remote purple_xfer_cancel_remote
31.936 -#define gaim_xfer_error purple_xfer_error
31.937 -#define gaim_xfer_update_progress purple_xfer_update_progress
31.938 -#define gaim_xfer_conversation_write purple_xfer_conversation_write
31.939 -
31.940 -#define gaim_xfers_get_handle purple_xfers_get_handle
31.941 -#define gaim_xfers_init purple_xfers_init
31.942 -#define gaim_xfers_uninit purple_xfers_uninit
31.943 -#define gaim_xfers_set_ui_ops purple_xfers_set_ui_ops
31.944 -#define gaim_xfers_get_ui_ops purple_xfers_get_ui_ops
31.945 -
31.946 -/* from gaim-client.h */
31.947 -
31.948 -#define gaim_init purple_init
31.949 -
31.950 -/* from idle.h */
31.951 -
31.952 -#define GaimIdleUiOps PurpleIdleUiOps
31.953 -
31.954 -#define gaim_idle_touch purple_idle_touch
31.955 -#define gaim_idle_set purple_idle_set
31.956 -#define gaim_idle_set_ui_ops purple_idle_set_ui_ops
31.957 -#define gaim_idle_get_ui_ops purple_idle_get_ui_ops
31.958 -#define gaim_idle_init purple_idle_init
31.959 -#define gaim_idle_uninit purple_idle_uninit
31.960 -
31.961 -/* from imgstore.h */
31.962 -
31.963 -#define GaimStoredImage PurpleStoredImage
31.964 -
31.965 -#define gaim_imgstore_add(data, size, filename) \
31.966 - purple_imgstore_add_with_id(g_memdup(data, size), size, filename)
31.967 -#define gaim_imgstore_get purple_imgstore_find_by_id
31.968 -#define gaim_imgstore_get_data purple_imgstore_get_data
31.969 -#define gaim_imgstore_get_size purple_imgstore_get_size
31.970 -#define gaim_imgstore_get_filename purple_imgstore_get_filename
31.971 -#define gaim_imgstore_ref purple_imgstore_ref_by_id
31.972 -#define gaim_imgstore_unref purple_imgstore_unref_by_id
31.973 -
31.974 -
31.975 -/* from log.h */
31.976 -
31.977 -#define GaimLog PurpleLog
31.978 -#define GaimLogLogger PurpleLogLogger
31.979 -#define GaimLogCommonLoggerData PurpleLogCommonLoggerData
31.980 -#define GaimLogSet PurpleLogSet
31.981 -
31.982 -#define GAIM_LOG_IM PURPLE_LOG_IM
31.983 -#define GAIM_LOG_CHAT PURPLE_LOG_CHAT
31.984 -#define GAIM_LOG_SYSTEM PURPLE_LOG_SYSTEM
31.985 -
31.986 -#define GaimLogType PurpleLogType
31.987 -
31.988 -#define GAIM_LOG_READ_NO_NEWLINE PURPLE_LOG_READ_NO_NEWLINE
31.989 -
31.990 -#define GaimLogReadFlags PurpleLogReadFlags
31.991 -
31.992 -#define GaimLogSetCallback PurpleLogSetCallback
31.993 -
31.994 -#define gaim_log_new purple_log_new
31.995 -#define gaim_log_free purple_log_free
31.996 -#define gaim_log_write purple_log_write
31.997 -#define gaim_log_read purple_log_read
31.998 -
31.999 -#define gaim_log_get_logs purple_log_get_logs
31.1000 -#define gaim_log_get_log_sets purple_log_get_log_sets
31.1001 -#define gaim_log_get_system_logs purple_log_get_system_logs
31.1002 -#define gaim_log_get_size purple_log_get_size
31.1003 -#define gaim_log_get_total_size purple_log_get_total_size
31.1004 -#define gaim_log_get_log_dir purple_log_get_log_dir
31.1005 -#define gaim_log_compare purple_log_compare
31.1006 -#define gaim_log_set_compare purple_log_set_compare
31.1007 -#define gaim_log_set_free purple_log_set_free
31.1008 -
31.1009 -#define gaim_log_common_writer purple_log_common_writer
31.1010 -#define gaim_log_common_lister purple_log_common_lister
31.1011 -#define gaim_log_common_total_sizer purple_log_common_total_sizer
31.1012 -#define gaim_log_common_sizer purple_log_common_sizer
31.1013 -
31.1014 -#define gaim_log_logger_new purple_log_logger_new
31.1015 -#define gaim_log_logger_free purple_log_logger_free
31.1016 -#define gaim_log_logger_add purple_log_logger_add
31.1017 -#define gaim_log_logger_remove purple_log_logger_remove
31.1018 -#define gaim_log_logger_set purple_log_logger_set
31.1019 -#define gaim_log_logger_get purple_log_logger_get
31.1020 -
31.1021 -#define gaim_log_logger_get_options purple_log_logger_get_options
31.1022 -
31.1023 -#define gaim_log_init purple_log_init
31.1024 -#define gaim_log_get_handle purple_log_get_handle
31.1025 -#define gaim_log_uninit purple_log_uninit
31.1026 -
31.1027 -/* from mime.h */
31.1028 -
31.1029 -#define GaimMimeDocument PurpleMimeDocument
31.1030 -#define GaimMimePart PurpleMimePart
31.1031 -
31.1032 -#define gaim_mime_document_new purple_mime_document_new
31.1033 -#define gaim_mime_document_free purple_mime_document_free
31.1034 -#define gaim_mime_document_parse purple_mime_document_parse
31.1035 -#define gaim_mime_document_parsen purple_mime_document_parsen
31.1036 -#define gaim_mime_document_write purple_mime_document_write
31.1037 -#define gaim_mime_document_get_fields purple_mime_document_get_fields
31.1038 -#define gaim_mime_document_get_field purple_mime_document_get_field
31.1039 -#define gaim_mime_document_set_field purple_mime_document_set_field
31.1040 -#define gaim_mime_document_get_parts purple_mime_document_get_parts
31.1041 -
31.1042 -#define gaim_mime_part_new purple_mime_part_new
31.1043 -#define gaim_mime_part_get_fields purple_mime_part_get_fields
31.1044 -#define gaim_mime_part_get_field purple_mime_part_get_field
31.1045 -#define gaim_mime_part_get_field_decoded purple_mime_part_get_field_decoded
31.1046 -#define gaim_mime_part_set_field purple_mime_part_set_field
31.1047 -#define gaim_mime_part_get_data purple_mime_part_get_data
31.1048 -#define gaim_mime_part_get_data_decoded purple_mime_part_get_data_decoded
31.1049 -#define gaim_mime_part_get_length purple_mime_part_get_length
31.1050 -#define gaim_mime_part_set_data purple_mime_part_set_data
31.1051 -
31.1052 -
31.1053 -/* from network.h */
31.1054 -
31.1055 -#define GaimNetworkListenData PurpleNetworkListenData
31.1056 -
31.1057 -#define GaimNetworkListenCallback PurpleNetworkListenCallback
31.1058 -
31.1059 -#define gaim_network_ip_atoi purple_network_ip_atoi
31.1060 -#define gaim_network_set_public_ip purple_network_set_public_ip
31.1061 -#define gaim_network_get_public_ip purple_network_get_public_ip
31.1062 -#define gaim_network_get_local_system_ip purple_network_get_local_system_ip
31.1063 -#define gaim_network_get_my_ip purple_network_get_my_ip
31.1064 -
31.1065 -#define gaim_network_listen purple_network_listen
31.1066 -#define gaim_network_listen_range purple_network_listen_range
31.1067 -#define gaim_network_listen_cancel purple_network_listen_cancel
31.1068 -#define gaim_network_get_port_from_fd purple_network_get_port_from_fd
31.1069 -
31.1070 -#define gaim_network_is_available purple_network_is_available
31.1071 -
31.1072 -#define gaim_network_init purple_network_init
31.1073 -#define gaim_network_uninit purple_network_uninit
31.1074 -
31.1075 -/* from notify.h */
31.1076 -
31.1077 -
31.1078 -#define GaimNotifyUserInfoEntry PurpleNotifyUserInfoEntry
31.1079 -#define GaimNotifyUserInfo PurpleNotifyUserInfo
31.1080 -
31.1081 -#define GaimNotifyCloseCallback PurpleNotifyCloseCallback
31.1082 -
31.1083 -#define GAIM_NOTIFY_MESSAGE PURPLE_NOTIFY_MESSAGE
31.1084 -#define GAIM_NOTIFY_EMAIL PURPLE_NOTIFY_EMAIL
31.1085 -#define GAIM_NOTIFY_EMAILS PURPLE_NOTIFY_EMAILS
31.1086 -#define GAIM_NOTIFY_FORMATTED PURPLE_NOTIFY_FORMATTED
31.1087 -#define GAIM_NOTIFY_SEARCHRESULTS PURPLE_NOTIFY_SEARCHRESULTS
31.1088 -#define GAIM_NOTIFY_USERINFO PURPLE_NOTIFY_USERINFO
31.1089 -#define GAIM_NOTIFY_URI PURPLE_NOTIFY_URI
31.1090 -
31.1091 -#define GaimNotifyType PurpleNotifyType
31.1092 -
31.1093 -#define GAIM_NOTIFY_MSG_ERROR PURPLE_NOTIFY_MSG_ERROR
31.1094 -#define GAIM_NOTIFY_MSG_WARNING PURPLE_NOTIFY_MSG_WARNING
31.1095 -#define GAIM_NOTIFY_MSG_INFO PURPLE_NOTIFY_MSG_INFO
31.1096 -
31.1097 -#define GaimNotifyMsgType PurpleNotifyMsgType
31.1098 -
31.1099 -#define GAIM_NOTIFY_BUTTON_LABELED PURPLE_NOTIFY_BUTTON_LABELED
31.1100 -#define GAIM_NOTIFY_BUTTON_CONTINUE PURPLE_NOTIFY_BUTTON_CONTINUE
31.1101 -#define GAIM_NOTIFY_BUTTON_ADD PURPLE_NOTIFY_BUTTON_ADD
31.1102 -#define GAIM_NOTIFY_BUTTON_INFO PURPLE_NOTIFY_BUTTON_INFO
31.1103 -#define GAIM_NOTIFY_BUTTON_IM PURPLE_NOTIFY_BUTTON_IM
31.1104 -#define GAIM_NOTIFY_BUTTON_JOIN PURPLE_NOTIFY_BUTTON_JOIN
31.1105 -#define GAIM_NOTIFY_BUTTON_INVITE PURPLE_NOTIFY_BUTTON_INVITE
31.1106 -
31.1107 -#define GaimNotifySearchButtonType PurpleNotifySearchButtonType
31.1108 -
31.1109 -#define GaimNotifySearchResults PurpleNotifySearchResults
31.1110 -
31.1111 -#define GAIM_NOTIFY_USER_INFO_ENTRY_PAIR PURPLE_NOTIFY_USER_INFO_ENTRY_PAIR
31.1112 -#define GAIM_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK
31.1113 -#define GAIM_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER
31.1114 -
31.1115 -#define GaimNotifyUserInfoEntryType PurpleNotifyUserInfoEntryType
31.1116 -
31.1117 -#define GaimNotifySearchColumn PurpleNotifySearchColumn
31.1118 -#define GaimNotifySearchResultsCallback PurpleNotifySearchResultsCallback
31.1119 -#define GaimNotifySearchButton PurpleNotifySearchButton
31.1120 -
31.1121 -#define GaimNotifyUiOps PurpleNotifyUiOps
31.1122 -
31.1123 -#define gaim_notify_searchresults purple_notify_searchresults
31.1124 -#define gaim_notify_searchresults_free purple_notify_searchresults_free
31.1125 -#define gaim_notify_searchresults_new_rows purple_notify_searchresults_new_rows
31.1126 -#define gaim_notify_searchresults_button_add purple_notify_searchresults_button_add
31.1127 -#define gaim_notify_searchresults_button_add_labeled purple_notify_searchresults_button_add_labeled
31.1128 -#define gaim_notify_searchresults_new purple_notify_searchresults_new
31.1129 -#define gaim_notify_searchresults_column_new purple_notify_searchresults_column_new
31.1130 -#define gaim_notify_searchresults_column_add purple_notify_searchresults_column_add
31.1131 -#define gaim_notify_searchresults_row_add purple_notify_searchresults_row_add
31.1132 -#define gaim_notify_searchresults_get_rows_count purple_notify_searchresults_get_rows_count
31.1133 -#define gaim_notify_searchresults_get_columns_count purple_notify_searchresults_get_columns_count
31.1134 -#define gaim_notify_searchresults_row_get purple_notify_searchresults_row_get
31.1135 -#define gaim_notify_searchresults_column_get_title purple_notify_searchresults_column_get_title
31.1136 -
31.1137 -#define gaim_notify_message purple_notify_message
31.1138 -#define gaim_notify_email purple_notify_email
31.1139 -#define gaim_notify_emails purple_notify_emails
31.1140 -#define gaim_notify_formatted purple_notify_formatted
31.1141 -#define gaim_notify_userinfo purple_notify_userinfo
31.1142 -
31.1143 -#define gaim_notify_user_info_new purple_notify_user_info_new
31.1144 -#define gaim_notify_user_info_destroy purple_notify_user_info_destroy
31.1145 -#define gaim_notify_user_info_get_entries purple_notify_user_info_get_entries
31.1146 -#define gaim_notify_user_info_get_text_with_newline purple_notify_user_info_get_text_with_newline
31.1147 -#define gaim_notify_user_info_add_pair purple_notify_user_info_add_pair
31.1148 -#define gaim_notify_user_info_prepend_pair purple_notify_user_info_prepend_pair
31.1149 -#define gaim_notify_user_info_remove_entry purple_notify_user_info_remove_entry
31.1150 -#define gaim_notify_user_info_entry_new purple_notify_user_info_entry_new
31.1151 -#define gaim_notify_user_info_add_section_break purple_notify_user_info_add_section_break
31.1152 -#define gaim_notify_user_info_add_section_header purple_notify_user_info_add_section_header
31.1153 -#define gaim_notify_user_info_remove_last_item purple_notify_user_info_remove_last_item
31.1154 -#define gaim_notify_user_info_entry_get_label purple_notify_user_info_entry_get_label
31.1155 -#define gaim_notify_user_info_entry_set_label purple_notify_user_info_entry_set_label
31.1156 -#define gaim_notify_user_info_entry_get_value purple_notify_user_info_entry_get_value
31.1157 -#define gaim_notify_user_info_entry_set_value purple_notify_user_info_entry_set_value
31.1158 -#define gaim_notify_user_info_entry_get_type purple_notify_user_info_entry_get_type
31.1159 -#define gaim_notify_user_info_entry_set_type purple_notify_user_info_entry_set_type
31.1160 -
31.1161 -#define gaim_notify_uri purple_notify_uri
31.1162 -#define gaim_notify_close purple_notify_close
31.1163 -#define gaim_notify_close_with_handle purple_notify_close_with_handle
31.1164 -
31.1165 -#define gaim_notify_info purple_notify_info
31.1166 -#define gaim_notify_warning purple_notify_warning
31.1167 -#define gaim_notify_error purple_notify_error
31.1168 -
31.1169 -#define gaim_notify_set_ui_ops purple_notify_set_ui_ops
31.1170 -#define gaim_notify_get_ui_ops purple_notify_get_ui_ops
31.1171 -
31.1172 -#define gaim_notify_get_handle purple_notify_get_handle
31.1173 -
31.1174 -#define gaim_notify_init purple_notify_init
31.1175 -#define gaim_notify_uninit purple_notify_uninit
31.1176 -
31.1177 -/* from ntlm.h */
31.1178 -
31.1179 -#define gaim_ntlm_gen_type1 purple_ntlm_gen_type1
31.1180 -#define gaim_ntlm_parse_type2 purple_ntlm_parse_type2
31.1181 -#define gaim_ntlm_gen_type3 purple_ntlm_gen_type3
31.1182 -
31.1183 -/* from plugin.h */
31.1184 -
31.1185 -#ifdef GAIM_PLUGINS
31.1186 -#ifndef PURPLE_PLUGINS
31.1187 -#define PURPLE_PLUGINS
31.1188 -#endif
31.1189 -#endif
31.1190 -
31.1191 -#define GaimPlugin PurplePlugin
31.1192 -#define GaimPluginInfo PurplePluginInfo
31.1193 -#define GaimPluginUiInfo PurplePluginUiInfo
31.1194 -#define GaimPluginLoaderInfo PurplePluginLoaderInfo
31.1195 -#define GaimPluginAction PurplePluginAction
31.1196 -#define GaimPluginPriority PurplePluginPriority
31.1197 -
31.1198 -#define GAIM_PLUGIN_UNKNOWN PURPLE_PLUGIN_UNKNOWN
31.1199 -#define GAIM_PLUGIN_STANDARD PURPLE_PLUGIN_STANDARD
31.1200 -#define GAIM_PLUGIN_LOADER PURPLE_PLUGIN_LOADER
31.1201 -#define GAIM_PLUGIN_PROTOCOL PURPLE_PLUGIN_PROTOCOL
31.1202 -
31.1203 -#define GaimPluginType PurplePluginType
31.1204 -
31.1205 -#define GAIM_PRIORITY_DEFAULT PURPLE_PRIORITY_DEFAULT
31.1206 -#define GAIM_PRIORITY_HIGHEST PURPLE_PRIORITY_HIGHEST
31.1207 -#define GAIM_PRIORITY_LOWEST PURPLE_PRIORITY_LOWEST
31.1208 -
31.1209 -#define GAIM_PLUGIN_FLAG_INVISIBLE PURPLE_PLUGIN_FLAG_INVISIBLE
31.1210 -
31.1211 -#define GAIM_PLUGIN_MAGIC PURPLE_PLUGIN_MAGIC
31.1212 -
31.1213 -#define GAIM_PLUGIN_LOADER_INFO PURPLE_PLUGIN_LOADER_INFO
31.1214 -#define GAIM_PLUGIN_HAS_PREF_FRAME PURPLE_PLUGIN_HAS_PREF_FRAME
31.1215 -#define GAIM_PLUGIN_UI_INFO PURPLE_PLUGIN_UI_INFO
31.1216 -
31.1217 -#define GAIM_PLUGIN_HAS_ACTIONS PURPLE_PLUGIN_HAS_ACTIONS
31.1218 -#define GAIM_PLUGIN_ACTIONS PURPLE_PLUGIN_ACTIONS
31.1219 -
31.1220 -#define GAIM_INIT_PLUGIN PURPLE_INIT_PLUGIN
31.1221 -
31.1222 -#define gaim_plugin_new purple_plugin_new
31.1223 -#define gaim_plugin_probe purple_plugin_probe
31.1224 -#define gaim_plugin_register purple_plugin_register
31.1225 -#define gaim_plugin_load purple_plugin_load
31.1226 -#define gaim_plugin_unload purple_plugin_unload
31.1227 -#define gaim_plugin_reload purple_plugin_reload
31.1228 -#define gaim_plugin_destroy purple_plugin_destroy
31.1229 -#define gaim_plugin_is_loaded purple_plugin_is_loaded
31.1230 -#define gaim_plugin_is_unloadable purple_plugin_is_unloadable
31.1231 -#define gaim_plugin_get_id purple_plugin_get_id
31.1232 -#define gaim_plugin_get_name purple_plugin_get_name
31.1233 -#define gaim_plugin_get_version purple_plugin_get_version
31.1234 -#define gaim_plugin_get_summary purple_plugin_get_summary
31.1235 -#define gaim_plugin_get_description purple_plugin_get_description
31.1236 -#define gaim_plugin_get_author purple_plugin_get_author
31.1237 -#define gaim_plugin_get_homepage purple_plugin_get_homepage
31.1238 -
31.1239 -#define gaim_plugin_ipc_register purple_plugin_ipc_register
31.1240 -#define gaim_plugin_ipc_unregister purple_plugin_ipc_unregister
31.1241 -#define gaim_plugin_ipc_unregister_all purple_plugin_ipc_unregister_all
31.1242 -#define gaim_plugin_ipc_get_params purple_plugin_ipc_get_params
31.1243 -#define gaim_plugin_ipc_call purple_plugin_ipc_call
31.1244 -
31.1245 -#define gaim_plugins_add_search_path purple_plugins_add_search_path
31.1246 -#define gaim_plugins_unload_all purple_plugins_unload_all
31.1247 -#define gaim_plugins_destroy_all purple_plugins_destroy_all
31.1248 -#define gaim_plugins_save_loaded purple_plugins_save_loaded
31.1249 -#define gaim_plugins_load_saved purple_plugins_load_saved
31.1250 -#define gaim_plugins_probe purple_plugins_probe
31.1251 -#define gaim_plugins_enabled purple_plugins_enabled
31.1252 -
31.1253 -#define gaim_plugins_register_probe_notify_cb purple_plugins_register_probe_notify_cb
31.1254 -#define gaim_plugins_unregister_probe_notify_cb purple_plugins_unregister_probe_notify_cb
31.1255 -#define gaim_plugins_register_load_notify_cb purple_plugins_register_load_notify_cb
31.1256 -#define gaim_plugins_unregister_load_notify_cb purple_plugins_unregister_load_notify_cb
31.1257 -#define gaim_plugins_register_unload_notify_cb purple_plugins_register_unload_notify_cb
31.1258 -#define gaim_plugins_unregister_unload_notify_cb purple_plugins_unregister_unload_notify_cb
31.1259 -
31.1260 -#define gaim_plugins_find_with_name purple_plugins_find_with_name
31.1261 -#define gaim_plugins_find_with_filename purple_plugins_find_with_filename
31.1262 -#define gaim_plugins_find_with_basename purple_plugins_find_with_basename
31.1263 -#define gaim_plugins_find_with_id purple_plugins_find_with_id
31.1264 -
31.1265 -#define gaim_plugins_get_loaded purple_plugins_get_loaded
31.1266 -#define gaim_plugins_get_protocols purple_plugins_get_protocols
31.1267 -#define gaim_plugins_get_all purple_plugins_get_all
31.1268 -
31.1269 -#define gaim_plugins_get_handle purple_plugins_get_handle
31.1270 -#define gaim_plugins_init purple_plugins_init
31.1271 -#define gaim_plugins_uninit purple_plugins_uninit
31.1272 -
31.1273 -#define gaim_plugin_action_new purple_plugin_action_new
31.1274 -#define gaim_plugin_action_free purple_plugin_action_free
31.1275 -
31.1276 -/* pluginpref.h */
31.1277 -
31.1278 -#define GaimPluginPrefFrame PurplePluginPrefFrame
31.1279 -#define GaimPluginPref PurplePluginPref
31.1280 -
31.1281 -#define GAIM_STRING_FORMAT_TYPE_NONE PURPLE_STRING_FORMAT_TYPE_NONE
31.1282 -#define GAIM_STRING_FORMAT_TYPE_MULTILINE PURPLE_STRING_FORMAT_TYPE_MULTILINE
31.1283 -#define GAIM_STRING_FORMAT_TYPE_HTML PURPLE_STRING_FORMAT_TYPE_HTML
31.1284 -
31.1285 -#define GaimStringFormatType PurpleStringFormatType
31.1286 -
31.1287 -#define GAIM_PLUGIN_PREF_NONE PURPLE_PLUGIN_PREF_NONE
31.1288 -#define GAIM_PLUGIN_PREF_CHOICE PURPLE_PLUGIN_PREF_CHOICE
31.1289 -#define GAIM_PLUGIN_PREF_INFO PURPLE_PLUGIN_PREF_INFO
31.1290 -#define GAIM_PLUGIN_PREF_STRING_FORMAT PURPLE_PLUGIN_PREF_STRING_FORMAT
31.1291 -
31.1292 -#define GaimPluginPrefType PurplePluginPrefType
31.1293 -
31.1294 -#define gaim_plugin_pref_frame_new purple_plugin_pref_frame_new
31.1295 -#define gaim_plugin_pref_frame_destroy purple_plugin_pref_frame_destroy
31.1296 -#define gaim_plugin_pref_frame_add purple_plugin_pref_frame_add
31.1297 -#define gaim_plugin_pref_frame_get_prefs purple_plugin_pref_frame_get_prefs
31.1298 -
31.1299 -#define gaim_plugin_pref_new purple_plugin_pref_new
31.1300 -#define gaim_plugin_pref_new_with_name purple_plugin_pref_new_with_name
31.1301 -#define gaim_plugin_pref_new_with_label purple_plugin_pref_new_with_label
31.1302 -#define gaim_plugin_pref_new_with_name_and_label purple_plugin_pref_new_with_name_and_label
31.1303 -#define gaim_plugin_pref_destroy purple_plugin_pref_destroy
31.1304 -#define gaim_plugin_pref_set_name purple_plugin_pref_set_name
31.1305 -#define gaim_plugin_pref_get_name purple_plugin_pref_get_name
31.1306 -#define gaim_plugin_pref_set_label purple_plugin_pref_set_label
31.1307 -#define gaim_plugin_pref_get_label purple_plugin_pref_get_label
31.1308 -#define gaim_plugin_pref_set_bounds purple_plugin_pref_set_bounds
31.1309 -#define gaim_plugin_pref_get_bounds purple_plugin_pref_get_bounds
31.1310 -#define gaim_plugin_pref_set_type purple_plugin_pref_set_type
31.1311 -#define gaim_plugin_pref_get_type purple_plugin_pref_get_type
31.1312 -#define gaim_plugin_pref_add_choice purple_plugin_pref_add_choice
31.1313 -#define gaim_plugin_pref_get_choices purple_plugin_pref_get_choices
31.1314 -#define gaim_plugin_pref_set_max_length purple_plugin_pref_set_max_length
31.1315 -#define gaim_plugin_pref_get_max_length purple_plugin_pref_get_max_length
31.1316 -#define gaim_plugin_pref_set_masked purple_plugin_pref_set_masked
31.1317 -#define gaim_plugin_pref_get_masked purple_plugin_pref_get_masked
31.1318 -#define gaim_plugin_pref_set_format_type purple_plugin_pref_set_format_type
31.1319 -#define gaim_plugin_pref_get_format_type purple_plugin_pref_get_format_type
31.1320 -
31.1321 -/* from pounce.h */
31.1322 -
31.1323 -#define GaimPounce PurplePounce
31.1324 -
31.1325 -#define GAIM_POUNCE_NONE PURPLE_POUNCE_NONE
31.1326 -#define GAIM_POUNCE_SIGNON PURPLE_POUNCE_SIGNON
31.1327 -#define GAIM_POUNCE_SIGNOFF PURPLE_POUNCE_SIGNOFF
31.1328 -#define GAIM_POUNCE_AWAY PURPLE_POUNCE_AWAY
31.1329 -#define GAIM_POUNCE_AWAY_RETURN PURPLE_POUNCE_AWAY_RETURN
31.1330 -#define GAIM_POUNCE_IDLE PURPLE_POUNCE_IDLE
31.1331 -#define GAIM_POUNCE_IDLE_RETURN PURPLE_POUNCE_IDLE_RETURN
31.1332 -#define GAIM_POUNCE_TYPING PURPLE_POUNCE_TYPING
31.1333 -#define GAIM_POUNCE_TYPED PURPLE_POUNCE_TYPED
31.1334 -#define GAIM_POUNCE_TYPING_STOPPED PURPLE_POUNCE_TYPING_STOPPED
31.1335 -#define GAIM_POUNCE_MESSAGE_RECEIVED PURPLE_POUNCE_MESSAGE_RECEIVED
31.1336 -#define GaimPounceEvent PurplePounceEvent
31.1337 -
31.1338 -#define GAIM_POUNCE_OPTION_NONE PURPLE_POUNCE_OPTION_NONE
31.1339 -#define GAIM_POUNCE_OPTION_AWAY PURPLE_POUNCE_OPTION_AWAY
31.1340 -#define GaimPounceOption PurplePounceOption
31.1341 -
31.1342 -#define GaimPounceCb PurplePounceCb
31.1343 -
31.1344 -#define gaim_pounce_new purple_pounce_new
31.1345 -#define gaim_pounce_destroy purple_pounce_destroy
31.1346 -#define gaim_pounce_destroy_all_by_account purple_pounce_destroy_all_by_account
31.1347 -#define gaim_pounce_set_events purple_pounce_set_events
31.1348 -#define gaim_pounce_set_options purple_pounce_set_options
31.1349 -#define gaim_pounce_set_pouncer purple_pounce_set_pouncer
31.1350 -#define gaim_pounce_set_pouncee purple_pounce_set_pouncee
31.1351 -#define gaim_pounce_set_save purple_pounce_set_save
31.1352 -#define gaim_pounce_action_register purple_pounce_action_register
31.1353 -#define gaim_pounce_action_set_enabled purple_pounce_action_set_enabled
31.1354 -#define gaim_pounce_action_set_attribute purple_pounce_action_set_attribute
31.1355 -#define gaim_pounce_set_data purple_pounce_set_data
31.1356 -#define gaim_pounce_get_events purple_pounce_get_events
31.1357 -#define gaim_pounce_get_options purple_pounce_get_options
31.1358 -#define gaim_pounce_get_pouncer purple_pounce_get_pouncer
31.1359 -#define gaim_pounce_get_pouncee purple_pounce_get_pouncee
31.1360 -#define gaim_pounce_get_save purple_pounce_get_save
31.1361 -#define gaim_pounce_action_is_enabled purple_pounce_action_is_enabled
31.1362 -#define gaim_pounce_action_get_attribute purple_pounce_action_get_attribute
31.1363 -#define gaim_pounce_get_data purple_pounce_get_data
31.1364 -#define gaim_pounce_execute purple_pounce_execute
31.1365 -
31.1366 -#define gaim_find_pounce purple_find_pounce
31.1367 -#define gaim_pounces_load purple_pounces_load
31.1368 -#define gaim_pounces_register_handler purple_pounces_register_handler
31.1369 -#define gaim_pounces_unregister_handler purple_pounces_unregister_handler
31.1370 -#define gaim_pounces_get_all purple_pounces_get_all
31.1371 -#define gaim_pounces_get_handle purple_pounces_get_handle
31.1372 -#define gaim_pounces_init purple_pounces_init
31.1373 -#define gaim_pounces_uninit purple_pounces_uninit
31.1374 -
31.1375 -/* from prefs.h */
31.1376 -
31.1377 -
31.1378 -#define GAIM_PREF_NONE PURPLE_PREF_NONE
31.1379 -#define GAIM_PREF_BOOLEAN PURPLE_PREF_BOOLEAN
31.1380 -#define GAIM_PREF_INT PURPLE_PREF_INT
31.1381 -#define GAIM_PREF_STRING PURPLE_PREF_STRING
31.1382 -#define GAIM_PREF_STRING_LIST PURPLE_PREF_STRING_LIST
31.1383 -#define GAIM_PREF_PATH PURPLE_PREF_PATH
31.1384 -#define GAIM_PREF_PATH_LIST PURPLE_PREF_PATH_LIST
31.1385 -#define GaimPrefType PurplePrefType
31.1386 -
31.1387 -#define GaimPrefCallback PurplePrefCallback
31.1388 -
31.1389 -#define gaim_prefs_get_handle purple_prefs_get_handle
31.1390 -#define gaim_prefs_init purple_prefs_init
31.1391 -#define gaim_prefs_uninit purple_prefs_uninit
31.1392 -#define gaim_prefs_add_none purple_prefs_add_none
31.1393 -#define gaim_prefs_add_bool purple_prefs_add_bool
31.1394 -#define gaim_prefs_add_int purple_prefs_add_int
31.1395 -#define gaim_prefs_add_string purple_prefs_add_string
31.1396 -#define gaim_prefs_add_string_list purple_prefs_add_string_list
31.1397 -#define gaim_prefs_add_path purple_prefs_add_path
31.1398 -#define gaim_prefs_add_path_list purple_prefs_add_path_list
31.1399 -#define gaim_prefs_remove purple_prefs_remove
31.1400 -#define gaim_prefs_rename purple_prefs_rename
31.1401 -#define gaim_prefs_rename_boolean_toggle purple_prefs_rename_boolean_toggle
31.1402 -#define gaim_prefs_destroy purple_prefs_destroy
31.1403 -#define gaim_prefs_set_generic purple_prefs_set_generic
31.1404 -#define gaim_prefs_set_bool purple_prefs_set_bool
31.1405 -#define gaim_prefs_set_int purple_prefs_set_int
31.1406 -#define gaim_prefs_set_string purple_prefs_set_string
31.1407 -#define gaim_prefs_set_string_list purple_prefs_set_string_list
31.1408 -#define gaim_prefs_set_path purple_prefs_set_path
31.1409 -#define gaim_prefs_set_path_list purple_prefs_set_path_list
31.1410 -#define gaim_prefs_exists purple_prefs_exists
31.1411 -#define gaim_prefs_get_type purple_prefs_get_type
31.1412 -#define gaim_prefs_get_bool purple_prefs_get_bool
31.1413 -#define gaim_prefs_get_int purple_prefs_get_int
31.1414 -#define gaim_prefs_get_string purple_prefs_get_string
31.1415 -#define gaim_prefs_get_string_list purple_prefs_get_string_list
31.1416 -#define gaim_prefs_get_path purple_prefs_get_path
31.1417 -#define gaim_prefs_get_path_list purple_prefs_get_path_list
31.1418 -#define gaim_prefs_connect_callback purple_prefs_connect_callback
31.1419 -#define gaim_prefs_disconnect_callback purple_prefs_disconnect_callback
31.1420 -#define gaim_prefs_disconnect_by_handle purple_prefs_disconnect_by_handle
31.1421 -#define gaim_prefs_trigger_callback purple_prefs_trigger_callback
31.1422 -#define gaim_prefs_load purple_prefs_load
31.1423 -#define gaim_prefs_update_old purple_prefs_update_old
31.1424 -
31.1425 -/* from privacy.h */
31.1426 -
31.1427 -#define GAIM_PRIVACY_ALLOW_ALL PURPLE_PRIVACY_ALLOW_ALL
31.1428 -#define GAIM_PRIVACY_DENY_ALL PURPLE_PRIVACY_DENY_ALL
31.1429 -#define GAIM_PRIVACY_ALLOW_USERS PURPLE_PRIVACY_ALLOW_USERS
31.1430 -#define GAIM_PRIVACY_DENY_USERS PURPLE_PRIVACY_DENY_USERS
31.1431 -#define GAIM_PRIVACY_ALLOW_BUDDYLIST PURPLE_PRIVACY_ALLOW_BUDDYLIST
31.1432 -#define GaimPrivacyType PurplePrivacyType
31.1433 -
31.1434 -#define GaimPrivacyUiOps PurplePrivacyUiOps
31.1435 -
31.1436 -#define gaim_privacy_permit_add purple_privacy_permit_add
31.1437 -#define gaim_privacy_permit_remove purple_privacy_permit_remove
31.1438 -#define gaim_privacy_deny_add purple_privacy_deny_add
31.1439 -#define gaim_privacy_deny_remove purple_privacy_deny_remove
31.1440 -#define gaim_privacy_allow purple_privacy_allow
31.1441 -#define gaim_privacy_deny purple_privacy_deny
31.1442 -#define gaim_privacy_check purple_privacy_check
31.1443 -#define gaim_privacy_set_ui_ops purple_privacy_set_ui_ops
31.1444 -#define gaim_privacy_get_ui_ops purple_privacy_get_ui_ops
31.1445 -#define gaim_privacy_init purple_privacy_init
31.1446 -
31.1447 -/* from proxy.h */
31.1448 -
31.1449 -#define GAIM_PROXY_USE_GLOBAL PURPLE_PROXY_USE_GLOBAL
31.1450 -#define GAIM_PROXY_NONE PURPLE_PROXY_NONE
31.1451 -#define GAIM_PROXY_HTTP PURPLE_PROXY_HTTP
31.1452 -#define GAIM_PROXY_SOCKS4 PURPLE_PROXY_SOCKS4
31.1453 -#define GAIM_PROXY_SOCKS5 PURPLE_PROXY_SOCKS5
31.1454 -#define GAIM_PROXY_USE_ENVVAR PURPLE_PROXY_USE_ENVVAR
31.1455 -#define GaimProxyType PurpleProxyType
31.1456 -
31.1457 -#define GaimProxyInfo PurpleProxyInfo
31.1458 -
31.1459 -#define GaimProxyConnectData PurpleProxyConnectData
31.1460 -#define GaimProxyConnectFunction PurpleProxyConnectFunction
31.1461 -
31.1462 -#define gaim_proxy_info_new purple_proxy_info_new
31.1463 -#define gaim_proxy_info_destroy purple_proxy_info_destroy
31.1464 -#define gaim_proxy_info_set_type purple_proxy_info_set_type
31.1465 -#define gaim_proxy_info_set_host purple_proxy_info_set_host
31.1466 -#define gaim_proxy_info_set_port purple_proxy_info_set_port
31.1467 -#define gaim_proxy_info_set_username purple_proxy_info_set_username
31.1468 -#define gaim_proxy_info_set_password purple_proxy_info_set_password
31.1469 -#define gaim_proxy_info_get_type purple_proxy_info_get_type
31.1470 -#define gaim_proxy_info_get_host purple_proxy_info_get_host
31.1471 -#define gaim_proxy_info_get_port purple_proxy_info_get_port
31.1472 -#define gaim_proxy_info_get_username purple_proxy_info_get_username
31.1473 -#define gaim_proxy_info_get_password purple_proxy_info_get_password
31.1474 -
31.1475 -#define gaim_global_proxy_get_info purple_global_proxy_get_info
31.1476 -#define gaim_proxy_get_handle purple_proxy_get_handle
31.1477 -#define gaim_proxy_init purple_proxy_init
31.1478 -#define gaim_proxy_uninit purple_proxy_uninit
31.1479 -#define gaim_proxy_get_setup purple_proxy_get_setup
31.1480 -
31.1481 -#define gaim_proxy_connect purple_proxy_connect
31.1482 -#define gaim_proxy_connect_socks5 purple_proxy_connect_socks5
31.1483 -#define gaim_proxy_connect_cancel purple_proxy_connect_cancel
31.1484 -#define gaim_proxy_connect_cancel_with_handle purple_proxy_connect_cancel_with_handle
31.1485 -
31.1486 -/* from prpl.h */
31.1487 -
31.1488 -#define GaimPluginProtocolInfo PurplePluginProtocolInfo
31.1489 -
31.1490 -#define GAIM_ICON_SCALE_DISPLAY PURPLE_ICON_SCALE_DISPLAY
31.1491 -#define GAIM_ICON_SCALE_SEND PURPLE_ICON_SCALE_SEND
31.1492 -#define GaimIconScaleRules PurpleIconScaleRules
31.1493 -
31.1494 -#define GaimBuddyIconSpec PurpleBuddyIconSpec
31.1495 -
31.1496 -#define GaimProtocolOptions PurpleProtocolOptions
31.1497 -
31.1498 -#define GAIM_IS_PROTOCOL_PLUGIN PURPLE_IS_PROTOCOL_PLUGIN
31.1499 -
31.1500 -#define GAIM_PLUGIN_PROTOCOL_INFO PURPLE_PLUGIN_PROTOCOL_INFO
31.1501 -
31.1502 -#define gaim_prpl_got_account_idle purple_prpl_got_account_idle
31.1503 -#define gaim_prpl_got_account_login_time purple_prpl_got_account_login_time
31.1504 -#define gaim_prpl_got_account_status purple_prpl_got_account_status
31.1505 -#define gaim_prpl_got_user_idle purple_prpl_got_user_idle
31.1506 -#define gaim_prpl_got_user_login_time purple_prpl_got_user_login_time
31.1507 -#define gaim_prpl_got_user_status purple_prpl_got_user_status
31.1508 -#define gaim_prpl_change_account_status purple_prpl_change_account_status
31.1509 -#define gaim_prpl_get_statuses purple_prpl_get_statuses
31.1510 -
31.1511 -#define gaim_find_prpl purple_find_prpl
31.1512 -
31.1513 -/* from request.h */
31.1514 -
31.1515 -#define GAIM_DEFAULT_ACTION_NONE PURPLE_DEFAULT_ACTION_NONE
31.1516 -
31.1517 -#define GAIM_REQUEST_INPUT PURPLE_REQUEST_INPUT
31.1518 -#define GAIM_REQUEST_CHOICE PURPLE_REQUEST_CHOICE
31.1519 -#define GAIM_REQUEST_ACTION PURPLE_REQUEST_ACTION
31.1520 -#define GAIM_REQUEST_FIELDS PURPLE_REQUEST_FIELDS
31.1521 -#define GAIM_REQUEST_FILE PURPLE_REQUEST_FILE
31.1522 -#define GAIM_REQUEST_FOLDER PURPLE_REQUEST_FOLDER
31.1523 -#define GaimRequestType PurpleRequestType
31.1524 -
31.1525 -#define GAIM_REQUEST_FIELD_NONE PURPLE_REQUEST_FIELD_NONE
31.1526 -#define GAIM_REQUEST_FIELD_STRING PURPLE_REQUEST_FIELD_STRING
31.1527 -#define GAIM_REQUEST_FIELD_INTEGER PURPLE_REQUEST_FIELD_INTEGER
31.1528 -#define GAIM_REQUEST_FIELD_BOOLEAN PURPLE_REQUEST_FIELD_BOOLEAN
31.1529 -#define GAIM_REQUEST_FIELD_CHOICE PURPLE_REQUEST_FIELD_CHOICE
31.1530 -#define GAIM_REQUEST_FIELD_LIST PURPLE_REQUEST_FIELD_LIST
31.1531 -#define GAIM_REQUEST_FIELD_LABEL PURPLE_REQUEST_FIELD_LABEL
31.1532 -#define GAIM_REQUEST_FIELD_IMAGE PURPLE_REQUEST_FIELD_IMAGE
31.1533 -#define GAIM_REQUEST_FIELD_ACCOUNT PURPLE_REQUEST_FIELD_ACCOUNT
31.1534 -#define GaimRequestFieldType PurpleRequestFieldType
31.1535 -
31.1536 -#define GaimRequestFields PurpleRequestFields
31.1537 -
31.1538 -#define GaimRequestFieldGroup PurpleRequestFieldGroup
31.1539 -
31.1540 -#define GaimRequestField PurpleRequestField
31.1541 -
31.1542 -#define GaimRequestUiOps PurpleRequestUiOps
31.1543 -
31.1544 -#define GaimRequestInputCb PurpleRequestInputCb
31.1545 -#define GaimRequestActionCb PurpleRequestActionCb
31.1546 -#define GaimRequestChoiceCb PurpleRequestChoiceCb
31.1547 -#define GaimRequestFieldsCb PurpleRequestFieldsCb
31.1548 -#define GaimRequestFileCb PurpleRequestFileCb
31.1549 -
31.1550 -#define gaim_request_fields_new purple_request_fields_new
31.1551 -#define gaim_request_fields_destroy purple_request_fields_destroy
31.1552 -#define gaim_request_fields_add_group purple_request_fields_add_group
31.1553 -#define gaim_request_fields_get_groups purple_request_fields_get_groups
31.1554 -#define gaim_request_fields_exists purple_request_fields_exists
31.1555 -#define gaim_request_fields_get_required purple_request_fields_get_required
31.1556 -#define gaim_request_fields_is_field_required purple_request_fields_is_field_required
31.1557 -#define gaim_request_fields_all_required_filled purple_request_fields_all_required_filled
31.1558 -#define gaim_request_fields_get_field purple_request_fields_get_field
31.1559 -#define gaim_request_fields_get_string purple_request_fields_get_string
31.1560 -#define gaim_request_fields_get_integer purple_request_fields_get_integer
31.1561 -#define gaim_request_fields_get_bool purple_request_fields_get_bool
31.1562 -#define gaim_request_fields_get_choice purple_request_fields_get_choice
31.1563 -#define gaim_request_fields_get_account purple_request_fields_get_account
31.1564 -
31.1565 -#define gaim_request_field_group_new purple_request_field_group_new
31.1566 -#define gaim_request_field_group_destroy purple_request_field_group_destroy
31.1567 -#define gaim_request_field_group_add_field purple_request_field_group_add_field
31.1568 -#define gaim_request_field_group_get_title purple_request_field_group_get_title
31.1569 -#define gaim_request_field_group_get_fields purple_request_field_group_get_fields
31.1570 -
31.1571 -#define gaim_request_field_new purple_request_field_new
31.1572 -#define gaim_request_field_destroy purple_request_field_destroy
31.1573 -#define gaim_request_field_set_label purple_request_field_set_label
31.1574 -#define gaim_request_field_set_visible purple_request_field_set_visible
31.1575 -#define gaim_request_field_set_type_hint purple_request_field_set_type_hint
31.1576 -#define gaim_request_field_set_required purple_request_field_set_required
31.1577 -#define gaim_request_field_get_type purple_request_field_get_type
31.1578 -#define gaim_request_field_get_id purple_request_field_get_id
31.1579 -#define gaim_request_field_get_label purple_request_field_get_label
31.1580 -#define gaim_request_field_is_visible purple_request_field_is_visible
31.1581 -#define gaim_request_field_get_type_hint purple_request_field_get_type_hint
31.1582 -#define gaim_request_field_is_required purple_request_field_is_required
31.1583 -
31.1584 -#define gaim_request_field_string_new purple_request_field_string_new
31.1585 -#define gaim_request_field_string_set_default_value \
31.1586 - purple_request_field_string_set_default_value
31.1587 -#define gaim_request_field_string_set_value purple_request_field_string_set_value
31.1588 -#define gaim_request_field_string_set_masked purple_request_field_string_set_masked
31.1589 -#define gaim_request_field_string_set_editable purple_request_field_string_set_editable
31.1590 -#define gaim_request_field_string_get_default_value \
31.1591 - purple_request_field_string_get_default_value
31.1592 -#define gaim_request_field_string_get_value purple_request_field_string_get_value
31.1593 -#define gaim_request_field_string_is_multiline purple_request_field_string_is_multiline
31.1594 -#define gaim_request_field_string_is_masked purple_request_field_string_is_masked
31.1595 -#define gaim_request_field_string_is_editable purple_request_field_string_is_editable
31.1596 -
31.1597 -#define gaim_request_field_int_new purple_request_field_int_new
31.1598 -#define gaim_request_field_int_set_default_value \
31.1599 - purple_request_field_int_set_default_value
31.1600 -#define gaim_request_field_int_set_value purple_request_field_int_set_value
31.1601 -#define gaim_request_field_int_get_default_value \
31.1602 - purple_request_field_int_get_default_value
31.1603 -#define gaim_request_field_int_get_value purple_request_field_int_get_value
31.1604 -
31.1605 -#define gaim_request_field_bool_new purple_request_field_bool_new
31.1606 -#define gaim_request_field_bool_set_default_value \
31.1607 - purple_request_field_book_set_default_value
31.1608 -#define gaim_request_field_bool_set_value purple_request_field_bool_set_value
31.1609 -#define gaim_request_field_bool_get_default_value \
31.1610 - purple_request_field_bool_get_default_value
31.1611 -#define gaim_request_field_bool_get_value purple_request_field_bool_get_value
31.1612 -
31.1613 -#define gaim_request_field_choice_new purple_request_field_choice_new
31.1614 -#define gaim_request_field_choice_add purple_request_field_choice_add
31.1615 -#define gaim_request_field_choice_set_default_value \
31.1616 - purple_request_field_choice_set_default_value
31.1617 -#define gaim_request_field_choice_set_value purple_request_field_choice_set_value
31.1618 -#define gaim_request_field_choice_get_default_value \
31.1619 - purple_request_field_choice_get_default_value
31.1620 -#define gaim_request_field_choice_get_value purple_request_field_choice_get_value
31.1621 -#define gaim_request_field_choice_get_labels purple_request_field_choice_get_labels
31.1622 -
31.1623 -#define gaim_request_field_list_new purple_request_field_list_new
31.1624 -#define gaim_request_field_list_set_multi_select purple_request_field_list_set_multi_select
31.1625 -#define gaim_request_field_list_get_multi_select purple_request_field_list_get_multi_select
31.1626 -#define gaim_request_field_list_get_data purple_request_field_list_get_data
31.1627 -#define gaim_request_field_list_add purple_request_field_list_add
31.1628 -#define gaim_request_field_list_add_selected purple_request_field_list_add_selected
31.1629 -#define gaim_request_field_list_clear_selected purple_request_field_list_clear_selected
31.1630 -#define gaim_request_field_list_set_selected purple_request_field_list_set_selected
31.1631 -#define gaim_request_field_list_is_selected purple_request_field_list_is_selected
31.1632 -#define gaim_request_field_list_get_selected purple_request_field_list_get_selected
31.1633 -#define gaim_request_field_list_get_items purple_request_field_list_get_items
31.1634 -
31.1635 -#define gaim_request_field_label_new purple_request_field_label_new
31.1636 -
31.1637 -#define gaim_request_field_image_new purple_request_field_image_new
31.1638 -#define gaim_request_field_image_set_scale purple_request_field_image_set_scale
31.1639 -#define gaim_request_field_image_get_buffer purple_request_field_image_get_buffer
31.1640 -#define gaim_request_field_image_get_size purple_request_field_image_get_size
31.1641 -#define gaim_request_field_image_get_scale_x purple_request_field_image_get_scale_x
31.1642 -#define gaim_request_field_image_get_scale_y purple_request_field_image_get_scale_y
31.1643 -
31.1644 -#define gaim_request_field_account_new purple_request_field_account_new
31.1645 -#define gaim_request_field_account_set_default_value purple_request_field_account_set_default_value
31.1646 -#define gaim_request_field_account_set_value purple_request_field_account_set_value
31.1647 -#define gaim_request_field_account_set_show_all purple_request_field_account_set_show_all
31.1648 -#define gaim_request_field_account_set_filter purple_request_field_account_set_filter
31.1649 -#define gaim_request_field_account_get_default_value purple_request_field_account_get_default_value
31.1650 -#define gaim_request_field_account_get_value purple_request_field_account_get_value
31.1651 -#define gaim_request_field_account_get_show_all purple_request_field_account_get_show_all
31.1652 -#define gaim_request_field_account_get_filter purple_request_field_account_get_filter
31.1653 -
31.1654 -#define gaim_request_input purple_request_input
31.1655 -#define gaim_request_choice purple_request_choice
31.1656 -#define gaim_request_choice_varg purple_request_choice_varg
31.1657 -#define gaim_request_action purple_request_action
31.1658 -#define gaim_request_action_varg purple_request_action_varg
31.1659 -#define gaim_request_fields(handle, title, primary, secondary, fields, ok_text, ok_cb, cancel_text, cancel_cb, user_data) purple_request_fields(handle, title, primary, secondary, fields, ok_text, ok_cb, cancel_text, cancel_cb, NULL, NULL, NULL, user_data)
31.1660 -#define gaim_request_close purple_request_close
31.1661 -#define gaim_request_close_with_handle purple_request_close_with_handle
31.1662 -
31.1663 -#define gaim_request_yes_no purple_request_yes_no
31.1664 -#define gaim_request_ok_cancel purple_request_ok_cancel
31.1665 -#define gaim_request_accept_cancel purple_request_accept_cancel
31.1666 -
31.1667 -#define gaim_request_file purple_request_file
31.1668 -#define gaim_request_folder purple_request_folder
31.1669 -
31.1670 -#define gaim_request_set_ui_ops purple_request_set_ui_ops
31.1671 -#define gaim_request_get_ui_ops purple_request_get_ui_ops
31.1672 -
31.1673 -/* from roomlist.h */
31.1674 -
31.1675 -#define GaimRoomlist PurpleRoomlist
31.1676 -#define GaimRoomlistRoom PurpleRoomlistRoom
31.1677 -#define GaimRoomlistField PurpleRoomlistField
31.1678 -#define GaimRoomlistUiOps PurpleRoomlistUiOps
31.1679 -
31.1680 -#define GAIM_ROOMLIST_ROOMTYPE_CATEGORY PURPLE_ROOMLIST_ROOMTYPE_CATEGORY
31.1681 -#define GAIM_ROOMLIST_ROOMTYPE_ROOM PURPLE_ROOMLIST_ROOMTYPE_ROOM
31.1682 -#define GaimRoomlistRoomType PurpleRoomlistRoomType
31.1683 -
31.1684 -#define GAIM_ROOMLIST_FIELD_BOOL PURPLE_ROOMLIST_BOOL
31.1685 -#define GAIM_ROOMLIST_FIELD_INT PURPLE_ROOMLIST_INT
31.1686 -#define GAIM_ROOMLIST_FIELD_STRING PURPLE_ROOMLIST_STRING
31.1687 -#define GaimRoomlistFieldType PurpleRoomlistFieldType
31.1688 -
31.1689 -#define gaim_roomlist_show_with_account purple_roomlist_show_with_account
31.1690 -#define gaim_roomlist_new purple_roomlist_new
31.1691 -#define gaim_roomlist_ref purple_roomlist_ref
31.1692 -#define gaim_roomlist_unref purple_roomlist_unref
31.1693 -#define gaim_roomlist_set_fields purple_roomlist_set_fields
31.1694 -#define gaim_roomlist_set_in_progress purple_roomlist_set_in_progress
31.1695 -#define gaim_roomlist_get_in_progress purple_roomlist_get_in_progress
31.1696 -#define gaim_roomlist_room_add purple_roomlist_room_add
31.1697 -
31.1698 -#define gaim_roomlist_get_list purple_roomlist_get_list
31.1699 -#define gaim_roomlist_cancel_get_list purple_roomlist_cancel_get_list
31.1700 -#define gaim_roomlist_expand_category purple_roomlist_expand_category
31.1701 -
31.1702 -#define gaim_roomlist_room_new purple_roomlist_room_new
31.1703 -#define gaim_roomlist_room_add_field purple_roomlist_room_add_field
31.1704 -#define gaim_roomlist_room_join purple_roomlist_room_join
31.1705 -#define gaim_roomlist_field_new purple_roomlist_field_new
31.1706 -
31.1707 -#define gaim_roomlist_set_ui_ops purple_roomlist_set_ui_ops
31.1708 -#define gaim_roomlist_get_ui_ops purple_roomlist_get_ui_ops
31.1709 -
31.1710 -/* from savedstatuses.h */
31.1711 -
31.1712 -#define GaimSavedStatus PurpleSavedStatus
31.1713 -#define GaimSavedStatusSub PurpleSavedStatusSub
31.1714 -
31.1715 -#define gaim_savedstatus_new purple_savedstatus_new
31.1716 -#define gaim_savedstatus_set_title purple_savedstatus_set_title
31.1717 -#define gaim_savedstatus_set_type purple_savedstatus_set_type
31.1718 -#define gaim_savedstatus_set_message purple_savedstatus_set_message
31.1719 -#define gaim_savedstatus_set_substatus purple_savedstatus_set_substatus
31.1720 -#define gaim_savedstatus_unset_substatus purple_savedstatus_unset_substatus
31.1721 -#define gaim_savedstatus_delete purple_savedstatus_delete
31.1722 -
31.1723 -#define gaim_savedstatuses_get_all purple_savedstatuses_get_all
31.1724 -#define gaim_savedstatuses_get_popular purple_savedstatuses_get_popular
31.1725 -#define gaim_savedstatus_get_current purple_savedstatus_get_current
31.1726 -#define gaim_savedstatus_get_default purple_savedstatus_get_default
31.1727 -#define gaim_savedstatus_get_idleaway purple_savedstatus_get_idleaway
31.1728 -#define gaim_savedstatus_is_idleaway purple_savedstatus_is_idleaway
31.1729 -#define gaim_savedstatus_set_idleaway purple_savedstatus_set_idleaway
31.1730 -#define gaim_savedstatus_get_startup purple_savedstatus_get_startup
31.1731 -#define gaim_savedstatus_find purple_savedstatus_find
31.1732 -#define gaim_savedstatus_find_by_creation_time purple_savedstatus_find_by_creation_time
31.1733 -#define gaim_savedstatus_find_transient_by_type_and_message \
31.1734 - purple_savedstatus_find_transient_by_type_and_message
31.1735 -
31.1736 -#define gaim_savedstatus_is_transient purple_savedstatus_is_transient
31.1737 -#define gaim_savedstatus_get_title purple_savedstatus_get_title
31.1738 -#define gaim_savedstatus_get_type purple_savedstatus_get_type
31.1739 -#define gaim_savedstatus_get_message purple_savedstatus_get_message
31.1740 -#define gaim_savedstatus_get_creation_time purple_savedstatus_get_creation_time
31.1741 -#define gaim_savedstatus_has_substatuses purple_savedstatus_has_substatuses
31.1742 -#define gaim_savedstatus_get_substatus purple_savedstatus_get_substatus
31.1743 -#define gaim_savedstatus_substatus_get_type purple_savedstatus_substatus_get_type
31.1744 -#define gaim_savedstatus_substatus_get_message purple_savedstatus_substatus_get_message
31.1745 -#define gaim_savedstatus_activate purple_savedstatus_activate
31.1746 -#define gaim_savedstatus_activate_for_account purple_savedstatus_activate_for_account
31.1747 -
31.1748 -#define gaim_savedstatuses_get_handle purple_savedstatuses_get_handle
31.1749 -#define gaim_savedstatuses_init purple_savedstatuses_init
31.1750 -#define gaim_savedstatuses_uninit purple_savedstatuses_uninit
31.1751 -
31.1752 -/* from signals.h */
31.1753 -
31.1754 -#define GAIM_CALLBACK PURPLE_CALLBACK
31.1755 -
31.1756 -#define GaimCallback PurpleCallback
31.1757 -#define GaimSignalMarshalFunc PurpleSignalMarshalFunc
31.1758 -
31.1759 -#define GAIM_SIGNAL_PRIORITY_DEFAULT PURPLE_SIGNAL_PRIORITY_DEFAULT
31.1760 -#define GAIM_SIGNAL_PRIORITY_HIGHEST PURPLE_SIGNAL_PRIORITY_HIGHEST
31.1761 -#define GAIM_SIGNAL_PRIORITY_LOWEST PURPLE_SIGNAL_PRIORITY_LOWEST
31.1762 -
31.1763 -#define gaim_signal_register purple_signal_register
31.1764 -#define gaim_signal_unregister purple_signal_unregister
31.1765 -
31.1766 -#define gaim_signals_unregister_by_instance purple_signals_unregister_by_instance
31.1767 -
31.1768 -#define gaim_signal_get_values purple_signal_get_values
31.1769 -#define gaim_signal_connect_priority purple_signal_connect_priority
31.1770 -#define gaim_signal_connect purple_signal_connect
31.1771 -#define gaim_signal_connect_priority_vargs purple_signal_connect_priority_vargs
31.1772 -#define gaim_signal_connect_vargs purple_signal_connect_vargs
31.1773 -#define gaim_signal_disconnect purple_signal_disconnect
31.1774 -
31.1775 -#define gaim_signals_disconnect_by_handle purple_signals_disconnect_by_handle
31.1776 -
31.1777 -#define gaim_signal_emit purple_signal_emit
31.1778 -#define gaim_signal_emit_vargs purple_signal_emit_vargs
31.1779 -#define gaim_signal_emit_return_1 purple_signal_emit_vargs
31.1780 -#define gaim_signal_emit_vargs_return_1 purple_signal_emit_vargs_return_1
31.1781 -
31.1782 -#define gaim_signals_init purple_signals_init
31.1783 -#define gaim_signals_uninit purple_signals_uninit
31.1784 -
31.1785 -#define gaim_marshal_VOID \
31.1786 - purple_marshal_VOID
31.1787 -#define gaim_marshal_VOID__INT \
31.1788 - purple_marshal_VOID__INT
31.1789 -#define gaim_marshal_VOID__INT_INT \
31.1790 - purple_marshal_VOID_INT_INT
31.1791 -#define gaim_marshal_VOID__POINTER \
31.1792 - purple_marshal_VOID__POINTER
31.1793 -#define gaim_marshal_VOID__POINTER_UINT \
31.1794 - purple_marshal_VOID__POINTER_UINT
31.1795 -#define gaim_marshal_VOID__POINTER_INT_INT \
31.1796 - purple_marshal_VOID__POINTER_INT_INT
31.1797 -#define gaim_marshal_VOID__POINTER_POINTER \
31.1798 - purple_marshal_VOID__POINTER_POINTER
31.1799 -#define gaim_marshal_VOID__POINTER_POINTER_UINT \
31.1800 - purple_marshal_VOID__POINTER_POINTER_UINT
31.1801 -#define gaim_marshal_VOID__POINTER_POINTER_UINT_UINT \
31.1802 - purple_marshal_VOID__POINTER_POINTER_UINT_UINT
31.1803 -#define gaim_marshal_VOID__POINTER_POINTER_POINTER \
31.1804 - purple_marshal_VOID__POINTER_POINTER_POINTER
31.1805 -#define gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER \
31.1806 - purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER
31.1807 -#define gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER_POINTER \
31.1808 - purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER_POINTER
31.1809 -#define gaim_marshal_VOID__POINTER_POINTER_POINTER_UINT \
31.1810 - purple_marshal_VOID__POINTER_POINTER_POINTER_UINT
31.1811 -#define gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER_UINT \
31.1812 - purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER_UINT
31.1813 -#define gaim_marshal_VOID__POINTER_POINTER_POINTER_UINT_UINT \
31.1814 - purple_marshal_VOID__POINTER_POINTER_POINTER_UINT_UINT
31.1815 -
31.1816 -#define gaim_marshal_INT__INT \
31.1817 - purple_marshal_INT__INT
31.1818 -#define gaim_marshal_INT__INT_INT \
31.1819 - purple_marshal_INT__INT_INT
31.1820 -#define gaim_marshal_INT__POINTER_POINTER_POINTER_POINTER_POINTER \
31.1821 - purple_marshal_INT__POINTER_POINTER_POINTER_POINTER_POINTER
31.1822 -
31.1823 -#define gaim_marshal_BOOLEAN__POINTER \
31.1824 - purple_marshal_BOOLEAN__POINTER
31.1825 -#define gaim_marshal_BOOLEAN__POINTER_POINTER \
31.1826 - purple_marshal_BOOLEAN__POINTER_POINTER
31.1827 -#define gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER \
31.1828 - purple_marshal_BOOLEAN__POINTER_POINTER_POINTER
31.1829 -#define gaim_marshal_BOOLEAN__POINTER_POINTER_UINT \
31.1830 - purple_marshal_BOOLEAN__POINTER_POINTER_UINT
31.1831 -#define gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER_UINT \
31.1832 - purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_UINT
31.1833 -#define gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER \
31.1834 - purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER
31.1835 -#define gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER \
31.1836 - purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER
31.1837 -
31.1838 -#define gaim_marshal_BOOLEAN__INT_POINTER \
31.1839 - purple_marshal_BOOLEAN__INT_POINTER
31.1840 -
31.1841 -#define gaim_marshal_POINTER__POINTER_INT \
31.1842 - purple_marshal_POINTER__POINTER_INT
31.1843 -#define gaim_marshal_POINTER__POINTER_INT64 \
31.1844 - purple_marshal_POINTER__POINTER_INT64
31.1845 -#define gaim_marshal_POINTER__POINTER_INT_BOOLEAN \
31.1846 - purple_marshal_POINTER__POINTER_INT_BOOLEAN
31.1847 -#define gaim_marshal_POINTER__POINTER_INT64_BOOLEAN \
31.1848 - purple_marshal_POINTER__POINTER_INT64_BOOLEAN
31.1849 -#define gaim_marshal_POINTER__POINTER_POINTER \
31.1850 - purple_marshal_POINTER__POINTER_POINTER
31.1851 -
31.1852 -/* from sound.h */
31.1853 -
31.1854 -#define GAIM_SOUND_BUDDY_ARRIVE PURPLE_SOUND_BUDDY_ARRIVE
31.1855 -#define GAIM_SOUND_BUDDY_LEAVE PURPLE_SOUND_BUDDY_LEAVE
31.1856 -#define GAIM_SOUND_RECEIVE PURPLE_SOUND_RECEIVE
31.1857 -#define GAIM_SOUND_FIRST_RECEIVE PURPLE_SOUND_FIRST_RECEIVE
31.1858 -#define GAIM_SOUND_SEND PURPLE_SOUND_SEND
31.1859 -#define GAIM_SOUND_CHAT_JOIN PURPLE_SOUND_CHAT_JOIN
31.1860 -#define GAIM_SOUND_CHAT_LEAVE PURPLE_SOUND_CHAT_LEAVE
31.1861 -#define GAIM_SOUND_CHAT_YOU_SAY PURPLE_SOUND_CHAT_YOU_SAY
31.1862 -#define GAIM_SOUND_CHAT_SAY PURPLE_SOUND_CHAT_SAY
31.1863 -#define GAIM_SOUND_POUNCE_DEFAULT PURPLE_SOUND_POUNCE_DEFAULT
31.1864 -#define GAIM_SOUND_CHAT_NICK PURPLE_SOUND_CHAT_NICK
31.1865 -#define GAIM_NUM_SOUNDS PURPLE_NUM_SOUNDS
31.1866 -#define GaimSoundEventID PurpleSoundEventID
31.1867 -
31.1868 -#define GaimSoundUiOps PurpleSoundUiOps
31.1869 -
31.1870 -#define gaim_sound_play_file purple_sound_play_file
31.1871 -#define gaim_sound_play_event purple_sound_play_event
31.1872 -#define gaim_sound_set_ui_ops purple_sound_set_ui_ops
31.1873 -#define gaim_sound_get_ui_ops purple_sound_get_ui_ops
31.1874 -#define gaim_sound_init purple_sound_init
31.1875 -#define gaim_sound_uninit purple_sound_uninit
31.1876 -
31.1877 -#define gaim_sounds_get_handle purple_sounds_get_handle
31.1878 -
31.1879 -/* from sslconn.h */
31.1880 -
31.1881 -#define GAIM_SSL_DEFAULT_PORT PURPLE_SSL_DEFAULT_PORT
31.1882 -
31.1883 -#define GAIM_SSL_HANDSHAKE_FAILED PURPLE_SSL_HANDSHAKE_FAILED
31.1884 -#define GAIM_SSL_CONNECT_FAILED PURPLE_SSL_CONNECT_FAILED
31.1885 -#define GaimSslErrorType PurpleSslErrorType
31.1886 -
31.1887 -#define GaimSslConnection PurpleSslConnection
31.1888 -
31.1889 -#define GaimSslInputFunction PurpleSslInputFunction
31.1890 -#define GaimSslErrorFunction PurpleSslErrorFunction
31.1891 -
31.1892 -#define GaimSslOps PurpleSslOps
31.1893 -
31.1894 -#define gaim_ssl_is_supported purple_ssl_is_supported
31.1895 -#define gaim_ssl_connect purple_ssl_connect
31.1896 -#define gaim_ssl_connect_fd purple_ssl_connect_fd
31.1897 -#define gaim_ssl_input_add purple_ssl_input_add
31.1898 -#define gaim_ssl_close purple_ssl_close
31.1899 -#define gaim_ssl_read purple_ssl_read
31.1900 -#define gaim_ssl_write purple_ssl_write
31.1901 -
31.1902 -#define gaim_ssl_set_ops purple_ssl_set_ops
31.1903 -#define gaim_ssl_get_ops purple_ssl_get_ops
31.1904 -#define gaim_ssl_init purple_ssl_init
31.1905 -#define gaim_ssl_uninit purple_ssl_uninit
31.1906 -
31.1907 -/* from status.h */
31.1908 -
31.1909 -#define GaimStatusType PurpleStatusType
31.1910 -#define GaimStatusAttr PurpleStatusAttr
31.1911 -#define GaimPresence PurplePresence
31.1912 -#define GaimStatus PurpleStatus
31.1913 -
31.1914 -#define GAIM_PRESENCE_CONTEXT_UNSET PURPLE_PRESENCE_CONTEXT_UNSET
31.1915 -#define GAIM_PRESENCE_CONTEXT_ACCOUNT PURPLE_PRESENCE_CONTEXT_ACCOUNT
31.1916 -#define GAIM_PRESENCE_CONTEXT_CONV PURPLE_PRESENCE_CONTEXT_CONV
31.1917 -#define GAIM_PRESENCE_CONTEXT_BUDDY PURPLE_PRESENCE_CONTEXT_BUDDY
31.1918 -#define GaimPresenceContext PurplePresenceContext
31.1919 -
31.1920 -#define GAIM_STATUS_UNSET PURPLE_STATUS_UNSET
31.1921 -#define GAIM_STATUS_OFFLINE PURPLE_STATUS_OFFLINE
31.1922 -#define GAIM_STATUS_AVAILABLE PURPLE_STATUS_AVAILABLE
31.1923 -#define GAIM_STATUS_UNAVAILABLE PURPLE_STATUS_UNAVAILABLE
31.1924 -#define GAIM_STATUS_INVISIBLE PURPLE_STATUS_INVISIBLE
31.1925 -#define GAIM_STATUS_AWAY PURPLE_STATUS_AWAY
31.1926 -#define GAIM_STATUS_EXTENDED_AWAY PURPLE_STATUS_EXTENDED_AWAY
31.1927 -#define GAIM_STATUS_MOBILE PURPLE_STATUS_MOBILE
31.1928 -#define GAIM_STATUS_NUM_PRIMITIVES PURPLE_STATUS_NUM_PRIMITIVES
31.1929 -#define GaimStatusPrimitive PurpleStatusPrimitive
31.1930 -
31.1931 -#define gaim_primitive_get_id_from_type purple_primitive_get_id_from_type
31.1932 -#define gaim_primitive_get_name_from_type purple_primitive_get_name_from_type
31.1933 -#define gaim_primitive_get_type_from_id purple_primitive_get_type_from_id
31.1934 -
31.1935 -#define gaim_status_type_new_full purple_status_type_new_full
31.1936 -#define gaim_status_type_new purple_status_type_new
31.1937 -#define gaim_status_type_new_with_attrs purple_status_type_new_with_attrs
31.1938 -#define gaim_status_type_destroy purple_status_type_destroy
31.1939 -#define gaim_status_type_set_primary_attr purple_status_type_set_primary_attr
31.1940 -#define gaim_status_type_add_attr purple_status_type_add_attr
31.1941 -#define gaim_status_type_add_attrs purple_status_type_add_attrs
31.1942 -#define gaim_status_type_add_attrs_vargs purple_status_type_add_attrs_vargs
31.1943 -#define gaim_status_type_get_primitive purple_status_type_get_primitive
31.1944 -#define gaim_status_type_get_id purple_status_type_get_id
31.1945 -#define gaim_status_type_get_name purple_status_type_get_name
31.1946 -#define gaim_status_type_is_saveable purple_status_type_is_saveable
31.1947 -#define gaim_status_type_is_user_settable purple_status_type_is_user_settable
31.1948 -#define gaim_status_type_is_independent purple_status_type_is_independent
31.1949 -#define gaim_status_type_is_exclusive purple_status_type_is_exclusive
31.1950 -#define gaim_status_type_is_available purple_status_type_is_available
31.1951 -#define gaim_status_type_get_primary_attr purple_status_type_get_primary_attr
31.1952 -#define gaim_status_type_get_attr purple_status_type_get_attr
31.1953 -#define gaim_status_type_get_attrs purple_status_type_get_attrs
31.1954 -#define gaim_status_type_find_with_id purple_status_type_find_with_id
31.1955 -
31.1956 -#define gaim_status_attr_new purple_status_attr_new
31.1957 -#define gaim_status_attr_destroy purple_status_attr_destroy
31.1958 -#define gaim_status_attr_get_id purple_status_attr_get_id
31.1959 -#define gaim_status_attr_get_name purple_status_attr_get_name
31.1960 -#define gaim_status_attr_get_value purple_status_attr_get_value
31.1961 -
31.1962 -#define gaim_status_new purple_status_new
31.1963 -#define gaim_status_destroy purple_status_destroy
31.1964 -#define gaim_status_set_active purple_status_set_active
31.1965 -#define gaim_status_set_active_with_attrs purple_status_set_active_with_attrs
31.1966 -#define gaim_status_set_active_with_attrs_list purple_status_set_active_with_attrs_list
31.1967 -#define gaim_status_set_attr_boolean purple_status_set_attr_boolean
31.1968 -#define gaim_status_set_attr_int purple_status_set_attr_int
31.1969 -#define gaim_status_set_attr_string purple_status_set_attr_string
31.1970 -#define gaim_status_get_type purple_status_get_type
31.1971 -#define gaim_status_get_presence purple_status_get_presence
31.1972 -#define gaim_status_get_id purple_status_get_id
31.1973 -#define gaim_status_get_name purple_status_get_name
31.1974 -#define gaim_status_is_independent purple_status_is_independent
31.1975 -#define gaim_status_is_exclusive purple_status_is_exclusive
31.1976 -#define gaim_status_is_available purple_status_is_available
31.1977 -#define gaim_status_is_active purple_status_is_active
31.1978 -#define gaim_status_is_online purple_status_is_online
31.1979 -#define gaim_status_get_attr_value purple_status_get_attr_value
31.1980 -#define gaim_status_get_attr_boolean purple_status_get_attr_boolean
31.1981 -#define gaim_status_get_attr_int purple_status_get_attr_int
31.1982 -#define gaim_status_get_attr_string purple_status_get_attr_string
31.1983 -#define gaim_status_compare purple_status_compare
31.1984 -
31.1985 -#define gaim_presence_new purple_presence_new
31.1986 -#define gaim_presence_new_for_account purple_presence_new_for_account
31.1987 -#define gaim_presence_new_for_conv purple_presence_new_for_conv
31.1988 -#define gaim_presence_new_for_buddy purple_presence_new_for_buddy
31.1989 -#define gaim_presence_destroy purple_presence_destroy
31.1990 -#define gaim_presence_add_status purple_presence_add_status
31.1991 -#define gaim_presence_add_list purple_presence_add_list
31.1992 -#define gaim_presence_set_status_active purple_presence_set_status_active
31.1993 -#define gaim_presence_switch_status purple_presence_switch_status
31.1994 -#define gaim_presence_set_idle purple_presence_set_idle
31.1995 -#define gaim_presence_set_login_time purple_presence_set_login_time
31.1996 -#define gaim_presence_get_context purple_presence_get_context
31.1997 -#define gaim_presence_get_account purple_presence_get_account
31.1998 -#define gaim_presence_get_conversation purple_presence_get_conversation
31.1999 -#define gaim_presence_get_chat_user purple_presence_get_chat_user
31.2000 -#define gaim_presence_get_statuses purple_presence_get_statuses
31.2001 -#define gaim_presence_get_status purple_presence_get_status
31.2002 -#define gaim_presence_get_active_status purple_presence_get_active_status
31.2003 -#define gaim_presence_is_available purple_presence_is_available
31.2004 -#define gaim_presence_is_online purple_presence_is_online
31.2005 -#define gaim_presence_is_status_active purple_presence_is_status_active
31.2006 -#define gaim_presence_is_status_primitive_active \
31.2007 - purple_presence_is_status_primitive_active
31.2008 -#define gaim_presence_is_idle purple_presence_is_idle
31.2009 -#define gaim_presence_get_idle_time purple_presence_get_idle_time
31.2010 -#define gaim_presence_get_login_time purple_presence_get_login_time
31.2011 -#define gaim_presence_compare purple_presence_compare
31.2012 -
31.2013 -#define gaim_status_get_handle purple_status_get_handle
31.2014 -#define gaim_status_init purple_status_init
31.2015 -#define gaim_status_uninit purple_status_uninit
31.2016 -
31.2017 -/* from stringref.h */
31.2018 -
31.2019 -#define GaimStringref PurpleStringref
31.2020 -
31.2021 -#define gaim_stringref_new purple_stringref_new
31.2022 -#define gaim_stringref_new_noref purple_stringref_new_noref
31.2023 -#define gaim_stringref_printf purple_stringref_printf
31.2024 -#define gaim_stringref_ref purple_stringref_ref
31.2025 -#define gaim_stringref_unref purple_stringref_unref
31.2026 -#define gaim_stringref_value purple_stringref_value
31.2027 -#define gaim_stringref_cmp purple_stringref_cmp
31.2028 -#define gaim_stringref_len purple_stringref_len
31.2029 -
31.2030 -/* from stun.h */
31.2031 -
31.2032 -#define GaimStunNatDiscovery PurpleStunNatDiscovery
31.2033 -
31.2034 -#define GAIM_STUN_STATUS_UNDISCOVERED PURPLE_STUN_STATUS_UNDISCOVERED
31.2035 -#define GAIM_STUN_STATUS_UNKNOWN PURPLE_STUN_STATUS_UNKNOWN
31.2036 -#define GAIM_STUN_STATUS_DISCOVERING PURPLE_STUN_STATUS_DISCOVERING
31.2037 -#define GAIM_STUN_STATUS_DISCOVERED PURPLE_STUN_STATUS_DISCOVERED
31.2038 -#define GaimStunStatus PurpleStunStatus
31.2039 -
31.2040 -#define GAIM_STUN_NAT_TYPE_PUBLIC_IP PURPLE_STUN_NAT_TYPE_PUBLIC_IP
31.2041 -#define GAIM_STUN_NAT_TYPE_UNKNOWN_NAT PURPLE_STUN_NAT_TYPE_UNKNOWN_NAT
31.2042 -#define GAIM_STUN_NAT_TYPE_FULL_CONE PURPLE_STUN_NAT_TYPE_FULL_CONE
31.2043 -#define GAIM_STUN_NAT_TYPE_RESTRICTED_CONE PURPLE_STUN_NAT_TYPE_RESTRICTED_CONE
31.2044 -#define GAIM_STUN_NAT_TYPE_PORT_RESTRICTED_CONE PURPLE_STUN_NAT_TYPE_PORT_RESTRICTED_CONE
31.2045 -#define GAIM_STUN_NAT_TYPE_SYMMETRIC PURPLE_STUN_NAT_TYPE_SYMMETRIC
31.2046 -#define GaimStunNatType PurpleStunNatType
31.2047 -
31.2048 -/* why didn't this have a Gaim prefix before? */
31.2049 -#define StunCallback PurpleStunCallback
31.2050 -
31.2051 -#define gaim_stun_discover purple_stun_discover
31.2052 -#define gaim_stun_init purple_stun_init
31.2053 -
31.2054 -/* from upnp.h */
31.2055 -
31.2056 -/* suggested rename: PurpleUPnpMappingHandle */
31.2057 -#define UPnPMappingAddRemove PurpleUPnPMappingAddRemove
31.2058 -
31.2059 -#define GaimUPnPCallback PurpleUPnPCallback
31.2060 -
31.2061 -#define gaim_upnp_discover purple_upnp_discover
31.2062 -#define gaim_upnp_get_public_ip purple_upnp_get_public_ip
31.2063 -#define gaim_upnp_cancel_port_mapping purple_upnp_cancel_port_mapping
31.2064 -#define gaim_upnp_set_port_mapping purple_upnp_set_port_mapping
31.2065 -
31.2066 -#define gaim_upnp_remove_port_mapping purple_upnp_remove_port_mapping
31.2067 -
31.2068 -/* from util.h */
31.2069 -
31.2070 -#define GaimUtilFetchUrlData PurpleUtilFetchUrlData
31.2071 -#define GaimMenuAction PurpleMenuAction
31.2072 -
31.2073 -#define GaimInfoFieldFormatCallback PurpleIntoFieldFormatCallback
31.2074 -
31.2075 -#define GaimKeyValuePair PurpleKeyValuePair
31.2076 -
31.2077 -#define gaim_menu_action_new purple_menu_action_new
31.2078 -#define gaim_menu_action_free purple_menu_action_free
31.2079 -
31.2080 -#define gaim_base16_encode purple_base16_encode
31.2081 -#define gaim_base16_decode purple_base16_decode
31.2082 -#define gaim_base64_encode purple_base64_encode
31.2083 -#define gaim_base64_decode purple_base64_decode
31.2084 -#define gaim_quotedp_decode purple_quotedp_decode
31.2085 -
31.2086 -#define gaim_mime_decode_field purple_mime_deco_field
31.2087 -
31.2088 -#define gaim_utf8_strftime purple_utf8_strftime
31.2089 -#define gaim_date_format_short purple_date_format_short
31.2090 -#define gaim_date_format_long purple_date_format_long
31.2091 -#define gaim_date_format_full purple_date_format_full
31.2092 -#define gaim_time_format purple_time_format
31.2093 -#define gaim_time_build purple_time_build
31.2094 -
31.2095 -#define GAIM_NO_TZ_OFF PURPLE_NO_TZ_OFF
31.2096 -
31.2097 -#define gaim_str_to_time purple_str_to_time
31.2098 -
31.2099 -#define gaim_markup_find_tag purple_markup_find_tag
31.2100 -#define gaim_markup_extract_info_field purple_markup_extract_info_field
31.2101 -#define gaim_markup_html_to_xhtml purple_markup_html_to_xhtml
31.2102 -#define gaim_markup_strip_html purple_markup_strip_html
31.2103 -#define gaim_markup_linkify purple_markup_linkify
31.2104 -#define gaim_markup_slice purple_markup_slice
31.2105 -#define gaim_markup_get_tag_name purple_markup_get_tag_name
31.2106 -#define gaim_unescape_html purple_unescape_html
31.2107 -
31.2108 -#define gaim_home_dir purple_home_dir
31.2109 -#define gaim_user_dir purple_user_dir
31.2110 -
31.2111 -#define gaim_util_set_user_dir purple_util_set_user_dir
31.2112 -
31.2113 -#define gaim_build_dir purple_build_dir
31.2114 -
31.2115 -#define gaim_util_write_data_to_file purple_util_write_data_to_file
31.2116 -
31.2117 -#define gaim_util_read_xml_from_file purple_util_read_xml_from_file
31.2118 -
31.2119 -#define gaim_mkstemp purple_mkstemp
31.2120 -
31.2121 -#define gaim_program_is_valid purple_program_is_valid
31.2122 -
31.2123 -#define gaim_running_gnome purple_running_gnome
31.2124 -#define gaim_running_kde purple_running_kde
31.2125 -#define gaim_running_osx purple_running_osx
31.2126 -
31.2127 -#define gaim_fd_get_ip purple_fd_get_ip
31.2128 -
31.2129 -#define gaim_normalize purple_normalize
31.2130 -#define gaim_normalize_nocase purple_normalize_nocase
31.2131 -
31.2132 -#define gaim_strdup_withhtml purple_strdup_withhtml
31.2133 -
31.2134 -#define gaim_str_has_prefix purple_str_has_prefix
31.2135 -#define gaim_str_has_suffix purple_str_has_suffix
31.2136 -#define gaim_str_add_cr purple_str_add_cr
31.2137 -#define gaim_str_strip_char purple_str_strip_char
31.2138 -
31.2139 -#define gaim_util_chrreplace purple_util_chrreplace
31.2140 -
31.2141 -#define gaim_strreplace purple_strreplace
31.2142 -
31.2143 -#define gaim_utf8_ncr_encode purple_utf8_ncr_encode
31.2144 -#define gaim_utf8_ncr_decode purple_utf8_ncr_decode
31.2145 -
31.2146 -#define gaim_strcasereplace purple_strcasereplace
31.2147 -#define gaim_strcasestr purple_strcasestr
31.2148 -
31.2149 -#define gaim_str_size_to_units purple_str_size_to_units
31.2150 -#define gaim_str_seconds_to_string purple_str_seconds_to_string
31.2151 -#define gaim_str_binary_to_ascii purple_str_binary_to_ascii
31.2152 -
31.2153 -
31.2154 -#define gaim_got_protocol_handler_uri purple_got_protocol_handler_uri
31.2155 -
31.2156 -#define gaim_url_parse purple_url_parse
31.2157 -
31.2158 -#define GaimUtilFetchUrlCallback PurpleUtilFetchUrlCallback
31.2159 -#define gaim_util_fetch_url purple_util_fetch_url
31.2160 -#define gaim_util_fetch_url_request purple_util_fetch_url_request
31.2161 -#define gaim_util_fetch_url_cancel purple_util_fetch_url_cancel
31.2162 -
31.2163 -#define gaim_url_decode purple_url_decode
31.2164 -#define gaim_url_encode purple_url_encode
31.2165 -
31.2166 -#define gaim_email_is_valid purple_email_is_valid
31.2167 -
31.2168 -#define gaim_uri_list_extract_uris purple_uri_list_extract_uris
31.2169 -#define gaim_uri_list_extract_filenames purple_uri_list_extract_filenames
31.2170 -
31.2171 -#define gaim_utf8_try_convert purple_utf8_try_convert
31.2172 -#define gaim_utf8_salvage purple_utf8_salvage
31.2173 -#define gaim_utf8_strcasecmp purple_utf8_strcasecmp
31.2174 -#define gaim_utf8_has_word purple_utf8_has_word
31.2175 -
31.2176 -#define gaim_print_utf8_to_console purple_print_utf8_to_console
31.2177 -
31.2178 -#define gaim_message_meify purple_message_meify
31.2179 -
31.2180 -#define gaim_text_strip_mnemonic purple_text_strip_mnemonic
31.2181 -
31.2182 -#define gaim_unescape_filename purple_unescape_filename
31.2183 -#define gaim_escape_filename purple_escape_filename
31.2184 -
31.2185 -/* from value.h */
31.2186 -
31.2187 -#define GAIM_TYPE_UNKNOWN PURPLE_TYPE_UNKNOWN
31.2188 -#define GAIM_TYPE_SUBTYPE PURPLE_TYPE_SUBTYPE
31.2189 -#define GAIM_TYPE_CHAR PURPLE_TYPE_CHAR
31.2190 -#define GAIM_TYPE_UCHAR PURPLE_TYPE_UCHAR
31.2191 -#define GAIM_TYPE_BOOLEAN PURPLE_TYPE_BOOLEAN
31.2192 -#define GAIM_TYPE_SHORT PURPLE_TYPE_SHORT
31.2193 -#define GAIM_TYPE_USHORT PURPLE_TYPE_USHORT
31.2194 -#define GAIM_TYPE_INT PURPLE_TYPE_INT
31.2195 -#define GAIM_TYPE_UINT PURPLE_TYPE_UINT
31.2196 -#define GAIM_TYPE_LONG PURPLE_TYPE_LONG
31.2197 -#define GAIM_TYPE_ULONG PURPLE_TYPE_ULONG
31.2198 -#define GAIM_TYPE_INT64 PURPLE_TYPE_INT64
31.2199 -#define GAIM_TYPE_UINT64 PURPLE_TYPE_UINT64
31.2200 -#define GAIM_TYPE_STRING PURPLE_TYPE_STRING
31.2201 -#define GAIM_TYPE_OBJECT PURPLE_TYPE_OBJECT
31.2202 -#define GAIM_TYPE_POINTER PURPLE_TYPE_POINTER
31.2203 -#define GAIM_TYPE_ENUM PURPLE_TYPE_ENUM
31.2204 -#define GAIM_TYPE_BOXED PURPLE_TYPE_BOXED
31.2205 -#define GaimType PurpleType
31.2206 -
31.2207 -
31.2208 -#define GAIM_SUBTYPE_UNKNOWN PURPLE_SUBTYPE_UNKNOWN
31.2209 -#define GAIM_SUBTYPE_ACCOUNT PURPLE_SUBTYPE_ACCOUNT
31.2210 -#define GAIM_SUBTYPE_BLIST PURPLE_SUBTYPE_BLIST
31.2211 -#define GAIM_SUBTYPE_BLIST_BUDDY PURPLE_SUBTYPE_BLIST_BUDDY
31.2212 -#define GAIM_SUBTYPE_BLIST_GROUP PURPLE_SUBTYPE_BLIST_GROUP
31.2213 -#define GAIM_SUBTYPE_BLIST_CHAT PURPLE_SUBTYPE_BLIST_CHAT
31.2214 -#define GAIM_SUBTYPE_BUDDY_ICON PURPLE_SUBTYPE_BUDDY_ICON
31.2215 -#define GAIM_SUBTYPE_CONNECTION PURPLE_SUBTYPE_CONNECTION
31.2216 -#define GAIM_SUBTYPE_CONVERSATION PURPLE_SUBTYPE_CONVERSATION
31.2217 -#define GAIM_SUBTYPE_PLUGIN PURPLE_SUBTYPE_PLUGIN
31.2218 -#define GAIM_SUBTYPE_BLIST_NODE PURPLE_SUBTYPE_BLIST_NODE
31.2219 -#define GAIM_SUBTYPE_CIPHER PURPLE_SUBTYPE_CIPHER
31.2220 -#define GAIM_SUBTYPE_STATUS PURPLE_SUBTYPE_STATUS
31.2221 -#define GAIM_SUBTYPE_LOG PURPLE_SUBTYPE_LOG
31.2222 -#define GAIM_SUBTYPE_XFER PURPLE_SUBTYPE_XFER
31.2223 -#define GAIM_SUBTYPE_SAVEDSTATUS PURPLE_SUBTYPE_SAVEDSTATUS
31.2224 -#define GAIM_SUBTYPE_XMLNODE PURPLE_SUBTYPE_XMLNODE
31.2225 -#define GAIM_SUBTYPE_USERINFO PURPLE_SUBTYPE_USERINFO
31.2226 -#define GaimSubType PurpleSubType
31.2227 -
31.2228 -#define GaimValue PurpleValue
31.2229 -
31.2230 -#define gaim_value_new purple_value_new
31.2231 -#define gaim_value_new_outgoing purple_value_new_outgoing
31.2232 -#define gaim_value_destroy purple_value_destroy
31.2233 -#define gaim_value_dup purple_value_dup
31.2234 -#define gaim_value_purple_buddy_icon_get_extensionget_type purple_value_get_type
31.2235 -#define gaim_value_get_subtype purple_value_get_subtype
31.2236 -#define gaim_value_get_specific_type purple_value_get_specific_type
31.2237 -#define gaim_value_is_outgoing purple_value_is_outgoing
31.2238 -#define gaim_value_set_char purple_value_set_char
31.2239 -#define gaim_value_set_uchar purple_value_set_uchar
31.2240 -#define gaim_value_set_boolean purple_value_set_boolean
31.2241 -#define gaim_value_set_short purple_value_set_short
31.2242 -#define gaim_value_set_ushort purple_value_set_ushort
31.2243 -#define gaim_value_set_int purple_value_set_int
31.2244 -#define gaim_value_set_uint purple_value_set_uint
31.2245 -#define gaim_value_set_long purple_value_set_long
31.2246 -#define gaim_value_set_ulong purple_value_set_ulong
31.2247 -#define gaim_value_set_int64 purple_value_set_int64
31.2248 -#define gaim_value_set_uint64 purple_value_set_uint64
31.2249 -#define gaim_value_set_string purple_value_set_string
31.2250 -#define gaim_value_set_object purple_value_set_object
31.2251 -#define gaim_value_set_pointer purple_value_set_pointer
31.2252 -#define gaim_value_set_enum purple_value_set_enum
31.2253 -#define gaim_value_set_boxed purple_value_set_boxed
31.2254 -#define gaim_value_get_char purple_value_get_char
31.2255 -#define gaim_value_get_uchar purple_value_get_uchar
31.2256 -#define gaim_value_get_boolean purple_value_get_boolean
31.2257 -#define gaim_value_get_short purple_value_get_short
31.2258 -#define gaim_value_get_ushort purple_value_get_ushort
31.2259 -#define gaim_value_get_int purple_value_get_int
31.2260 -#define gaim_value_get_uint purple_value_get_uint
31.2261 -#define gaim_value_get_long purple_value_get_long
31.2262 -#define gaim_value_get_ulong purple_value_get_ulong
31.2263 -#define gaim_value_get_int64 purple_value_get_int64
31.2264 -#define gaim_value_get_uint64 purple_value_get_uint64
31.2265 -#define gaim_value_get_string purple_value_get_string
31.2266 -#define gaim_value_get_object purple_value_get_object
31.2267 -#define gaim_value_get_pointer purple_value_get_pointer
31.2268 -#define gaim_value_get_enum purple_value_get_enum
31.2269 -#define gaim_value_get_boxed purple_value_get_boxed
31.2270 -
31.2271 -/* from version.h */
31.2272 -
31.2273 -#define GAIM_MAJOR_VERSION PURPLE_MAJOR_VERSION
31.2274 -#define GAIM_MINOR_VERSION PURPLE_MINOR_VERSION
31.2275 -#define GAIM_MICRO_VERSION PURPLE_MICRO_VERSION
31.2276 -
31.2277 -#define GAIM_VERSION_CHECK PURPLE_VERSION_CHECK
31.2278 -
31.2279 -/* from whiteboard.h */
31.2280 -
31.2281 -#define GaimWhiteboardPrplOps PurpleWhiteboardPrplOps
31.2282 -#define GaimWhiteboard PurpleWhiteboard
31.2283 -#define GaimWhiteboardUiOps PurpleWhiteboardUiOps
31.2284 -
31.2285 -#define gaim_whiteboard_set_ui_ops purple_whiteboard_set_ui_ops
31.2286 -#define gaim_whiteboard_set_prpl_ops purple_whiteboard_set_prpl_ops
31.2287 -
31.2288 -#define gaim_whiteboard_create purple_whiteboard_create
31.2289 -#define gaim_whiteboard_destroy purple_whiteboard_destroy
31.2290 -#define gaim_whiteboard_start purple_whiteboard_start
31.2291 -#define gaim_whiteboard_get_session purple_whiteboard_get_session
31.2292 -#define gaim_whiteboard_draw_list_destroy purple_whiteboard_draw_list_destroy
31.2293 -#define gaim_whiteboard_get_dimensions purple_whiteboard_get_dimensions
31.2294 -#define gaim_whiteboard_set_dimensions purple_whiteboard_set_dimensions
31.2295 -#define gaim_whiteboard_draw_point purple_whiteboard_draw_point
31.2296 -#define gaim_whiteboard_send_draw_list purple_whiteboard_send_draw_list
31.2297 -#define gaim_whiteboard_draw_line purple_whiteboard_draw_line
31.2298 -#define gaim_whiteboard_clear purple_whiteboard_clear
31.2299 -#define gaim_whiteboard_send_clear purple_whiteboard_send_clear
31.2300 -#define gaim_whiteboard_send_brush purple_whiteboard_send_brush
31.2301 -#define gaim_whiteboard_get_brush purple_whiteboard_get_brush
31.2302 -#define gaim_whiteboard_set_brush purple_whiteboard_set_brush
31.2303 -
31.2304 -/* for static plugins */
31.2305 -#define gaim_init_ssl_plugin purple_init_ssl_plugin
31.2306 -#define gaim_init_ssl_openssl_plugin purple_init_ssl_openssl_plugin
31.2307 -#define gaim_init_ssl_gnutls_plugin purple_init_ssl_gnutls_plugin
31.2308 -#define gaim_init_gg_plugin purple_init_gg_plugin
31.2309 -#define gaim_init_jabber_plugin purple_init_jabber_plugin
31.2310 -#define gaim_init_sametime_plugin purple_init_sametime_plugin
31.2311 -#define gaim_init_msn_plugin purple_init_msn_plugin
31.2312 -#define gaim_init_novell_plugin purple_init_novell_plugin
31.2313 -#define gaim_init_qq_plugin purple_init_qq_plugin
31.2314 -#define gaim_init_simple_plugin purple_init_simple_plugin
31.2315 -#define gaim_init_yahoo_plugin purple_init_yahoo_plugin
31.2316 -#define gaim_init_zephyr_plugin purple_init_zephyr_plugin
31.2317 -#define gaim_init_aim_plugin purple_init_aim_plugin
31.2318 -#define gaim_init_icq_plugin purple_init_icq_plugin
31.2319 -
31.2320 -#endif /* _GAIM_COMPAT_H_ */
32.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/gg.h Fri Aug 21 13:24:36 2009 -0700
32.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
32.3 @@ -1,71 +0,0 @@
32.4 -/**
32.5 - * @file gg.h
32.6 - *
32.7 - * purple
32.8 - *
32.9 - * Copyright (C) 2005 Bartosz Oler <bartosz@bzimage.us>
32.10 - *
32.11 - * This program is free software; you can redistribute it and/or modify
32.12 - * it under the terms of the GNU General Public License as published by
32.13 - * the Free Software Foundation; either version 2 of the License, or
32.14 - * (at your option) any later version.
32.15 - *
32.16 - * This program is distributed in the hope that it will be useful,
32.17 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
32.18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32.19 - * GNU General Public License for more details.
32.20 - *
32.21 - * You should have received a copy of the GNU General Public License
32.22 - * along with this program; if not, write to the Free Software
32.23 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
32.24 - */
32.25 -
32.26 -
32.27 -#ifndef _PURPLE_GG_H
32.28 -#define _PURPLE_GG_H
32.29 -
32.30 -#include <libgadu.h>
32.31 -#include "internal.h"
32.32 -#include "search.h"
32.33 -#include "connection.h"
32.34 -
32.35 -
32.36 -#define PUBDIR_RESULTS_MAX 20
32.37 -
32.38 -
32.39 -typedef struct
32.40 -{
32.41 - char *name;
32.42 - GList *participants;
32.43 -
32.44 -} GGPChat;
32.45 -
32.46 -typedef void (*GGPTokenCallback)(PurpleConnection *);
32.47 -
32.48 -typedef struct
32.49 -{
32.50 - char *id;
32.51 - char *data;
32.52 - unsigned int size;
32.53 -
32.54 - struct gg_http *req;
32.55 - guint inpa;
32.56 -
32.57 - GGPTokenCallback cb;
32.58 -
32.59 -} GGPToken;
32.60 -
32.61 -typedef struct {
32.62 -
32.63 - struct gg_session *session;
32.64 - GGPToken *token;
32.65 - GList *chats;
32.66 - GGPSearches *searches;
32.67 - int chats_count;
32.68 - GList *pending_richtext_messages;
32.69 - GHashTable *pending_images;
32.70 -} GGPInfo;
32.71 -
32.72 -#endif /* _PURPLE_GG_H */
32.73 -
32.74 -/* vim: set ts=8 sts=0 sw=8 noet: */
33.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/group.h Fri Aug 21 13:24:36 2009 -0700
33.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
33.3 @@ -1,110 +0,0 @@
33.4 -/**
33.5 - * @file group.h Group functions
33.6 - *
33.7 - * purple
33.8 - *
33.9 - * Purple is the legal property of its developers, whose names are too numerous
33.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
33.11 - * source distribution.
33.12 - *
33.13 - * This program is free software; you can redistribute it and/or modify
33.14 - * it under the terms of the GNU General Public License as published by
33.15 - * the Free Software Foundation; either version 2 of the License, or
33.16 - * (at your option) any later version.
33.17 - *
33.18 - * This program is distributed in the hope that it will be useful,
33.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
33.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33.21 - * GNU General Public License for more details.
33.22 - *
33.23 - * You should have received a copy of the GNU General Public License
33.24 - * along with this program; if not, write to the Free Software
33.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
33.26 - */
33.27 -#ifndef _MSN_GROUP_H_
33.28 -#define _MSN_GROUP_H_
33.29 -
33.30 -typedef struct _MsnGroup MsnGroup;
33.31 -
33.32 -#include <stdio.h>
33.33 -
33.34 -#include "session.h"
33.35 -#include "user.h"
33.36 -#include "userlist.h"
33.37 -
33.38 -#define MSN_INDIVIDUALS_GROUP_ID "1983"
33.39 -#define MSN_INDIVIDUALS_GROUP_NAME _("Other Contacts")
33.40 -
33.41 -#define MSN_NON_IM_GROUP_ID "email"
33.42 -#define MSN_NON_IM_GROUP_NAME _("Non-IM Contacts")
33.43 -
33.44 -/**
33.45 - * A group.
33.46 - */
33.47 -struct _MsnGroup
33.48 -{
33.49 - MsnSession *session; /**< The MSN session. */
33.50 -
33.51 - char *id; /**< The group ID. */
33.52 - char *name; /**< The name of the group. */
33.53 -};
33.54 -
33.55 -/**************************************************************************
33.56 - ** @name Group API *
33.57 - **************************************************************************/
33.58 -/*@{*/
33.59 -
33.60 -/**
33.61 - * Creates a new group structure.
33.62 - *
33.63 - * @param session The MSN session.
33.64 - * @param id The group ID.
33.65 - * @param name The name of the group.
33.66 - *
33.67 - * @return A new group structure.
33.68 - */
33.69 -MsnGroup *msn_group_new(MsnUserList *userlist, const char *id, const char *name);
33.70 -
33.71 -/**
33.72 - * Destroys a group structure.
33.73 - *
33.74 - * @param group The group to destroy.
33.75 - */
33.76 -void msn_group_destroy(MsnGroup *group);
33.77 -
33.78 -/**
33.79 - * Sets the ID for a group.
33.80 - *
33.81 - * @param group The group.
33.82 - * @param id The ID.
33.83 - */
33.84 -void msn_group_set_id(MsnGroup *group, const char *id);
33.85 -
33.86 -/**
33.87 - * Sets the name for a group.
33.88 - *
33.89 - * @param group The group.
33.90 - * @param name The name.
33.91 - */
33.92 -void msn_group_set_name(MsnGroup *group, const char *name);
33.93 -
33.94 -/**
33.95 - * Returns the ID for a group.
33.96 - *
33.97 - * @param group The group.
33.98 - *
33.99 - * @return The ID.
33.100 - */
33.101 -char* msn_group_get_id(const MsnGroup *group);
33.102 -
33.103 -/**
33.104 - * Returns the name for a group.
33.105 - *
33.106 - * @param group The group.
33.107 - *
33.108 - * @return The name.
33.109 - */
33.110 -const char *msn_group_get_name(const MsnGroup *group);
33.111 -
33.112 -#endif /* _MSN_GROUP_H_ */
33.113 -
34.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/history.h Fri Aug 21 13:24:36 2009 -0700
34.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
34.3 @@ -1,48 +0,0 @@
34.4 -/**
34.5 - * @file history.h MSN history functions
34.6 - *
34.7 - * purple
34.8 - *
34.9 - * Purple is the legal property of its developers, whose names are too numerous
34.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
34.11 - * source distribution.
34.12 - *
34.13 - * This program is free software; you can redistribute it and/or modify
34.14 - * it under the terms of the GNU General Public License as published by
34.15 - * the Free Software Foundation; either version 2 of the License, or
34.16 - * (at your option) any later version.
34.17 - *
34.18 - * This program is distributed in the hope that it will be useful,
34.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
34.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34.21 - * GNU General Public License for more details.
34.22 - *
34.23 - * You should have received a copy of the GNU General Public License
34.24 - * along with this program; if not, write to the Free Software
34.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
34.26 - */
34.27 -#ifndef _MSN_HISTORY_H
34.28 -#define _MSN_HISTORY_H
34.29 -
34.30 -#define MSN_NS_HIST_ELEMS 0x300
34.31 -#define MSN_SB_HIST_ELEMS 0x30
34.32 -
34.33 -typedef struct _MsnHistory MsnHistory;
34.34 -
34.35 -#include "transaction.h"
34.36 -
34.37 -/**
34.38 - * The history.
34.39 - */
34.40 -struct _MsnHistory
34.41 -{
34.42 - GQueue *queue;
34.43 - unsigned int trId;
34.44 -};
34.45 -
34.46 -MsnHistory *msn_history_new(void);
34.47 -void msn_history_destroy(MsnHistory *history);
34.48 -MsnTransaction *msn_history_find(MsnHistory *history, unsigned int triId);
34.49 -void msn_history_add(MsnHistory *history, MsnTransaction *trans);
34.50 -
34.51 -#endif /* _MSN_HISTORY_H */
35.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/httpconn.h Fri Aug 21 13:24:36 2009 -0700
35.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
35.3 @@ -1,111 +0,0 @@
35.4 -/**
35.5 - * @file httpconn.h HTTP connection
35.6 - *
35.7 - * purple
35.8 - *
35.9 - * Purple is the legal property of its developers, whose names are too numerous
35.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
35.11 - * source distribution.
35.12 - *
35.13 - * This program is free software; you can redistribute it and/or modify
35.14 - * it under the terms of the GNU General Public License as published by
35.15 - * the Free Software Foundation; either version 2 of the License, or
35.16 - * (at your option) any later version.
35.17 - *
35.18 - * This program is distributed in the hope that it will be useful,
35.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
35.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35.21 - * GNU General Public License for more details.
35.22 - *
35.23 - * You should have received a copy of the GNU General Public License
35.24 - * along with this program; if not, write to the Free Software
35.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
35.26 - */
35.27 -#ifndef _MSN_HTTPCONN_H_
35.28 -#define _MSN_HTTPCONN_H_
35.29 -
35.30 -typedef struct _MsnHttpConn MsnHttpConn;
35.31 -
35.32 -#include "circbuffer.h"
35.33 -#include "servconn.h"
35.34 -
35.35 -/**
35.36 - * An HTTP Connection.
35.37 - */
35.38 -struct _MsnHttpConn
35.39 -{
35.40 - MsnSession *session; /**< The MSN Session. */
35.41 - MsnServConn *servconn; /**< The connection object. */
35.42 -
35.43 - PurpleProxyConnectData *connect_data;
35.44 -
35.45 - char *full_session_id; /**< The full session id. */
35.46 - char *session_id; /**< The trimmed session id. */
35.47 -
35.48 - int timer; /**< The timer for polling. */
35.49 -
35.50 - gboolean waiting_response; /**< The flag that states if we are waiting
35.51 - a response from the server. */
35.52 - gboolean connected; /**< The flag that states if the connection is on. */
35.53 - gboolean virgin; /**< The flag that states if this connection
35.54 - should specify the host (not gateway) to
35.55 - connect to. */
35.56 -
35.57 - char *host; /**< The HTTP gateway host. */
35.58 - GList *queue; /**< The queue of data chunks to write. */
35.59 -
35.60 - int fd; /**< The connection's file descriptor. */
35.61 - guint inpa; /**< The connection's input handler. */
35.62 -
35.63 - char *rx_buf; /**< The receive buffer. */
35.64 - int rx_len; /**< The receive buffer length. */
35.65 -
35.66 - PurpleCircBuffer *tx_buf;
35.67 - guint tx_handler;
35.68 -};
35.69 -
35.70 -/**
35.71 - * Creates a new HTTP connection object.
35.72 - *
35.73 - * @param servconn The connection object.
35.74 - *
35.75 - * @return The new object.
35.76 - */
35.77 -MsnHttpConn *msn_httpconn_new(MsnServConn *servconn);
35.78 -
35.79 -/**
35.80 - * Destroys an HTTP connection object.
35.81 - *
35.82 - * @param httpconn The HTTP connection object.
35.83 - */
35.84 -void msn_httpconn_destroy(MsnHttpConn *httpconn);
35.85 -
35.86 -/**
35.87 - * Writes a chunk of data to the HTTP connection.
35.88 - *
35.89 - * @param servconn The server connection.
35.90 - * @param data The data to write.
35.91 - * @param data_len The size of the data to write.
35.92 - *
35.93 - * @return The number of bytes written.
35.94 - */
35.95 -gssize msn_httpconn_write(MsnHttpConn *httpconn, const char *data, size_t data_len);
35.96 -
35.97 -/**
35.98 - * Connects the HTTP connection object to a host.
35.99 - *
35.100 - * @param httpconn The HTTP connection object.
35.101 - * @param host The host to connect to.
35.102 - * @param port The port to connect to.
35.103 - */
35.104 -gboolean msn_httpconn_connect(MsnHttpConn *httpconn,
35.105 - const char *host, int port);
35.106 -
35.107 -/**
35.108 - * Disconnects the HTTP connection object.
35.109 - *
35.110 - * @param httpconn The HTTP connection object.
35.111 - */
35.112 -void msn_httpconn_disconnect(MsnHttpConn *httpconn);
35.113 -
35.114 -#endif /* _MSN_HTTPCONN_H_ */
36.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/idle.h Fri Aug 21 13:24:36 2009 -0700
36.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
36.3 @@ -1,102 +0,0 @@
36.4 -/**
36.5 - * @file idle.h Idle API
36.6 - * @ingroup core
36.7 - */
36.8 -
36.9 -/* purple
36.10 - *
36.11 - * Purple is the legal property of its developers, whose names are too numerous
36.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
36.13 - * source distribution.
36.14 - *
36.15 - * This program is free software; you can redistribute it and/or modify
36.16 - * it under the terms of the GNU General Public License as published by
36.17 - * the Free Software Foundation; either version 2 of the License, or
36.18 - * (at your option) any later version.
36.19 - *
36.20 - * This program is distributed in the hope that it will be useful,
36.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
36.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36.23 - * GNU General Public License for more details.
36.24 - *
36.25 - * You should have received a copy of the GNU General Public License
36.26 - * along with this program; if not, write to the Free Software
36.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
36.28 - */
36.29 -#ifndef _PURPLE_IDLE_H_
36.30 -#define _PURPLE_IDLE_H_
36.31 -
36.32 -/**
36.33 - * Idle UI operations.
36.34 - */
36.35 -typedef struct
36.36 -{
36.37 - time_t (*get_time_idle)(void);
36.38 -
36.39 - void (*_purple_reserved1)(void);
36.40 - void (*_purple_reserved2)(void);
36.41 - void (*_purple_reserved3)(void);
36.42 - void (*_purple_reserved4)(void);
36.43 -} PurpleIdleUiOps;
36.44 -
36.45 -#ifdef __cplusplus
36.46 -extern "C" {
36.47 -#endif
36.48 -
36.49 -/**************************************************************************/
36.50 -/** @name Idle API */
36.51 -/**************************************************************************/
36.52 -/*@{*/
36.53 -
36.54 -/**
36.55 - * Touch our idle tracker. This signifies that the user is
36.56 - * 'active'. The conversation code calls this when the
36.57 - * user sends an IM, for example.
36.58 - */
36.59 -void purple_idle_touch(void);
36.60 -
36.61 -/**
36.62 - * Fake our idle time by setting the time at which our
36.63 - * accounts purportedly became idle. This is used by
36.64 - * the I'dle Mak'er plugin.
36.65 - */
36.66 -void purple_idle_set(time_t time);
36.67 -
36.68 -/*@}*/
36.69 -
36.70 -/**************************************************************************/
36.71 -/** @name Idle Subsystem */
36.72 -/**************************************************************************/
36.73 -/*@{*/
36.74 -
36.75 -/**
36.76 - * Sets the UI operations structure to be used for idle reporting.
36.77 - *
36.78 - * @param ops The UI operations structure.
36.79 - */
36.80 -void purple_idle_set_ui_ops(PurpleIdleUiOps *ops);
36.81 -
36.82 -/**
36.83 - * Returns the UI operations structure used for idle reporting.
36.84 - *
36.85 - * @return The UI operations structure in use.
36.86 - */
36.87 -PurpleIdleUiOps *purple_idle_get_ui_ops(void);
36.88 -
36.89 -/**
36.90 - * Initializes the idle system.
36.91 - */
36.92 -void purple_idle_init(void);
36.93 -
36.94 -/**
36.95 - * Uninitializes the idle system.
36.96 - */
36.97 -void purple_idle_uninit(void);
36.98 -
36.99 -/*@}*/
36.100 -
36.101 -#ifdef __cplusplus
36.102 -}
36.103 -#endif
36.104 -
36.105 -#endif /* _PURPLE_IDLE_H_ */
37.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/imgstore.h Fri Aug 21 13:24:36 2009 -0700
37.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
37.3 @@ -1,214 +0,0 @@
37.4 -/**
37.5 - * @file imgstore.h IM Image Store API
37.6 - * @ingroup core
37.7 - * @see @ref imgstore-signals
37.8 - */
37.9 -
37.10 -/* purple
37.11 - *
37.12 - * Purple is the legal property of its developers, whose names are too numerous
37.13 - * to list here. Please refer to the COPYRIGHT file distributed with this
37.14 - * source distribution.
37.15 - *
37.16 - * This program is free software; you can redistribute it and/or modify
37.17 - * it under the terms of the GNU General Public License as published by
37.18 - * the Free Software Foundation; either version 2 of the License, or
37.19 - * (at your option) any later version.
37.20 - *
37.21 - * This program is distributed in the hope that it will be useful,
37.22 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
37.23 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37.24 - * GNU General Public License for more details.
37.25 - *
37.26 - * You should have received a copy of the GNU General Public License
37.27 - * along with this program; if not, write to the Free Software
37.28 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
37.29 - */
37.30 -#ifndef _PURPLE_IMGSTORE_H_
37.31 -#define _PURPLE_IMGSTORE_H_
37.32 -
37.33 -#include <glib.h>
37.34 -
37.35 -/** A reference-counted immutable wrapper around an image's data and its
37.36 - * filename.
37.37 - */
37.38 -typedef struct _PurpleStoredImage PurpleStoredImage;
37.39 -
37.40 -#ifdef __cplusplus
37.41 -extern "C" {
37.42 -#endif
37.43 -
37.44 -/**
37.45 - * Add an image to the store.
37.46 - *
37.47 - * The caller owns a reference to the image in the store, and must dereference
37.48 - * the image with purple_imgstore_unref() for it to be freed.
37.49 - *
37.50 - * No ID is allocated when using this function. If you need to reference the
37.51 - * image by an ID, use purple_imgstore_add_with_id() instead.
37.52 - *
37.53 - * @param data Pointer to the image data, which the imgstore will take
37.54 - * ownership of and free as appropriate. If you want a
37.55 - * copy of the data, make it before calling this function.
37.56 - * @param size Image data's size.
37.57 - * @param filename Filename associated with image. This is for your
37.58 - * convenience. It could be the full path to the
37.59 - * image or, more commonly, the filename of the image
37.60 - * without any directory information. It can also be
37.61 - * NULL, if you don't need to keep track of a filename.
37.62 - *
37.63 - * @return The stored image.
37.64 - */
37.65 -PurpleStoredImage *
37.66 -purple_imgstore_add(gpointer data, size_t size, const char *filename);
37.67 -
37.68 -/**
37.69 - * Create an image and add it to the store.
37.70 - *
37.71 - * @param path The path to the image.
37.72 - *
37.73 - * @return The stored image.
37.74 - * @since 2.X.X
37.75 - */
37.76 -PurpleStoredImage *
37.77 -purple_imgstore_new_from_file(const char *path);
37.78 -
37.79 -/**
37.80 - * Add an image to the store, allocating an ID.
37.81 - *
37.82 - * The caller owns a reference to the image in the store, and must dereference
37.83 - * the image with purple_imgstore_unref_by_id() or purple_imgstore_unref()
37.84 - * for it to be freed.
37.85 - *
37.86 - * @param data Pointer to the image data, which the imgstore will take
37.87 - * ownership of and free as appropriate. If you want a
37.88 - * copy of the data, make it before calling this function.
37.89 - * @param size Image data's size.
37.90 - * @param filename Filename associated with image. This is for your
37.91 - * convenience. It could be the full path to the
37.92 - * image or, more commonly, the filename of the image
37.93 - * without any directory information. It can also be
37.94 - * NULL, if you don't need to keep track of a filename.
37.95 -
37.96 - * @return ID for the image. This is a unique number that can be used
37.97 - * within libpurple to reference the image.
37.98 - */
37.99 -int purple_imgstore_add_with_id(gpointer data, size_t size, const char *filename);
37.100 -
37.101 -/**
37.102 - * Retrieve an image from the store. The caller does not own a
37.103 - * reference to the image.
37.104 - *
37.105 - * @param id The ID for the image.
37.106 - *
37.107 - * @return A pointer to the requested image, or NULL if it was not found.
37.108 - */
37.109 -PurpleStoredImage *purple_imgstore_find_by_id(int id);
37.110 -
37.111 -/**
37.112 - * Retrieves a pointer to the image's data.
37.113 - *
37.114 - * @param img The Image
37.115 - *
37.116 - * @return A pointer to the data, which must not
37.117 - * be freed or modified.
37.118 - */
37.119 -gconstpointer purple_imgstore_get_data(PurpleStoredImage *img);
37.120 -
37.121 -/**
37.122 - * Retrieves the length of the image's data.
37.123 - *
37.124 - * @param img The Image
37.125 - *
37.126 - * @return The size of the data that the pointer returned by
37.127 - * purple_imgstore_get_data points to.
37.128 - */
37.129 -size_t purple_imgstore_get_size(PurpleStoredImage *img);
37.130 -
37.131 -/**
37.132 - * Retrieves a pointer to the image's filename.
37.133 - *
37.134 - * @param img The image
37.135 - *
37.136 - * @return A pointer to the filename, which must not
37.137 - * be freed or modified.
37.138 - */
37.139 -const char *purple_imgstore_get_filename(const PurpleStoredImage *img);
37.140 -
37.141 -/**
37.142 - * Looks at the magic numbers of the image data (the first few bytes)
37.143 - * and returns an extension corresponding to the image's file type.
37.144 - *
37.145 - * @param img The image.
37.146 - *
37.147 - * @return The image's extension (for example "png") or "icon"
37.148 - * if unknown.
37.149 - */
37.150 -const char *purple_imgstore_get_extension(PurpleStoredImage *img);
37.151 -
37.152 -/**
37.153 - * Increment the reference count.
37.154 - *
37.155 - * @param img The image.
37.156 - *
37.157 - * @return @a img
37.158 - */
37.159 -PurpleStoredImage *
37.160 -purple_imgstore_ref(PurpleStoredImage *img);
37.161 -
37.162 -/**
37.163 - * Decrement the reference count.
37.164 - *
37.165 - * If the reference count reaches zero, the image will be freed.
37.166 - *
37.167 - * @param img The image.
37.168 - *
37.169 - * @return @a img or @c NULL if the reference count reached zero.
37.170 - */
37.171 -PurpleStoredImage *
37.172 -purple_imgstore_unref(PurpleStoredImage *img);
37.173 -
37.174 -/**
37.175 - * Increment the reference count using an ID.
37.176 - *
37.177 - * This is a convience wrapper for purple_imgstore_find_by_id() and
37.178 - * purple_imgstore_ref(), so if you have a PurpleStoredImage, it'll
37.179 - * be more efficient to call purple_imgstore_ref() directly.
37.180 - *
37.181 - * @param id The ID for the image.
37.182 - */
37.183 -void purple_imgstore_ref_by_id(int id);
37.184 -
37.185 -/**
37.186 - * Decrement the reference count using an ID.
37.187 - *
37.188 - * This is a convience wrapper for purple_imgstore_find_by_id() and
37.189 - * purple_imgstore_unref(), so if you have a PurpleStoredImage, it'll
37.190 - * be more efficient to call purple_imgstore_unref() directly.
37.191 - *
37.192 - * @param id The ID for the image.
37.193 - */
37.194 -void purple_imgstore_unref_by_id(int id);
37.195 -
37.196 -/**
37.197 - * Returns the image store subsystem handle.
37.198 - *
37.199 - * @return The subsystem handle.
37.200 - */
37.201 -void *purple_imgstore_get_handle(void);
37.202 -
37.203 -/**
37.204 - * Initializes the image store subsystem.
37.205 - */
37.206 -void purple_imgstore_init(void);
37.207 -
37.208 -/**
37.209 - * Uninitializes the image store subsystem.
37.210 - */
37.211 -void purple_imgstore_uninit(void);
37.212 -
37.213 -#ifdef __cplusplus
37.214 -}
37.215 -#endif
37.216 -
37.217 -#endif /* _PURPLE_IMGSTORE_H_ */
38.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/internal.h Fri Aug 21 13:24:36 2009 -0700
38.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
38.3 @@ -1,352 +0,0 @@
38.4 -/**
38.5 - * @file internal.h Internal definitions and includes
38.6 - * @ingroup core
38.7 - */
38.8 -
38.9 -/* purple
38.10 - *
38.11 - * Purple is the legal property of its developers, whose names are too numerous
38.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
38.13 - * source distribution.
38.14 - *
38.15 - * This program is free software; you can redistribute it and/or modify
38.16 - * it under the terms of the GNU General Public License as published by
38.17 - * the Free Software Foundation; either version 2 of the License, or
38.18 - * (at your option) any later version.
38.19 - *
38.20 - * This program is distributed in the hope that it will be useful,
38.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
38.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38.23 - * GNU General Public License for more details.
38.24 - *
38.25 - * You should have received a copy of the GNU General Public License
38.26 - * along with this program; if not, write to the Free Software
38.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
38.28 - */
38.29 -#ifndef _PURPLE_INTERNAL_H_
38.30 -#define _PURPLE_INTERNAL_H_
38.31 -
38.32 -#ifdef HAVE_CONFIG_H
38.33 -# include <config.h>
38.34 -#endif
38.35 -
38.36 -/* for SIOCGIFCONF in SKYOS */
38.37 -#ifdef SKYOS
38.38 -#include <net/sockios.h>
38.39 -#endif
38.40 -/*
38.41 - * If we're using NLS, make sure gettext works. If not, then define
38.42 - * dummy macros in place of the normal gettext macros.
38.43 - *
38.44 - * Also, the perl XS config.h file sometimes defines _ So we need to
38.45 - * make sure _ isn't already defined before trying to define it.
38.46 - *
38.47 - * The Singular/Plural/Number ngettext dummy definition below was
38.48 - * taken from an email to the texinfo mailing list by Manuel Guerrero.
38.49 - * Thank you Manuel, and thank you Alex's good friend Google.
38.50 - */
38.51 -#ifdef ENABLE_NLS
38.52 -# include <locale.h>
38.53 -# include <libintl.h>
38.54 -# define _(String) ((const char *)dgettext(PACKAGE, String))
38.55 -# ifdef gettext_noop
38.56 -# define N_(String) gettext_noop (String)
38.57 -# else
38.58 -# define N_(String) (String)
38.59 -# endif
38.60 -#else
38.61 -# include <locale.h>
38.62 -# define N_(String) (String)
38.63 -# ifndef _
38.64 -# define _(String) ((const char *)String)
38.65 -# endif
38.66 -# define ngettext(Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural))
38.67 -# define dngettext(Domain, Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural))
38.68 -#endif
38.69 -
38.70 -#ifdef HAVE_ENDIAN_H
38.71 -# include <endian.h>
38.72 -#endif
38.73 -
38.74 -#define MSG_LEN 2048
38.75 -/* The above should normally be the same as BUF_LEN,
38.76 - * but just so we're explicitly asking for the max message
38.77 - * length. */
38.78 -#define BUF_LEN MSG_LEN
38.79 -#define BUF_LONG BUF_LEN * 2
38.80 -
38.81 -#include <sys/stat.h>
38.82 -#include <sys/types.h>
38.83 -#ifndef _WIN32
38.84 -#include <sys/time.h>
38.85 -#include <sys/wait.h>
38.86 -#include <sys/time.h>
38.87 -#endif
38.88 -#include <ctype.h>
38.89 -#include <errno.h>
38.90 -#include <fcntl.h>
38.91 -#include <math.h>
38.92 -#include <stdio.h>
38.93 -#include <stdlib.h>
38.94 -#include <string.h>
38.95 -#include <time.h>
38.96 -
38.97 -#ifdef HAVE_ICONV
38.98 -#include <iconv.h>
38.99 -#endif
38.100 -
38.101 -#ifdef HAVE_LANGINFO_CODESET
38.102 -#include <langinfo.h>
38.103 -#endif
38.104 -
38.105 -#include <gmodule.h>
38.106 -
38.107 -#ifdef PURPLE_PLUGINS
38.108 -# ifdef HAVE_DLFCN_H
38.109 -# include <dlfcn.h>
38.110 -# endif
38.111 -#endif
38.112 -
38.113 -#ifndef _WIN32
38.114 -# include <netinet/in.h>
38.115 -# include <sys/socket.h>
38.116 -# include <arpa/inet.h>
38.117 -# include <sys/un.h>
38.118 -# include <sys/utsname.h>
38.119 -# include <netdb.h>
38.120 -# include <signal.h>
38.121 -# include <unistd.h>
38.122 -#endif
38.123 -
38.124 -/* MAXPATHLEN should only be used with readlink() on glib < 2.4.0. For
38.125 - * anything else, use g_file_read_link() or other dynamic functions. This is
38.126 - * important because Hurd has no hard limits on path length. */
38.127 -#if !GLIB_CHECK_VERSION(2,4,0)
38.128 -# ifndef MAXPATHLEN
38.129 -# ifdef PATH_MAX
38.130 -# define MAXPATHLEN PATH_MAX
38.131 -# else
38.132 -# define MAXPATHLEN 1024
38.133 -# endif
38.134 -# endif
38.135 -#endif
38.136 -
38.137 -#ifndef HOST_NAME_MAX
38.138 -# define HOST_NAME_MAX 255
38.139 -#endif
38.140 -
38.141 -#include <glib.h>
38.142 -#if !GLIB_CHECK_VERSION(2,4,0)
38.143 -# define G_MAXUINT32 ((guint32) 0xffffffff)
38.144 -#endif
38.145 -
38.146 -#ifndef G_MAXSIZE
38.147 -# if GLIB_SIZEOF_LONG == 8
38.148 -# define G_MAXSIZE ((gsize) 0xffffffffffffffff)
38.149 -# else
38.150 -# define G_MAXSIZE ((gsize) 0xffffffff)
38.151 -# endif
38.152 -#endif
38.153 -
38.154 -#ifndef G_MAXSSIZE
38.155 -# if GLIB_SIZEOF_LONG == 8
38.156 -# define G_MAXSSIZE ((gssize) 0x7fffffffffffffff)
38.157 -# else
38.158 -# define G_MAXSSIZE ((gssize) 0x7fffffff)
38.159 -# endif
38.160 -#endif
38.161 -
38.162 -#if GLIB_CHECK_VERSION(2,6,0)
38.163 -# include <glib/gstdio.h>
38.164 -#endif
38.165 -
38.166 -#if !GLIB_CHECK_VERSION(2,6,0)
38.167 -# define g_freopen freopen
38.168 -# define g_fopen fopen
38.169 -# define g_rmdir rmdir
38.170 -# define g_remove remove
38.171 -# define g_unlink unlink
38.172 -# define g_lstat lstat
38.173 -# define g_stat stat
38.174 -# define g_mkdir mkdir
38.175 -# define g_rename rename
38.176 -# define g_open open
38.177 -#endif
38.178 -
38.179 -#if !GLIB_CHECK_VERSION(2,8,0) && !defined _WIN32
38.180 -# define g_access access
38.181 -#endif
38.182 -
38.183 -#if !GLIB_CHECK_VERSION(2,10,0)
38.184 -# define g_slice_new(type) g_new(type, 1)
38.185 -# define g_slice_new0(type) g_new0(type, 1)
38.186 -# define g_slice_free(type, mem) g_free(mem)
38.187 -#endif
38.188 -
38.189 -#ifdef _WIN32
38.190 -#include "win32dep.h"
38.191 -#endif
38.192 -
38.193 -/* ugly ugly ugly */
38.194 -/* This is a workaround for the fact that G_GINT64_MODIFIER and G_GSIZE_FORMAT
38.195 - * are only defined in Glib >= 2.4 */
38.196 -#ifndef G_GINT64_MODIFIER
38.197 -# if GLIB_SIZEOF_LONG == 8
38.198 -# define G_GINT64_MODIFIER "l"
38.199 -# else
38.200 -# define G_GINT64_MODIFIER "ll"
38.201 -# endif
38.202 -#endif
38.203 -
38.204 -#ifndef G_GSIZE_MODIFIER
38.205 -# if GLIB_SIZEOF_LONG == 8
38.206 -# define G_GSIZE_MODIFIER "l"
38.207 -# else
38.208 -# define G_GSIZE_MODIFIER ""
38.209 -# endif
38.210 -#endif
38.211 -
38.212 -#ifndef G_GSIZE_FORMAT
38.213 -# if GLIB_SIZEOF_LONG == 8
38.214 -# define G_GSIZE_FORMAT "lu"
38.215 -# else
38.216 -# define G_GSIZE_FORMAT "u"
38.217 -# endif
38.218 -#endif
38.219 -
38.220 -#ifndef G_GSSIZE_FORMAT
38.221 -# if GLIB_SIZEOF_LONG == 8
38.222 -# define G_GSSIZE_FORMAT "li"
38.223 -# else
38.224 -# define G_GSSIZE_FORMAT "i"
38.225 -# endif
38.226 -#endif
38.227 -
38.228 -#ifndef G_GNUC_NULL_TERMINATED
38.229 -# if __GNUC__ >= 4
38.230 -# define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
38.231 -# else
38.232 -# define G_GNUC_NULL_TERMINATED
38.233 -# endif
38.234 -#endif
38.235 -
38.236 -#ifdef HAVE_CONFIG_H
38.237 -#if SIZEOF_TIME_T == 4
38.238 -# define PURPLE_TIME_T_MODIFIER "lu"
38.239 -#elif SIZEOF_TIME_T == 8
38.240 -# define PURPLE_TIME_T_MODIFIER "zu"
38.241 -#else
38.242 -#error Unknown size of time_t
38.243 -#endif
38.244 -#endif
38.245 -
38.246 -#include <glib-object.h>
38.247 -
38.248 -#ifndef G_DEFINE_TYPE
38.249 -#define G_DEFINE_TYPE(TypeName, type_name, TYPE_PARENT) \
38.250 -\
38.251 -static void type_name##_init (TypeName *self); \
38.252 -static void type_name##_class_init (TypeName##Class *klass); \
38.253 -static gpointer type_name##_parent_class = NULL; \
38.254 -static void type_name##_class_intern_init (gpointer klass) \
38.255 -{ \
38.256 - type_name##_parent_class = g_type_class_peek_parent (klass); \
38.257 - type_name##_class_init ((TypeName##Class*) klass); \
38.258 -} \
38.259 -\
38.260 -GType \
38.261 -type_name##_get_type (void) \
38.262 -{ \
38.263 - static GType g_define_type_id = 0; \
38.264 - if (G_UNLIKELY (g_define_type_id == 0)) \
38.265 - { \
38.266 - g_define_type_id = \
38.267 - g_type_register_static_simple (TYPE_PARENT, \
38.268 - g_intern_static_string (#TypeName), \
38.269 - sizeof (TypeName##Class), \
38.270 - (GClassInitFunc)type_name##_class_intern_init, \
38.271 - sizeof (TypeName), \
38.272 - (GInstanceInitFunc)type_name##_init, \
38.273 - (GTypeFlags) 0); \
38.274 - } \
38.275 - return g_define_type_id; \
38.276 -} /* closes type_name##_get_type() */
38.277 -
38.278 -#endif
38.279 -
38.280 -/* Safer ways to work with static buffers. When using non-static
38.281 - * buffers, either use g_strdup_* functions (preferred) or use
38.282 - * g_strlcpy/g_strlcpy directly. */
38.283 -#define purple_strlcpy(dest, src) g_strlcpy(dest, src, sizeof(dest))
38.284 -#define purple_strlcat(dest, src) g_strlcat(dest, src, sizeof(dest))
38.285 -
38.286 -#define PURPLE_WEBSITE "http://pidgin.im/"
38.287 -#define PURPLE_DEVEL_WEBSITE "http://developer.pidgin.im/"
38.288 -
38.289 -
38.290 -/* INTERNAL FUNCTIONS */
38.291 -
38.292 -#include "account.h"
38.293 -#include "connection.h"
38.294 -
38.295 -/* This is for the accounts code to notify the buddy icon code that
38.296 - * it's done loading. We may want to replace this with a signal. */
38.297 -void
38.298 -_purple_buddy_icons_account_loaded_cb(void);
38.299 -
38.300 -/* This is for the buddy list to notify the buddy icon code that
38.301 - * it's done loading. We may want to replace this with a signal. */
38.302 -void
38.303 -_purple_buddy_icons_blist_loaded_cb(void);
38.304 -
38.305 -/* This is for the purple_core_migrate() code to tell the buddy
38.306 - * icon subsystem about the old icons directory so it can
38.307 - * migrate any icons in use. */
38.308 -void
38.309 -_purple_buddy_icon_set_old_icons_dir(const char *dirname);
38.310 -
38.311 -/**
38.312 - * Creates a connection to the specified account and either connects
38.313 - * or attempts to register a new account. If you are logging in,
38.314 - * the connection uses the current active status for this account.
38.315 - * So if you want to sign on as "away," for example, you need to
38.316 - * have called purple_account_set_status(account, "away").
38.317 - * (And this will call purple_account_connect() automatically).
38.318 - *
38.319 - * @note This function should only be called by purple_account_connect()
38.320 - * in account.c. If you're trying to sign on an account, use that
38.321 - * function instead.
38.322 - *
38.323 - * @param account The account the connection should be connecting to.
38.324 - * @param regist Whether we are registering a new account or just
38.325 - * trying to do a normal signon.
38.326 - * @param password The password to use.
38.327 - */
38.328 -void _purple_connection_new(PurpleAccount *account, gboolean regist,
38.329 - const char *password);
38.330 -/**
38.331 - * Tries to unregister the account on the server. If the account is not
38.332 - * connected, also creates a new connection.
38.333 - *
38.334 - * @note This function should only be called by purple_account_unregister()
38.335 - * in account.c.
38.336 - *
38.337 - * @param account The account to unregister
38.338 - * @param password The password to use.
38.339 - * @param cb Optional callback to be called when unregistration is complete
38.340 - * @param user_data user data to pass to the callback
38.341 - */
38.342 -void _purple_connection_new_unregister(PurpleAccount *account, const char *password,
38.343 - PurpleAccountUnregistrationCb cb, void *user_data);
38.344 -/**
38.345 - * Disconnects and destroys a PurpleConnection.
38.346 - *
38.347 - * @note This function should only be called by purple_account_disconnect()
38.348 - * in account.c. If you're trying to sign off an account, use that
38.349 - * function instead.
38.350 - *
38.351 - * @param gc The purple connection to destroy.
38.352 - */
38.353 -void _purple_connection_destroy(PurpleConnection *gc);
38.354 -
38.355 -#endif /* _PURPLE_INTERNAL_H_ */
39.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/iq.h Fri Aug 21 13:24:36 2009 -0700
39.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
39.3 @@ -1,114 +0,0 @@
39.4 -/**
39.5 - * @file iq.h JabberID handlers
39.6 - *
39.7 - * purple
39.8 - *
39.9 - * Copyright (C) 2003 Nathan Walp <faceprint@faceprint.com>
39.10 - *
39.11 - * This program is free software; you can redistribute it and/or modify
39.12 - * it under the terms of the GNU General Public License as published by
39.13 - * the Free Software Foundation; either version 2 of the License, or
39.14 - * (at your option) any later version.
39.15 - *
39.16 - * This program is distributed in the hope that it will be useful,
39.17 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
39.18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39.19 - * GNU General Public License for more details.
39.20 - *
39.21 - * You should have received a copy of the GNU General Public License
39.22 - * along with this program; if not, write to the Free Software
39.23 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
39.24 - */
39.25 -#ifndef PURPLE_JABBER_IQ_H_
39.26 -#define PURPLE_JABBER_IQ_H_
39.27 -
39.28 -typedef enum {
39.29 - JABBER_IQ_SET,
39.30 - JABBER_IQ_GET,
39.31 - JABBER_IQ_RESULT,
39.32 - JABBER_IQ_ERROR,
39.33 - JABBER_IQ_NONE
39.34 -} JabberIqType;
39.35 -
39.36 -#include "jabber.h"
39.37 -#include "connection.h"
39.38 -
39.39 -typedef struct _JabberIq JabberIq;
39.40 -
39.41 -/**
39.42 - * A JabberIqHandler is called to process an incoming IQ stanza.
39.43 - * Handlers typically process unsolicited incoming GETs or SETs for their
39.44 - * registered namespace, but may be called to handle the results of a
39.45 - * GET or SET that we generated if no JabberIqCallback was generated
39.46 - * The handler may be called for the results of a GET or SET (RESULT or ERROR)
39.47 - * that we generated
39.48 - * if the generating function did not register a JabberIqCallback.
39.49 - *
39.50 - * @param js The JabberStream object.
39.51 - * @param from The remote entity (the from attribute on the <iq/> stanza)
39.52 - * @param type The IQ type.
39.53 - * @param id The IQ id (the id attribute on the <iq/> stanza)
39.54 - * @param child The child element of the <iq/> stanza that matches the name
39.55 - * and namespace registered with jabber_iq_register_handler.
39.56 - *
39.57 - * @see jabber_iq_register_handler()
39.58 - * @see JabberIqCallback
39.59 - */
39.60 -typedef void (JabberIqHandler)(JabberStream *js, const char *from,
39.61 - JabberIqType type, const char *id,
39.62 - xmlnode *child);
39.63 -
39.64 -/**
39.65 - * A JabberIqCallback is called to process the results of a GET or SET that
39.66 - * we send to a remote entity. The callback is matched based on the id
39.67 - * of the incoming stanza (which matches the one on the initial stanza).
39.68 - *
39.69 - * @param js The JabberStream object.
39.70 - * @param from The remote entity (the from attribute on the <iq/> stanza)
39.71 - * @param type The IQ type. The only possible values are JABBER_IQ_RESULT
39.72 - * and JABBER_IQ_ERROR.
39.73 - * @param id The IQ id (the id attribute on the <iq/> stanza)
39.74 - * @param packet The <iq/> stanza
39.75 - * @param data The callback data passed to jabber_iq_set_callback()
39.76 - *
39.77 - * @see jabber_iq_set_callback()
39.78 - */
39.79 -typedef void (JabberIqCallback)(JabberStream *js, const char *from,
39.80 - JabberIqType type, const char *id,
39.81 - xmlnode *packet, gpointer data);
39.82 -
39.83 -struct _JabberIq {
39.84 - JabberIqType type;
39.85 - char *id;
39.86 - xmlnode *node;
39.87 -
39.88 - JabberIqCallback *callback;
39.89 - gpointer callback_data;
39.90 -
39.91 - JabberStream *js;
39.92 -};
39.93 -
39.94 -JabberIq *jabber_iq_new(JabberStream *js, JabberIqType type);
39.95 -JabberIq *jabber_iq_new_query(JabberStream *js, JabberIqType type,
39.96 - const char *xmlns);
39.97 -
39.98 -void jabber_iq_parse(JabberStream *js, xmlnode *packet);
39.99 -
39.100 -void jabber_iq_remove_callback_by_id(JabberStream *js, const char *id);
39.101 -void jabber_iq_set_callback(JabberIq *iq, JabberIqCallback *cb, gpointer data);
39.102 -void jabber_iq_set_id(JabberIq *iq, const char *id);
39.103 -
39.104 -void jabber_iq_send(JabberIq *iq);
39.105 -void jabber_iq_free(JabberIq *iq);
39.106 -
39.107 -void jabber_iq_init(void);
39.108 -void jabber_iq_uninit(void);
39.109 -
39.110 -void jabber_iq_register_handler(const char *node, const char *xmlns,
39.111 - JabberIqHandler *func);
39.112 -
39.113 -/* Connected to namespace-handler registration signals */
39.114 -void jabber_iq_signal_register(const gchar *node, const gchar *xmlns);
39.115 -void jabber_iq_signal_unregister(const gchar *node, const gchar *xmlns);
39.116 -
39.117 -#endif /* PURPLE_JABBER_IQ_H_ */
40.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/irc.h Fri Aug 21 13:24:36 2009 -0700
40.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
40.3 @@ -1,198 +0,0 @@
40.4 -/**
40.5 - * @file irc.h
40.6 - *
40.7 - * purple
40.8 - *
40.9 - * Copyright (C) 2003, Ethan Blanton <eblanton@cs.purdue.edu>
40.10 - *
40.11 - * This program is free software; you can redistribute it and/or modify
40.12 - * it under the terms of the GNU General Public License as published by
40.13 - * the Free Software Foundation; either version 2 of the License, or
40.14 - * (at your option) any later version.
40.15 - *
40.16 - * This program is distributed in the hope that it will be useful,
40.17 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
40.18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40.19 - * GNU General Public License for more details.
40.20 - *
40.21 - * You should have received a copy of the GNU General Public License
40.22 - * along with this program; if not, write to the Free Software
40.23 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
40.24 - */
40.25 -
40.26 -#ifndef _PURPLE_IRC_H
40.27 -#define _PURPLE_IRC_H
40.28 -
40.29 -#include <glib.h>
40.30 -
40.31 -#include "circbuffer.h"
40.32 -#include "ft.h"
40.33 -#include "roomlist.h"
40.34 -#include "sslconn.h"
40.35 -
40.36 -#define IRC_DEFAULT_SERVER "irc.freenode.net"
40.37 -#define IRC_DEFAULT_PORT 6667
40.38 -#define IRC_DEFAULT_SSL_PORT 994
40.39 -
40.40 -#define IRC_DEFAULT_CHARSET "UTF-8"
40.41 -#define IRC_DEFAULT_AUTODETECT FALSE
40.42 -#define IRC_DEFAULT_ALIAS "purple"
40.43 -
40.44 -#define IRC_DEFAULT_QUIT "Leaving."
40.45 -
40.46 -#define IRC_INITIAL_BUFSIZE 1024
40.47 -
40.48 -#define IRC_NAMES_FLAG "irc-namelist"
40.49 -
40.50 -
40.51 -enum { IRC_USEROPT_SERVER, IRC_USEROPT_PORT, IRC_USEROPT_CHARSET };
40.52 -enum irc_state { IRC_STATE_NEW, IRC_STATE_ESTABLISHED };
40.53 -
40.54 -struct irc_conn {
40.55 - PurpleAccount *account;
40.56 - GHashTable *msgs;
40.57 - GHashTable *cmds;
40.58 - char *server;
40.59 - int fd;
40.60 - guint timer;
40.61 - GHashTable *buddies;
40.62 -
40.63 - gboolean ison_outstanding;
40.64 -
40.65 - char *inbuf;
40.66 - int inbuflen;
40.67 - int inbufused;
40.68 -
40.69 - GString *motd;
40.70 - GString *names;
40.71 - struct _whois {
40.72 - char *nick;
40.73 - char *away;
40.74 - char *userhost;
40.75 - char *name;
40.76 - char *server;
40.77 - char *serverinfo;
40.78 - char *channels;
40.79 - int ircop;
40.80 - int identified;
40.81 - int idle;
40.82 - time_t signon;
40.83 - } whois;
40.84 - PurpleRoomlist *roomlist;
40.85 - PurpleSslConnection *gsc;
40.86 -
40.87 - gboolean quitting;
40.88 -
40.89 - PurpleCircBuffer *outbuf;
40.90 - guint writeh;
40.91 -
40.92 - time_t recv_time;
40.93 -
40.94 - char *mode_chars;
40.95 - char *reqnick;
40.96 - gboolean nickused;
40.97 -};
40.98 -
40.99 -struct irc_buddy {
40.100 - char *name;
40.101 - gboolean online;
40.102 - gboolean flag;
40.103 -};
40.104 -
40.105 -typedef int (*IRCCmdCallback) (struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.106 -
40.107 -int irc_send(struct irc_conn *irc, const char *buf);
40.108 -gboolean irc_blist_timeout(struct irc_conn *irc);
40.109 -
40.110 -char *irc_escape_privmsg(const char *text, gssize length);
40.111 -
40.112 -char *irc_mirc2html(const char *string);
40.113 -char *irc_mirc2txt(const char *string);
40.114 -
40.115 -const char *irc_nick_skip_mode(struct irc_conn *irc, const char *string);
40.116 -
40.117 -gboolean irc_ischannel(const char *string);
40.118 -
40.119 -void irc_register_commands(void);
40.120 -void irc_msg_table_build(struct irc_conn *irc);
40.121 -void irc_parse_msg(struct irc_conn *irc, char *input);
40.122 -char *irc_parse_ctcp(struct irc_conn *irc, const char *from, const char *to, const char *msg, int notice);
40.123 -char *irc_format(struct irc_conn *irc, const char *format, ...);
40.124 -
40.125 -void irc_msg_default(struct irc_conn *irc, const char *name, const char *from, char **args);
40.126 -void irc_msg_away(struct irc_conn *irc, const char *name, const char *from, char **args);
40.127 -void irc_msg_badmode(struct irc_conn *irc, const char *name, const char *from, char **args);
40.128 -void irc_msg_badnick(struct irc_conn *irc, const char *name, const char *from, char **args);
40.129 -void irc_msg_ban(struct irc_conn *irc, const char *name, const char *from, char **args);
40.130 -void irc_msg_banfull(struct irc_conn *irc, const char *name, const char *from, char **args);
40.131 -void irc_msg_banned(struct irc_conn *irc, const char *name, const char *from, char **args);
40.132 -void irc_msg_chanmode(struct irc_conn *irc, const char *name, const char *from, char **args);
40.133 -void irc_msg_endwhois(struct irc_conn *irc, const char *name, const char *from, char **args);
40.134 -void irc_msg_features(struct irc_conn *irc, const char *name, const char *from, char **args);
40.135 -void irc_msg_invite(struct irc_conn *irc, const char *name, const char *from, char **args);
40.136 -void irc_msg_inviteonly(struct irc_conn *irc, const char *name, const char *from, char **args);
40.137 -void irc_msg_ison(struct irc_conn *irc, const char *name, const char *from, char **args);
40.138 -void irc_msg_join(struct irc_conn *irc, const char *name, const char *from, char **args);
40.139 -void irc_msg_kick(struct irc_conn *irc, const char *name, const char *from, char **args);
40.140 -void irc_msg_list(struct irc_conn *irc, const char *name, const char *from, char **args);
40.141 -void irc_msg_luser(struct irc_conn *irc, const char *name, const char *from, char **args);
40.142 -void irc_msg_mode(struct irc_conn *irc, const char *name, const char *from, char **args);
40.143 -void irc_msg_motd(struct irc_conn *irc, const char *name, const char *from, char **args);
40.144 -void irc_msg_names(struct irc_conn *irc, const char *name, const char *from, char **args);
40.145 -void irc_msg_nick(struct irc_conn *irc, const char *name, const char *from, char **args);
40.146 -void irc_msg_nickused(struct irc_conn *irc, const char *name, const char *from, char **args);
40.147 -void irc_msg_nochan(struct irc_conn *irc, const char *name, const char *from, char **args);
40.148 -void irc_msg_nonick(struct irc_conn *irc, const char *name, const char *from, char **args);
40.149 -void irc_msg_nochangenick(struct irc_conn *irc, const char *name, const char *from, char **args);
40.150 -void irc_msg_nosend(struct irc_conn *irc, const char *name, const char *from, char **args);
40.151 -void irc_msg_notice(struct irc_conn *irc, const char *name, const char *from, char **args);
40.152 -void irc_msg_notinchan(struct irc_conn *irc, const char *name, const char *from, char **args);
40.153 -void irc_msg_notop(struct irc_conn *irc, const char *name, const char *from, char **args);
40.154 -void irc_msg_part(struct irc_conn *irc, const char *name, const char *from, char **args);
40.155 -void irc_msg_ping(struct irc_conn *irc, const char *name, const char *from, char **args);
40.156 -void irc_msg_pong(struct irc_conn *irc, const char *name, const char *from, char **args);
40.157 -void irc_msg_privmsg(struct irc_conn *irc, const char *name, const char *from, char **args);
40.158 -void irc_msg_quit(struct irc_conn *irc, const char *name, const char *from, char **args);
40.159 -void irc_msg_regonly(struct irc_conn *irc, const char *name, const char *from, char **args);
40.160 -void irc_msg_time(struct irc_conn *irc, const char *name, const char *from, char **args);
40.161 -void irc_msg_topic(struct irc_conn *irc, const char *name, const char *from, char **args);
40.162 -void irc_msg_unavailable(struct irc_conn *irc, const char *name, const char *from, char **args);
40.163 -void irc_msg_unknown(struct irc_conn *irc, const char *name, const char *from, char **args);
40.164 -void irc_msg_wallops(struct irc_conn *irc, const char *name, const char *from, char **args);
40.165 -void irc_msg_whois(struct irc_conn *irc, const char *name, const char *from, char **args);
40.166 -
40.167 -void irc_msg_ignore(struct irc_conn *irc, const char *name, const char *from, char **args);
40.168 -
40.169 -void irc_cmd_table_build(struct irc_conn *irc);
40.170 -
40.171 -int irc_cmd_default(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.172 -int irc_cmd_away(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.173 -int irc_cmd_ctcp(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.174 -int irc_cmd_ctcp_action(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.175 -int irc_cmd_ctcp_version(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.176 -int irc_cmd_invite(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.177 -int irc_cmd_join(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.178 -int irc_cmd_kick(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.179 -int irc_cmd_list(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.180 -int irc_cmd_mode(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.181 -int irc_cmd_names(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.182 -int irc_cmd_nick(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.183 -int irc_cmd_op(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.184 -int irc_cmd_privmsg(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.185 -int irc_cmd_part(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.186 -int irc_cmd_ping(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.187 -int irc_cmd_quit(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.188 -int irc_cmd_quote(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.189 -int irc_cmd_query(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.190 -int irc_cmd_remove(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.191 -int irc_cmd_service(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.192 -int irc_cmd_time(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.193 -int irc_cmd_topic(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.194 -int irc_cmd_wallops(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.195 -int irc_cmd_whois(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.196 -int irc_cmd_whowas(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
40.197 -
40.198 -PurpleXfer *irc_dccsend_new_xfer(PurpleConnection *gc, const char *who);
40.199 -void irc_dccsend_send_file(PurpleConnection *gc, const char *who, const char *file);
40.200 -void irc_dccsend_recv(struct irc_conn *irc, const char *from, const char *msg);
40.201 -#endif /* _PURPLE_IRC_H */
41.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/jabber.h Fri Aug 21 13:24:36 2009 -0700
41.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
41.3 @@ -1,385 +0,0 @@
41.4 -/**
41.5 - * @file jabber.h
41.6 - *
41.7 - * purple
41.8 - *
41.9 - * Copyright (C) 2003 Nathan Walp <faceprint@faceprint.com>
41.10 - *
41.11 - * This program is free software; you can redistribute it and/or modify
41.12 - * it under the terms of the GNU General Public License as published by
41.13 - * the Free Software Foundation; either version 2 of the License, or
41.14 - * (at your option) any later version.
41.15 - *
41.16 - * This program is distributed in the hope that it will be useful,
41.17 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
41.18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41.19 - * GNU General Public License for more details.
41.20 - *
41.21 - * You should have received a copy of the GNU General Public License
41.22 - * along with this program; if not, write to the Free Software
41.23 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
41.24 - */
41.25 -#ifndef PURPLE_JABBER_H_
41.26 -#define PURPLE_JABBER_H_
41.27 -
41.28 -typedef enum {
41.29 - JABBER_CAP_NONE = 0,
41.30 -/* JABBER_CAP_XHTML = 1 << 0, */
41.31 -/* JABBER_CAP_COMPOSING = 1 << 1, */
41.32 - JABBER_CAP_SI = 1 << 2,
41.33 - JABBER_CAP_SI_FILE_XFER = 1 << 3,
41.34 - JABBER_CAP_BYTESTREAMS = 1 << 4,
41.35 - JABBER_CAP_IBB = 1 << 5,
41.36 - JABBER_CAP_CHAT_STATES = 1 << 6,
41.37 - JABBER_CAP_IQ_SEARCH = 1 << 7,
41.38 - JABBER_CAP_IQ_REGISTER = 1 << 8,
41.39 -
41.40 - /* Google Talk extensions:
41.41 - * http://code.google.com/apis/talk/jep_extensions/extensions.html
41.42 - */
41.43 - JABBER_CAP_GMAIL_NOTIFY = 1 << 9,
41.44 - JABBER_CAP_GOOGLE_ROSTER = 1 << 10,
41.45 -
41.46 - JABBER_CAP_PING = 1 << 11,
41.47 - JABBER_CAP_ADHOC = 1 << 12,
41.48 - JABBER_CAP_BLOCKING = 1 << 13,
41.49 -
41.50 - JABBER_CAP_ITEMS = 1 << 14,
41.51 -
41.52 - JABBER_CAP_RETRIEVED = 1 << 31
41.53 -} JabberCapabilities;
41.54 -
41.55 -typedef struct _JabberStream JabberStream;
41.56 -
41.57 -#include <libxml/parser.h>
41.58 -#include <glib.h>
41.59 -#include "circbuffer.h"
41.60 -#include "connection.h"
41.61 -#include "dnsquery.h"
41.62 -#include "dnssrv.h"
41.63 -#include "media.h"
41.64 -#include "mediamanager.h"
41.65 -#include "roomlist.h"
41.66 -#include "sslconn.h"
41.67 -
41.68 -#include "iq.h"
41.69 -#include "jutil.h"
41.70 -#include "xmlnode.h"
41.71 -#include "buddy.h"
41.72 -#include "bosh.h"
41.73 -
41.74 -#ifdef HAVE_CYRUS_SASL
41.75 -#include <sasl/sasl.h>
41.76 -#endif
41.77 -
41.78 -#define CAPS0115_NODE "http://pidgin.im/"
41.79 -
41.80 -/* Index into attention_types list */
41.81 -#define JABBER_BUZZ 0
41.82 -
41.83 -extern PurplePlugin *jabber_plugin;
41.84 -
41.85 -typedef enum {
41.86 - JABBER_STREAM_OFFLINE,
41.87 - JABBER_STREAM_CONNECTING,
41.88 - JABBER_STREAM_INITIALIZING,
41.89 - JABBER_STREAM_INITIALIZING_ENCRYPTION,
41.90 - JABBER_STREAM_AUTHENTICATING,
41.91 - JABBER_STREAM_REINITIALIZING,
41.92 - JABBER_STREAM_CONNECTED
41.93 -} JabberStreamState;
41.94 -
41.95 -struct _JabberStream
41.96 -{
41.97 - int fd;
41.98 -
41.99 - PurpleSrvQueryData *srv_query_data;
41.100 -
41.101 - xmlParserCtxt *context;
41.102 - xmlnode *current;
41.103 -
41.104 - enum {
41.105 - JABBER_PROTO_0_9,
41.106 - JABBER_PROTO_1_0
41.107 - } protocol_version;
41.108 - enum {
41.109 - JABBER_AUTH_UNKNOWN,
41.110 - JABBER_AUTH_DIGEST_MD5,
41.111 - JABBER_AUTH_PLAIN,
41.112 - JABBER_AUTH_IQ_AUTH,
41.113 - JABBER_AUTH_CYRUS
41.114 - } auth_type;
41.115 - char *stream_id;
41.116 - JabberStreamState state;
41.117 -
41.118 - /* SASL authentication */
41.119 - char *expected_rspauth;
41.120 -
41.121 - GHashTable *buddies;
41.122 -
41.123 - /*
41.124 - * This boolean was added to eliminate a heinous bug where we would
41.125 - * get into a loop with the server and move a buddy back and forth
41.126 - * from one group to another.
41.127 - *
41.128 - * The sequence goes something like this:
41.129 - * 1. Our resource and another resource both approve an authorization
41.130 - * request at the exact same time. We put the buddy in group A and
41.131 - * the other resource put the buddy in group B.
41.132 - * 2. The server receives the roster add for group B and sends us a
41.133 - * roster push.
41.134 - * 3. We receive this roster push and modify our local blist. This
41.135 - * triggers us to send a roster add for group B.
41.136 - * 4. The server recieves our earlier roster add for group A and sends
41.137 - * us a roster push.
41.138 - * 5. We receive this roster push and modify our local blist. This
41.139 - * triggers us to send a roster add for group A.
41.140 - * 6. The server receives our earlier roster add for group B and sends
41.141 - * us a roster push.
41.142 - * (repeat steps 3 through 6 ad infinitum)
41.143 - *
41.144 - * This boolean is used to short-circuit the sending of a roster add
41.145 - * when we receive a roster push.
41.146 - *
41.147 - * See these bug reports:
41.148 - * http://trac.adiumx.com/ticket/8834
41.149 - * http://developer.pidgin.im/ticket/5484
41.150 - * http://developer.pidgin.im/ticket/6188
41.151 - */
41.152 - gboolean currently_parsing_roster_push;
41.153 -
41.154 - GHashTable *chats;
41.155 - GList *chat_servers;
41.156 - PurpleRoomlist *roomlist;
41.157 - GList *user_directories;
41.158 -
41.159 - GHashTable *iq_callbacks;
41.160 - int next_id;
41.161 -
41.162 - GList *bs_proxies;
41.163 - GList *oob_file_transfers;
41.164 - GList *file_transfers;
41.165 -
41.166 - time_t idle;
41.167 - time_t old_idle;
41.168 -
41.169 - JabberID *user;
41.170 - JabberBuddy *user_jb;
41.171 -
41.172 - PurpleConnection *gc;
41.173 - PurpleSslConnection *gsc;
41.174 -
41.175 - gboolean registration;
41.176 -
41.177 - char *initial_avatar_hash;
41.178 - char *avatar_hash;
41.179 - GSList *pending_avatar_requests;
41.180 -
41.181 - GSList *pending_buddy_info_requests;
41.182 -
41.183 - PurpleCircBuffer *write_buffer;
41.184 - guint writeh;
41.185 -
41.186 - gboolean reinit;
41.187 -
41.188 - JabberCapabilities server_caps;
41.189 - gboolean googletalk;
41.190 - char *server_name;
41.191 -
41.192 - char *gmail_last_time;
41.193 - char *gmail_last_tid;
41.194 -
41.195 - char *serverFQDN;
41.196 -
41.197 - /* OK, this stays at the end of the struct, so plugins can depend
41.198 - * on the rest of the stuff being in the right place
41.199 - */
41.200 -#ifdef HAVE_CYRUS_SASL
41.201 - sasl_conn_t *sasl;
41.202 - sasl_callback_t *sasl_cb;
41.203 -#else /* keep the struct the same size */
41.204 - void *sasl;
41.205 - void *sasl_cb;
41.206 -#endif
41.207 - /* did someone say something about the end of the struct? */
41.208 -#ifdef HAVE_CYRUS_SASL
41.209 - const char *current_mech;
41.210 - int auth_fail_count;
41.211 -#endif
41.212 -
41.213 - int sasl_state;
41.214 - int sasl_maxbuf;
41.215 - GString *sasl_mechs;
41.216 -
41.217 - gboolean unregistration;
41.218 - PurpleAccountUnregistrationCb unregistration_cb;
41.219 - void *unregistration_user_data;
41.220 -
41.221 - gboolean vcard_fetched;
41.222 - /* Timer at login to push updated avatar */
41.223 - guint vcard_timer;
41.224 -
41.225 - /* Entity Capabilities hash */
41.226 - char *caps_hash;
41.227 -
41.228 - /* does the local server support PEP? */
41.229 - gboolean pep;
41.230 -
41.231 - /* Is Buzz enabled? */
41.232 - gboolean allowBuzz;
41.233 -
41.234 - /* A list of JabberAdHocCommands supported by the server */
41.235 - GList *commands;
41.236 -
41.237 - /* last presence update to check for differences */
41.238 - JabberBuddyState old_state;
41.239 - char *old_msg;
41.240 - int old_priority;
41.241 - char *old_avatarhash;
41.242 -
41.243 - /* same for user tune */
41.244 - char *old_artist;
41.245 - char *old_title;
41.246 - char *old_source;
41.247 - char *old_uri;
41.248 - int old_length;
41.249 - char *old_track;
41.250 -
41.251 - char *certificate_CN;
41.252 -
41.253 - /* A purple timeout tag for the keepalive */
41.254 - guint keepalive_timeout;
41.255 -
41.256 - PurpleSrvResponse *srv_rec;
41.257 - guint srv_rec_idx;
41.258 - guint max_srv_rec_idx;
41.259 -
41.260 - /* BOSH stuff */
41.261 - PurpleBOSHConnection *bosh;
41.262 -
41.263 - /**
41.264 - * This linked list contains PurpleUtilFetchUrlData structs
41.265 - * for when we lookup buddy icons from a url
41.266 - */
41.267 - GSList *url_datas;
41.268 -
41.269 - /* keep a hash table of JingleSessions */
41.270 - GHashTable *sessions;
41.271 -
41.272 - /* maybe this should only be present when USE_VV? */
41.273 - gchar *stun_ip;
41.274 - int stun_port;
41.275 - PurpleDnsQueryData *stun_query;
41.276 - /* later add stuff to handle TURN relays... */
41.277 -};
41.278 -
41.279 -typedef gboolean (JabberFeatureEnabled)(JabberStream *js, const gchar *namespace);
41.280 -
41.281 -typedef struct _JabberFeature
41.282 -{
41.283 - gchar *namespace;
41.284 - JabberFeatureEnabled *is_enabled;
41.285 -} JabberFeature;
41.286 -
41.287 -typedef struct _JabberIdentity
41.288 -{
41.289 - gchar *category;
41.290 - gchar *type;
41.291 - gchar *name;
41.292 - gchar *lang;
41.293 -} JabberIdentity;
41.294 -
41.295 -typedef struct _JabberBytestreamsStreamhost {
41.296 - char *jid;
41.297 - char *host;
41.298 - int port;
41.299 - char *zeroconf;
41.300 -} JabberBytestreamsStreamhost;
41.301 -
41.302 -/* what kind of additional features as returned from disco#info are supported? */
41.303 -extern GList *jabber_features;
41.304 -extern GList *jabber_identities;
41.305 -
41.306 -void jabber_stream_features_parse(JabberStream *js, xmlnode *packet);
41.307 -void jabber_process_packet(JabberStream *js, xmlnode **packet);
41.308 -void jabber_send(JabberStream *js, xmlnode *data);
41.309 -void jabber_send_raw(JabberStream *js, const char *data, int len);
41.310 -void jabber_send_signal_cb(PurpleConnection *pc, xmlnode **packet,
41.311 - gpointer unused);
41.312 -
41.313 -void jabber_stream_set_state(JabberStream *js, JabberStreamState state);
41.314 -
41.315 -void jabber_register_parse(JabberStream *js, const char *from,
41.316 - JabberIqType type, const char *id, xmlnode *query);
41.317 -void jabber_register_start(JabberStream *js);
41.318 -
41.319 -char *jabber_get_next_id(JabberStream *js);
41.320 -
41.321 -/** Parse an error into a human-readable string and optionally a disconnect
41.322 - * reason.
41.323 - * @param js the stream on which the error occurred.
41.324 - * @param packet the error packet
41.325 - * @param reason where to store the disconnection reason, or @c NULL if you
41.326 - * don't care or you don't intend to close the connection.
41.327 - */
41.328 -char *jabber_parse_error(JabberStream *js, xmlnode *packet, PurpleConnectionError *reason);
41.329 -
41.330 -void jabber_add_feature(const gchar *namespace, JabberFeatureEnabled cb); /* cb may be NULL */
41.331 -void jabber_remove_feature(const gchar *namespace);
41.332 -
41.333 -/** Adds an identity to this jabber library instance. For list of valid values visit the
41.334 - * website of the XMPP Registrar ( http://www.xmpp.org/registrar/disco-categories.html#client ).
41.335 - * @param category the category of the identity.
41.336 - * @param type the type of the identity.
41.337 - * @param language the language localization of the name. Can be NULL.
41.338 - * @param name the name of the identity.
41.339 - */
41.340 -void jabber_add_identity(const gchar *category, const gchar *type, const gchar *lang, const gchar *name);
41.341 -
41.342 -/**
41.343 - * Returns true if this connection is over a secure (SSL) stream. Use this
41.344 - * instead of checking js->gsc because BOSH stores its PurpleSslConnection
41.345 - * members in its own data structure.
41.346 - */
41.347 -gboolean jabber_stream_is_ssl(JabberStream *js);
41.348 -
41.349 -/** PRPL functions */
41.350 -const char *jabber_list_icon(PurpleAccount *a, PurpleBuddy *b);
41.351 -const char* jabber_list_emblem(PurpleBuddy *b);
41.352 -char *jabber_status_text(PurpleBuddy *b);
41.353 -void jabber_tooltip_text(PurpleBuddy *b, PurpleNotifyUserInfo *user_info, gboolean full);
41.354 -GList *jabber_status_types(PurpleAccount *account);
41.355 -void jabber_login(PurpleAccount *account);
41.356 -void jabber_close(PurpleConnection *gc);
41.357 -void jabber_idle_set(PurpleConnection *gc, int idle);
41.358 -void jabber_blocklist_parse_push(JabberStream *js, const char *from,
41.359 - JabberIqType type, const char *id,
41.360 - xmlnode *child);
41.361 -void jabber_request_block_list(JabberStream *js);
41.362 -void jabber_add_deny(PurpleConnection *gc, const char *who);
41.363 -void jabber_rem_deny(PurpleConnection *gc, const char *who);
41.364 -void jabber_keepalive(PurpleConnection *gc);
41.365 -void jabber_register_gateway(JabberStream *js, const char *gateway);
41.366 -void jabber_register_account(PurpleAccount *account);
41.367 -void jabber_unregister_account(PurpleAccount *account, PurpleAccountUnregistrationCb cb, void *user_data);
41.368 -gboolean jabber_send_attention(PurpleConnection *gc, const char *username, guint code);
41.369 -GList *jabber_attention_types(PurpleAccount *account);
41.370 -void jabber_convo_closed(PurpleConnection *gc, const char *who);
41.371 -PurpleChat *jabber_find_blist_chat(PurpleAccount *account, const char *name);
41.372 -gboolean jabber_offline_message(const PurpleBuddy *buddy);
41.373 -int jabber_prpl_send_raw(PurpleConnection *gc, const char *buf, int len);
41.374 -GList *jabber_actions(PurplePlugin *plugin, gpointer context);
41.375 -
41.376 -gboolean jabber_audio_enabled(JabberStream *js, const char *unused);
41.377 -gboolean jabber_video_enabled(JabberStream *js, const char *unused);
41.378 -gboolean jabber_initiate_media(PurpleAccount *account, const char *who,
41.379 - PurpleMediaSessionType type);
41.380 -PurpleMediaCaps jabber_get_media_caps(PurpleAccount *account, const char *who);
41.381 -
41.382 -void jabber_register_commands(void);
41.383 -void jabber_unregister_commands(void);
41.384 -
41.385 -void jabber_init_plugin(PurplePlugin *plugin);
41.386 -void jabber_uninit_plugin(void);
41.387 -
41.388 -#endif /* PURPLE_JABBER_H_ */
42.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/jutil.h Fri Aug 21 13:24:36 2009 -0700
42.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
42.3 @@ -1,54 +0,0 @@
42.4 -/**
42.5 - * @file jutil.h utility functions
42.6 - *
42.7 - * purple
42.8 - *
42.9 - * Copyright (C) 2003 Nathan Walp <faceprint@faceprint.com>
42.10 - *
42.11 - * This program is free software; you can redistribute it and/or modify
42.12 - * it under the terms of the GNU General Public License as published by
42.13 - * the Free Software Foundation; either version 2 of the License, or
42.14 - * (at your option) any later version.
42.15 - *
42.16 - * This program is distributed in the hope that it will be useful,
42.17 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
42.18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42.19 - * GNU General Public License for more details.
42.20 - *
42.21 - * You should have received a copy of the GNU General Public License
42.22 - * along with this program; if not, write to the Free Software
42.23 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
42.24 - */
42.25 -#ifndef PURPLE_JABBER_JUTIL_H_
42.26 -#define PURPLE_JABBER_JUTIL_H_
42.27 -
42.28 -typedef struct _JabberID {
42.29 - char *node;
42.30 - char *domain;
42.31 - char *resource;
42.32 -} JabberID;
42.33 -
42.34 -#include "jabber.h"
42.35 -
42.36 -JabberID* jabber_id_new(const char *str);
42.37 -void jabber_id_free(JabberID *jid);
42.38 -
42.39 -char *jabber_get_resource(const char *jid);
42.40 -char *jabber_get_bare_jid(const char *jid);
42.41 -
42.42 -const char *jabber_normalize(const PurpleAccount *account, const char *in);
42.43 -
42.44 -/* Returns true if JID is the bare JID of our server. */
42.45 -gboolean jabber_is_own_server(JabberStream *js, const char *jid);
42.46 -
42.47 -/* Returns true if JID is the bare JID of our account. */
42.48 -gboolean jabber_is_own_account(JabberStream *js, const char *jid);
42.49 -
42.50 -gboolean jabber_nodeprep_validate(const char *);
42.51 -gboolean jabber_domain_validate(const char *);
42.52 -gboolean jabber_resourceprep_validate(const char *);
42.53 -
42.54 -PurpleConversation *jabber_find_unnormalized_conv(const char *name, PurpleAccount *account);
42.55 -
42.56 -char *jabber_calculate_data_sha1sum(gconstpointer data, size_t len);
42.57 -#endif /* PURPLE_JABBER_JUTIL_H_ */
43.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/libgadu-i386.h Fri Aug 21 13:24:36 2009 -0700
43.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
43.3 @@ -1,1393 +0,0 @@
43.4 -/* include/libgadu.h. Generated from libgadu.h.in by configure. */
43.5 -/* $Id: libgadu.h.in,v 1.5.2.1 2007-04-21 23:44:25 wojtekka Exp $ */
43.6 -
43.7 -/*
43.8 - * (C) Copyright 2001-2003 Wojtek Kaniewski <wojtekka@irc.pl>
43.9 - * Robert J. Wo¼ny <speedy@ziew.org>
43.10 - * Arkadiusz Mi¶kiewicz <arekm@pld-linux.org>
43.11 - * Tomasz Chiliñski <chilek@chilan.com>
43.12 - * Piotr Wysocki <wysek@linux.bydg.org>
43.13 - * Dawid Jarosz <dawjar@poczta.onet.pl>
43.14 - *
43.15 - * This program is free software; you can redistribute it and/or modify
43.16 - * it under the terms of the GNU Lesser General Public License Version
43.17 - * 2.1 as published by the Free Software Foundation.
43.18 - *
43.19 - * This program is distributed in the hope that it will be useful,
43.20 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
43.21 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43.22 - * GNU Lesser General Public License for more details.
43.23 - *
43.24 - * You should have received a copy of the GNU Lesser General Public
43.25 - * License along with this program; if not, write to the Free Software
43.26 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
43.27 - * USA.
43.28 - */
43.29 -
43.30 -#ifndef __GG_LIBGADU_H
43.31 -#define __GG_LIBGADU_H
43.32 -
43.33 -#ifdef __cplusplus
43.34 -#ifdef _WIN32
43.35 -#pragma pack(push, 1)
43.36 -#endif
43.37 -extern "C" {
43.38 -#endif
43.39 -
43.40 -#include <sys/types.h>
43.41 -#include <stdio.h>
43.42 -#include <stdarg.h>
43.43 -
43.44 -/* Defined if libgadu was compiled for bigendian machine. */
43.45 -/* #undef GG_CONFIG_BIGENDIAN */
43.46 -
43.47 -/* Defined if this machine has gethostbyname_r(). */
43.48 -/* #undef GG_CONFIG_HAVE_GETHOSTBYNAME_R */
43.49 -
43.50 -/* Defined if libgadu was compiled and linked with pthread support. */
43.51 -/* #undef GG_CONFIG_HAVE_PTHREAD */
43.52 -
43.53 -/* Defined if this machine has C99-compiliant vsnprintf(). */
43.54 -#define GG_CONFIG_HAVE_C99_VSNPRINTF
43.55 -
43.56 -/* Defined if this machine has va_copy(). */
43.57 -#define GG_CONFIG_HAVE_VA_COPY
43.58 -
43.59 -/* Defined if this machine has __va_copy(). */
43.60 -#define GG_CONFIG_HAVE___VA_COPY
43.61 -
43.62 -/* Defined if this machine supports long long. */
43.63 -#define GG_CONFIG_HAVE_LONG_LONG
43.64 -
43.65 -/* Defined if libgadu was compiled and linked with TLS support. */
43.66 -#define GG_CONFIG_HAVE_OPENSSL
43.67 -
43.68 -/* Defined if uintX_t types are defined in <stdint.h>. */
43.69 -#define GG_CONFIG_HAVE_STDINT_H
43.70 -
43.71 -/* Defined if uintX_t types are defined in <inttypes.h>. */
43.72 -/* #undef GG_CONFIG_HAVE_INTTYPES_H */
43.73 -
43.74 -/* Defined if uintX_t types are defined in <sys/inttypes.h>. */
43.75 -/* #undef GG_CONFIG_HAVE_SYS_INTTYPES_H */
43.76 -
43.77 -/* Defined if uintX_t types are defined in <sys/int_types.h>. */
43.78 -/* #undef GG_CONFIG_HAVE_SYS_INT_TYPES_H */
43.79 -
43.80 -/* Defined if uintX_t types are defined in <sys/types.h>. */
43.81 -/* #undef GG_CONFIG_HAVE_SYS_TYPES_H */
43.82 -
43.83 -#ifdef GG_CONFIG_HAVE_OPENSSL
43.84 -#include <openssl/ssl.h>
43.85 -#endif
43.86 -
43.87 -#ifdef GG_CONFIG_HAVE_STDINT_H
43.88 -#include <stdint.h>
43.89 -#else
43.90 -# ifdef GG_CONFIG_HAVE_INTTYPES_H
43.91 -# include <inttypes.h>
43.92 -# else
43.93 -# ifdef GG_CONFIG_HAVE_SYS_INTTYPES_H
43.94 -# include <sys/inttypes.h>
43.95 -# else
43.96 -# ifdef GG_CONFIG_HAVE_SYS_INT_TYPES_H
43.97 -# include <sys/int_types.h>
43.98 -# else
43.99 -# ifdef GG_CONFIG_HAVE_SYS_TYPES_H
43.100 -# include <sys/types.h>
43.101 -# else
43.102 -
43.103 -#ifndef __AC_STDINT_H
43.104 -#define __AC_STDINT_H
43.105 -
43.106 -/* ISO C 9X: 7.18 Integer types <stdint.h> */
43.107 -
43.108 -typedef unsigned char uint8_t;
43.109 -typedef unsigned short uint16_t;
43.110 -typedef unsigned int uint32_t;
43.111 -
43.112 -#ifndef __CYGWIN__
43.113 -#define __int8_t_defined
43.114 -typedef signed char int8_t;
43.115 -typedef signed short int16_t;
43.116 -typedef signed int int32_t;
43.117 -#endif
43.118 -
43.119 -#endif /* __AC_STDINT_H */
43.120 -
43.121 -# endif
43.122 -# endif
43.123 -# endif
43.124 -# endif
43.125 -#endif
43.126 -
43.127 -/*
43.128 - * typedef uin_t
43.129 - *
43.130 - * typ reprezentuj±cy numer osoby.
43.131 - */
43.132 -typedef uint32_t uin_t;
43.133 -
43.134 -/*
43.135 - * ogólna struktura opisuj±ca ró¿ne sesje. przydatna w klientach.
43.136 - */
43.137 -#define gg_common_head(x) \
43.138 - int fd; /* podgl±dany deskryptor */ \
43.139 - int check; /* sprawdzamy zapis czy odczyt */ \
43.140 - int state; /* aktualny stan maszynki */ \
43.141 - int error; /* kod b³êdu dla GG_STATE_ERROR */ \
43.142 - int type; /* rodzaj sesji */ \
43.143 - int id; /* identyfikator */ \
43.144 - int timeout; /* sugerowany timeout w sekundach */ \
43.145 - int (*callback)(x*); /* callback przy zmianach */ \
43.146 - void (*destroy)(x*); /* funkcja niszczenia */
43.147 -
43.148 -struct gg_common {
43.149 - gg_common_head(struct gg_common)
43.150 -};
43.151 -
43.152 -struct gg_image_queue;
43.153 -
43.154 -/*
43.155 - * struct gg_session
43.156 - *
43.157 - * struktura opisuj±ca dan± sesjê. tworzona przez gg_login(), zwalniana
43.158 - * przez gg_free_session().
43.159 - */
43.160 -struct gg_session {
43.161 - gg_common_head(struct gg_session)
43.162 -
43.163 - int async; /* czy po³±czenie jest asynchroniczne */
43.164 - int pid; /* pid procesu resolvera */
43.165 - int port; /* port, z którym siê ³±czymy */
43.166 - int seq; /* numer sekwencyjny ostatniej wiadomo¶ci */
43.167 - int last_pong; /* czas otrzymania ostatniego ping/pong */
43.168 - int last_event; /* czas otrzymania ostatniego pakietu */
43.169 -
43.170 - struct gg_event *event; /* zdarzenie po ->callback() */
43.171 -
43.172 - uint32_t proxy_addr; /* adres proxy, keszowany */
43.173 - uint16_t proxy_port; /* port proxy */
43.174 -
43.175 - uint32_t hub_addr; /* adres huba po resolvniêciu */
43.176 - uint32_t server_addr; /* adres serwera, od huba */
43.177 -
43.178 - uint32_t client_addr; /* adres klienta */
43.179 - uint16_t client_port; /* port, na którym klient s³ucha */
43.180 -
43.181 - uint32_t external_addr; /* adres zewnetrzny klienta */
43.182 - uint16_t external_port; /* port zewnetrzny klienta */
43.183 -
43.184 - uin_t uin; /* numerek klienta */
43.185 - char *password; /* i jego has³o. zwalniane automagicznie */
43.186 -
43.187 - int initial_status; /* pocz±tkowy stan klienta */
43.188 - int status; /* aktualny stan klienta */
43.189 -
43.190 - char *recv_buf; /* bufor na otrzymywane pakiety */
43.191 - int recv_done; /* ile ju¿ wczytano do bufora */
43.192 - int recv_left; /* i ile jeszcze trzeba wczytaæ */
43.193 -
43.194 - int protocol_version; /* wersja u¿ywanego protoko³u */
43.195 - char *client_version; /* wersja u¿ywanego klienta */
43.196 - int last_sysmsg; /* ostatnia wiadomo¶æ systemowa */
43.197 -
43.198 - char *initial_descr; /* pocz±tkowy opis stanu klienta */
43.199 -
43.200 - void *resolver; /* wska¼nik na informacje resolvera */
43.201 -
43.202 - char *header_buf; /* bufor na pocz±tek nag³ówka */
43.203 - unsigned int header_done;/* ile ju¿ mamy */
43.204 -
43.205 -#ifdef GG_CONFIG_HAVE_OPENSSL
43.206 - SSL *ssl; /* sesja TLS */
43.207 - SSL_CTX *ssl_ctx; /* kontekst sesji? */
43.208 -#else
43.209 - void *ssl; /* zachowujemy ABI */
43.210 - void *ssl_ctx;
43.211 -#endif
43.212 -
43.213 - int image_size; /* maksymalny rozmiar obrazków w KiB */
43.214 -
43.215 - char *userlist_reply; /* fragment odpowiedzi listy kontaktów */
43.216 -
43.217 - int userlist_blocks; /* na ile kawa³ków podzielono listê kontaktów */
43.218 -
43.219 - struct gg_image_queue *images; /* aktualnie wczytywane obrazki */
43.220 -};
43.221 -
43.222 -/*
43.223 - * struct gg_http
43.224 - *
43.225 - * ogólna struktura opisuj±ca stan wszystkich operacji HTTP. tworzona
43.226 - * przez gg_http_connect(), zwalniana przez gg_http_free().
43.227 - */
43.228 -struct gg_http {
43.229 - gg_common_head(struct gg_http)
43.230 -
43.231 - int async; /* czy po³±czenie asynchroniczne */
43.232 - int pid; /* pid procesu resolvera */
43.233 - int port; /* port, z którym siê ³±czymy */
43.234 -
43.235 - char *query; /* bufor zapytania http */
43.236 - char *header; /* bufor nag³ówka */
43.237 - int header_size; /* rozmiar wczytanego nag³ówka */
43.238 - char *body; /* bufor otrzymanych informacji */
43.239 - unsigned int body_size; /* oczekiwana ilo¶æ informacji */
43.240 -
43.241 - void *data; /* dane danej operacji http */
43.242 -
43.243 - char *user_data; /* dane u¿ytkownika, nie s± zwalniane przez gg_http_free() */
43.244 -
43.245 - void *resolver; /* wska¼nik na informacje resolvera */
43.246 -
43.247 - unsigned int body_done; /* ile ju¿ tre¶ci odebrano? */
43.248 -};
43.249 -
43.250 -#ifdef __GNUC__
43.251 -#define GG_PACKED __attribute__ ((packed))
43.252 -#else
43.253 -#define GG_PACKED
43.254 -#endif
43.255 -
43.256 -#define GG_MAX_PATH 276
43.257 -
43.258 -/*
43.259 - * struct gg_file_info
43.260 - *
43.261 - * odpowiednik windowsowej struktury WIN32_FIND_DATA niezbêdnej przy
43.262 - * wysy³aniu plików.
43.263 - */
43.264 -struct gg_file_info {
43.265 - uint32_t mode; /* dwFileAttributes */
43.266 - uint32_t ctime[2]; /* ftCreationTime */
43.267 - uint32_t atime[2]; /* ftLastAccessTime */
43.268 - uint32_t mtime[2]; /* ftLastWriteTime */
43.269 - uint32_t size_hi; /* nFileSizeHigh */
43.270 - uint32_t size; /* nFileSizeLow */
43.271 - uint32_t reserved0; /* dwReserved0 */
43.272 - uint32_t reserved1; /* dwReserved1 */
43.273 - unsigned char filename[GG_MAX_PATH - 14]; /* cFileName */
43.274 - unsigned char short_filename[14]; /* cAlternateFileName */
43.275 -} GG_PACKED;
43.276 -
43.277 -/*
43.278 - * struct gg_dcc
43.279 - *
43.280 - * struktura opisuj±ca nas³uchuj±ce gniazdo po³±czeñ miêdzy klientami.
43.281 - * tworzona przez gg_dcc_socket_create(), zwalniana przez gg_dcc_free().
43.282 - */
43.283 -struct gg_dcc {
43.284 - gg_common_head(struct gg_dcc)
43.285 -
43.286 - struct gg_event *event; /* opis zdarzenia */
43.287 -
43.288 - int active; /* czy to my siê ³±czymy? */
43.289 - int port; /* port, na którym siedzi */
43.290 - uin_t uin; /* uin klienta */
43.291 - uin_t peer_uin; /* uin drugiej strony */
43.292 - int file_fd; /* deskryptor pliku */
43.293 - unsigned int offset; /* offset w pliku */
43.294 - unsigned int chunk_size;/* rozmiar kawa³ka */
43.295 - unsigned int chunk_offset;/* offset w aktualnym kawa³ku */
43.296 - struct gg_file_info file_info;
43.297 - /* informacje o pliku */
43.298 - int established; /* po³±czenie ustanowione */
43.299 - char *voice_buf; /* bufor na pakiet po³±czenia g³osowego */
43.300 - int incoming; /* po³±czenie przychodz±ce */
43.301 - char *chunk_buf; /* bufor na kawa³ek danych */
43.302 - uint32_t remote_addr; /* adres drugiej strony */
43.303 - uint16_t remote_port; /* port drugiej strony */
43.304 -};
43.305 -
43.306 -/*
43.307 - * enum gg_session_t
43.308 - *
43.309 - * rodzaje sesji.
43.310 - */
43.311 -enum gg_session_t {
43.312 - GG_SESSION_GG = 1, /* po³±czenie z serwerem gg */
43.313 - GG_SESSION_HTTP, /* ogólna sesja http */
43.314 - GG_SESSION_SEARCH, /* szukanie */
43.315 - GG_SESSION_REGISTER, /* rejestrowanie */
43.316 - GG_SESSION_REMIND, /* przypominanie has³a */
43.317 - GG_SESSION_PASSWD, /* zmiana has³a */
43.318 - GG_SESSION_CHANGE, /* zmiana informacji o sobie */
43.319 - GG_SESSION_DCC, /* ogólne po³±czenie DCC */
43.320 - GG_SESSION_DCC_SOCKET, /* nas³uchuj±cy socket */
43.321 - GG_SESSION_DCC_SEND, /* wysy³anie pliku */
43.322 - GG_SESSION_DCC_GET, /* odbieranie pliku */
43.323 - GG_SESSION_DCC_VOICE, /* rozmowa g³osowa */
43.324 - GG_SESSION_USERLIST_GET, /* pobieranie userlisty */
43.325 - GG_SESSION_USERLIST_PUT, /* wysy³anie userlisty */
43.326 - GG_SESSION_UNREGISTER, /* usuwanie konta */
43.327 - GG_SESSION_USERLIST_REMOVE, /* usuwanie userlisty */
43.328 - GG_SESSION_TOKEN, /* pobieranie tokenu */
43.329 -
43.330 - GG_SESSION_USER0 = 256, /* zdefiniowana dla u¿ytkownika */
43.331 - GG_SESSION_USER1, /* j.w. */
43.332 - GG_SESSION_USER2, /* j.w. */
43.333 - GG_SESSION_USER3, /* j.w. */
43.334 - GG_SESSION_USER4, /* j.w. */
43.335 - GG_SESSION_USER5, /* j.w. */
43.336 - GG_SESSION_USER6, /* j.w. */
43.337 - GG_SESSION_USER7 /* j.w. */
43.338 -};
43.339 -
43.340 -/*
43.341 - * enum gg_state_t
43.342 - *
43.343 - * opisuje stan asynchronicznej maszyny.
43.344 - */
43.345 -enum gg_state_t {
43.346 - /* wspólne */
43.347 - GG_STATE_IDLE = 0, /* nie powinno wyst±piæ. */
43.348 - GG_STATE_RESOLVING, /* wywo³a³ gethostbyname() */
43.349 - GG_STATE_CONNECTING, /* wywo³a³ connect() */
43.350 - GG_STATE_READING_DATA, /* czeka na dane http */
43.351 - GG_STATE_ERROR, /* wyst±pi³ b³±d. kod w x->error */
43.352 -
43.353 - /* gg_session */
43.354 - GG_STATE_CONNECTING_HUB, /* wywo³a³ connect() na huba */
43.355 - GG_STATE_CONNECTING_GG, /* wywo³a³ connect() na serwer */
43.356 - GG_STATE_READING_KEY, /* czeka na klucz */
43.357 - GG_STATE_READING_REPLY, /* czeka na odpowied¼ */
43.358 - GG_STATE_CONNECTED, /* po³±czy³ siê */
43.359 -
43.360 - /* gg_http */
43.361 - GG_STATE_SENDING_QUERY, /* wysy³a zapytanie http */
43.362 - GG_STATE_READING_HEADER, /* czeka na nag³ówek http */
43.363 - GG_STATE_PARSING, /* przetwarza dane */
43.364 - GG_STATE_DONE, /* skoñczy³ */
43.365 -
43.366 - /* gg_dcc */
43.367 - GG_STATE_LISTENING, /* czeka na po³±czenia */
43.368 - GG_STATE_READING_UIN_1, /* czeka na uin peera */
43.369 - GG_STATE_READING_UIN_2, /* czeka na swój uin */
43.370 - GG_STATE_SENDING_ACK, /* wysy³a potwierdzenie dcc */
43.371 - GG_STATE_READING_ACK, /* czeka na potwierdzenie dcc */
43.372 - GG_STATE_READING_REQUEST, /* czeka na komendê */
43.373 - GG_STATE_SENDING_REQUEST, /* wysy³a komendê */
43.374 - GG_STATE_SENDING_FILE_INFO, /* wysy³a informacje o pliku */
43.375 - GG_STATE_READING_PRE_FILE_INFO, /* czeka na pakiet przed file_info */
43.376 - GG_STATE_READING_FILE_INFO, /* czeka na informacje o pliku */
43.377 - GG_STATE_SENDING_FILE_ACK, /* wysy³a potwierdzenie pliku */
43.378 - GG_STATE_READING_FILE_ACK, /* czeka na potwierdzenie pliku */
43.379 - GG_STATE_SENDING_FILE_HEADER, /* wysy³a nag³ówek pliku */
43.380 - GG_STATE_READING_FILE_HEADER, /* czeka na nag³ówek */
43.381 - GG_STATE_GETTING_FILE, /* odbiera plik */
43.382 - GG_STATE_SENDING_FILE, /* wysy³a plik */
43.383 - GG_STATE_READING_VOICE_ACK, /* czeka na potwierdzenie voip */
43.384 - GG_STATE_READING_VOICE_HEADER, /* czeka na rodzaj bloku voip */
43.385 - GG_STATE_READING_VOICE_SIZE, /* czeka na rozmiar bloku voip */
43.386 - GG_STATE_READING_VOICE_DATA, /* czeka na dane voip */
43.387 - GG_STATE_SENDING_VOICE_ACK, /* wysy³a potwierdzenie voip */
43.388 - GG_STATE_SENDING_VOICE_REQUEST, /* wysy³a ¿±danie voip */
43.389 - GG_STATE_READING_TYPE, /* czeka na typ po³±czenia */
43.390 -
43.391 - /* nowe. bez sensu jest to API. */
43.392 - GG_STATE_TLS_NEGOTIATION /* negocjuje po³±czenie TLS */
43.393 -};
43.394 -
43.395 -/*
43.396 - * enum gg_check_t
43.397 - *
43.398 - * informuje, co proces klienta powinien sprawdziæ na deskryptorze danego
43.399 - * po³±czenia.
43.400 - */
43.401 -enum gg_check_t {
43.402 - GG_CHECK_NONE = 0, /* nic. nie powinno wyst±piæ */
43.403 - GG_CHECK_WRITE = 1, /* sprawdzamy mo¿liwo¶æ zapisu */
43.404 - GG_CHECK_READ = 2 /* sprawdzamy mo¿liwo¶æ odczytu */
43.405 -};
43.406 -
43.407 -/*
43.408 - * struct gg_login_params
43.409 - *
43.410 - * parametry gg_login(). przeniesiono do struktury, ¿eby unikn±æ problemów
43.411 - * z ci±g³ymi zmianami API, gdy dodano co¶ nowego do protoko³u.
43.412 - */
43.413 -struct gg_login_params {
43.414 - uin_t uin; /* numerek */
43.415 - char *password; /* has³o */
43.416 - int async; /* asynchroniczne sockety? */
43.417 - int status; /* pocz±tkowy status klienta */
43.418 - char *status_descr; /* opis statusu */
43.419 - uint32_t server_addr; /* adres serwera gg */
43.420 - uint16_t server_port; /* port serwera gg */
43.421 - uint32_t client_addr; /* adres dcc klienta */
43.422 - uint16_t client_port; /* port dcc klienta */
43.423 - int protocol_version; /* wersja protoko³u */
43.424 - char *client_version; /* wersja klienta */
43.425 - int has_audio; /* czy ma d¼wiêk? */
43.426 - int last_sysmsg; /* ostatnia wiadomo¶æ systemowa */
43.427 - uint32_t external_addr; /* adres widziany na zewnatrz */
43.428 - uint16_t external_port; /* port widziany na zewnatrz */
43.429 - int tls; /* czy ³±czymy po TLS? */
43.430 - int image_size; /* maksymalny rozmiar obrazka w KiB */
43.431 - int era_omnix; /* czy udawaæ klienta era omnix? */
43.432 -
43.433 - char dummy[6 * sizeof(int)]; /* miejsce na kolejnych 6 zmiennych,
43.434 - * ¿eby z dodaniem parametru nie
43.435 - * zmienia³ siê rozmiar struktury */
43.436 -};
43.437 -
43.438 -struct gg_session *gg_login(const struct gg_login_params *p);
43.439 -void gg_free_session(struct gg_session *sess);
43.440 -void gg_logoff(struct gg_session *sess);
43.441 -int gg_change_status(struct gg_session *sess, int status);
43.442 -int gg_change_status_descr(struct gg_session *sess, int status, const char *descr);
43.443 -int gg_change_status_descr_time(struct gg_session *sess, int status, const char *descr, int time);
43.444 -int gg_send_message(struct gg_session *sess, int msgclass, uin_t recipient, const unsigned char *message);
43.445 -int gg_send_message_richtext(struct gg_session *sess, int msgclass, uin_t recipient, const unsigned char *message, const unsigned char *format, int formatlen);
43.446 -int gg_send_message_confer(struct gg_session *sess, int msgclass, int recipients_count, uin_t *recipients, const unsigned char *message);
43.447 -int gg_send_message_confer_richtext(struct gg_session *sess, int msgclass, int recipients_count, uin_t *recipients, const unsigned char *message, const unsigned char *format, int formatlen);
43.448 -int gg_send_message_ctcp(struct gg_session *sess, int msgclass, uin_t recipient, const unsigned char *message, int message_len);
43.449 -int gg_ping(struct gg_session *sess);
43.450 -int gg_userlist_request(struct gg_session *sess, char type, const char *request);
43.451 -int gg_image_request(struct gg_session *sess, uin_t recipient, int size, uint32_t crc32);
43.452 -int gg_image_reply(struct gg_session *sess, uin_t recipient, const char *filename, const char *image, int size);
43.453 -
43.454 -uint32_t gg_crc32(uint32_t crc, const unsigned char *buf, int len);
43.455 -
43.456 -struct gg_image_queue {
43.457 - uin_t sender; /* nadawca obrazka */
43.458 - uint32_t size; /* rozmiar */
43.459 - uint32_t crc32; /* suma kontrolna */
43.460 - char *filename; /* nazwa pliku */
43.461 - char *image; /* bufor z obrazem */
43.462 - uint32_t done; /* ile ju¿ wczytano */
43.463 -
43.464 - struct gg_image_queue *next; /* nastêpny na li¶cie */
43.465 -};
43.466 -
43.467 -/*
43.468 - * enum gg_event_t
43.469 - *
43.470 - * rodzaje zdarzeñ.
43.471 - */
43.472 -enum gg_event_t {
43.473 - GG_EVENT_NONE = 0, /* nic siê nie wydarzy³o */
43.474 - GG_EVENT_MSG, /* otrzymano wiadomo¶æ */
43.475 - GG_EVENT_NOTIFY, /* kto¶ siê pojawi³ */
43.476 - GG_EVENT_NOTIFY_DESCR, /* kto¶ siê pojawi³ z opisem */
43.477 - GG_EVENT_STATUS, /* kto¶ zmieni³ stan */
43.478 - GG_EVENT_ACK, /* potwierdzenie wys³ania wiadomo¶ci */
43.479 - GG_EVENT_PONG, /* pakiet pong */
43.480 - GG_EVENT_CONN_FAILED, /* po³±czenie siê nie uda³o */
43.481 - GG_EVENT_CONN_SUCCESS, /* po³±czenie siê powiod³o */
43.482 - GG_EVENT_DISCONNECT, /* serwer zrywa po³±czenie */
43.483 -
43.484 - GG_EVENT_DCC_NEW, /* nowe po³±czenie miêdzy klientami */
43.485 - GG_EVENT_DCC_ERROR, /* b³±d po³±czenia miêdzy klientami */
43.486 - GG_EVENT_DCC_DONE, /* zakoñczono po³±czenie */
43.487 - GG_EVENT_DCC_CLIENT_ACCEPT, /* moment akceptacji klienta */
43.488 - GG_EVENT_DCC_CALLBACK, /* klient siê po³±czy³ na ¿±danie */
43.489 - GG_EVENT_DCC_NEED_FILE_INFO, /* nale¿y wype³niæ file_info */
43.490 - GG_EVENT_DCC_NEED_FILE_ACK, /* czeka na potwierdzenie pliku */
43.491 - GG_EVENT_DCC_NEED_VOICE_ACK, /* czeka na potwierdzenie rozmowy */
43.492 - GG_EVENT_DCC_VOICE_DATA, /* ramka danych rozmowy g³osowej */
43.493 -
43.494 - GG_EVENT_PUBDIR50_SEARCH_REPLY, /* odpowiedz wyszukiwania */
43.495 - GG_EVENT_PUBDIR50_READ, /* odczytano w³asne dane z katalogu */
43.496 - GG_EVENT_PUBDIR50_WRITE, /* wpisano w³asne dane do katalogu */
43.497 -
43.498 - GG_EVENT_STATUS60, /* kto¶ zmieni³ stan w GG 6.0 */
43.499 - GG_EVENT_NOTIFY60, /* kto¶ siê pojawi³ w GG 6.0 */
43.500 - GG_EVENT_USERLIST, /* odpowied¼ listy kontaktów w GG 6.0 */
43.501 - GG_EVENT_IMAGE_REQUEST, /* pro¶ba o wys³anie obrazka GG 6.0 */
43.502 - GG_EVENT_IMAGE_REPLY, /* podes³any obrazek GG 6.0 */
43.503 - GG_EVENT_DCC_ACK /* potwierdzenie transmisji */
43.504 -};
43.505 -
43.506 -#define GG_EVENT_SEARCH50_REPLY GG_EVENT_PUBDIR50_SEARCH_REPLY
43.507 -
43.508 -/*
43.509 - * enum gg_failure_t
43.510 - *
43.511 - * okre¶la powód nieudanego po³±czenia.
43.512 - */
43.513 -enum gg_failure_t {
43.514 - GG_FAILURE_RESOLVING = 1, /* nie znaleziono serwera */
43.515 - GG_FAILURE_CONNECTING, /* nie mo¿na siê po³±czyæ */
43.516 - GG_FAILURE_INVALID, /* serwer zwróci³ nieprawid³owe dane */
43.517 - GG_FAILURE_READING, /* zerwano po³±czenie podczas odczytu */
43.518 - GG_FAILURE_WRITING, /* zerwano po³±czenie podczas zapisu */
43.519 - GG_FAILURE_PASSWORD, /* nieprawid³owe has³o */
43.520 - GG_FAILURE_404, /* XXX nieu¿ywane */
43.521 - GG_FAILURE_TLS, /* b³±d negocjacji TLS */
43.522 - GG_FAILURE_NEED_EMAIL, /* serwer roz³±czy³ nas z pro¶b± o zmianê emaila */
43.523 - GG_FAILURE_INTRUDER, /* za du¿o prób po³±czenia siê z nieprawid³owym has³em */
43.524 - GG_FAILURE_UNAVAILABLE /* serwery s± wy³±czone */
43.525 -};
43.526 -
43.527 -/*
43.528 - * enum gg_error_t
43.529 - *
43.530 - * okre¶la rodzaj b³êdu wywo³anego przez dan± operacjê. nie zawiera
43.531 - * przesadnie szczegó³owych informacji o powodzie b³êdu, by nie komplikowaæ
43.532 - * obs³ugi b³êdów. je¶li wymagana jest wiêksza dok³adno¶æ, nale¿y sprawdziæ
43.533 - * zawarto¶æ zmiennej errno.
43.534 - */
43.535 -enum gg_error_t {
43.536 - GG_ERROR_RESOLVING = 1, /* b³±d znajdowania hosta */
43.537 - GG_ERROR_CONNECTING, /* b³±d ³aczenia siê */
43.538 - GG_ERROR_READING, /* b³±d odczytu */
43.539 - GG_ERROR_WRITING, /* b³±d wysy³ania */
43.540 -
43.541 - GG_ERROR_DCC_HANDSHAKE, /* b³±d negocjacji */
43.542 - GG_ERROR_DCC_FILE, /* b³±d odczytu/zapisu pliku */
43.543 - GG_ERROR_DCC_EOF, /* plik siê skoñczy³? */
43.544 - GG_ERROR_DCC_NET, /* b³±d wysy³ania/odbierania */
43.545 - GG_ERROR_DCC_REFUSED /* po³±czenie odrzucone przez usera */
43.546 -};
43.547 -
43.548 -/*
43.549 - * struktury dotycz±ce wyszukiwania w GG 5.0. NIE NALE¯Y SIÊ DO NICH
43.550 - * ODWO£YWAÆ BEZPO¦REDNIO! do dostêpu do nich s³u¿± funkcje gg_pubdir50_*()
43.551 - */
43.552 -struct gg_pubdir50_entry {
43.553 - int num;
43.554 - char *field;
43.555 - char *value;
43.556 -};
43.557 -
43.558 -struct gg_pubdir50_s {
43.559 - int count;
43.560 - uin_t next;
43.561 - int type;
43.562 - uint32_t seq;
43.563 - struct gg_pubdir50_entry *entries;
43.564 - int entries_count;
43.565 -};
43.566 -
43.567 -/*
43.568 - * typedef gg_pubdir_50_t
43.569 - *
43.570 - * typ opisuj±cy zapytanie lub wynik zapytania katalogu publicznego
43.571 - * z protoko³u GG 5.0. nie nale¿y siê odwo³ywaæ bezpo¶rednio do jego
43.572 - * pól -- s³u¿± do tego funkcje gg_pubdir50_*()
43.573 - */
43.574 -typedef struct gg_pubdir50_s *gg_pubdir50_t;
43.575 -
43.576 -/*
43.577 - * struct gg_event
43.578 - *
43.579 - * struktura opisuj±ca rodzaj zdarzenia. wychodzi z gg_watch_fd() lub
43.580 - * z gg_dcc_watch_fd()
43.581 - */
43.582 -struct gg_event {
43.583 - int type; /* rodzaj zdarzenia -- gg_event_t */
43.584 - union { /* @event */
43.585 - struct gg_notify_reply *notify; /* informacje o li¶cie kontaktów -- GG_EVENT_NOTIFY */
43.586 -
43.587 - enum gg_failure_t failure; /* b³±d po³±czenia -- GG_EVENT_FAILURE */
43.588 -
43.589 - struct gg_dcc *dcc_new; /* nowe po³±czenie bezpo¶rednie -- GG_EVENT_DCC_NEW */
43.590 -
43.591 - int dcc_error; /* b³±d po³±czenia bezpo¶redniego -- GG_EVENT_DCC_ERROR */
43.592 -
43.593 - gg_pubdir50_t pubdir50; /* wynik operacji zwi±zanej z katalogiem publicznym -- GG_EVENT_PUBDIR50_* */
43.594 -
43.595 - struct { /* @msg odebrano wiadomo¶æ -- GG_EVENT_MSG */
43.596 - uin_t sender; /* numer nadawcy */
43.597 - int msgclass; /* klasa wiadomo¶ci */
43.598 - time_t time; /* czas nadania */
43.599 - unsigned char *message; /* tre¶æ wiadomo¶ci */
43.600 -
43.601 - int recipients_count; /* ilo¶æ odbiorców konferencji */
43.602 - uin_t *recipients; /* odbiorcy konferencji */
43.603 -
43.604 - int formats_length; /* d³ugo¶æ informacji o formatowaniu tekstu */
43.605 - void *formats; /* informacje o formatowaniu tekstu */
43.606 - } msg;
43.607 -
43.608 - struct { /* @notify_descr informacje o li¶cie kontaktów z opisami stanu -- GG_EVENT_NOTIFY_DESCR */
43.609 - struct gg_notify_reply *notify; /* informacje o li¶cie kontaktów */
43.610 - char *descr; /* opis stanu */
43.611 - } notify_descr;
43.612 -
43.613 - struct { /* @status zmiana stanu -- GG_EVENT_STATUS */
43.614 - uin_t uin; /* numer */
43.615 - uint32_t status; /* nowy stan */
43.616 - char *descr; /* opis stanu */
43.617 - } status;
43.618 -
43.619 - struct { /* @status60 zmiana stanu -- GG_EVENT_STATUS60 */
43.620 - uin_t uin; /* numer */
43.621 - int status; /* nowy stan */
43.622 - uint32_t remote_ip; /* adres ip */
43.623 - uint16_t remote_port; /* port */
43.624 - int version; /* wersja klienta */
43.625 - int image_size; /* maksymalny rozmiar grafiki w KiB */
43.626 - char *descr; /* opis stanu */
43.627 - time_t time; /* czas powrotu */
43.628 - } status60;
43.629 -
43.630 - struct { /* @notify60 informacja o li¶cie kontaktów -- GG_EVENT_NOTIFY60 */
43.631 - uin_t uin; /* numer */
43.632 - int status; /* stan */
43.633 - uint32_t remote_ip; /* adres ip */
43.634 - uint16_t remote_port; /* port */
43.635 - int version; /* wersja klienta */
43.636 - int image_size; /* maksymalny rozmiar grafiki w KiB */
43.637 - char *descr; /* opis stanu */
43.638 - time_t time; /* czas powrotu */
43.639 - } *notify60;
43.640 -
43.641 - struct { /* @ack potwierdzenie wiadomo¶ci -- GG_EVENT_ACK */
43.642 - uin_t recipient; /* numer odbiorcy */
43.643 - int status; /* stan dorêczenia wiadomo¶ci */
43.644 - int seq; /* numer sekwencyjny wiadomo¶ci */
43.645 - } ack;
43.646 -
43.647 - struct { /* @dcc_voice_data otrzymano dane d¼wiêkowe -- GG_EVENT_DCC_VOICE_DATA */
43.648 - uint8_t *data; /* dane d¼wiêkowe */
43.649 - int length; /* ilo¶æ danych d¼wiêkowych */
43.650 - } dcc_voice_data;
43.651 -
43.652 - struct { /* @userlist odpowied¼ listy kontaktów serwera */
43.653 - char type; /* rodzaj odpowiedzi */
43.654 - char *reply; /* tre¶æ odpowiedzi */
43.655 - } userlist;
43.656 -
43.657 - struct { /* @image_request pro¶ba o obrazek */
43.658 - uin_t sender; /* nadawca pro¶by */
43.659 - uint32_t size; /* rozmiar obrazka */
43.660 - uint32_t crc32; /* suma kontrolna */
43.661 - } image_request;
43.662 -
43.663 - struct { /* @image_reply odpowied¼ z obrazkiem */
43.664 - uin_t sender; /* nadawca odpowiedzi */
43.665 - uint32_t size; /* rozmiar obrazka */
43.666 - uint32_t crc32; /* suma kontrolna */
43.667 - char *filename; /* nazwa pliku */
43.668 - char *image; /* bufor z obrazkiem */
43.669 - } image_reply;
43.670 - } event;
43.671 -};
43.672 -
43.673 -struct gg_event *gg_watch_fd(struct gg_session *sess);
43.674 -void gg_event_free(struct gg_event *e);
43.675 -#define gg_free_event gg_event_free
43.676 -
43.677 -/*
43.678 - * funkcje obs³ugi listy kontaktów.
43.679 - */
43.680 -int gg_notify_ex(struct gg_session *sess, uin_t *userlist, char *types, int count);
43.681 -int gg_notify(struct gg_session *sess, uin_t *userlist, int count);
43.682 -int gg_add_notify_ex(struct gg_session *sess, uin_t uin, char type);
43.683 -int gg_add_notify(struct gg_session *sess, uin_t uin);
43.684 -int gg_remove_notify_ex(struct gg_session *sess, uin_t uin, char type);
43.685 -int gg_remove_notify(struct gg_session *sess, uin_t uin);
43.686 -
43.687 -/*
43.688 - * funkcje obs³ugi http.
43.689 - */
43.690 -struct gg_http *gg_http_connect(const char *hostname, int port, int async, const char *method, const char *path, const char *header);
43.691 -int gg_http_watch_fd(struct gg_http *h);
43.692 -void gg_http_stop(struct gg_http *h);
43.693 -void gg_http_free(struct gg_http *h);
43.694 -void gg_http_free_fields(struct gg_http *h);
43.695 -#define gg_free_http gg_http_free
43.696 -
43.697 -/*
43.698 - * struktury opisuj±ca kryteria wyszukiwania dla gg_search(). nieaktualne,
43.699 - * zast±pione przez gg_pubdir50_t. pozostawiono je dla zachowania ABI.
43.700 - */
43.701 -struct gg_search_request {
43.702 - int active;
43.703 - unsigned int start;
43.704 - char *nickname;
43.705 - char *first_name;
43.706 - char *last_name;
43.707 - char *city;
43.708 - int gender;
43.709 - int min_birth;
43.710 - int max_birth;
43.711 - char *email;
43.712 - char *phone;
43.713 - uin_t uin;
43.714 -};
43.715 -
43.716 -struct gg_search {
43.717 - int count;
43.718 - struct gg_search_result *results;
43.719 -};
43.720 -
43.721 -struct gg_search_result {
43.722 - uin_t uin;
43.723 - char *first_name;
43.724 - char *last_name;
43.725 - char *nickname;
43.726 - int born;
43.727 - int gender;
43.728 - char *city;
43.729 - int active;
43.730 -};
43.731 -
43.732 -#define GG_GENDER_NONE 0
43.733 -#define GG_GENDER_FEMALE 1
43.734 -#define GG_GENDER_MALE 2
43.735 -
43.736 -/*
43.737 - * funkcje wyszukiwania.
43.738 - */
43.739 -struct gg_http *gg_search(const struct gg_search_request *r, int async);
43.740 -int gg_search_watch_fd(struct gg_http *f);
43.741 -void gg_free_search(struct gg_http *f);
43.742 -#define gg_search_free gg_free_search
43.743 -
43.744 -const struct gg_search_request *gg_search_request_mode_0(char *nickname, char *first_name, char *last_name, char *city, int gender, int min_birth, int max_birth, int active, int start);
43.745 -const struct gg_search_request *gg_search_request_mode_1(char *email, int active, int start);
43.746 -const struct gg_search_request *gg_search_request_mode_2(char *phone, int active, int start);
43.747 -const struct gg_search_request *gg_search_request_mode_3(uin_t uin, int active, int start);
43.748 -void gg_search_request_free(struct gg_search_request *r);
43.749 -
43.750 -/*
43.751 - * funkcje obs³ugi katalogu publicznego zgodne z GG 5.0. tym razem funkcje
43.752 - * zachowuj± pewien poziom abstrakcji, ¿eby unikn±æ zmian ABI przy zmianach
43.753 - * w protokole.
43.754 - *
43.755 - * NIE NALE¯Y SIÊ ODWO£YWAÆ DO PÓL gg_pubdir50_t BEZPO¦REDNIO!
43.756 - */
43.757 -uint32_t gg_pubdir50(struct gg_session *sess, gg_pubdir50_t req);
43.758 -gg_pubdir50_t gg_pubdir50_new(int type);
43.759 -int gg_pubdir50_add(gg_pubdir50_t req, const char *field, const char *value);
43.760 -int gg_pubdir50_seq_set(gg_pubdir50_t req, uint32_t seq);
43.761 -const char *gg_pubdir50_get(gg_pubdir50_t res, int num, const char *field);
43.762 -int gg_pubdir50_type(gg_pubdir50_t res);
43.763 -int gg_pubdir50_count(gg_pubdir50_t res);
43.764 -uin_t gg_pubdir50_next(gg_pubdir50_t res);
43.765 -uint32_t gg_pubdir50_seq(gg_pubdir50_t res);
43.766 -void gg_pubdir50_free(gg_pubdir50_t res);
43.767 -
43.768 -#define GG_PUBDIR50_UIN "FmNumber"
43.769 -#define GG_PUBDIR50_STATUS "FmStatus"
43.770 -#define GG_PUBDIR50_FIRSTNAME "firstname"
43.771 -#define GG_PUBDIR50_LASTNAME "lastname"
43.772 -#define GG_PUBDIR50_NICKNAME "nickname"
43.773 -#define GG_PUBDIR50_BIRTHYEAR "birthyear"
43.774 -#define GG_PUBDIR50_CITY "city"
43.775 -#define GG_PUBDIR50_GENDER "gender"
43.776 -#define GG_PUBDIR50_GENDER_FEMALE "1"
43.777 -#define GG_PUBDIR50_GENDER_MALE "2"
43.778 -#define GG_PUBDIR50_GENDER_SET_FEMALE "2"
43.779 -#define GG_PUBDIR50_GENDER_SET_MALE "1"
43.780 -#define GG_PUBDIR50_ACTIVE "ActiveOnly"
43.781 -#define GG_PUBDIR50_ACTIVE_TRUE "1"
43.782 -#define GG_PUBDIR50_START "fmstart"
43.783 -#define GG_PUBDIR50_FAMILYNAME "familyname"
43.784 -#define GG_PUBDIR50_FAMILYCITY "familycity"
43.785 -
43.786 -int gg_pubdir50_handle_reply(struct gg_event *e, const char *packet, int length);
43.787 -
43.788 -/*
43.789 - * struct gg_pubdir
43.790 - *
43.791 - * operacje na katalogu publicznym.
43.792 - */
43.793 -struct gg_pubdir {
43.794 - int success; /* czy siê uda³o */
43.795 - uin_t uin; /* otrzymany numerek. 0 je¶li b³±d */
43.796 -};
43.797 -
43.798 -/* ogólne funkcje, nie powinny byæ u¿ywane */
43.799 -int gg_pubdir_watch_fd(struct gg_http *f);
43.800 -void gg_pubdir_free(struct gg_http *f);
43.801 -#define gg_free_pubdir gg_pubdir_free
43.802 -
43.803 -struct gg_token {
43.804 - int width; /* szeroko¶æ obrazka */
43.805 - int height; /* wysoko¶æ obrazka */
43.806 - int length; /* ilo¶æ znaków w tokenie */
43.807 - char *tokenid; /* id tokenu */
43.808 -};
43.809 -
43.810 -/* funkcje dotycz±ce tokenów */
43.811 -struct gg_http *gg_token(int async);
43.812 -int gg_token_watch_fd(struct gg_http *h);
43.813 -void gg_token_free(struct gg_http *h);
43.814 -
43.815 -/* rejestracja nowego numerka */
43.816 -struct gg_http *gg_register(const char *email, const char *password, int async);
43.817 -struct gg_http *gg_register2(const char *email, const char *password, const char *qa, int async);
43.818 -struct gg_http *gg_register3(const char *email, const char *password, const char *tokenid, const char *tokenval, int async);
43.819 -#define gg_register_watch_fd gg_pubdir_watch_fd
43.820 -#define gg_register_free gg_pubdir_free
43.821 -#define gg_free_register gg_pubdir_free
43.822 -
43.823 -struct gg_http *gg_unregister(uin_t uin, const char *password, const char *email, int async);
43.824 -struct gg_http *gg_unregister2(uin_t uin, const char *password, const char *qa, int async);
43.825 -struct gg_http *gg_unregister3(uin_t uin, const char *password, const char *tokenid, const char *tokenval, int async);
43.826 -#define gg_unregister_watch_fd gg_pubdir_watch_fd
43.827 -#define gg_unregister_free gg_pubdir_free
43.828 -
43.829 -/* przypomnienie has³a e-mailem */
43.830 -struct gg_http *gg_remind_passwd(uin_t uin, int async);
43.831 -struct gg_http *gg_remind_passwd2(uin_t uin, const char *tokenid, const char *tokenval, int async);
43.832 -struct gg_http *gg_remind_passwd3(uin_t uin, const char *email, const char *tokenid, const char *tokenval, int async);
43.833 -#define gg_remind_passwd_watch_fd gg_pubdir_watch_fd
43.834 -#define gg_remind_passwd_free gg_pubdir_free
43.835 -#define gg_free_remind_passwd gg_pubdir_free
43.836 -
43.837 -/* zmiana has³a */
43.838 -struct gg_http *gg_change_passwd(uin_t uin, const char *passwd, const char *newpasswd, const char *newemail, int async);
43.839 -struct gg_http *gg_change_passwd2(uin_t uin, const char *passwd, const char *newpasswd, const char *email, const char *newemail, int async);
43.840 -struct gg_http *gg_change_passwd3(uin_t uin, const char *passwd, const char *newpasswd, const char *qa, int async);
43.841 -struct gg_http *gg_change_passwd4(uin_t uin, const char *email, const char *passwd, const char *newpasswd, const char *tokenid, const char *tokenval, int async);
43.842 -#define gg_change_passwd_free gg_pubdir_free
43.843 -#define gg_free_change_passwd gg_pubdir_free
43.844 -
43.845 -/*
43.846 - * struct gg_change_info_request
43.847 - *
43.848 - * opis ¿±dania zmiany informacji w katalogu publicznym.
43.849 - */
43.850 -struct gg_change_info_request {
43.851 - char *first_name; /* imiê */
43.852 - char *last_name; /* nazwisko */
43.853 - char *nickname; /* pseudonim */
43.854 - char *email; /* email */
43.855 - int born; /* rok urodzenia */
43.856 - int gender; /* p³eæ */
43.857 - char *city; /* miasto */
43.858 -};
43.859 -
43.860 -struct gg_change_info_request *gg_change_info_request_new(const char *first_name, const char *last_name, const char *nickname, const char *email, int born, int gender, const char *city);
43.861 -void gg_change_info_request_free(struct gg_change_info_request *r);
43.862 -
43.863 -struct gg_http *gg_change_info(uin_t uin, const char *passwd, const struct gg_change_info_request *request, int async);
43.864 -#define gg_change_pubdir_watch_fd gg_pubdir_watch_fd
43.865 -#define gg_change_pubdir_free gg_pubdir_free
43.866 -#define gg_free_change_pubdir gg_pubdir_free
43.867 -
43.868 -/*
43.869 - * funkcje dotycz±ce listy kontaktów na serwerze.
43.870 - */
43.871 -struct gg_http *gg_userlist_get(uin_t uin, const char *password, int async);
43.872 -int gg_userlist_get_watch_fd(struct gg_http *f);
43.873 -void gg_userlist_get_free(struct gg_http *f);
43.874 -
43.875 -struct gg_http *gg_userlist_put(uin_t uin, const char *password, const char *contacts, int async);
43.876 -int gg_userlist_put_watch_fd(struct gg_http *f);
43.877 -void gg_userlist_put_free(struct gg_http *f);
43.878 -
43.879 -struct gg_http *gg_userlist_remove(uin_t uin, const char *password, int async);
43.880 -int gg_userlist_remove_watch_fd(struct gg_http *f);
43.881 -void gg_userlist_remove_free(struct gg_http *f);
43.882 -
43.883 -
43.884 -
43.885 -/*
43.886 - * funkcje dotycz±ce komunikacji miêdzy klientami.
43.887 - */
43.888 -extern int gg_dcc_port; /* port, na którym nas³uchuje klient */
43.889 -extern unsigned long gg_dcc_ip; /* adres, na którym nas³uchuje klient */
43.890 -
43.891 -int gg_dcc_request(struct gg_session *sess, uin_t uin);
43.892 -
43.893 -struct gg_dcc *gg_dcc_send_file(uint32_t ip, uint16_t port, uin_t my_uin, uin_t peer_uin);
43.894 -struct gg_dcc *gg_dcc_get_file(uint32_t ip, uint16_t port, uin_t my_uin, uin_t peer_uin);
43.895 -struct gg_dcc *gg_dcc_voice_chat(uint32_t ip, uint16_t port, uin_t my_uin, uin_t peer_uin);
43.896 -void gg_dcc_set_type(struct gg_dcc *d, int type);
43.897 -int gg_dcc_fill_file_info(struct gg_dcc *d, const char *filename);
43.898 -int gg_dcc_fill_file_info2(struct gg_dcc *d, const char *filename, const char *local_filename);
43.899 -int gg_dcc_voice_send(struct gg_dcc *d, char *buf, int length);
43.900 -
43.901 -#define GG_DCC_VOICE_FRAME_LENGTH 195
43.902 -#define GG_DCC_VOICE_FRAME_LENGTH_505 326
43.903 -
43.904 -struct gg_dcc *gg_dcc_socket_create(uin_t uin, uint16_t port);
43.905 -#define gg_dcc_socket_free gg_free_dcc
43.906 -#define gg_dcc_socket_watch_fd gg_dcc_watch_fd
43.907 -
43.908 -struct gg_event *gg_dcc_watch_fd(struct gg_dcc *d);
43.909 -
43.910 -void gg_dcc_free(struct gg_dcc *c);
43.911 -#define gg_free_dcc gg_dcc_free
43.912 -
43.913 -/*
43.914 - * je¶li chcemy sobie podebugowaæ, wystarczy ustawiæ `gg_debug_level'.
43.915 - * niestety w miarê przybywania wpisów `gg_debug(...)' nie chcia³o mi
43.916 - * siê ustawiaæ odpowiednich leveli, wiêc wiêkszo¶æ sz³a do _MISC.
43.917 - */
43.918 -extern int gg_debug_level; /* poziom debugowania. mapa bitowa sta³ych GG_DEBUG_* */
43.919 -
43.920 -/*
43.921 - * mo¿na podaæ wska¼nik do funkcji obs³uguj±cej wywo³ania gg_debug().
43.922 - * nieoficjalne, nieudokumentowane, mo¿e siê zmieniæ. je¶li kto¶ jest
43.923 - * zainteresowany, niech da znaæ na ekg-devel.
43.924 - */
43.925 -extern void (*gg_debug_handler)(int level, const char *format, va_list ap);
43.926 -extern void (*gg_debug_handler_session)(struct gg_session *sess, int level, const char *format, va_list ap);
43.927 -
43.928 -/*
43.929 - * mo¿na podaæ plik, do którego bêd± zapisywane teksty z gg_debug().
43.930 - */
43.931 -extern FILE *gg_debug_file;
43.932 -
43.933 -#define GG_DEBUG_NET 1
43.934 -#define GG_DEBUG_TRAFFIC 2
43.935 -#define GG_DEBUG_DUMP 4
43.936 -#define GG_DEBUG_FUNCTION 8
43.937 -#define GG_DEBUG_MISC 16
43.938 -
43.939 -#ifdef GG_DEBUG_DISABLE
43.940 -#define gg_debug(x, y...) do { } while(0)
43.941 -#define gg_debug_session(z, x, y...) do { } while(0)
43.942 -#else
43.943 -void gg_debug(int level, const char *format, ...);
43.944 -void gg_debug_session(struct gg_session *sess, int level, const char *format, ...);
43.945 -#endif
43.946 -
43.947 -const char *gg_libgadu_version(void);
43.948 -
43.949 -/*
43.950 - * konfiguracja http proxy.
43.951 - */
43.952 -extern int gg_proxy_enabled; /* w³±cza obs³ugê proxy */
43.953 -extern char *gg_proxy_host; /* okre¶la adres serwera proxy */
43.954 -extern int gg_proxy_port; /* okre¶la port serwera proxy */
43.955 -extern char *gg_proxy_username; /* okre¶la nazwê u¿ytkownika przy autoryzacji serwera proxy */
43.956 -extern char *gg_proxy_password; /* okre¶la has³o u¿ytkownika przy autoryzacji serwera proxy */
43.957 -extern int gg_proxy_http_only; /* w³±cza obs³ugê proxy wy³±cznie dla us³ug HTTP */
43.958 -
43.959 -
43.960 -/*
43.961 - * adres, z którego ¶lemy pakiety (np ³±czymy siê z serwerem)
43.962 - * u¿ywany przy gg_connect()
43.963 - */
43.964 -extern unsigned long gg_local_ip;
43.965 -/*
43.966 - * -------------------------------------------------------------------------
43.967 - * poni¿ej znajduj± siê wewnêtrzne sprawy biblioteki. zwyk³y klient nie
43.968 - * powinien ich w ogóle ruszaæ, bo i nie ma po co. wszystko mo¿na za³atwiæ
43.969 - * procedurami wy¿szego poziomu, których definicje znajduj± siê na pocz±tku
43.970 - * tego pliku.
43.971 - * -------------------------------------------------------------------------
43.972 - */
43.973 -
43.974 -#ifdef GG_CONFIG_HAVE_PTHREAD
43.975 -int gg_resolve_pthread(int *fd, void **resolver, const char *hostname);
43.976 -void gg_resolve_pthread_cleanup(void *resolver, int kill);
43.977 -#endif
43.978 -
43.979 -#ifdef _WIN32
43.980 -int gg_thread_socket(int thread_id, int socket);
43.981 -#endif
43.982 -
43.983 -int gg_resolve(int *fd, int *pid, const char *hostname);
43.984 -
43.985 -#ifdef __GNUC__
43.986 -char *gg_saprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
43.987 -#else
43.988 -char *gg_saprintf(const char *format, ...);
43.989 -#endif
43.990 -
43.991 -char *gg_vsaprintf(const char *format, va_list ap);
43.992 -
43.993 -#define gg_alloc_sprintf gg_saprintf
43.994 -
43.995 -char *gg_get_line(char **ptr);
43.996 -
43.997 -int gg_connect(void *addr, int port, int async);
43.998 -struct in_addr *gg_gethostbyname(const char *hostname);
43.999 -char *gg_read_line(int sock, char *buf, int length);
43.1000 -void gg_chomp(char *line);
43.1001 -char *gg_urlencode(const char *str);
43.1002 -int gg_http_hash(const char *format, ...);
43.1003 -int gg_read(struct gg_session *sess, char *buf, int length);
43.1004 -int gg_write(struct gg_session *sess, const char *buf, int length);
43.1005 -void *gg_recv_packet(struct gg_session *sess);
43.1006 -int gg_send_packet(struct gg_session *sess, int type, ...);
43.1007 -unsigned int gg_login_hash(const unsigned char *password, unsigned int seed);
43.1008 -uint32_t gg_fix32(uint32_t x);
43.1009 -uint16_t gg_fix16(uint16_t x);
43.1010 -#define fix16 gg_fix16
43.1011 -#define fix32 gg_fix32
43.1012 -char *gg_proxy_auth(void);
43.1013 -char *gg_base64_encode(const char *buf);
43.1014 -char *gg_base64_decode(const char *buf);
43.1015 -int gg_image_queue_remove(struct gg_session *s, struct gg_image_queue *q, int freeq);
43.1016 -
43.1017 -#define GG_APPMSG_HOST "appmsg.gadu-gadu.pl"
43.1018 -#define GG_APPMSG_PORT 80
43.1019 -#define GG_PUBDIR_HOST "pubdir.gadu-gadu.pl"
43.1020 -#define GG_PUBDIR_PORT 80
43.1021 -#define GG_REGISTER_HOST "register.gadu-gadu.pl"
43.1022 -#define GG_REGISTER_PORT 80
43.1023 -#define GG_REMIND_HOST "retr.gadu-gadu.pl"
43.1024 -#define GG_REMIND_PORT 80
43.1025 -
43.1026 -#define GG_DEFAULT_PORT 8074
43.1027 -#define GG_HTTPS_PORT 443
43.1028 -#define GG_HTTP_USERAGENT "Mozilla/4.7 [en] (Win98; I)"
43.1029 -
43.1030 -#define GG_DEFAULT_CLIENT_VERSION "6, 1, 0, 158"
43.1031 -#define GG_DEFAULT_PROTOCOL_VERSION 0x24
43.1032 -#define GG_DEFAULT_TIMEOUT 30
43.1033 -#define GG_HAS_AUDIO_MASK 0x40000000
43.1034 -#define GG_ERA_OMNIX_MASK 0x04000000
43.1035 -#define GG_LIBGADU_VERSION "CVS"
43.1036 -
43.1037 -#define GG_DEFAULT_DCC_PORT 1550
43.1038 -
43.1039 -struct gg_header {
43.1040 - uint32_t type; /* typ pakietu */
43.1041 - uint32_t length; /* d³ugo¶æ reszty pakietu */
43.1042 -} GG_PACKED;
43.1043 -
43.1044 -#define GG_WELCOME 0x0001
43.1045 -#define GG_NEED_EMAIL 0x0014
43.1046 -
43.1047 -struct gg_welcome {
43.1048 - uint32_t key; /* klucz szyfrowania has³a */
43.1049 -} GG_PACKED;
43.1050 -
43.1051 -#define GG_LOGIN 0x000c
43.1052 -
43.1053 -struct gg_login {
43.1054 - uint32_t uin; /* mój numerek */
43.1055 - uint32_t hash; /* hash has³a */
43.1056 - uint32_t status; /* status na dzieñ dobry */
43.1057 - uint32_t version; /* moja wersja klienta */
43.1058 - uint32_t local_ip; /* mój adres ip */
43.1059 - uint16_t local_port; /* port, na którym s³ucham */
43.1060 -} GG_PACKED;
43.1061 -
43.1062 -#define GG_LOGIN_EXT 0x0013
43.1063 -
43.1064 -struct gg_login_ext {
43.1065 - uint32_t uin; /* mój numerek */
43.1066 - uint32_t hash; /* hash has³a */
43.1067 - uint32_t status; /* status na dzieñ dobry */
43.1068 - uint32_t version; /* moja wersja klienta */
43.1069 - uint32_t local_ip; /* mój adres ip */
43.1070 - uint16_t local_port; /* port, na którym s³ucham */
43.1071 - uint32_t external_ip; /* zewnêtrzny adres ip */
43.1072 - uint16_t external_port; /* zewnêtrzny port */
43.1073 -} GG_PACKED;
43.1074 -
43.1075 -#define GG_LOGIN60 0x0015
43.1076 -
43.1077 -struct gg_login60 {
43.1078 - uint32_t uin; /* mój numerek */
43.1079 - uint32_t hash; /* hash has³a */
43.1080 - uint32_t status; /* status na dzieñ dobry */
43.1081 - uint32_t version; /* moja wersja klienta */
43.1082 - uint8_t dunno1; /* 0x00 */
43.1083 - uint32_t local_ip; /* mój adres ip */
43.1084 - uint16_t local_port; /* port, na którym s³ucham */
43.1085 - uint32_t external_ip; /* zewnêtrzny adres ip */
43.1086 - uint16_t external_port; /* zewnêtrzny port */
43.1087 - uint8_t image_size; /* maksymalny rozmiar grafiki w KiB */
43.1088 - uint8_t dunno2; /* 0xbe */
43.1089 -} GG_PACKED;
43.1090 -
43.1091 -#define GG_LOGIN_OK 0x0003
43.1092 -
43.1093 -#define GG_LOGIN_FAILED 0x0009
43.1094 -
43.1095 -#define GG_PUBDIR50_REQUEST 0x0014
43.1096 -
43.1097 -#define GG_PUBDIR50_WRITE 0x01
43.1098 -#define GG_PUBDIR50_READ 0x02
43.1099 -#define GG_PUBDIR50_SEARCH 0x03
43.1100 -#define GG_PUBDIR50_SEARCH_REQUEST GG_PUBDIR50_SEARCH
43.1101 -#define GG_PUBDIR50_SEARCH_REPLY 0x05
43.1102 -
43.1103 -struct gg_pubdir50_request {
43.1104 - uint8_t type; /* GG_PUBDIR50_* */
43.1105 - uint32_t seq; /* czas wys³ania zapytania */
43.1106 -} GG_PACKED;
43.1107 -
43.1108 -#define GG_PUBDIR50_REPLY 0x000e
43.1109 -
43.1110 -struct gg_pubdir50_reply {
43.1111 - uint8_t type; /* GG_PUBDIR50_* */
43.1112 - uint32_t seq; /* czas wys³ania zapytania */
43.1113 -} GG_PACKED;
43.1114 -
43.1115 -#define GG_NEW_STATUS 0x0002
43.1116 -
43.1117 -#define GG_STATUS_NOT_AVAIL 0x0001 /* niedostêpny */
43.1118 -#define GG_STATUS_NOT_AVAIL_DESCR 0x0015 /* niedostêpny z opisem (4.8) */
43.1119 -#define GG_STATUS_AVAIL 0x0002 /* dostêpny */
43.1120 -#define GG_STATUS_AVAIL_DESCR 0x0004 /* dostêpny z opisem (4.9) */
43.1121 -#define GG_STATUS_BUSY 0x0003 /* zajêty */
43.1122 -#define GG_STATUS_BUSY_DESCR 0x0005 /* zajêty z opisem (4.8) */
43.1123 -#define GG_STATUS_INVISIBLE 0x0014 /* niewidoczny (4.6) */
43.1124 -#define GG_STATUS_INVISIBLE_DESCR 0x0016 /* niewidoczny z opisem (4.9) */
43.1125 -#define GG_STATUS_BLOCKED 0x0006 /* zablokowany */
43.1126 -
43.1127 -#define GG_STATUS_FRIENDS_MASK 0x8000 /* tylko dla znajomych (4.6) */
43.1128 -
43.1129 -#define GG_STATUS_DESCR_MAXSIZE 70
43.1130 -
43.1131 -/*
43.1132 - * makra do ³atwego i szybkiego sprawdzania stanu.
43.1133 - */
43.1134 -
43.1135 -/* GG_S_F() tryb tylko dla znajomych */
43.1136 -#define GG_S_F(x) (((x) & GG_STATUS_FRIENDS_MASK) != 0)
43.1137 -
43.1138 -/* GG_S() stan bez uwzglêdnienia trybu tylko dla znajomych */
43.1139 -#define GG_S(x) ((x) & ~GG_STATUS_FRIENDS_MASK)
43.1140 -
43.1141 -/* GG_S_A() dostêpny */
43.1142 -#define GG_S_A(x) (GG_S(x) == GG_STATUS_AVAIL || GG_S(x) == GG_STATUS_AVAIL_DESCR)
43.1143 -
43.1144 -/* GG_S_NA() niedostêpny */
43.1145 -#define GG_S_NA(x) (GG_S(x) == GG_STATUS_NOT_AVAIL || GG_S(x) == GG_STATUS_NOT_AVAIL_DESCR)
43.1146 -
43.1147 -/* GG_S_B() zajêty */
43.1148 -#define GG_S_B(x) (GG_S(x) == GG_STATUS_BUSY || GG_S(x) == GG_STATUS_BUSY_DESCR)
43.1149 -
43.1150 -/* GG_S_I() niewidoczny */
43.1151 -#define GG_S_I(x) (GG_S(x) == GG_STATUS_INVISIBLE || GG_S(x) == GG_STATUS_INVISIBLE_DESCR)
43.1152 -
43.1153 -/* GG_S_D() stan opisowy */
43.1154 -#define GG_S_D(x) (GG_S(x) == GG_STATUS_NOT_AVAIL_DESCR || GG_S(x) == GG_STATUS_AVAIL_DESCR || GG_S(x) == GG_STATUS_BUSY_DESCR || GG_S(x) == GG_STATUS_INVISIBLE_DESCR)
43.1155 -
43.1156 -/* GG_S_BL() blokowany lub blokuj±cy */
43.1157 -#define GG_S_BL(x) (GG_S(x) == GG_STATUS_BLOCKED)
43.1158 -
43.1159 -struct gg_new_status {
43.1160 - uint32_t status; /* na jaki zmieniæ? */
43.1161 -} GG_PACKED;
43.1162 -
43.1163 -#define GG_NOTIFY_FIRST 0x000f
43.1164 -#define GG_NOTIFY_LAST 0x0010
43.1165 -
43.1166 -#define GG_NOTIFY 0x0010
43.1167 -
43.1168 -struct gg_notify {
43.1169 - uint32_t uin; /* numerek danej osoby */
43.1170 - uint8_t dunno1; /* rodzaj wpisu w li¶cie */
43.1171 -} GG_PACKED;
43.1172 -
43.1173 -#define GG_USER_OFFLINE 0x01 /* bêdziemy niewidoczni dla u¿ytkownika */
43.1174 -#define GG_USER_NORMAL 0x03 /* zwyk³y u¿ytkownik */
43.1175 -#define GG_USER_BLOCKED 0x04 /* zablokowany u¿ytkownik */
43.1176 -
43.1177 -#define GG_LIST_EMPTY 0x0012
43.1178 -
43.1179 -#define GG_NOTIFY_REPLY 0x000c /* tak, to samo co GG_LOGIN */
43.1180 -
43.1181 -struct gg_notify_reply {
43.1182 - uint32_t uin; /* numerek */
43.1183 - uint32_t status; /* status danej osoby */
43.1184 - uint32_t remote_ip; /* adres ip delikwenta */
43.1185 - uint16_t remote_port; /* port, na którym s³ucha klient */
43.1186 - uint32_t version; /* wersja klienta */
43.1187 - uint16_t dunno2; /* znowu port? */
43.1188 -} GG_PACKED;
43.1189 -
43.1190 -#define GG_NOTIFY_REPLY60 0x0011
43.1191 -
43.1192 -struct gg_notify_reply60 {
43.1193 - uint32_t uin; /* numerek plus flagi w MSB */
43.1194 - uint8_t status; /* status danej osoby */
43.1195 - uint32_t remote_ip; /* adres ip delikwenta */
43.1196 - uint16_t remote_port; /* port, na którym s³ucha klient */
43.1197 - uint8_t version; /* wersja klienta */
43.1198 - uint8_t image_size; /* maksymalny rozmiar grafiki w KiB */
43.1199 - uint8_t dunno1; /* 0x00 */
43.1200 -} GG_PACKED;
43.1201 -
43.1202 -#define GG_STATUS60 0x000f
43.1203 -
43.1204 -struct gg_status60 {
43.1205 - uint32_t uin; /* numerek plus flagi w MSB */
43.1206 - uint8_t status; /* status danej osoby */
43.1207 - uint32_t remote_ip; /* adres ip delikwenta */
43.1208 - uint16_t remote_port; /* port, na którym s³ucha klient */
43.1209 - uint8_t version; /* wersja klienta */
43.1210 - uint8_t image_size; /* maksymalny rozmiar grafiki w KiB */
43.1211 - uint8_t dunno1; /* 0x00 */
43.1212 -} GG_PACKED;
43.1213 -
43.1214 -#define GG_ADD_NOTIFY 0x000d
43.1215 -#define GG_REMOVE_NOTIFY 0x000e
43.1216 -
43.1217 -struct gg_add_remove {
43.1218 - uint32_t uin; /* numerek */
43.1219 - uint8_t dunno1; /* bitmapa */
43.1220 -} GG_PACKED;
43.1221 -
43.1222 -#define GG_STATUS 0x0002
43.1223 -
43.1224 -struct gg_status {
43.1225 - uint32_t uin; /* numerek */
43.1226 - uint32_t status; /* nowy stan */
43.1227 -} GG_PACKED;
43.1228 -
43.1229 -#define GG_SEND_MSG 0x000b
43.1230 -
43.1231 -#define GG_CLASS_QUEUED 0x0001
43.1232 -#define GG_CLASS_OFFLINE GG_CLASS_QUEUED
43.1233 -#define GG_CLASS_MSG 0x0004
43.1234 -#define GG_CLASS_CHAT 0x0008
43.1235 -#define GG_CLASS_CTCP 0x0010
43.1236 -#define GG_CLASS_ACK 0x0020
43.1237 -#define GG_CLASS_EXT GG_CLASS_ACK /* kompatybilno¶æ wstecz */
43.1238 -
43.1239 -#define GG_MSG_MAXSIZE 2000
43.1240 -
43.1241 -struct gg_send_msg {
43.1242 - uint32_t recipient;
43.1243 - uint32_t seq;
43.1244 - uint32_t msgclass;
43.1245 -} GG_PACKED;
43.1246 -
43.1247 -struct gg_msg_richtext {
43.1248 - uint8_t flag;
43.1249 - uint16_t length;
43.1250 -} GG_PACKED;
43.1251 -
43.1252 -struct gg_msg_richtext_format {
43.1253 - uint16_t position;
43.1254 - uint8_t font;
43.1255 -} GG_PACKED;
43.1256 -
43.1257 -struct gg_msg_richtext_image {
43.1258 - uint16_t unknown1;
43.1259 - uint32_t size;
43.1260 - uint32_t crc32;
43.1261 -} GG_PACKED;
43.1262 -
43.1263 -#define GG_FONT_BOLD 0x01
43.1264 -#define GG_FONT_ITALIC 0x02
43.1265 -#define GG_FONT_UNDERLINE 0x04
43.1266 -#define GG_FONT_COLOR 0x08
43.1267 -#define GG_FONT_IMAGE 0x80
43.1268 -
43.1269 -struct gg_msg_richtext_color {
43.1270 - uint8_t red;
43.1271 - uint8_t green;
43.1272 - uint8_t blue;
43.1273 -} GG_PACKED;
43.1274 -
43.1275 -struct gg_msg_recipients {
43.1276 - uint8_t flag;
43.1277 - uint32_t count;
43.1278 -} GG_PACKED;
43.1279 -
43.1280 -struct gg_msg_image_request {
43.1281 - uint8_t flag;
43.1282 - uint32_t size;
43.1283 - uint32_t crc32;
43.1284 -} GG_PACKED;
43.1285 -
43.1286 -struct gg_msg_image_reply {
43.1287 - uint8_t flag;
43.1288 - uint32_t size;
43.1289 - uint32_t crc32;
43.1290 - /* char filename[]; */
43.1291 - /* char image[]; */
43.1292 -} GG_PACKED;
43.1293 -
43.1294 -#define GG_SEND_MSG_ACK 0x0005
43.1295 -
43.1296 -#define GG_ACK_BLOCKED 0x0001
43.1297 -#define GG_ACK_DELIVERED 0x0002
43.1298 -#define GG_ACK_QUEUED 0x0003
43.1299 -#define GG_ACK_MBOXFULL 0x0004
43.1300 -#define GG_ACK_NOT_DELIVERED 0x0006
43.1301 -
43.1302 -struct gg_send_msg_ack {
43.1303 - uint32_t status;
43.1304 - uint32_t recipient;
43.1305 - uint32_t seq;
43.1306 -} GG_PACKED;
43.1307 -
43.1308 -#define GG_RECV_MSG 0x000a
43.1309 -
43.1310 -struct gg_recv_msg {
43.1311 - uint32_t sender;
43.1312 - uint32_t seq;
43.1313 - uint32_t time;
43.1314 - uint32_t msgclass;
43.1315 -} GG_PACKED;
43.1316 -
43.1317 -#define GG_PING 0x0008
43.1318 -
43.1319 -#define GG_PONG 0x0007
43.1320 -
43.1321 -#define GG_DISCONNECTING 0x000b
43.1322 -
43.1323 -#define GG_USERLIST_REQUEST 0x0016
43.1324 -
43.1325 -#define GG_USERLIST_PUT 0x00
43.1326 -#define GG_USERLIST_PUT_MORE 0x01
43.1327 -#define GG_USERLIST_GET 0x02
43.1328 -
43.1329 -struct gg_userlist_request {
43.1330 - uint8_t type;
43.1331 -} GG_PACKED;
43.1332 -
43.1333 -#define GG_USERLIST_REPLY 0x0010
43.1334 -
43.1335 -#define GG_USERLIST_PUT_REPLY 0x00
43.1336 -#define GG_USERLIST_PUT_MORE_REPLY 0x02
43.1337 -#define GG_USERLIST_GET_REPLY 0x06
43.1338 -#define GG_USERLIST_GET_MORE_REPLY 0x04
43.1339 -
43.1340 -struct gg_userlist_reply {
43.1341 - uint8_t type;
43.1342 -} GG_PACKED;
43.1343 -
43.1344 -/*
43.1345 - * pakiety, sta³e, struktury dla DCC
43.1346 - */
43.1347 -
43.1348 -struct gg_dcc_tiny_packet {
43.1349 - uint8_t type; /* rodzaj pakietu */
43.1350 -} GG_PACKED;
43.1351 -
43.1352 -struct gg_dcc_small_packet {
43.1353 - uint32_t type; /* rodzaj pakietu */
43.1354 -} GG_PACKED;
43.1355 -
43.1356 -struct gg_dcc_big_packet {
43.1357 - uint32_t type; /* rodzaj pakietu */
43.1358 - uint32_t dunno1; /* niewiadoma */
43.1359 - uint32_t dunno2; /* niewiadoma */
43.1360 -} GG_PACKED;
43.1361 -
43.1362 -/*
43.1363 - * póki co, nie znamy dok³adnie protoko³u. nie wiemy, co czemu odpowiada.
43.1364 - * nazwy s± niepowa¿ne i tymczasowe.
43.1365 - */
43.1366 -#define GG_DCC_WANT_FILE 0x0003 /* peer chce plik */
43.1367 -#define GG_DCC_HAVE_FILE 0x0001 /* wiêc mu damy */
43.1368 -#define GG_DCC_HAVE_FILEINFO 0x0003 /* niech ma informacje o pliku */
43.1369 -#define GG_DCC_GIMME_FILE 0x0006 /* peer jest pewny */
43.1370 -#define GG_DCC_CATCH_FILE 0x0002 /* wysy³amy plik */
43.1371 -
43.1372 -#define GG_DCC_FILEATTR_READONLY 0x0020
43.1373 -
43.1374 -#define GG_DCC_TIMEOUT_SEND 1800 /* 30 minut */
43.1375 -#define GG_DCC_TIMEOUT_GET 1800 /* 30 minut */
43.1376 -#define GG_DCC_TIMEOUT_FILE_ACK 300 /* 5 minut */
43.1377 -#define GG_DCC_TIMEOUT_VOICE_ACK 300 /* 5 minut */
43.1378 -
43.1379 -#ifdef __cplusplus
43.1380 -}
43.1381 -#ifdef _WIN32
43.1382 -#pragma pack(pop)
43.1383 -#endif
43.1384 -#endif
43.1385 -
43.1386 -#endif /* __GG_LIBGADU_H */
43.1387 -
43.1388 -/*
43.1389 - * Local variables:
43.1390 - * c-indentation-style: k&r
43.1391 - * c-basic-offset: 8
43.1392 - * indent-tabs-mode: notnil
43.1393 - * End:
43.1394 - *
43.1395 - * vim: shiftwidth=8:
43.1396 - */
44.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/libgadu-ppc.h Fri Aug 21 13:24:36 2009 -0700
44.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
44.3 @@ -1,1393 +0,0 @@
44.4 -/* include/libgadu.h. Generated from libgadu.h.in by configure. */
44.5 -/* $Id: libgadu.h.in,v 1.5.2.1 2007-04-21 23:44:25 wojtekka Exp $ */
44.6 -
44.7 -/*
44.8 - * (C) Copyright 2001-2003 Wojtek Kaniewski <wojtekka@irc.pl>
44.9 - * Robert J. Wo¼ny <speedy@ziew.org>
44.10 - * Arkadiusz Mi¶kiewicz <arekm@pld-linux.org>
44.11 - * Tomasz Chiliñski <chilek@chilan.com>
44.12 - * Piotr Wysocki <wysek@linux.bydg.org>
44.13 - * Dawid Jarosz <dawjar@poczta.onet.pl>
44.14 - *
44.15 - * This program is free software; you can redistribute it and/or modify
44.16 - * it under the terms of the GNU Lesser General Public License Version
44.17 - * 2.1 as published by the Free Software Foundation.
44.18 - *
44.19 - * This program is distributed in the hope that it will be useful,
44.20 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
44.21 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44.22 - * GNU Lesser General Public License for more details.
44.23 - *
44.24 - * You should have received a copy of the GNU Lesser General Public
44.25 - * License along with this program; if not, write to the Free Software
44.26 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
44.27 - * USA.
44.28 - */
44.29 -
44.30 -#ifndef __GG_LIBGADU_H
44.31 -#define __GG_LIBGADU_H
44.32 -
44.33 -#ifdef __cplusplus
44.34 -#ifdef _WIN32
44.35 -#pragma pack(push, 1)
44.36 -#endif
44.37 -extern "C" {
44.38 -#endif
44.39 -
44.40 -#include <sys/types.h>
44.41 -#include <stdio.h>
44.42 -#include <stdarg.h>
44.43 -
44.44 -/* Defined if libgadu was compiled for bigendian machine. */
44.45 -#define GG_CONFIG_BIGENDIAN
44.46 -
44.47 -/* Defined if this machine has gethostbyname_r(). */
44.48 -/* #undef GG_CONFIG_HAVE_GETHOSTBYNAME_R */
44.49 -
44.50 -/* Defined if libgadu was compiled and linked with pthread support. */
44.51 -/* #undef GG_CONFIG_HAVE_PTHREAD */
44.52 -
44.53 -/* Defined if this machine has C99-compiliant vsnprintf(). */
44.54 -#define GG_CONFIG_HAVE_C99_VSNPRINTF
44.55 -
44.56 -/* Defined if this machine has va_copy(). */
44.57 -#define GG_CONFIG_HAVE_VA_COPY
44.58 -
44.59 -/* Defined if this machine has __va_copy(). */
44.60 -#define GG_CONFIG_HAVE___VA_COPY
44.61 -
44.62 -/* Defined if this machine supports long long. */
44.63 -#define GG_CONFIG_HAVE_LONG_LONG
44.64 -
44.65 -/* Defined if libgadu was compiled and linked with TLS support. */
44.66 -#define GG_CONFIG_HAVE_OPENSSL
44.67 -
44.68 -/* Defined if uintX_t types are defined in <stdint.h>. */
44.69 -#define GG_CONFIG_HAVE_STDINT_H
44.70 -
44.71 -/* Defined if uintX_t types are defined in <inttypes.h>. */
44.72 -/* #undef GG_CONFIG_HAVE_INTTYPES_H */
44.73 -
44.74 -/* Defined if uintX_t types are defined in <sys/inttypes.h>. */
44.75 -/* #undef GG_CONFIG_HAVE_SYS_INTTYPES_H */
44.76 -
44.77 -/* Defined if uintX_t types are defined in <sys/int_types.h>. */
44.78 -/* #undef GG_CONFIG_HAVE_SYS_INT_TYPES_H */
44.79 -
44.80 -/* Defined if uintX_t types are defined in <sys/types.h>. */
44.81 -/* #undef GG_CONFIG_HAVE_SYS_TYPES_H */
44.82 -
44.83 -#ifdef GG_CONFIG_HAVE_OPENSSL
44.84 -#include <openssl/ssl.h>
44.85 -#endif
44.86 -
44.87 -#ifdef GG_CONFIG_HAVE_STDINT_H
44.88 -#include <stdint.h>
44.89 -#else
44.90 -# ifdef GG_CONFIG_HAVE_INTTYPES_H
44.91 -# include <inttypes.h>
44.92 -# else
44.93 -# ifdef GG_CONFIG_HAVE_SYS_INTTYPES_H
44.94 -# include <sys/inttypes.h>
44.95 -# else
44.96 -# ifdef GG_CONFIG_HAVE_SYS_INT_TYPES_H
44.97 -# include <sys/int_types.h>
44.98 -# else
44.99 -# ifdef GG_CONFIG_HAVE_SYS_TYPES_H
44.100 -# include <sys/types.h>
44.101 -# else
44.102 -
44.103 -#ifndef __AC_STDINT_H
44.104 -#define __AC_STDINT_H
44.105 -
44.106 -/* ISO C 9X: 7.18 Integer types <stdint.h> */
44.107 -
44.108 -typedef unsigned char uint8_t;
44.109 -typedef unsigned short uint16_t;
44.110 -typedef unsigned int uint32_t;
44.111 -
44.112 -#ifndef __CYGWIN__
44.113 -#define __int8_t_defined
44.114 -typedef signed char int8_t;
44.115 -typedef signed short int16_t;
44.116 -typedef signed int int32_t;
44.117 -#endif
44.118 -
44.119 -#endif /* __AC_STDINT_H */
44.120 -
44.121 -# endif
44.122 -# endif
44.123 -# endif
44.124 -# endif
44.125 -#endif
44.126 -
44.127 -/*
44.128 - * typedef uin_t
44.129 - *
44.130 - * typ reprezentuj±cy numer osoby.
44.131 - */
44.132 -typedef uint32_t uin_t;
44.133 -
44.134 -/*
44.135 - * ogólna struktura opisuj±ca ró¿ne sesje. przydatna w klientach.
44.136 - */
44.137 -#define gg_common_head(x) \
44.138 - int fd; /* podgl±dany deskryptor */ \
44.139 - int check; /* sprawdzamy zapis czy odczyt */ \
44.140 - int state; /* aktualny stan maszynki */ \
44.141 - int error; /* kod b³êdu dla GG_STATE_ERROR */ \
44.142 - int type; /* rodzaj sesji */ \
44.143 - int id; /* identyfikator */ \
44.144 - int timeout; /* sugerowany timeout w sekundach */ \
44.145 - int (*callback)(x*); /* callback przy zmianach */ \
44.146 - void (*destroy)(x*); /* funkcja niszczenia */
44.147 -
44.148 -struct gg_common {
44.149 - gg_common_head(struct gg_common)
44.150 -};
44.151 -
44.152 -struct gg_image_queue;
44.153 -
44.154 -/*
44.155 - * struct gg_session
44.156 - *
44.157 - * struktura opisuj±ca dan± sesjê. tworzona przez gg_login(), zwalniana
44.158 - * przez gg_free_session().
44.159 - */
44.160 -struct gg_session {
44.161 - gg_common_head(struct gg_session)
44.162 -
44.163 - int async; /* czy po³±czenie jest asynchroniczne */
44.164 - int pid; /* pid procesu resolvera */
44.165 - int port; /* port, z którym siê ³±czymy */
44.166 - int seq; /* numer sekwencyjny ostatniej wiadomo¶ci */
44.167 - int last_pong; /* czas otrzymania ostatniego ping/pong */
44.168 - int last_event; /* czas otrzymania ostatniego pakietu */
44.169 -
44.170 - struct gg_event *event; /* zdarzenie po ->callback() */
44.171 -
44.172 - uint32_t proxy_addr; /* adres proxy, keszowany */
44.173 - uint16_t proxy_port; /* port proxy */
44.174 -
44.175 - uint32_t hub_addr; /* adres huba po resolvniêciu */
44.176 - uint32_t server_addr; /* adres serwera, od huba */
44.177 -
44.178 - uint32_t client_addr; /* adres klienta */
44.179 - uint16_t client_port; /* port, na którym klient s³ucha */
44.180 -
44.181 - uint32_t external_addr; /* adres zewnetrzny klienta */
44.182 - uint16_t external_port; /* port zewnetrzny klienta */
44.183 -
44.184 - uin_t uin; /* numerek klienta */
44.185 - char *password; /* i jego has³o. zwalniane automagicznie */
44.186 -
44.187 - int initial_status; /* pocz±tkowy stan klienta */
44.188 - int status; /* aktualny stan klienta */
44.189 -
44.190 - char *recv_buf; /* bufor na otrzymywane pakiety */
44.191 - int recv_done; /* ile ju¿ wczytano do bufora */
44.192 - int recv_left; /* i ile jeszcze trzeba wczytaæ */
44.193 -
44.194 - int protocol_version; /* wersja u¿ywanego protoko³u */
44.195 - char *client_version; /* wersja u¿ywanego klienta */
44.196 - int last_sysmsg; /* ostatnia wiadomo¶æ systemowa */
44.197 -
44.198 - char *initial_descr; /* pocz±tkowy opis stanu klienta */
44.199 -
44.200 - void *resolver; /* wska¼nik na informacje resolvera */
44.201 -
44.202 - char *header_buf; /* bufor na pocz±tek nag³ówka */
44.203 - unsigned int header_done;/* ile ju¿ mamy */
44.204 -
44.205 -#ifdef GG_CONFIG_HAVE_OPENSSL
44.206 - SSL *ssl; /* sesja TLS */
44.207 - SSL_CTX *ssl_ctx; /* kontekst sesji? */
44.208 -#else
44.209 - void *ssl; /* zachowujemy ABI */
44.210 - void *ssl_ctx;
44.211 -#endif
44.212 -
44.213 - int image_size; /* maksymalny rozmiar obrazków w KiB */
44.214 -
44.215 - char *userlist_reply; /* fragment odpowiedzi listy kontaktów */
44.216 -
44.217 - int userlist_blocks; /* na ile kawa³ków podzielono listê kontaktów */
44.218 -
44.219 - struct gg_image_queue *images; /* aktualnie wczytywane obrazki */
44.220 -};
44.221 -
44.222 -/*
44.223 - * struct gg_http
44.224 - *
44.225 - * ogólna struktura opisuj±ca stan wszystkich operacji HTTP. tworzona
44.226 - * przez gg_http_connect(), zwalniana przez gg_http_free().
44.227 - */
44.228 -struct gg_http {
44.229 - gg_common_head(struct gg_http)
44.230 -
44.231 - int async; /* czy po³±czenie asynchroniczne */
44.232 - int pid; /* pid procesu resolvera */
44.233 - int port; /* port, z którym siê ³±czymy */
44.234 -
44.235 - char *query; /* bufor zapytania http */
44.236 - char *header; /* bufor nag³ówka */
44.237 - int header_size; /* rozmiar wczytanego nag³ówka */
44.238 - char *body; /* bufor otrzymanych informacji */
44.239 - unsigned int body_size; /* oczekiwana ilo¶æ informacji */
44.240 -
44.241 - void *data; /* dane danej operacji http */
44.242 -
44.243 - char *user_data; /* dane u¿ytkownika, nie s± zwalniane przez gg_http_free() */
44.244 -
44.245 - void *resolver; /* wska¼nik na informacje resolvera */
44.246 -
44.247 - unsigned int body_done; /* ile ju¿ tre¶ci odebrano? */
44.248 -};
44.249 -
44.250 -#ifdef __GNUC__
44.251 -#define GG_PACKED __attribute__ ((packed))
44.252 -#else
44.253 -#define GG_PACKED
44.254 -#endif
44.255 -
44.256 -#define GG_MAX_PATH 276
44.257 -
44.258 -/*
44.259 - * struct gg_file_info
44.260 - *
44.261 - * odpowiednik windowsowej struktury WIN32_FIND_DATA niezbêdnej przy
44.262 - * wysy³aniu plików.
44.263 - */
44.264 -struct gg_file_info {
44.265 - uint32_t mode; /* dwFileAttributes */
44.266 - uint32_t ctime[2]; /* ftCreationTime */
44.267 - uint32_t atime[2]; /* ftLastAccessTime */
44.268 - uint32_t mtime[2]; /* ftLastWriteTime */
44.269 - uint32_t size_hi; /* nFileSizeHigh */
44.270 - uint32_t size; /* nFileSizeLow */
44.271 - uint32_t reserved0; /* dwReserved0 */
44.272 - uint32_t reserved1; /* dwReserved1 */
44.273 - unsigned char filename[GG_MAX_PATH - 14]; /* cFileName */
44.274 - unsigned char short_filename[14]; /* cAlternateFileName */
44.275 -} GG_PACKED;
44.276 -
44.277 -/*
44.278 - * struct gg_dcc
44.279 - *
44.280 - * struktura opisuj±ca nas³uchuj±ce gniazdo po³±czeñ miêdzy klientami.
44.281 - * tworzona przez gg_dcc_socket_create(), zwalniana przez gg_dcc_free().
44.282 - */
44.283 -struct gg_dcc {
44.284 - gg_common_head(struct gg_dcc)
44.285 -
44.286 - struct gg_event *event; /* opis zdarzenia */
44.287 -
44.288 - int active; /* czy to my siê ³±czymy? */
44.289 - int port; /* port, na którym siedzi */
44.290 - uin_t uin; /* uin klienta */
44.291 - uin_t peer_uin; /* uin drugiej strony */
44.292 - int file_fd; /* deskryptor pliku */
44.293 - unsigned int offset; /* offset w pliku */
44.294 - unsigned int chunk_size;/* rozmiar kawa³ka */
44.295 - unsigned int chunk_offset;/* offset w aktualnym kawa³ku */
44.296 - struct gg_file_info file_info;
44.297 - /* informacje o pliku */
44.298 - int established; /* po³±czenie ustanowione */
44.299 - char *voice_buf; /* bufor na pakiet po³±czenia g³osowego */
44.300 - int incoming; /* po³±czenie przychodz±ce */
44.301 - char *chunk_buf; /* bufor na kawa³ek danych */
44.302 - uint32_t remote_addr; /* adres drugiej strony */
44.303 - uint16_t remote_port; /* port drugiej strony */
44.304 -};
44.305 -
44.306 -/*
44.307 - * enum gg_session_t
44.308 - *
44.309 - * rodzaje sesji.
44.310 - */
44.311 -enum gg_session_t {
44.312 - GG_SESSION_GG = 1, /* po³±czenie z serwerem gg */
44.313 - GG_SESSION_HTTP, /* ogólna sesja http */
44.314 - GG_SESSION_SEARCH, /* szukanie */
44.315 - GG_SESSION_REGISTER, /* rejestrowanie */
44.316 - GG_SESSION_REMIND, /* przypominanie has³a */
44.317 - GG_SESSION_PASSWD, /* zmiana has³a */
44.318 - GG_SESSION_CHANGE, /* zmiana informacji o sobie */
44.319 - GG_SESSION_DCC, /* ogólne po³±czenie DCC */
44.320 - GG_SESSION_DCC_SOCKET, /* nas³uchuj±cy socket */
44.321 - GG_SESSION_DCC_SEND, /* wysy³anie pliku */
44.322 - GG_SESSION_DCC_GET, /* odbieranie pliku */
44.323 - GG_SESSION_DCC_VOICE, /* rozmowa g³osowa */
44.324 - GG_SESSION_USERLIST_GET, /* pobieranie userlisty */
44.325 - GG_SESSION_USERLIST_PUT, /* wysy³anie userlisty */
44.326 - GG_SESSION_UNREGISTER, /* usuwanie konta */
44.327 - GG_SESSION_USERLIST_REMOVE, /* usuwanie userlisty */
44.328 - GG_SESSION_TOKEN, /* pobieranie tokenu */
44.329 -
44.330 - GG_SESSION_USER0 = 256, /* zdefiniowana dla u¿ytkownika */
44.331 - GG_SESSION_USER1, /* j.w. */
44.332 - GG_SESSION_USER2, /* j.w. */
44.333 - GG_SESSION_USER3, /* j.w. */
44.334 - GG_SESSION_USER4, /* j.w. */
44.335 - GG_SESSION_USER5, /* j.w. */
44.336 - GG_SESSION_USER6, /* j.w. */
44.337 - GG_SESSION_USER7 /* j.w. */
44.338 -};
44.339 -
44.340 -/*
44.341 - * enum gg_state_t
44.342 - *
44.343 - * opisuje stan asynchronicznej maszyny.
44.344 - */
44.345 -enum gg_state_t {
44.346 - /* wspólne */
44.347 - GG_STATE_IDLE = 0, /* nie powinno wyst±piæ. */
44.348 - GG_STATE_RESOLVING, /* wywo³a³ gethostbyname() */
44.349 - GG_STATE_CONNECTING, /* wywo³a³ connect() */
44.350 - GG_STATE_READING_DATA, /* czeka na dane http */
44.351 - GG_STATE_ERROR, /* wyst±pi³ b³±d. kod w x->error */
44.352 -
44.353 - /* gg_session */
44.354 - GG_STATE_CONNECTING_HUB, /* wywo³a³ connect() na huba */
44.355 - GG_STATE_CONNECTING_GG, /* wywo³a³ connect() na serwer */
44.356 - GG_STATE_READING_KEY, /* czeka na klucz */
44.357 - GG_STATE_READING_REPLY, /* czeka na odpowied¼ */
44.358 - GG_STATE_CONNECTED, /* po³±czy³ siê */
44.359 -
44.360 - /* gg_http */
44.361 - GG_STATE_SENDING_QUERY, /* wysy³a zapytanie http */
44.362 - GG_STATE_READING_HEADER, /* czeka na nag³ówek http */
44.363 - GG_STATE_PARSING, /* przetwarza dane */
44.364 - GG_STATE_DONE, /* skoñczy³ */
44.365 -
44.366 - /* gg_dcc */
44.367 - GG_STATE_LISTENING, /* czeka na po³±czenia */
44.368 - GG_STATE_READING_UIN_1, /* czeka na uin peera */
44.369 - GG_STATE_READING_UIN_2, /* czeka na swój uin */
44.370 - GG_STATE_SENDING_ACK, /* wysy³a potwierdzenie dcc */
44.371 - GG_STATE_READING_ACK, /* czeka na potwierdzenie dcc */
44.372 - GG_STATE_READING_REQUEST, /* czeka na komendê */
44.373 - GG_STATE_SENDING_REQUEST, /* wysy³a komendê */
44.374 - GG_STATE_SENDING_FILE_INFO, /* wysy³a informacje o pliku */
44.375 - GG_STATE_READING_PRE_FILE_INFO, /* czeka na pakiet przed file_info */
44.376 - GG_STATE_READING_FILE_INFO, /* czeka na informacje o pliku */
44.377 - GG_STATE_SENDING_FILE_ACK, /* wysy³a potwierdzenie pliku */
44.378 - GG_STATE_READING_FILE_ACK, /* czeka na potwierdzenie pliku */
44.379 - GG_STATE_SENDING_FILE_HEADER, /* wysy³a nag³ówek pliku */
44.380 - GG_STATE_READING_FILE_HEADER, /* czeka na nag³ówek */
44.381 - GG_STATE_GETTING_FILE, /* odbiera plik */
44.382 - GG_STATE_SENDING_FILE, /* wysy³a plik */
44.383 - GG_STATE_READING_VOICE_ACK, /* czeka na potwierdzenie voip */
44.384 - GG_STATE_READING_VOICE_HEADER, /* czeka na rodzaj bloku voip */
44.385 - GG_STATE_READING_VOICE_SIZE, /* czeka na rozmiar bloku voip */
44.386 - GG_STATE_READING_VOICE_DATA, /* czeka na dane voip */
44.387 - GG_STATE_SENDING_VOICE_ACK, /* wysy³a potwierdzenie voip */
44.388 - GG_STATE_SENDING_VOICE_REQUEST, /* wysy³a ¿±danie voip */
44.389 - GG_STATE_READING_TYPE, /* czeka na typ po³±czenia */
44.390 -
44.391 - /* nowe. bez sensu jest to API. */
44.392 - GG_STATE_TLS_NEGOTIATION /* negocjuje po³±czenie TLS */
44.393 -};
44.394 -
44.395 -/*
44.396 - * enum gg_check_t
44.397 - *
44.398 - * informuje, co proces klienta powinien sprawdziæ na deskryptorze danego
44.399 - * po³±czenia.
44.400 - */
44.401 -enum gg_check_t {
44.402 - GG_CHECK_NONE = 0, /* nic. nie powinno wyst±piæ */
44.403 - GG_CHECK_WRITE = 1, /* sprawdzamy mo¿liwo¶æ zapisu */
44.404 - GG_CHECK_READ = 2 /* sprawdzamy mo¿liwo¶æ odczytu */
44.405 -};
44.406 -
44.407 -/*
44.408 - * struct gg_login_params
44.409 - *
44.410 - * parametry gg_login(). przeniesiono do struktury, ¿eby unikn±æ problemów
44.411 - * z ci±g³ymi zmianami API, gdy dodano co¶ nowego do protoko³u.
44.412 - */
44.413 -struct gg_login_params {
44.414 - uin_t uin; /* numerek */
44.415 - char *password; /* has³o */
44.416 - int async; /* asynchroniczne sockety? */
44.417 - int status; /* pocz±tkowy status klienta */
44.418 - char *status_descr; /* opis statusu */
44.419 - uint32_t server_addr; /* adres serwera gg */
44.420 - uint16_t server_port; /* port serwera gg */
44.421 - uint32_t client_addr; /* adres dcc klienta */
44.422 - uint16_t client_port; /* port dcc klienta */
44.423 - int protocol_version; /* wersja protoko³u */
44.424 - char *client_version; /* wersja klienta */
44.425 - int has_audio; /* czy ma d¼wiêk? */
44.426 - int last_sysmsg; /* ostatnia wiadomo¶æ systemowa */
44.427 - uint32_t external_addr; /* adres widziany na zewnatrz */
44.428 - uint16_t external_port; /* port widziany na zewnatrz */
44.429 - int tls; /* czy ³±czymy po TLS? */
44.430 - int image_size; /* maksymalny rozmiar obrazka w KiB */
44.431 - int era_omnix; /* czy udawaæ klienta era omnix? */
44.432 -
44.433 - char dummy[6 * sizeof(int)]; /* miejsce na kolejnych 6 zmiennych,
44.434 - * ¿eby z dodaniem parametru nie
44.435 - * zmienia³ siê rozmiar struktury */
44.436 -};
44.437 -
44.438 -struct gg_session *gg_login(const struct gg_login_params *p);
44.439 -void gg_free_session(struct gg_session *sess);
44.440 -void gg_logoff(struct gg_session *sess);
44.441 -int gg_change_status(struct gg_session *sess, int status);
44.442 -int gg_change_status_descr(struct gg_session *sess, int status, const char *descr);
44.443 -int gg_change_status_descr_time(struct gg_session *sess, int status, const char *descr, int time);
44.444 -int gg_send_message(struct gg_session *sess, int msgclass, uin_t recipient, const unsigned char *message);
44.445 -int gg_send_message_richtext(struct gg_session *sess, int msgclass, uin_t recipient, const unsigned char *message, const unsigned char *format, int formatlen);
44.446 -int gg_send_message_confer(struct gg_session *sess, int msgclass, int recipients_count, uin_t *recipients, const unsigned char *message);
44.447 -int gg_send_message_confer_richtext(struct gg_session *sess, int msgclass, int recipients_count, uin_t *recipients, const unsigned char *message, const unsigned char *format, int formatlen);
44.448 -int gg_send_message_ctcp(struct gg_session *sess, int msgclass, uin_t recipient, const unsigned char *message, int message_len);
44.449 -int gg_ping(struct gg_session *sess);
44.450 -int gg_userlist_request(struct gg_session *sess, char type, const char *request);
44.451 -int gg_image_request(struct gg_session *sess, uin_t recipient, int size, uint32_t crc32);
44.452 -int gg_image_reply(struct gg_session *sess, uin_t recipient, const char *filename, const char *image, int size);
44.453 -
44.454 -uint32_t gg_crc32(uint32_t crc, const unsigned char *buf, int len);
44.455 -
44.456 -struct gg_image_queue {
44.457 - uin_t sender; /* nadawca obrazka */
44.458 - uint32_t size; /* rozmiar */
44.459 - uint32_t crc32; /* suma kontrolna */
44.460 - char *filename; /* nazwa pliku */
44.461 - char *image; /* bufor z obrazem */
44.462 - uint32_t done; /* ile ju¿ wczytano */
44.463 -
44.464 - struct gg_image_queue *next; /* nastêpny na li¶cie */
44.465 -};
44.466 -
44.467 -/*
44.468 - * enum gg_event_t
44.469 - *
44.470 - * rodzaje zdarzeñ.
44.471 - */
44.472 -enum gg_event_t {
44.473 - GG_EVENT_NONE = 0, /* nic siê nie wydarzy³o */
44.474 - GG_EVENT_MSG, /* otrzymano wiadomo¶æ */
44.475 - GG_EVENT_NOTIFY, /* kto¶ siê pojawi³ */
44.476 - GG_EVENT_NOTIFY_DESCR, /* kto¶ siê pojawi³ z opisem */
44.477 - GG_EVENT_STATUS, /* kto¶ zmieni³ stan */
44.478 - GG_EVENT_ACK, /* potwierdzenie wys³ania wiadomo¶ci */
44.479 - GG_EVENT_PONG, /* pakiet pong */
44.480 - GG_EVENT_CONN_FAILED, /* po³±czenie siê nie uda³o */
44.481 - GG_EVENT_CONN_SUCCESS, /* po³±czenie siê powiod³o */
44.482 - GG_EVENT_DISCONNECT, /* serwer zrywa po³±czenie */
44.483 -
44.484 - GG_EVENT_DCC_NEW, /* nowe po³±czenie miêdzy klientami */
44.485 - GG_EVENT_DCC_ERROR, /* b³±d po³±czenia miêdzy klientami */
44.486 - GG_EVENT_DCC_DONE, /* zakoñczono po³±czenie */
44.487 - GG_EVENT_DCC_CLIENT_ACCEPT, /* moment akceptacji klienta */
44.488 - GG_EVENT_DCC_CALLBACK, /* klient siê po³±czy³ na ¿±danie */
44.489 - GG_EVENT_DCC_NEED_FILE_INFO, /* nale¿y wype³niæ file_info */
44.490 - GG_EVENT_DCC_NEED_FILE_ACK, /* czeka na potwierdzenie pliku */
44.491 - GG_EVENT_DCC_NEED_VOICE_ACK, /* czeka na potwierdzenie rozmowy */
44.492 - GG_EVENT_DCC_VOICE_DATA, /* ramka danych rozmowy g³osowej */
44.493 -
44.494 - GG_EVENT_PUBDIR50_SEARCH_REPLY, /* odpowiedz wyszukiwania */
44.495 - GG_EVENT_PUBDIR50_READ, /* odczytano w³asne dane z katalogu */
44.496 - GG_EVENT_PUBDIR50_WRITE, /* wpisano w³asne dane do katalogu */
44.497 -
44.498 - GG_EVENT_STATUS60, /* kto¶ zmieni³ stan w GG 6.0 */
44.499 - GG_EVENT_NOTIFY60, /* kto¶ siê pojawi³ w GG 6.0 */
44.500 - GG_EVENT_USERLIST, /* odpowied¼ listy kontaktów w GG 6.0 */
44.501 - GG_EVENT_IMAGE_REQUEST, /* pro¶ba o wys³anie obrazka GG 6.0 */
44.502 - GG_EVENT_IMAGE_REPLY, /* podes³any obrazek GG 6.0 */
44.503 - GG_EVENT_DCC_ACK /* potwierdzenie transmisji */
44.504 -};
44.505 -
44.506 -#define GG_EVENT_SEARCH50_REPLY GG_EVENT_PUBDIR50_SEARCH_REPLY
44.507 -
44.508 -/*
44.509 - * enum gg_failure_t
44.510 - *
44.511 - * okre¶la powód nieudanego po³±czenia.
44.512 - */
44.513 -enum gg_failure_t {
44.514 - GG_FAILURE_RESOLVING = 1, /* nie znaleziono serwera */
44.515 - GG_FAILURE_CONNECTING, /* nie mo¿na siê po³±czyæ */
44.516 - GG_FAILURE_INVALID, /* serwer zwróci³ nieprawid³owe dane */
44.517 - GG_FAILURE_READING, /* zerwano po³±czenie podczas odczytu */
44.518 - GG_FAILURE_WRITING, /* zerwano po³±czenie podczas zapisu */
44.519 - GG_FAILURE_PASSWORD, /* nieprawid³owe has³o */
44.520 - GG_FAILURE_404, /* XXX nieu¿ywane */
44.521 - GG_FAILURE_TLS, /* b³±d negocjacji TLS */
44.522 - GG_FAILURE_NEED_EMAIL, /* serwer roz³±czy³ nas z pro¶b± o zmianê emaila */
44.523 - GG_FAILURE_INTRUDER, /* za du¿o prób po³±czenia siê z nieprawid³owym has³em */
44.524 - GG_FAILURE_UNAVAILABLE /* serwery s± wy³±czone */
44.525 -};
44.526 -
44.527 -/*
44.528 - * enum gg_error_t
44.529 - *
44.530 - * okre¶la rodzaj b³êdu wywo³anego przez dan± operacjê. nie zawiera
44.531 - * przesadnie szczegó³owych informacji o powodzie b³êdu, by nie komplikowaæ
44.532 - * obs³ugi b³êdów. je¶li wymagana jest wiêksza dok³adno¶æ, nale¿y sprawdziæ
44.533 - * zawarto¶æ zmiennej errno.
44.534 - */
44.535 -enum gg_error_t {
44.536 - GG_ERROR_RESOLVING = 1, /* b³±d znajdowania hosta */
44.537 - GG_ERROR_CONNECTING, /* b³±d ³aczenia siê */
44.538 - GG_ERROR_READING, /* b³±d odczytu */
44.539 - GG_ERROR_WRITING, /* b³±d wysy³ania */
44.540 -
44.541 - GG_ERROR_DCC_HANDSHAKE, /* b³±d negocjacji */
44.542 - GG_ERROR_DCC_FILE, /* b³±d odczytu/zapisu pliku */
44.543 - GG_ERROR_DCC_EOF, /* plik siê skoñczy³? */
44.544 - GG_ERROR_DCC_NET, /* b³±d wysy³ania/odbierania */
44.545 - GG_ERROR_DCC_REFUSED /* po³±czenie odrzucone przez usera */
44.546 -};
44.547 -
44.548 -/*
44.549 - * struktury dotycz±ce wyszukiwania w GG 5.0. NIE NALE¯Y SIÊ DO NICH
44.550 - * ODWO£YWAÆ BEZPO¦REDNIO! do dostêpu do nich s³u¿± funkcje gg_pubdir50_*()
44.551 - */
44.552 -struct gg_pubdir50_entry {
44.553 - int num;
44.554 - char *field;
44.555 - char *value;
44.556 -};
44.557 -
44.558 -struct gg_pubdir50_s {
44.559 - int count;
44.560 - uin_t next;
44.561 - int type;
44.562 - uint32_t seq;
44.563 - struct gg_pubdir50_entry *entries;
44.564 - int entries_count;
44.565 -};
44.566 -
44.567 -/*
44.568 - * typedef gg_pubdir_50_t
44.569 - *
44.570 - * typ opisuj±cy zapytanie lub wynik zapytania katalogu publicznego
44.571 - * z protoko³u GG 5.0. nie nale¿y siê odwo³ywaæ bezpo¶rednio do jego
44.572 - * pól -- s³u¿± do tego funkcje gg_pubdir50_*()
44.573 - */
44.574 -typedef struct gg_pubdir50_s *gg_pubdir50_t;
44.575 -
44.576 -/*
44.577 - * struct gg_event
44.578 - *
44.579 - * struktura opisuj±ca rodzaj zdarzenia. wychodzi z gg_watch_fd() lub
44.580 - * z gg_dcc_watch_fd()
44.581 - */
44.582 -struct gg_event {
44.583 - int type; /* rodzaj zdarzenia -- gg_event_t */
44.584 - union { /* @event */
44.585 - struct gg_notify_reply *notify; /* informacje o li¶cie kontaktów -- GG_EVENT_NOTIFY */
44.586 -
44.587 - enum gg_failure_t failure; /* b³±d po³±czenia -- GG_EVENT_FAILURE */
44.588 -
44.589 - struct gg_dcc *dcc_new; /* nowe po³±czenie bezpo¶rednie -- GG_EVENT_DCC_NEW */
44.590 -
44.591 - int dcc_error; /* b³±d po³±czenia bezpo¶redniego -- GG_EVENT_DCC_ERROR */
44.592 -
44.593 - gg_pubdir50_t pubdir50; /* wynik operacji zwi±zanej z katalogiem publicznym -- GG_EVENT_PUBDIR50_* */
44.594 -
44.595 - struct { /* @msg odebrano wiadomo¶æ -- GG_EVENT_MSG */
44.596 - uin_t sender; /* numer nadawcy */
44.597 - int msgclass; /* klasa wiadomo¶ci */
44.598 - time_t time; /* czas nadania */
44.599 - unsigned char *message; /* tre¶æ wiadomo¶ci */
44.600 -
44.601 - int recipients_count; /* ilo¶æ odbiorców konferencji */
44.602 - uin_t *recipients; /* odbiorcy konferencji */
44.603 -
44.604 - int formats_length; /* d³ugo¶æ informacji o formatowaniu tekstu */
44.605 - void *formats; /* informacje o formatowaniu tekstu */
44.606 - } msg;
44.607 -
44.608 - struct { /* @notify_descr informacje o li¶cie kontaktów z opisami stanu -- GG_EVENT_NOTIFY_DESCR */
44.609 - struct gg_notify_reply *notify; /* informacje o li¶cie kontaktów */
44.610 - char *descr; /* opis stanu */
44.611 - } notify_descr;
44.612 -
44.613 - struct { /* @status zmiana stanu -- GG_EVENT_STATUS */
44.614 - uin_t uin; /* numer */
44.615 - uint32_t status; /* nowy stan */
44.616 - char *descr; /* opis stanu */
44.617 - } status;
44.618 -
44.619 - struct { /* @status60 zmiana stanu -- GG_EVENT_STATUS60 */
44.620 - uin_t uin; /* numer */
44.621 - int status; /* nowy stan */
44.622 - uint32_t remote_ip; /* adres ip */
44.623 - uint16_t remote_port; /* port */
44.624 - int version; /* wersja klienta */
44.625 - int image_size; /* maksymalny rozmiar grafiki w KiB */
44.626 - char *descr; /* opis stanu */
44.627 - time_t time; /* czas powrotu */
44.628 - } status60;
44.629 -
44.630 - struct { /* @notify60 informacja o li¶cie kontaktów -- GG_EVENT_NOTIFY60 */
44.631 - uin_t uin; /* numer */
44.632 - int status; /* stan */
44.633 - uint32_t remote_ip; /* adres ip */
44.634 - uint16_t remote_port; /* port */
44.635 - int version; /* wersja klienta */
44.636 - int image_size; /* maksymalny rozmiar grafiki w KiB */
44.637 - char *descr; /* opis stanu */
44.638 - time_t time; /* czas powrotu */
44.639 - } *notify60;
44.640 -
44.641 - struct { /* @ack potwierdzenie wiadomo¶ci -- GG_EVENT_ACK */
44.642 - uin_t recipient; /* numer odbiorcy */
44.643 - int status; /* stan dorêczenia wiadomo¶ci */
44.644 - int seq; /* numer sekwencyjny wiadomo¶ci */
44.645 - } ack;
44.646 -
44.647 - struct { /* @dcc_voice_data otrzymano dane d¼wiêkowe -- GG_EVENT_DCC_VOICE_DATA */
44.648 - uint8_t *data; /* dane d¼wiêkowe */
44.649 - int length; /* ilo¶æ danych d¼wiêkowych */
44.650 - } dcc_voice_data;
44.651 -
44.652 - struct { /* @userlist odpowied¼ listy kontaktów serwera */
44.653 - char type; /* rodzaj odpowiedzi */
44.654 - char *reply; /* tre¶æ odpowiedzi */
44.655 - } userlist;
44.656 -
44.657 - struct { /* @image_request pro¶ba o obrazek */
44.658 - uin_t sender; /* nadawca pro¶by */
44.659 - uint32_t size; /* rozmiar obrazka */
44.660 - uint32_t crc32; /* suma kontrolna */
44.661 - } image_request;
44.662 -
44.663 - struct { /* @image_reply odpowied¼ z obrazkiem */
44.664 - uin_t sender; /* nadawca odpowiedzi */
44.665 - uint32_t size; /* rozmiar obrazka */
44.666 - uint32_t crc32; /* suma kontrolna */
44.667 - char *filename; /* nazwa pliku */
44.668 - char *image; /* bufor z obrazkiem */
44.669 - } image_reply;
44.670 - } event;
44.671 -};
44.672 -
44.673 -struct gg_event *gg_watch_fd(struct gg_session *sess);
44.674 -void gg_event_free(struct gg_event *e);
44.675 -#define gg_free_event gg_event_free
44.676 -
44.677 -/*
44.678 - * funkcje obs³ugi listy kontaktów.
44.679 - */
44.680 -int gg_notify_ex(struct gg_session *sess, uin_t *userlist, char *types, int count);
44.681 -int gg_notify(struct gg_session *sess, uin_t *userlist, int count);
44.682 -int gg_add_notify_ex(struct gg_session *sess, uin_t uin, char type);
44.683 -int gg_add_notify(struct gg_session *sess, uin_t uin);
44.684 -int gg_remove_notify_ex(struct gg_session *sess, uin_t uin, char type);
44.685 -int gg_remove_notify(struct gg_session *sess, uin_t uin);
44.686 -
44.687 -/*
44.688 - * funkcje obs³ugi http.
44.689 - */
44.690 -struct gg_http *gg_http_connect(const char *hostname, int port, int async, const char *method, const char *path, const char *header);
44.691 -int gg_http_watch_fd(struct gg_http *h);
44.692 -void gg_http_stop(struct gg_http *h);
44.693 -void gg_http_free(struct gg_http *h);
44.694 -void gg_http_free_fields(struct gg_http *h);
44.695 -#define gg_free_http gg_http_free
44.696 -
44.697 -/*
44.698 - * struktury opisuj±ca kryteria wyszukiwania dla gg_search(). nieaktualne,
44.699 - * zast±pione przez gg_pubdir50_t. pozostawiono je dla zachowania ABI.
44.700 - */
44.701 -struct gg_search_request {
44.702 - int active;
44.703 - unsigned int start;
44.704 - char *nickname;
44.705 - char *first_name;
44.706 - char *last_name;
44.707 - char *city;
44.708 - int gender;
44.709 - int min_birth;
44.710 - int max_birth;
44.711 - char *email;
44.712 - char *phone;
44.713 - uin_t uin;
44.714 -};
44.715 -
44.716 -struct gg_search {
44.717 - int count;
44.718 - struct gg_search_result *results;
44.719 -};
44.720 -
44.721 -struct gg_search_result {
44.722 - uin_t uin;
44.723 - char *first_name;
44.724 - char *last_name;
44.725 - char *nickname;
44.726 - int born;
44.727 - int gender;
44.728 - char *city;
44.729 - int active;
44.730 -};
44.731 -
44.732 -#define GG_GENDER_NONE 0
44.733 -#define GG_GENDER_FEMALE 1
44.734 -#define GG_GENDER_MALE 2
44.735 -
44.736 -/*
44.737 - * funkcje wyszukiwania.
44.738 - */
44.739 -struct gg_http *gg_search(const struct gg_search_request *r, int async);
44.740 -int gg_search_watch_fd(struct gg_http *f);
44.741 -void gg_free_search(struct gg_http *f);
44.742 -#define gg_search_free gg_free_search
44.743 -
44.744 -const struct gg_search_request *gg_search_request_mode_0(char *nickname, char *first_name, char *last_name, char *city, int gender, int min_birth, int max_birth, int active, int start);
44.745 -const struct gg_search_request *gg_search_request_mode_1(char *email, int active, int start);
44.746 -const struct gg_search_request *gg_search_request_mode_2(char *phone, int active, int start);
44.747 -const struct gg_search_request *gg_search_request_mode_3(uin_t uin, int active, int start);
44.748 -void gg_search_request_free(struct gg_search_request *r);
44.749 -
44.750 -/*
44.751 - * funkcje obs³ugi katalogu publicznego zgodne z GG 5.0. tym razem funkcje
44.752 - * zachowuj± pewien poziom abstrakcji, ¿eby unikn±æ zmian ABI przy zmianach
44.753 - * w protokole.
44.754 - *
44.755 - * NIE NALE¯Y SIÊ ODWO£YWAÆ DO PÓL gg_pubdir50_t BEZPO¦REDNIO!
44.756 - */
44.757 -uint32_t gg_pubdir50(struct gg_session *sess, gg_pubdir50_t req);
44.758 -gg_pubdir50_t gg_pubdir50_new(int type);
44.759 -int gg_pubdir50_add(gg_pubdir50_t req, const char *field, const char *value);
44.760 -int gg_pubdir50_seq_set(gg_pubdir50_t req, uint32_t seq);
44.761 -const char *gg_pubdir50_get(gg_pubdir50_t res, int num, const char *field);
44.762 -int gg_pubdir50_type(gg_pubdir50_t res);
44.763 -int gg_pubdir50_count(gg_pubdir50_t res);
44.764 -uin_t gg_pubdir50_next(gg_pubdir50_t res);
44.765 -uint32_t gg_pubdir50_seq(gg_pubdir50_t res);
44.766 -void gg_pubdir50_free(gg_pubdir50_t res);
44.767 -
44.768 -#define GG_PUBDIR50_UIN "FmNumber"
44.769 -#define GG_PUBDIR50_STATUS "FmStatus"
44.770 -#define GG_PUBDIR50_FIRSTNAME "firstname"
44.771 -#define GG_PUBDIR50_LASTNAME "lastname"
44.772 -#define GG_PUBDIR50_NICKNAME "nickname"
44.773 -#define GG_PUBDIR50_BIRTHYEAR "birthyear"
44.774 -#define GG_PUBDIR50_CITY "city"
44.775 -#define GG_PUBDIR50_GENDER "gender"
44.776 -#define GG_PUBDIR50_GENDER_FEMALE "1"
44.777 -#define GG_PUBDIR50_GENDER_MALE "2"
44.778 -#define GG_PUBDIR50_GENDER_SET_FEMALE "2"
44.779 -#define GG_PUBDIR50_GENDER_SET_MALE "1"
44.780 -#define GG_PUBDIR50_ACTIVE "ActiveOnly"
44.781 -#define GG_PUBDIR50_ACTIVE_TRUE "1"
44.782 -#define GG_PUBDIR50_START "fmstart"
44.783 -#define GG_PUBDIR50_FAMILYNAME "familyname"
44.784 -#define GG_PUBDIR50_FAMILYCITY "familycity"
44.785 -
44.786 -int gg_pubdir50_handle_reply(struct gg_event *e, const char *packet, int length);
44.787 -
44.788 -/*
44.789 - * struct gg_pubdir
44.790 - *
44.791 - * operacje na katalogu publicznym.
44.792 - */
44.793 -struct gg_pubdir {
44.794 - int success; /* czy siê uda³o */
44.795 - uin_t uin; /* otrzymany numerek. 0 je¶li b³±d */
44.796 -};
44.797 -
44.798 -/* ogólne funkcje, nie powinny byæ u¿ywane */
44.799 -int gg_pubdir_watch_fd(struct gg_http *f);
44.800 -void gg_pubdir_free(struct gg_http *f);
44.801 -#define gg_free_pubdir gg_pubdir_free
44.802 -
44.803 -struct gg_token {
44.804 - int width; /* szeroko¶æ obrazka */
44.805 - int height; /* wysoko¶æ obrazka */
44.806 - int length; /* ilo¶æ znaków w tokenie */
44.807 - char *tokenid; /* id tokenu */
44.808 -};
44.809 -
44.810 -/* funkcje dotycz±ce tokenów */
44.811 -struct gg_http *gg_token(int async);
44.812 -int gg_token_watch_fd(struct gg_http *h);
44.813 -void gg_token_free(struct gg_http *h);
44.814 -
44.815 -/* rejestracja nowego numerka */
44.816 -struct gg_http *gg_register(const char *email, const char *password, int async);
44.817 -struct gg_http *gg_register2(const char *email, const char *password, const char *qa, int async);
44.818 -struct gg_http *gg_register3(const char *email, const char *password, const char *tokenid, const char *tokenval, int async);
44.819 -#define gg_register_watch_fd gg_pubdir_watch_fd
44.820 -#define gg_register_free gg_pubdir_free
44.821 -#define gg_free_register gg_pubdir_free
44.822 -
44.823 -struct gg_http *gg_unregister(uin_t uin, const char *password, const char *email, int async);
44.824 -struct gg_http *gg_unregister2(uin_t uin, const char *password, const char *qa, int async);
44.825 -struct gg_http *gg_unregister3(uin_t uin, const char *password, const char *tokenid, const char *tokenval, int async);
44.826 -#define gg_unregister_watch_fd gg_pubdir_watch_fd
44.827 -#define gg_unregister_free gg_pubdir_free
44.828 -
44.829 -/* przypomnienie has³a e-mailem */
44.830 -struct gg_http *gg_remind_passwd(uin_t uin, int async);
44.831 -struct gg_http *gg_remind_passwd2(uin_t uin, const char *tokenid, const char *tokenval, int async);
44.832 -struct gg_http *gg_remind_passwd3(uin_t uin, const char *email, const char *tokenid, const char *tokenval, int async);
44.833 -#define gg_remind_passwd_watch_fd gg_pubdir_watch_fd
44.834 -#define gg_remind_passwd_free gg_pubdir_free
44.835 -#define gg_free_remind_passwd gg_pubdir_free
44.836 -
44.837 -/* zmiana has³a */
44.838 -struct gg_http *gg_change_passwd(uin_t uin, const char *passwd, const char *newpasswd, const char *newemail, int async);
44.839 -struct gg_http *gg_change_passwd2(uin_t uin, const char *passwd, const char *newpasswd, const char *email, const char *newemail, int async);
44.840 -struct gg_http *gg_change_passwd3(uin_t uin, const char *passwd, const char *newpasswd, const char *qa, int async);
44.841 -struct gg_http *gg_change_passwd4(uin_t uin, const char *email, const char *passwd, const char *newpasswd, const char *tokenid, const char *tokenval, int async);
44.842 -#define gg_change_passwd_free gg_pubdir_free
44.843 -#define gg_free_change_passwd gg_pubdir_free
44.844 -
44.845 -/*
44.846 - * struct gg_change_info_request
44.847 - *
44.848 - * opis ¿±dania zmiany informacji w katalogu publicznym.
44.849 - */
44.850 -struct gg_change_info_request {
44.851 - char *first_name; /* imiê */
44.852 - char *last_name; /* nazwisko */
44.853 - char *nickname; /* pseudonim */
44.854 - char *email; /* email */
44.855 - int born; /* rok urodzenia */
44.856 - int gender; /* p³eæ */
44.857 - char *city; /* miasto */
44.858 -};
44.859 -
44.860 -struct gg_change_info_request *gg_change_info_request_new(const char *first_name, const char *last_name, const char *nickname, const char *email, int born, int gender, const char *city);
44.861 -void gg_change_info_request_free(struct gg_change_info_request *r);
44.862 -
44.863 -struct gg_http *gg_change_info(uin_t uin, const char *passwd, const struct gg_change_info_request *request, int async);
44.864 -#define gg_change_pubdir_watch_fd gg_pubdir_watch_fd
44.865 -#define gg_change_pubdir_free gg_pubdir_free
44.866 -#define gg_free_change_pubdir gg_pubdir_free
44.867 -
44.868 -/*
44.869 - * funkcje dotycz±ce listy kontaktów na serwerze.
44.870 - */
44.871 -struct gg_http *gg_userlist_get(uin_t uin, const char *password, int async);
44.872 -int gg_userlist_get_watch_fd(struct gg_http *f);
44.873 -void gg_userlist_get_free(struct gg_http *f);
44.874 -
44.875 -struct gg_http *gg_userlist_put(uin_t uin, const char *password, const char *contacts, int async);
44.876 -int gg_userlist_put_watch_fd(struct gg_http *f);
44.877 -void gg_userlist_put_free(struct gg_http *f);
44.878 -
44.879 -struct gg_http *gg_userlist_remove(uin_t uin, const char *password, int async);
44.880 -int gg_userlist_remove_watch_fd(struct gg_http *f);
44.881 -void gg_userlist_remove_free(struct gg_http *f);
44.882 -
44.883 -
44.884 -
44.885 -/*
44.886 - * funkcje dotycz±ce komunikacji miêdzy klientami.
44.887 - */
44.888 -extern int gg_dcc_port; /* port, na którym nas³uchuje klient */
44.889 -extern unsigned long gg_dcc_ip; /* adres, na którym nas³uchuje klient */
44.890 -
44.891 -int gg_dcc_request(struct gg_session *sess, uin_t uin);
44.892 -
44.893 -struct gg_dcc *gg_dcc_send_file(uint32_t ip, uint16_t port, uin_t my_uin, uin_t peer_uin);
44.894 -struct gg_dcc *gg_dcc_get_file(uint32_t ip, uint16_t port, uin_t my_uin, uin_t peer_uin);
44.895 -struct gg_dcc *gg_dcc_voice_chat(uint32_t ip, uint16_t port, uin_t my_uin, uin_t peer_uin);
44.896 -void gg_dcc_set_type(struct gg_dcc *d, int type);
44.897 -int gg_dcc_fill_file_info(struct gg_dcc *d, const char *filename);
44.898 -int gg_dcc_fill_file_info2(struct gg_dcc *d, const char *filename, const char *local_filename);
44.899 -int gg_dcc_voice_send(struct gg_dcc *d, char *buf, int length);
44.900 -
44.901 -#define GG_DCC_VOICE_FRAME_LENGTH 195
44.902 -#define GG_DCC_VOICE_FRAME_LENGTH_505 326
44.903 -
44.904 -struct gg_dcc *gg_dcc_socket_create(uin_t uin, uint16_t port);
44.905 -#define gg_dcc_socket_free gg_free_dcc
44.906 -#define gg_dcc_socket_watch_fd gg_dcc_watch_fd
44.907 -
44.908 -struct gg_event *gg_dcc_watch_fd(struct gg_dcc *d);
44.909 -
44.910 -void gg_dcc_free(struct gg_dcc *c);
44.911 -#define gg_free_dcc gg_dcc_free
44.912 -
44.913 -/*
44.914 - * je¶li chcemy sobie podebugowaæ, wystarczy ustawiæ `gg_debug_level'.
44.915 - * niestety w miarê przybywania wpisów `gg_debug(...)' nie chcia³o mi
44.916 - * siê ustawiaæ odpowiednich leveli, wiêc wiêkszo¶æ sz³a do _MISC.
44.917 - */
44.918 -extern int gg_debug_level; /* poziom debugowania. mapa bitowa sta³ych GG_DEBUG_* */
44.919 -
44.920 -/*
44.921 - * mo¿na podaæ wska¼nik do funkcji obs³uguj±cej wywo³ania gg_debug().
44.922 - * nieoficjalne, nieudokumentowane, mo¿e siê zmieniæ. je¶li kto¶ jest
44.923 - * zainteresowany, niech da znaæ na ekg-devel.
44.924 - */
44.925 -extern void (*gg_debug_handler)(int level, const char *format, va_list ap);
44.926 -extern void (*gg_debug_handler_session)(struct gg_session *sess, int level, const char *format, va_list ap);
44.927 -
44.928 -/*
44.929 - * mo¿na podaæ plik, do którego bêd± zapisywane teksty z gg_debug().
44.930 - */
44.931 -extern FILE *gg_debug_file;
44.932 -
44.933 -#define GG_DEBUG_NET 1
44.934 -#define GG_DEBUG_TRAFFIC 2
44.935 -#define GG_DEBUG_DUMP 4
44.936 -#define GG_DEBUG_FUNCTION 8
44.937 -#define GG_DEBUG_MISC 16
44.938 -
44.939 -#ifdef GG_DEBUG_DISABLE
44.940 -#define gg_debug(x, y...) do { } while(0)
44.941 -#define gg_debug_session(z, x, y...) do { } while(0)
44.942 -#else
44.943 -void gg_debug(int level, const char *format, ...);
44.944 -void gg_debug_session(struct gg_session *sess, int level, const char *format, ...);
44.945 -#endif
44.946 -
44.947 -const char *gg_libgadu_version(void);
44.948 -
44.949 -/*
44.950 - * konfiguracja http proxy.
44.951 - */
44.952 -extern int gg_proxy_enabled; /* w³±cza obs³ugê proxy */
44.953 -extern char *gg_proxy_host; /* okre¶la adres serwera proxy */
44.954 -extern int gg_proxy_port; /* okre¶la port serwera proxy */
44.955 -extern char *gg_proxy_username; /* okre¶la nazwê u¿ytkownika przy autoryzacji serwera proxy */
44.956 -extern char *gg_proxy_password; /* okre¶la has³o u¿ytkownika przy autoryzacji serwera proxy */
44.957 -extern int gg_proxy_http_only; /* w³±cza obs³ugê proxy wy³±cznie dla us³ug HTTP */
44.958 -
44.959 -
44.960 -/*
44.961 - * adres, z którego ¶lemy pakiety (np ³±czymy siê z serwerem)
44.962 - * u¿ywany przy gg_connect()
44.963 - */
44.964 -extern unsigned long gg_local_ip;
44.965 -/*
44.966 - * -------------------------------------------------------------------------
44.967 - * poni¿ej znajduj± siê wewnêtrzne sprawy biblioteki. zwyk³y klient nie
44.968 - * powinien ich w ogóle ruszaæ, bo i nie ma po co. wszystko mo¿na za³atwiæ
44.969 - * procedurami wy¿szego poziomu, których definicje znajduj± siê na pocz±tku
44.970 - * tego pliku.
44.971 - * -------------------------------------------------------------------------
44.972 - */
44.973 -
44.974 -#ifdef GG_CONFIG_HAVE_PTHREAD
44.975 -int gg_resolve_pthread(int *fd, void **resolver, const char *hostname);
44.976 -void gg_resolve_pthread_cleanup(void *resolver, int kill);
44.977 -#endif
44.978 -
44.979 -#ifdef _WIN32
44.980 -int gg_thread_socket(int thread_id, int socket);
44.981 -#endif
44.982 -
44.983 -int gg_resolve(int *fd, int *pid, const char *hostname);
44.984 -
44.985 -#ifdef __GNUC__
44.986 -char *gg_saprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
44.987 -#else
44.988 -char *gg_saprintf(const char *format, ...);
44.989 -#endif
44.990 -
44.991 -char *gg_vsaprintf(const char *format, va_list ap);
44.992 -
44.993 -#define gg_alloc_sprintf gg_saprintf
44.994 -
44.995 -char *gg_get_line(char **ptr);
44.996 -
44.997 -int gg_connect(void *addr, int port, int async);
44.998 -struct in_addr *gg_gethostbyname(const char *hostname);
44.999 -char *gg_read_line(int sock, char *buf, int length);
44.1000 -void gg_chomp(char *line);
44.1001 -char *gg_urlencode(const char *str);
44.1002 -int gg_http_hash(const char *format, ...);
44.1003 -int gg_read(struct gg_session *sess, char *buf, int length);
44.1004 -int gg_write(struct gg_session *sess, const char *buf, int length);
44.1005 -void *gg_recv_packet(struct gg_session *sess);
44.1006 -int gg_send_packet(struct gg_session *sess, int type, ...);
44.1007 -unsigned int gg_login_hash(const unsigned char *password, unsigned int seed);
44.1008 -uint32_t gg_fix32(uint32_t x);
44.1009 -uint16_t gg_fix16(uint16_t x);
44.1010 -#define fix16 gg_fix16
44.1011 -#define fix32 gg_fix32
44.1012 -char *gg_proxy_auth(void);
44.1013 -char *gg_base64_encode(const char *buf);
44.1014 -char *gg_base64_decode(const char *buf);
44.1015 -int gg_image_queue_remove(struct gg_session *s, struct gg_image_queue *q, int freeq);
44.1016 -
44.1017 -#define GG_APPMSG_HOST "appmsg.gadu-gadu.pl"
44.1018 -#define GG_APPMSG_PORT 80
44.1019 -#define GG_PUBDIR_HOST "pubdir.gadu-gadu.pl"
44.1020 -#define GG_PUBDIR_PORT 80
44.1021 -#define GG_REGISTER_HOST "register.gadu-gadu.pl"
44.1022 -#define GG_REGISTER_PORT 80
44.1023 -#define GG_REMIND_HOST "retr.gadu-gadu.pl"
44.1024 -#define GG_REMIND_PORT 80
44.1025 -
44.1026 -#define GG_DEFAULT_PORT 8074
44.1027 -#define GG_HTTPS_PORT 443
44.1028 -#define GG_HTTP_USERAGENT "Mozilla/4.7 [en] (Win98; I)"
44.1029 -
44.1030 -#define GG_DEFAULT_CLIENT_VERSION "6, 1, 0, 158"
44.1031 -#define GG_DEFAULT_PROTOCOL_VERSION 0x24
44.1032 -#define GG_DEFAULT_TIMEOUT 30
44.1033 -#define GG_HAS_AUDIO_MASK 0x40000000
44.1034 -#define GG_ERA_OMNIX_MASK 0x04000000
44.1035 -#define GG_LIBGADU_VERSION "CVS"
44.1036 -
44.1037 -#define GG_DEFAULT_DCC_PORT 1550
44.1038 -
44.1039 -struct gg_header {
44.1040 - uint32_t type; /* typ pakietu */
44.1041 - uint32_t length; /* d³ugo¶æ reszty pakietu */
44.1042 -} GG_PACKED;
44.1043 -
44.1044 -#define GG_WELCOME 0x0001
44.1045 -#define GG_NEED_EMAIL 0x0014
44.1046 -
44.1047 -struct gg_welcome {
44.1048 - uint32_t key; /* klucz szyfrowania has³a */
44.1049 -} GG_PACKED;
44.1050 -
44.1051 -#define GG_LOGIN 0x000c
44.1052 -
44.1053 -struct gg_login {
44.1054 - uint32_t uin; /* mój numerek */
44.1055 - uint32_t hash; /* hash has³a */
44.1056 - uint32_t status; /* status na dzieñ dobry */
44.1057 - uint32_t version; /* moja wersja klienta */
44.1058 - uint32_t local_ip; /* mój adres ip */
44.1059 - uint16_t local_port; /* port, na którym s³ucham */
44.1060 -} GG_PACKED;
44.1061 -
44.1062 -#define GG_LOGIN_EXT 0x0013
44.1063 -
44.1064 -struct gg_login_ext {
44.1065 - uint32_t uin; /* mój numerek */
44.1066 - uint32_t hash; /* hash has³a */
44.1067 - uint32_t status; /* status na dzieñ dobry */
44.1068 - uint32_t version; /* moja wersja klienta */
44.1069 - uint32_t local_ip; /* mój adres ip */
44.1070 - uint16_t local_port; /* port, na którym s³ucham */
44.1071 - uint32_t external_ip; /* zewnêtrzny adres ip */
44.1072 - uint16_t external_port; /* zewnêtrzny port */
44.1073 -} GG_PACKED;
44.1074 -
44.1075 -#define GG_LOGIN60 0x0015
44.1076 -
44.1077 -struct gg_login60 {
44.1078 - uint32_t uin; /* mój numerek */
44.1079 - uint32_t hash; /* hash has³a */
44.1080 - uint32_t status; /* status na dzieñ dobry */
44.1081 - uint32_t version; /* moja wersja klienta */
44.1082 - uint8_t dunno1; /* 0x00 */
44.1083 - uint32_t local_ip; /* mój adres ip */
44.1084 - uint16_t local_port; /* port, na którym s³ucham */
44.1085 - uint32_t external_ip; /* zewnêtrzny adres ip */
44.1086 - uint16_t external_port; /* zewnêtrzny port */
44.1087 - uint8_t image_size; /* maksymalny rozmiar grafiki w KiB */
44.1088 - uint8_t dunno2; /* 0xbe */
44.1089 -} GG_PACKED;
44.1090 -
44.1091 -#define GG_LOGIN_OK 0x0003
44.1092 -
44.1093 -#define GG_LOGIN_FAILED 0x0009
44.1094 -
44.1095 -#define GG_PUBDIR50_REQUEST 0x0014
44.1096 -
44.1097 -#define GG_PUBDIR50_WRITE 0x01
44.1098 -#define GG_PUBDIR50_READ 0x02
44.1099 -#define GG_PUBDIR50_SEARCH 0x03
44.1100 -#define GG_PUBDIR50_SEARCH_REQUEST GG_PUBDIR50_SEARCH
44.1101 -#define GG_PUBDIR50_SEARCH_REPLY 0x05
44.1102 -
44.1103 -struct gg_pubdir50_request {
44.1104 - uint8_t type; /* GG_PUBDIR50_* */
44.1105 - uint32_t seq; /* czas wys³ania zapytania */
44.1106 -} GG_PACKED;
44.1107 -
44.1108 -#define GG_PUBDIR50_REPLY 0x000e
44.1109 -
44.1110 -struct gg_pubdir50_reply {
44.1111 - uint8_t type; /* GG_PUBDIR50_* */
44.1112 - uint32_t seq; /* czas wys³ania zapytania */
44.1113 -} GG_PACKED;
44.1114 -
44.1115 -#define GG_NEW_STATUS 0x0002
44.1116 -
44.1117 -#define GG_STATUS_NOT_AVAIL 0x0001 /* niedostêpny */
44.1118 -#define GG_STATUS_NOT_AVAIL_DESCR 0x0015 /* niedostêpny z opisem (4.8) */
44.1119 -#define GG_STATUS_AVAIL 0x0002 /* dostêpny */
44.1120 -#define GG_STATUS_AVAIL_DESCR 0x0004 /* dostêpny z opisem (4.9) */
44.1121 -#define GG_STATUS_BUSY 0x0003 /* zajêty */
44.1122 -#define GG_STATUS_BUSY_DESCR 0x0005 /* zajêty z opisem (4.8) */
44.1123 -#define GG_STATUS_INVISIBLE 0x0014 /* niewidoczny (4.6) */
44.1124 -#define GG_STATUS_INVISIBLE_DESCR 0x0016 /* niewidoczny z opisem (4.9) */
44.1125 -#define GG_STATUS_BLOCKED 0x0006 /* zablokowany */
44.1126 -
44.1127 -#define GG_STATUS_FRIENDS_MASK 0x8000 /* tylko dla znajomych (4.6) */
44.1128 -
44.1129 -#define GG_STATUS_DESCR_MAXSIZE 70
44.1130 -
44.1131 -/*
44.1132 - * makra do ³atwego i szybkiego sprawdzania stanu.
44.1133 - */
44.1134 -
44.1135 -/* GG_S_F() tryb tylko dla znajomych */
44.1136 -#define GG_S_F(x) (((x) & GG_STATUS_FRIENDS_MASK) != 0)
44.1137 -
44.1138 -/* GG_S() stan bez uwzglêdnienia trybu tylko dla znajomych */
44.1139 -#define GG_S(x) ((x) & ~GG_STATUS_FRIENDS_MASK)
44.1140 -
44.1141 -/* GG_S_A() dostêpny */
44.1142 -#define GG_S_A(x) (GG_S(x) == GG_STATUS_AVAIL || GG_S(x) == GG_STATUS_AVAIL_DESCR)
44.1143 -
44.1144 -/* GG_S_NA() niedostêpny */
44.1145 -#define GG_S_NA(x) (GG_S(x) == GG_STATUS_NOT_AVAIL || GG_S(x) == GG_STATUS_NOT_AVAIL_DESCR)
44.1146 -
44.1147 -/* GG_S_B() zajêty */
44.1148 -#define GG_S_B(x) (GG_S(x) == GG_STATUS_BUSY || GG_S(x) == GG_STATUS_BUSY_DESCR)
44.1149 -
44.1150 -/* GG_S_I() niewidoczny */
44.1151 -#define GG_S_I(x) (GG_S(x) == GG_STATUS_INVISIBLE || GG_S(x) == GG_STATUS_INVISIBLE_DESCR)
44.1152 -
44.1153 -/* GG_S_D() stan opisowy */
44.1154 -#define GG_S_D(x) (GG_S(x) == GG_STATUS_NOT_AVAIL_DESCR || GG_S(x) == GG_STATUS_AVAIL_DESCR || GG_S(x) == GG_STATUS_BUSY_DESCR || GG_S(x) == GG_STATUS_INVISIBLE_DESCR)
44.1155 -
44.1156 -/* GG_S_BL() blokowany lub blokuj±cy */
44.1157 -#define GG_S_BL(x) (GG_S(x) == GG_STATUS_BLOCKED)
44.1158 -
44.1159 -struct gg_new_status {
44.1160 - uint32_t status; /* na jaki zmieniæ? */
44.1161 -} GG_PACKED;
44.1162 -
44.1163 -#define GG_NOTIFY_FIRST 0x000f
44.1164 -#define GG_NOTIFY_LAST 0x0010
44.1165 -
44.1166 -#define GG_NOTIFY 0x0010
44.1167 -
44.1168 -struct gg_notify {
44.1169 - uint32_t uin; /* numerek danej osoby */
44.1170 - uint8_t dunno1; /* rodzaj wpisu w li¶cie */
44.1171 -} GG_PACKED;
44.1172 -
44.1173 -#define GG_USER_OFFLINE 0x01 /* bêdziemy niewidoczni dla u¿ytkownika */
44.1174 -#define GG_USER_NORMAL 0x03 /* zwyk³y u¿ytkownik */
44.1175 -#define GG_USER_BLOCKED 0x04 /* zablokowany u¿ytkownik */
44.1176 -
44.1177 -#define GG_LIST_EMPTY 0x0012
44.1178 -
44.1179 -#define GG_NOTIFY_REPLY 0x000c /* tak, to samo co GG_LOGIN */
44.1180 -
44.1181 -struct gg_notify_reply {
44.1182 - uint32_t uin; /* numerek */
44.1183 - uint32_t status; /* status danej osoby */
44.1184 - uint32_t remote_ip; /* adres ip delikwenta */
44.1185 - uint16_t remote_port; /* port, na którym s³ucha klient */
44.1186 - uint32_t version; /* wersja klienta */
44.1187 - uint16_t dunno2; /* znowu port? */
44.1188 -} GG_PACKED;
44.1189 -
44.1190 -#define GG_NOTIFY_REPLY60 0x0011
44.1191 -
44.1192 -struct gg_notify_reply60 {
44.1193 - uint32_t uin; /* numerek plus flagi w MSB */
44.1194 - uint8_t status; /* status danej osoby */
44.1195 - uint32_t remote_ip; /* adres ip delikwenta */
44.1196 - uint16_t remote_port; /* port, na którym s³ucha klient */
44.1197 - uint8_t version; /* wersja klienta */
44.1198 - uint8_t image_size; /* maksymalny rozmiar grafiki w KiB */
44.1199 - uint8_t dunno1; /* 0x00 */
44.1200 -} GG_PACKED;
44.1201 -
44.1202 -#define GG_STATUS60 0x000f
44.1203 -
44.1204 -struct gg_status60 {
44.1205 - uint32_t uin; /* numerek plus flagi w MSB */
44.1206 - uint8_t status; /* status danej osoby */
44.1207 - uint32_t remote_ip; /* adres ip delikwenta */
44.1208 - uint16_t remote_port; /* port, na którym s³ucha klient */
44.1209 - uint8_t version; /* wersja klienta */
44.1210 - uint8_t image_size; /* maksymalny rozmiar grafiki w KiB */
44.1211 - uint8_t dunno1; /* 0x00 */
44.1212 -} GG_PACKED;
44.1213 -
44.1214 -#define GG_ADD_NOTIFY 0x000d
44.1215 -#define GG_REMOVE_NOTIFY 0x000e
44.1216 -
44.1217 -struct gg_add_remove {
44.1218 - uint32_t uin; /* numerek */
44.1219 - uint8_t dunno1; /* bitmapa */
44.1220 -} GG_PACKED;
44.1221 -
44.1222 -#define GG_STATUS 0x0002
44.1223 -
44.1224 -struct gg_status {
44.1225 - uint32_t uin; /* numerek */
44.1226 - uint32_t status; /* nowy stan */
44.1227 -} GG_PACKED;
44.1228 -
44.1229 -#define GG_SEND_MSG 0x000b
44.1230 -
44.1231 -#define GG_CLASS_QUEUED 0x0001
44.1232 -#define GG_CLASS_OFFLINE GG_CLASS_QUEUED
44.1233 -#define GG_CLASS_MSG 0x0004
44.1234 -#define GG_CLASS_CHAT 0x0008
44.1235 -#define GG_CLASS_CTCP 0x0010
44.1236 -#define GG_CLASS_ACK 0x0020
44.1237 -#define GG_CLASS_EXT GG_CLASS_ACK /* kompatybilno¶æ wstecz */
44.1238 -
44.1239 -#define GG_MSG_MAXSIZE 2000
44.1240 -
44.1241 -struct gg_send_msg {
44.1242 - uint32_t recipient;
44.1243 - uint32_t seq;
44.1244 - uint32_t msgclass;
44.1245 -} GG_PACKED;
44.1246 -
44.1247 -struct gg_msg_richtext {
44.1248 - uint8_t flag;
44.1249 - uint16_t length;
44.1250 -} GG_PACKED;
44.1251 -
44.1252 -struct gg_msg_richtext_format {
44.1253 - uint16_t position;
44.1254 - uint8_t font;
44.1255 -} GG_PACKED;
44.1256 -
44.1257 -struct gg_msg_richtext_image {
44.1258 - uint16_t unknown1;
44.1259 - uint32_t size;
44.1260 - uint32_t crc32;
44.1261 -} GG_PACKED;
44.1262 -
44.1263 -#define GG_FONT_BOLD 0x01
44.1264 -#define GG_FONT_ITALIC 0x02
44.1265 -#define GG_FONT_UNDERLINE 0x04
44.1266 -#define GG_FONT_COLOR 0x08
44.1267 -#define GG_FONT_IMAGE 0x80
44.1268 -
44.1269 -struct gg_msg_richtext_color {
44.1270 - uint8_t red;
44.1271 - uint8_t green;
44.1272 - uint8_t blue;
44.1273 -} GG_PACKED;
44.1274 -
44.1275 -struct gg_msg_recipients {
44.1276 - uint8_t flag;
44.1277 - uint32_t count;
44.1278 -} GG_PACKED;
44.1279 -
44.1280 -struct gg_msg_image_request {
44.1281 - uint8_t flag;
44.1282 - uint32_t size;
44.1283 - uint32_t crc32;
44.1284 -} GG_PACKED;
44.1285 -
44.1286 -struct gg_msg_image_reply {
44.1287 - uint8_t flag;
44.1288 - uint32_t size;
44.1289 - uint32_t crc32;
44.1290 - /* char filename[]; */
44.1291 - /* char image[]; */
44.1292 -} GG_PACKED;
44.1293 -
44.1294 -#define GG_SEND_MSG_ACK 0x0005
44.1295 -
44.1296 -#define GG_ACK_BLOCKED 0x0001
44.1297 -#define GG_ACK_DELIVERED 0x0002
44.1298 -#define GG_ACK_QUEUED 0x0003
44.1299 -#define GG_ACK_MBOXFULL 0x0004
44.1300 -#define GG_ACK_NOT_DELIVERED 0x0006
44.1301 -
44.1302 -struct gg_send_msg_ack {
44.1303 - uint32_t status;
44.1304 - uint32_t recipient;
44.1305 - uint32_t seq;
44.1306 -} GG_PACKED;
44.1307 -
44.1308 -#define GG_RECV_MSG 0x000a
44.1309 -
44.1310 -struct gg_recv_msg {
44.1311 - uint32_t sender;
44.1312 - uint32_t seq;
44.1313 - uint32_t time;
44.1314 - uint32_t msgclass;
44.1315 -} GG_PACKED;
44.1316 -
44.1317 -#define GG_PING 0x0008
44.1318 -
44.1319 -#define GG_PONG 0x0007
44.1320 -
44.1321 -#define GG_DISCONNECTING 0x000b
44.1322 -
44.1323 -#define GG_USERLIST_REQUEST 0x0016
44.1324 -
44.1325 -#define GG_USERLIST_PUT 0x00
44.1326 -#define GG_USERLIST_PUT_MORE 0x01
44.1327 -#define GG_USERLIST_GET 0x02
44.1328 -
44.1329 -struct gg_userlist_request {
44.1330 - uint8_t type;
44.1331 -} GG_PACKED;
44.1332 -
44.1333 -#define GG_USERLIST_REPLY 0x0010
44.1334 -
44.1335 -#define GG_USERLIST_PUT_REPLY 0x00
44.1336 -#define GG_USERLIST_PUT_MORE_REPLY 0x02
44.1337 -#define GG_USERLIST_GET_REPLY 0x06
44.1338 -#define GG_USERLIST_GET_MORE_REPLY 0x04
44.1339 -
44.1340 -struct gg_userlist_reply {
44.1341 - uint8_t type;
44.1342 -} GG_PACKED;
44.1343 -
44.1344 -/*
44.1345 - * pakiety, sta³e, struktury dla DCC
44.1346 - */
44.1347 -
44.1348 -struct gg_dcc_tiny_packet {
44.1349 - uint8_t type; /* rodzaj pakietu */
44.1350 -} GG_PACKED;
44.1351 -
44.1352 -struct gg_dcc_small_packet {
44.1353 - uint32_t type; /* rodzaj pakietu */
44.1354 -} GG_PACKED;
44.1355 -
44.1356 -struct gg_dcc_big_packet {
44.1357 - uint32_t type; /* rodzaj pakietu */
44.1358 - uint32_t dunno1; /* niewiadoma */
44.1359 - uint32_t dunno2; /* niewiadoma */
44.1360 -} GG_PACKED;
44.1361 -
44.1362 -/*
44.1363 - * póki co, nie znamy dok³adnie protoko³u. nie wiemy, co czemu odpowiada.
44.1364 - * nazwy s± niepowa¿ne i tymczasowe.
44.1365 - */
44.1366 -#define GG_DCC_WANT_FILE 0x0003 /* peer chce plik */
44.1367 -#define GG_DCC_HAVE_FILE 0x0001 /* wiêc mu damy */
44.1368 -#define GG_DCC_HAVE_FILEINFO 0x0003 /* niech ma informacje o pliku */
44.1369 -#define GG_DCC_GIMME_FILE 0x0006 /* peer jest pewny */
44.1370 -#define GG_DCC_CATCH_FILE 0x0002 /* wysy³amy plik */
44.1371 -
44.1372 -#define GG_DCC_FILEATTR_READONLY 0x0020
44.1373 -
44.1374 -#define GG_DCC_TIMEOUT_SEND 1800 /* 30 minut */
44.1375 -#define GG_DCC_TIMEOUT_GET 1800 /* 30 minut */
44.1376 -#define GG_DCC_TIMEOUT_FILE_ACK 300 /* 5 minut */
44.1377 -#define GG_DCC_TIMEOUT_VOICE_ACK 300 /* 5 minut */
44.1378 -
44.1379 -#ifdef __cplusplus
44.1380 -}
44.1381 -#ifdef _WIN32
44.1382 -#pragma pack(pop)
44.1383 -#endif
44.1384 -#endif
44.1385 -
44.1386 -#endif /* __GG_LIBGADU_H */
44.1387 -
44.1388 -/*
44.1389 - * Local variables:
44.1390 - * c-indentation-style: k&r
44.1391 - * c-basic-offset: 8
44.1392 - * indent-tabs-mode: notnil
44.1393 - * End:
44.1394 - *
44.1395 - * vim: shiftwidth=8:
44.1396 - */
45.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/libgadu.h Fri Aug 21 13:24:36 2009 -0700
45.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
45.3 @@ -1,7 +0,0 @@
45.4 -#ifdef __ppc__
45.5 -#include "libgadu-ppc.h"
45.6 -#elif defined(__i386__)
45.7 -#include "libgadu-i386.h"
45.8 -#else
45.9 -#error This isn't a recognized platform.
45.10 -#endif
46.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/libpurple.h Fri Aug 21 13:24:36 2009 -0700
46.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
46.3 @@ -1,22 +0,0 @@
46.4 -#include <libpurple/gaim-compat.h>
46.5 -#include <libpurple/connection.h>
46.6 -#include <libpurple/conversation.h>
46.7 -#include <libpurple/core.h>
46.8 -#include <libpurple/debug.h>
46.9 -#include <libpurple/dnsquery.h>
46.10 -#include <libpurple/ft.h>
46.11 -#include <libpurple/imgstore.h>
46.12 -#include <libpurple/network.h>
46.13 -#include <libpurple/notify.h>
46.14 -#include <libpurple/plugin.h>
46.15 -#include <libpurple/pounce.h>
46.16 -#include <libpurple/prefs.h>
46.17 -#include <libpurple/privacy.h>
46.18 -#include <libpurple/proxy.h>
46.19 -#include <libpurple/request.h>
46.20 -#include <libpurple/roomlist.h>
46.21 -#include <libpurple/signals.h>
46.22 -#include <libpurple/sslconn.h>
46.23 -#include <libpurple/sound.h>
46.24 -#include <libpurple/util.h>
46.25 -#include <libpurple/whiteboard.h>
47.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/libymsg.h Fri Aug 21 13:24:36 2009 -0700
47.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
47.3 @@ -1,359 +0,0 @@
47.4 -/**
47.5 - * @file libymsg.h The Yahoo! and Yahoo! JAPAN Protocol Plugins
47.6 - *
47.7 - * purple
47.8 - *
47.9 - * Purple is the legal property of its developers, whose names are too numerous
47.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
47.11 - * source distribution.
47.12 - *
47.13 - * This program is free software; you can redistribute it and/or modify
47.14 - * it under the terms of the GNU General Public License as published by
47.15 - * the Free Software Foundation; either version 2 of the License, or
47.16 - * (at your option) any later version.
47.17 - *
47.18 - * This program is distributed in the hope that it will be useful,
47.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
47.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47.21 - * GNU General Public License for more details.
47.22 - *
47.23 - * You should have received a copy of the GNU General Public License
47.24 - * along with this program; if not, write to the Free Software
47.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
47.26 - */
47.27 -
47.28 -#ifndef _LIBYMSG_H_
47.29 -#define _LIBYMSG_H_
47.30 -
47.31 -#include "circbuffer.h"
47.32 -#include "cmds.h"
47.33 -#include "prpl.h"
47.34 -
47.35 -#define YAHOO_PAGER_HOST "scsa.msg.yahoo.com"
47.36 -#define YAHOO_PAGER_PORT 5050
47.37 -#define YAHOO_PAGER_PORT_P2P 5101
47.38 -#define YAHOO_LOGIN_URL "https://login.yahoo.com/config/pwtoken_login?src=ymsgr&ts=&token=%s"
47.39 -#define YAHOO_TOKEN_URL "https://login.yahoo.com/config/pwtoken_get?src=ymsgr&ts=&login=%s&passwd=%s&chal=%s"
47.40 -#define YAHOO_P2P_KEEPALIVE_SECS 300
47.41 -#define YAHOO_P2P_SERVER_TIMEOUT 10
47.42 -#define YAHOO_PROFILE_URL "http://profiles.yahoo.com/"
47.43 -#define YAHOO_MAIL_URL "http://rd.yahoo.com/messenger/client/?http://mail.yahoo.com/"
47.44 -#define YAHOO_XFER_HOST "filetransfer.msg.yahoo.com"
47.45 -#define YAHOO_XFER_PORT 80
47.46 -#define YAHOO_XFER_RELAY_HOST "relay.msg.yahoo.com"
47.47 -#define YAHOO_XFER_RELAY_PORT 80
47.48 -#define YAHOO_ROOMLIST_URL "http://insider.msg.yahoo.com/ycontent/"
47.49 -#define YAHOO_ROOMLIST_LOCALE "us"
47.50 -/* really we should get the list of servers from
47.51 - http://update.messenger.yahoo.co.jp/servers.html */
47.52 -#define YAHOOJP_PAGER_HOST "cs.yahoo.co.jp"
47.53 -#define YAHOOJP_TOKEN_URL "https://login.yahoo.co.jp/config/pwtoken_get?src=ymsgr&ts=&login=%s&passwd=%s&chal=%s"
47.54 -#define YAHOOJP_LOGIN_URL "https://login.yahoo.co.jp/config/pwtoken_login?src=ymsgr&ts=&token=%s"
47.55 -#define YAHOOJP_PROFILE_URL "http://profiles.yahoo.co.jp/"
47.56 -#define YAHOOJP_MAIL_URL "http://mail.yahoo.co.jp/"
47.57 -#define YAHOOJP_XFER_HOST "filetransfer.msg.yahoo.co.jp"
47.58 -#define YAHOOJP_WEBCAM_HOST "wc.yahoo.co.jp"
47.59 -/* not sure, must test: */
47.60 -#define YAHOOJP_XFER_RELAY_HOST "relay.msg.yahoo.co.jp"
47.61 -#define YAHOOJP_XFER_RELAY_PORT 80
47.62 -#define YAHOOJP_ROOMLIST_URL "http://insider.msg.yahoo.co.jp/ycontent/"
47.63 -#define YAHOOJP_ROOMLIST_LOCALE "ja"
47.64 -
47.65 -#define YAHOO_AUDIBLE_URL "http://us.dl1.yimg.com/download.yahoo.com/dl/aud"
47.66 -
47.67 -#define WEBMESSENGER_URL "http://login.yahoo.com/config/login?.src=pg"
47.68 -
47.69 -#define YAHOO_SMS_CARRIER_URL "http://lookup.msg.vip.mud.yahoo.com"
47.70 -
47.71 -#define YAHOO_USERINFO_URL "http://address.yahoo.com/yab/us?v=XM&sync=1&tags=short&useutf8=1&noclear=1&legenc=codepage-1252"
47.72 -#define YAHOOJP_USERINFO_URL "http://address.yahoo.co.jp/yab/jp?v=XM&sync=1&tags=short&useutf8=1&noclear=1&legenc=codepage-1252"
47.73 -
47.74 -#define YAHOO_PICURL_SETTING "picture_url"
47.75 -#define YAHOO_PICCKSUM_SETTING "picture_checksum"
47.76 -#define YAHOO_PICEXPIRE_SETTING "picture_expire"
47.77 -
47.78 -#define YAHOO_STATUS_TYPE_OFFLINE "offline"
47.79 -#define YAHOO_STATUS_TYPE_AVAILABLE "available"
47.80 -#define YAHOO_STATUS_TYPE_BRB "brb"
47.81 -#define YAHOO_STATUS_TYPE_BUSY "busy"
47.82 -#define YAHOO_STATUS_TYPE_NOTATHOME "notathome"
47.83 -#define YAHOO_STATUS_TYPE_NOTATDESK "notatdesk"
47.84 -#define YAHOO_STATUS_TYPE_NOTINOFFICE "notinoffice"
47.85 -#define YAHOO_STATUS_TYPE_ONPHONE "onphone"
47.86 -#define YAHOO_STATUS_TYPE_ONVACATION "onvacation"
47.87 -#define YAHOO_STATUS_TYPE_OUTTOLUNCH "outtolunch"
47.88 -#define YAHOO_STATUS_TYPE_STEPPEDOUT "steppedout"
47.89 -#define YAHOO_STATUS_TYPE_AWAY "away"
47.90 -#define YAHOO_STATUS_TYPE_INVISIBLE "invisible"
47.91 -#define YAHOO_STATUS_TYPE_MOBILE "mobile"
47.92 -
47.93 -#define YAHOO_CLIENT_VERSION_ID "4194239"
47.94 -#define YAHOO_CLIENT_VERSION "9.0.0.2162"
47.95 -
47.96 -#define YAHOOJP_CLIENT_VERSION_ID "4194239"
47.97 -#define YAHOOJP_CLIENT_VERSION "9.0.0.2162"
47.98 -
47.99 -#define YAHOO_CLIENT_USERAGENT "Mozilla/5.0"
47.100 -
47.101 -/* Index into attention types list. */
47.102 -#define YAHOO_BUZZ 0
47.103 -
47.104 -typedef enum {
47.105 - YAHOO_PKT_TYPE_SERVER = 0,
47.106 - YAHOO_PKT_TYPE_P2P
47.107 -} yahoo_pkt_type;
47.108 -
47.109 -typedef enum {
47.110 - YAHOO_P2P_WE_ARE_CLIENT =0,
47.111 - YAHOO_P2P_WE_ARE_SERVER
47.112 -} yahoo_p2p_connection_type;
47.113 -
47.114 -enum yahoo_status {
47.115 - YAHOO_STATUS_AVAILABLE = 0,
47.116 - YAHOO_STATUS_BRB,
47.117 - YAHOO_STATUS_BUSY,
47.118 - YAHOO_STATUS_NOTATHOME,
47.119 - YAHOO_STATUS_NOTATDESK,
47.120 - YAHOO_STATUS_NOTINOFFICE,
47.121 - YAHOO_STATUS_ONPHONE,
47.122 - YAHOO_STATUS_ONVACATION,
47.123 - YAHOO_STATUS_OUTTOLUNCH,
47.124 - YAHOO_STATUS_STEPPEDOUT,
47.125 - YAHOO_STATUS_INVISIBLE = 12,
47.126 - YAHOO_STATUS_CUSTOM = 99,
47.127 - YAHOO_STATUS_IDLE = 999,
47.128 - YAHOO_STATUS_WEBLOGIN = 0x5a55aa55,
47.129 - YAHOO_STATUS_OFFLINE = 0x5a55aa56, /* don't ask */
47.130 - YAHOO_STATUS_TYPING = 0x16,
47.131 - YAHOO_STATUS_DISCONNECTED = 0xffffffff /* in ymsg 15. doesnt mean the normal sense of 'disconnected' */
47.132 -};
47.133 -
47.134 -struct yahoo_buddy_icon_upload_data {
47.135 - PurpleConnection *gc;
47.136 - GString *str;
47.137 - char *filename;
47.138 - int pos;
47.139 - int fd;
47.140 - guint watcher;
47.141 -};
47.142 -
47.143 -struct yahoo_p2p_data {
47.144 - PurpleConnection *gc;
47.145 - char *host_ip;
47.146 - char *host_username;
47.147 - int val_13;
47.148 - guint input_event;
47.149 - gint source;
47.150 - int session_id;
47.151 - yahoo_p2p_connection_type connection_type;
47.152 -};
47.153 -
47.154 -struct _YchtConn;
47.155 -
47.156 -typedef struct _YahooPersonalDetails {
47.157 - char *id;
47.158 -
47.159 - struct {
47.160 - char *first;
47.161 - char *last;
47.162 - char *middle;
47.163 - char *nick;
47.164 - } names;
47.165 -
47.166 - struct {
47.167 - char *work;
47.168 - char *home;
47.169 - char *mobile;
47.170 - } phone;
47.171 -} YahooPersonalDetails;
47.172 -
47.173 -typedef struct {
47.174 - PurpleConnection *gc;
47.175 - int fd;
47.176 - guchar *rxqueue;
47.177 - int rxlen;
47.178 - PurpleCircBuffer *txbuf;
47.179 - guint txhandler;
47.180 - GHashTable *friends;
47.181 -
47.182 - char **profiles; /* Multiple profiles can be associated with an account */
47.183 - YahooPersonalDetails ypd;
47.184 -
47.185 - /**
47.186 - * This is used to keep track of the IMVironment chosen
47.187 - * by people you talk to. We don't do very much with
47.188 - * this right now... but at least now if the remote user
47.189 - * selects an IMVironment we won't reset it back to the
47.190 - * default of nothing.
47.191 - */
47.192 - GHashTable *imvironments;
47.193 -
47.194 - int current_status;
47.195 - gboolean logged_in;
47.196 - GString *tmp_serv_blist, *tmp_serv_ilist, *tmp_serv_plist;
47.197 - GSList *confs;
47.198 - unsigned int conf_id; /* just a counter */
47.199 - gboolean chat_online;
47.200 - gboolean in_chat;
47.201 - char *chat_name;
47.202 - char *pending_chat_room;
47.203 - char *pending_chat_id;
47.204 - char *pending_chat_topic;
47.205 - char *pending_chat_goto;
47.206 - char *auth;
47.207 - gsize auth_written;
47.208 - char *cookie_y;
47.209 - char *cookie_t;
47.210 - int session_id;
47.211 - gboolean jp;
47.212 - gboolean wm; /* connected w/ web messenger method */
47.213 - /* picture aka buddy icon stuff */
47.214 - char *picture_url;
47.215 - int picture_checksum;
47.216 -
47.217 - /* ew. we have to check the icon before we connect,
47.218 - * but can't upload it til we're connected. */
47.219 - struct yahoo_buddy_icon_upload_data *picture_upload_todo;
47.220 - PurpleProxyConnectData *buddy_icon_connect_data;
47.221 -
47.222 - struct _YchtConn *ycht;
47.223 -
47.224 - /**
47.225 - * This linked list contains PurpleUtilFetchUrlData structs
47.226 - * for when we lookup people profile or photo information.
47.227 - */
47.228 - GSList *url_datas;
47.229 - GHashTable *xfer_peer_idstring_map;/* Hey, i dont know, but putting this HashTable next to friends gives a run time fault... */
47.230 - GSList *cookies;/* contains all cookies, including _y and _t */
47.231 -
47.232 - /**
47.233 - * We may receive a list15 in multiple packets with no prior warning as to how many we'll be getting;
47.234 - * the server expects us to keep track of the group for which it is sending us contact names.
47.235 - */
47.236 - char *current_list15_grp;
47.237 - time_t last_ping;
47.238 - time_t last_keepalive;
47.239 - GHashTable *peers; /* information about p2p data */
47.240 - int yahoo_p2p_timer;
47.241 - int yahoo_local_p2p_server_fd;
47.242 - int yahoo_p2p_server_watcher;
47.243 - GHashTable *sms_carrier; /* sms carrier data */
47.244 - guint yahoo_p2p_server_timeout_handle;
47.245 -} YahooData;
47.246 -
47.247 -#define YAHOO_MAX_STATUS_MESSAGE_LENGTH (255)
47.248 -
47.249 -/*
47.250 - * Current Maximum Length for Instant Messages
47.251 - *
47.252 - * This was found by experiment.
47.253 - *
47.254 - * The YMSG protocol allows a message of up to 948 bytes, but the official client
47.255 - * limits to 800 characters. According to experiments I conducted, it seems that
47.256 - * the discrepancy is to allow some leeway for messages with mixed single- and
47.257 - * multi-byte characters, as I was able to send messages of 840 and 932 bytes
47.258 - * by using some multibyte characters (some random Chinese or Japanese characters,
47.259 - * to be precise). - rekkanoryo
47.260 - */
47.261 -#define YAHOO_MAX_MESSAGE_LENGTH_BYTES 948
47.262 -#define YAHOO_MAX_MESSAGE_LENGTH_CHARS 800
47.263 -
47.264 -/* sometimes i wish prpls could #include things from other prpls. then i could just
47.265 - * use the routines from libfaim and not have to admit to knowing how they work. */
47.266 -#define yahoo_put16(buf, data) ( \
47.267 - (*(buf) = (unsigned char)((data)>>8)&0xff), \
47.268 - (*((buf)+1) = (unsigned char)(data)&0xff), \
47.269 - 2)
47.270 -#define yahoo_get16(buf) ((((*(buf))<<8)&0xff00) + ((*((buf)+1)) & 0xff))
47.271 -#define yahoo_put32(buf, data) ( \
47.272 - (*((buf)) = (unsigned char)((data)>>24)&0xff), \
47.273 - (*((buf)+1) = (unsigned char)((data)>>16)&0xff), \
47.274 - (*((buf)+2) = (unsigned char)((data)>>8)&0xff), \
47.275 - (*((buf)+3) = (unsigned char)(data)&0xff), \
47.276 - 4)
47.277 -#define yahoo_get32(buf) ((((*(buf))<<24)&0xff000000) + \
47.278 - (((*((buf)+1))<<16)&0x00ff0000) + \
47.279 - (((*((buf)+2))<< 8)&0x0000ff00) + \
47.280 - (((*((buf)+3) )&0x000000ff)))
47.281 -
47.282 -/* util.c */
47.283 -void yahoo_init_colorht(void);
47.284 -void yahoo_dest_colorht(void);
47.285 -char *yahoo_codes_to_html(const char *x);
47.286 -char *yahoo_html_to_codes(const char *src);
47.287 -
47.288 -gboolean
47.289 -yahoo_account_use_http_proxy(PurpleConnection *conn);
47.290 -
47.291 -/**
47.292 - * Encode some text to send to the yahoo server.
47.293 - *
47.294 - * @param gc The connection handle.
47.295 - * @param str The null terminated utf8 string to encode.
47.296 - * @param utf8 If not @c NULL, whether utf8 is okay or not.
47.297 - * Even if it is okay, we may not use it. If we
47.298 - * used it, we set this to @c TRUE, else to
47.299 - * @c FALSE. If @c NULL, false is assumed, and
47.300 - * it is not dereferenced.
47.301 - * @return The g_malloced string in the appropriate encoding.
47.302 - */
47.303 -char *yahoo_string_encode(PurpleConnection *gc, const char *str, gboolean *utf8);
47.304 -
47.305 -/**
47.306 - * Decode some text received from the server.
47.307 - *
47.308 - * @param gc The gc handle.
47.309 - * @param str The null terminated string to decode.
47.310 - * @param utf8 Did the server tell us it was supposed to be utf8?
47.311 - * @return The decoded, utf-8 string, which must be g_free()'d.
47.312 - */
47.313 -char *yahoo_string_decode(PurpleConnection *gc, const char *str, gboolean utf8);
47.314 -
47.315 -char *yahoo_convert_to_numeric(const char *str);
47.316 -
47.317 -
47.318 -/* yahoo_profile.c */
47.319 -void yahoo_get_info(PurpleConnection *gc, const char *name);
47.320 -
47.321 -/* libymsg.h - these functions were formerly static but need not to be for the
47.322 - * new two-prpl model. */
47.323 -const char *yahoo_list_icon(PurpleAccount *a, PurpleBuddy *b);
47.324 -const char *yahoo_list_emblem(PurpleBuddy *b);
47.325 -char *yahoo_status_text(PurpleBuddy *b);
47.326 -void yahoo_tooltip_text(PurpleBuddy *b, PurpleNotifyUserInfo *user_info, gboolean full);
47.327 -GList *yahoo_status_types(PurpleAccount *account);
47.328 -GList *yahoo_blist_node_menu(PurpleBlistNode *node);
47.329 -void yahoo_login(PurpleAccount *account);
47.330 -void yahoo_close(PurpleConnection *gc);
47.331 -int yahoo_send_im(PurpleConnection *gc, const char *who, const char *what, PurpleMessageFlags flags);
47.332 -unsigned int yahoo_send_typing(PurpleConnection *gc, const char *who, PurpleTypingState state);
47.333 -void yahoo_set_status(PurpleAccount *account, PurpleStatus *status);
47.334 -void yahoo_set_idle(PurpleConnection *gc, int idle);
47.335 -void yahoo_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *g);
47.336 -void yahoo_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group);
47.337 -void yahoo_add_deny(PurpleConnection *gc, const char *who);
47.338 -void yahoo_rem_deny(PurpleConnection *gc, const char *who);
47.339 -void yahoo_set_permit_deny(PurpleConnection *gc);
47.340 -void yahoo_keepalive(PurpleConnection *gc);
47.341 -void yahoo_change_buddys_group(PurpleConnection *gc, const char *who, const char *old_group, const char *new_group);
47.342 -void yahoo_rename_group(PurpleConnection *gc, const char *old_name, PurpleGroup *group, GList *moved_buddies);
47.343 -gboolean yahoo_offline_message(const PurpleBuddy *buddy);
47.344 -gboolean yahoo_send_attention(PurpleConnection *gc, const char *username, guint type);
47.345 -GList *yahoo_attention_types(PurpleAccount *account);
47.346 -
47.347 -GList *yahoo_actions(PurplePlugin *plugin, gpointer context);
47.348 -void yahoopurple_register_commands(void);
47.349 -
47.350 -PurpleCmdRet yahoopurple_cmd_buzz(PurpleConversation *c, const gchar *cmd, gchar **args, gchar **error, void *data);
47.351 -PurpleCmdRet yahoopurple_cmd_chat_join(PurpleConversation *conv, const char *cmd, char **args, char **error, void *data);
47.352 -PurpleCmdRet yahoopurple_cmd_chat_list(PurpleConversation *conv, const char *cmd, char **args, char **error, void *data);
47.353 -/* needed for xfer, thought theyd be useful for other enhancements later on
47.354 - Returns list of cookies stored in yahoo_data formatted as a single null terminated string
47.355 - returned value must be g_freed
47.356 -*/
47.357 -gchar* yahoo_get_cookies(PurpleConnection *gc);
47.358 -
47.359 -/* send p2p pkt containing our encoded ip, asking peer to connect to us */
47.360 -void yahoo_send_p2p_pkt(PurpleConnection *gc, const char *who, int val_13);
47.361 -
47.362 -#endif /* _LIBYMSG_H_ */
48.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/log.h Fri Aug 21 13:24:36 2009 -0700
48.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
48.3 @@ -1,583 +0,0 @@
48.4 -/**
48.5 - * @file log.h Logging API
48.6 - * @ingroup core
48.7 - * @see @ref log-signals
48.8 - */
48.9 -
48.10 -/* purple
48.11 - *
48.12 - * Purple is the legal property of its developers, whose names are too numerous
48.13 - * to list here. Please refer to the COPYRIGHT file distributed with this
48.14 - * source distribution.
48.15 - *
48.16 - * This program is free software; you can redistribute it and/or modify
48.17 - * it under the terms of the GNU General Public License as published by
48.18 - * the Free Software Foundation; either version 2 of the License, or
48.19 - * (at your option) any later version.
48.20 - *
48.21 - * This program is distributed in the hope that it will be useful,
48.22 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
48.23 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48.24 - * GNU General Public License for more details.
48.25 - *
48.26 - * You should have received a copy of the GNU General Public License
48.27 - * along with this program; if not, write to the Free Software
48.28 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
48.29 - */
48.30 -#ifndef _PURPLE_LOG_H_
48.31 -#define _PURPLE_LOG_H_
48.32 -
48.33 -#include <stdio.h>
48.34 -
48.35 -
48.36 -/********************************************************
48.37 - * DATA STRUCTURES **************************************
48.38 - ********************************************************/
48.39 -
48.40 -typedef struct _PurpleLog PurpleLog;
48.41 -typedef struct _PurpleLogLogger PurpleLogLogger;
48.42 -typedef struct _PurpleLogCommonLoggerData PurpleLogCommonLoggerData;
48.43 -typedef struct _PurpleLogSet PurpleLogSet;
48.44 -
48.45 -typedef enum {
48.46 - PURPLE_LOG_IM,
48.47 - PURPLE_LOG_CHAT,
48.48 - PURPLE_LOG_SYSTEM
48.49 -} PurpleLogType;
48.50 -
48.51 -typedef enum {
48.52 - PURPLE_LOG_READ_NO_NEWLINE = 1
48.53 -} PurpleLogReadFlags;
48.54 -
48.55 -#include "account.h"
48.56 -#include "conversation.h"
48.57 -
48.58 -typedef void (*PurpleLogSetCallback) (GHashTable *sets, PurpleLogSet *set);
48.59 -
48.60 -/**
48.61 - * A log logger.
48.62 - *
48.63 - * This struct gets filled out and is included in the PurpleLog. It contains everything
48.64 - * needed to write and read from logs.
48.65 - */
48.66 -struct _PurpleLogLogger {
48.67 - char *name; /**< The logger's name */
48.68 - char *id; /**< an identifier to refer to this logger */
48.69 -
48.70 - /** This gets called when the log is first created.
48.71 - I don't think this is actually needed. */
48.72 - void (*create)(PurpleLog *log);
48.73 -
48.74 - /** This is used to write to the log file */
48.75 - gsize (*write)(PurpleLog *log,
48.76 - PurpleMessageFlags type,
48.77 - const char *from,
48.78 - time_t time,
48.79 - const char *message);
48.80 -
48.81 - /** Called when the log is destroyed */
48.82 - void (*finalize)(PurpleLog *log);
48.83 -
48.84 - /** This function returns a sorted GList of available PurpleLogs */
48.85 - GList *(*list)(PurpleLogType type, const char *name, PurpleAccount *account);
48.86 -
48.87 - /** Given one of the logs returned by the logger's list function,
48.88 - * this returns the contents of the log in GtkIMHtml markup */
48.89 - char *(*read)(PurpleLog *log, PurpleLogReadFlags *flags);
48.90 -
48.91 - /** Given one of the logs returned by the logger's list function,
48.92 - * this returns the size of the log in bytes */
48.93 - int (*size)(PurpleLog *log);
48.94 -
48.95 - /** Returns the total size of all the logs. If this is undefined a default
48.96 - * implementation is used */
48.97 - int (*total_size)(PurpleLogType type, const char *name, PurpleAccount *account);
48.98 -
48.99 - /** This function returns a sorted GList of available system PurpleLogs */
48.100 - GList *(*list_syslog)(PurpleAccount *account);
48.101 -
48.102 - /** Adds PurpleLogSets to a GHashTable. By passing the data in the PurpleLogSets
48.103 - * to list, the caller can get every available PurpleLog from the logger.
48.104 - * Loggers using purple_log_common_writer() (or otherwise storing their
48.105 - * logs in the same directory structure as the stock loggers) do not
48.106 - * need to implement this function.
48.107 - *
48.108 - * Loggers which implement this function must create a PurpleLogSet,
48.109 - * then call @a cb with @a sets and the newly created PurpleLogSet. */
48.110 - void (*get_log_sets)(PurpleLogSetCallback cb, GHashTable *sets);
48.111 -
48.112 - /* Attempts to delete the specified log, indicating success or failure */
48.113 - gboolean (*remove)(PurpleLog *log);
48.114 -
48.115 - /* Tests whether a log is deletable */
48.116 - gboolean (*is_deletable)(PurpleLog *log);
48.117 -
48.118 - void (*_purple_reserved1)(void);
48.119 - void (*_purple_reserved2)(void);
48.120 - void (*_purple_reserved3)(void);
48.121 - void (*_purple_reserved4)(void);
48.122 -};
48.123 -
48.124 -/**
48.125 - * A log. Not the wooden type.
48.126 - */
48.127 -struct _PurpleLog {
48.128 - PurpleLogType type; /**< The type of log this is */
48.129 - char *name; /**< The name of this log */
48.130 - PurpleAccount *account; /**< The account this log is taking
48.131 - place on */
48.132 - PurpleConversation *conv; /**< The conversation being logged */
48.133 - time_t time; /**< The time this conversation
48.134 - started, converted to the local timezone */
48.135 -
48.136 - PurpleLogLogger *logger; /**< The logging mechanism this log
48.137 - is to use */
48.138 - void *logger_data; /**< Data used by the log logger */
48.139 - struct tm *tm; /**< The time this conversation
48.140 - started, saved with original
48.141 - timezone data, if available and
48.142 - if struct tm has the BSD
48.143 - timezone fields, else @c NULL.
48.144 - Do NOT modify anything in this struct.*/
48.145 -
48.146 - /* IMPORTANT: Some code in log.c allocates these without zeroing them.
48.147 - * IMPORTANT: Update that code if you add members here. */
48.148 -};
48.149 -
48.150 -/**
48.151 - * A common logger_data struct containing a file handle and path, as well
48.152 - * as a pointer to something else for additional data.
48.153 - */
48.154 -struct _PurpleLogCommonLoggerData {
48.155 - char *path;
48.156 - FILE *file;
48.157 - void *extra_data;
48.158 -};
48.159 -
48.160 -/**
48.161 - * Describes available logs.
48.162 - *
48.163 - * By passing the elements of this struct to purple_log_get_logs(), the caller
48.164 - * can get all available PurpleLogs.
48.165 - */
48.166 -struct _PurpleLogSet {
48.167 - PurpleLogType type; /**< The type of logs available */
48.168 - char *name; /**< The name of the logs available */
48.169 - PurpleAccount *account; /**< The account the available logs
48.170 - took place on. This will be
48.171 - @c NULL if the account no longer
48.172 - exists. (Depending on a
48.173 - logger's implementation of
48.174 - list, it may not be possible
48.175 - to load such logs.) */
48.176 - gboolean buddy; /**< Is this (account, name) a buddy
48.177 - on the buddy list? */
48.178 - char *normalized_name; /**< The normalized version of
48.179 - @a name. It must be set, and
48.180 - may be set to the same pointer
48.181 - value as @a name. */
48.182 -
48.183 - /* IMPORTANT: Some code in log.c allocates these without zeroing them.
48.184 - * IMPORTANT: Update that code if you add members here. */
48.185 -};
48.186 -
48.187 -#ifdef __cplusplus
48.188 -extern "C" {
48.189 -#endif
48.190 -
48.191 -/***************************************/
48.192 -/** @name Log Functions */
48.193 -/***************************************/
48.194 -/*@{*/
48.195 -
48.196 -/**
48.197 - * Creates a new log
48.198 - *
48.199 - * @param type The type of log this is.
48.200 - * @param name The name of this conversation (buddy name, chat name,
48.201 - * etc.)
48.202 - * @param account The account the conversation is occurring on
48.203 - * @param conv The conversation being logged
48.204 - * @param time The time this conversation started
48.205 - * @param tm The time this conversation started, with timezone data,
48.206 - * if available and if struct tm has the BSD timezone fields.
48.207 - * @return The new log
48.208 - */
48.209 -PurpleLog *purple_log_new(PurpleLogType type, const char *name, PurpleAccount *account,
48.210 - PurpleConversation *conv, time_t time, const struct tm *tm);
48.211 -
48.212 -/**
48.213 - * Frees a log
48.214 - *
48.215 - * @param log The log to destroy
48.216 - */
48.217 -void purple_log_free(PurpleLog *log);
48.218 -
48.219 -/**
48.220 - * Writes to a log file. Assumes you have checked preferences already.
48.221 - *
48.222 - * @param log The log to write to
48.223 - * @param type The type of message being logged
48.224 - * @param from Whom this message is coming from, or @c NULL for
48.225 - * system messages
48.226 - * @param time A timestamp in UNIX time
48.227 - * @param message The message to log
48.228 - */
48.229 -void purple_log_write(PurpleLog *log,
48.230 - PurpleMessageFlags type,
48.231 - const char *from,
48.232 - time_t time,
48.233 - const char *message);
48.234 -
48.235 -/**
48.236 - * Reads from a log
48.237 - *
48.238 - * @param log The log to read from
48.239 - * @param flags The returned logging flags.
48.240 - *
48.241 - * @return The contents of this log in Purple Markup.
48.242 - */
48.243 -char *purple_log_read(PurpleLog *log, PurpleLogReadFlags *flags);
48.244 -
48.245 -/**
48.246 - * Returns a list of all available logs
48.247 - *
48.248 - * @param type The type of the log
48.249 - * @param name The name of the log
48.250 - * @param account The account
48.251 - * @return A sorted list of PurpleLogs
48.252 - */
48.253 -GList *purple_log_get_logs(PurpleLogType type, const char *name, PurpleAccount *account);
48.254 -
48.255 -/**
48.256 - * Returns a GHashTable of PurpleLogSets.
48.257 - *
48.258 - * A "log set" here means the information necessary to gather the
48.259 - * PurpleLogs for a given buddy/chat. This information would be passed
48.260 - * to purple_log_list to get a list of PurpleLogs.
48.261 - *
48.262 - * The primary use of this function is to get a list of everyone the
48.263 - * user has ever talked to (assuming he or she uses logging).
48.264 - *
48.265 - * The GHashTable that's returned will free all log sets in it when
48.266 - * destroyed. If a PurpleLogSet is removed from the GHashTable, it
48.267 - * must be freed with purple_log_set_free().
48.268 - *
48.269 - * @return A GHashTable of all available unique PurpleLogSets
48.270 - */
48.271 -GHashTable *purple_log_get_log_sets(void);
48.272 -
48.273 -/**
48.274 - * Returns a list of all available system logs
48.275 - *
48.276 - * @param account The account
48.277 - * @return A sorted list of PurpleLogs
48.278 - */
48.279 -GList *purple_log_get_system_logs(PurpleAccount *account);
48.280 -
48.281 -/**
48.282 - * Returns the size of a log
48.283 - *
48.284 - * @param log The log
48.285 - * @return The size of the log, in bytes
48.286 - */
48.287 -int purple_log_get_size(PurpleLog *log);
48.288 -
48.289 -/**
48.290 - * Returns the size, in bytes, of all available logs in this conversation
48.291 - *
48.292 - * @param type The type of the log
48.293 - * @param name The name of the log
48.294 - * @param account The account
48.295 - * @return The size in bytes
48.296 - */
48.297 -int purple_log_get_total_size(PurpleLogType type, const char *name, PurpleAccount *account);
48.298 -
48.299 -/**
48.300 - * Returns the activity score of a log, based on total size in bytes,
48.301 - * which is then decayed based on age
48.302 - *
48.303 - * @param type The type of the log
48.304 - * @param name The name of the log
48.305 - * @param account The account
48.306 - * @return The activity score
48.307 - *
48.308 - * @since 2.6.0
48.309 - */
48.310 -int purple_log_get_activity_score(PurpleLogType type, const char *name, PurpleAccount *account);
48.311 -
48.312 -/**
48.313 - * Tests whether a log is deletable
48.314 - *
48.315 - * A return value of @c FALSE indicates that purple_log_delete() will fail on this
48.316 - * log, unless something changes between the two calls. A return value of @c TRUE,
48.317 - * however, does not guarantee the log can be deleted.
48.318 - *
48.319 - * @param log The log
48.320 - * @return A boolean indicating if the log is deletable
48.321 - */
48.322 -gboolean purple_log_is_deletable(PurpleLog *log);
48.323 -
48.324 -/**
48.325 - * Deletes a log
48.326 - *
48.327 - * @param log The log
48.328 - * @return A boolean indicating success or failure
48.329 - */
48.330 -gboolean purple_log_delete(PurpleLog *log);
48.331 -
48.332 -/**
48.333 - * Returns the default logger directory Purple uses for a given account
48.334 - * and username. This would be where Purple stores logs created by
48.335 - * the built-in text or HTML loggers.
48.336 - *
48.337 - * @param type The type of the log.
48.338 - * @param name The name of the log.
48.339 - * @param account The account.
48.340 - * @return The default logger directory for Purple.
48.341 - */
48.342 -char *purple_log_get_log_dir(PurpleLogType type, const char *name, PurpleAccount *account);
48.343 -
48.344 -/**
48.345 - * Implements GCompareFunc for PurpleLogs
48.346 - *
48.347 - * @param y A PurpleLog
48.348 - * @param z Another PurpleLog
48.349 - * @return A value as specified by GCompareFunc
48.350 - */
48.351 -gint purple_log_compare(gconstpointer y, gconstpointer z);
48.352 -
48.353 -/**
48.354 - * Implements GCompareFunc for PurpleLogSets
48.355 - *
48.356 - * @param y A PurpleLogSet
48.357 - * @param z Another PurpleLogSet
48.358 - * @return A value as specified by GCompareFunc
48.359 - */
48.360 -gint purple_log_set_compare(gconstpointer y, gconstpointer z);
48.361 -
48.362 -/**
48.363 - * Frees a log set
48.364 - *
48.365 - * @param set The log set to destroy
48.366 - */
48.367 -void purple_log_set_free(PurpleLogSet *set);
48.368 -
48.369 -/*@}*/
48.370 -
48.371 -/******************************************/
48.372 -/** @name Common Logger Functions */
48.373 -/******************************************/
48.374 -/*@{*/
48.375 -
48.376 -/**
48.377 - * Opens a new log file in the standard Purple log location
48.378 - * with the given file extension, named for the current time,
48.379 - * for writing. If a log file is already open, the existing
48.380 - * file handle is retained. The log's logger_data value is
48.381 - * set to a PurpleLogCommonLoggerData struct containing the log
48.382 - * file handle and log path.
48.383 - *
48.384 - * This function is intended to be used as a "common"
48.385 - * implementation of a logger's @c write function.
48.386 - * It should only be passed to purple_log_logger_new() and never
48.387 - * called directly.
48.388 - *
48.389 - * @param log The log to write to.
48.390 - * @param ext The file extension to give to this log file.
48.391 - */
48.392 -void purple_log_common_writer(PurpleLog *log, const char *ext);
48.393 -
48.394 -/**
48.395 - * Returns a sorted GList of PurpleLogs of the requested type.
48.396 - *
48.397 - * This function should only be used with logs that are written
48.398 - * with purple_log_common_writer(). It's intended to be used as
48.399 - * a "common" implementation of a logger's @c list function.
48.400 - * It should only be passed to purple_log_logger_new() and never
48.401 - * called directly.
48.402 - *
48.403 - * @param type The type of the logs being listed.
48.404 - * @param name The name of the log.
48.405 - * @param account The account of the log.
48.406 - * @param ext The file extension this log format uses.
48.407 - * @param logger A reference to the logger struct for this log.
48.408 - *
48.409 - * @return A sorted GList of PurpleLogs matching the parameters.
48.410 - */
48.411 -GList *purple_log_common_lister(PurpleLogType type, const char *name,
48.412 - PurpleAccount *account, const char *ext,
48.413 - PurpleLogLogger *logger);
48.414 -
48.415 -/**
48.416 - * Returns the total size of all the logs for a given user, with
48.417 - * a given extension.
48.418 - *
48.419 - * This function should only be used with logs that are written
48.420 - * with purple_log_common_writer(). It's intended to be used as
48.421 - * a "common" implementation of a logger's @c total_size function.
48.422 - * It should only be passed to purple_log_logger_new() and never
48.423 - * called directly.
48.424 - *
48.425 - * @param type The type of the logs being sized.
48.426 - * @param name The name of the logs to size
48.427 - * (e.g. the username or chat name).
48.428 - * @param account The account of the log.
48.429 - * @param ext The file extension this log format uses.
48.430 - *
48.431 - * @return The size of all the logs with the specified extension
48.432 - * for the specified user.
48.433 - */
48.434 -int purple_log_common_total_sizer(PurpleLogType type, const char *name,
48.435 - PurpleAccount *account, const char *ext);
48.436 -
48.437 -/**
48.438 - * Returns the size of a given PurpleLog.
48.439 - *
48.440 - * This function should only be used with logs that are written
48.441 - * with purple_log_common_writer(). It's intended to be used as
48.442 - * a "common" implementation of a logger's @c size function.
48.443 - * It should only be passed to purple_log_logger_new() and never
48.444 - * called directly.
48.445 - *
48.446 - * @param log The PurpleLog to size.
48.447 - *
48.448 - * @return An integer indicating the size of the log in bytes.
48.449 - */
48.450 -int purple_log_common_sizer(PurpleLog *log);
48.451 -
48.452 -/**
48.453 - * Deletes a log
48.454 - *
48.455 - * This function should only be used with logs that are written
48.456 - * with purple_log_common_writer(). It's intended to be used as
48.457 - * a "common" implementation of a logger's @c delete function.
48.458 - * It should only be passed to purple_log_logger_new() and never
48.459 - * called directly.
48.460 - *
48.461 - * @param log The PurpleLog to delete.
48.462 - *
48.463 - * @return A boolean indicating success or failure.
48.464 - */
48.465 -gboolean purple_log_common_deleter(PurpleLog *log);
48.466 -
48.467 -/**
48.468 - * Checks to see if a log is deletable
48.469 - *
48.470 - * This function should only be used with logs that are written
48.471 - * with purple_log_common_writer(). It's intended to be used as
48.472 - * a "common" implementation of a logger's @c is_deletable function.
48.473 - * It should only be passed to purple_log_logger_new() and never
48.474 - * called directly.
48.475 - *
48.476 - * @param log The PurpleLog to check.
48.477 - *
48.478 - * @return A boolean indicating if the log is deletable.
48.479 - */
48.480 -gboolean purple_log_common_is_deletable(PurpleLog *log);
48.481 -
48.482 -/*@}*/
48.483 -
48.484 -/******************************************/
48.485 -/** @name Logger Functions */
48.486 -/******************************************/
48.487 -/*@{*/
48.488 -
48.489 -/**
48.490 - * Creates a new logger
48.491 - *
48.492 - * @param id The logger's id.
48.493 - * @param name The logger's name.
48.494 - * @param functions The number of functions being passed. The following
48.495 - * functions are currently available (in order): @c create,
48.496 - * @c write, @c finalize, @c list, @c read, @c size,
48.497 - * @c total_size, @c list_syslog, @c get_log_sets,
48.498 - * @c remove, @c is_deletable.
48.499 - * For details on these functions, see PurpleLogLogger.
48.500 - * Functions may not be skipped. For example, passing
48.501 - * @c create and @c write is acceptable (for a total of
48.502 - * two functions). Passing @c create and @c finalize,
48.503 - * however, is not. To accomplish that, the caller must
48.504 - * pass @c create, @c NULL (a placeholder for @c write),
48.505 - * and @c finalize (for a total of 3 functions).
48.506 - *
48.507 - * @return The new logger
48.508 - */
48.509 -PurpleLogLogger *purple_log_logger_new(const char *id, const char *name, int functions, ...);
48.510 -
48.511 -/**
48.512 - * Frees a logger
48.513 - *
48.514 - * @param logger The logger to free
48.515 - */
48.516 -void purple_log_logger_free(PurpleLogLogger *logger);
48.517 -
48.518 -/**
48.519 - * Adds a new logger
48.520 - *
48.521 - * @param logger The new logger to add
48.522 - */
48.523 -void purple_log_logger_add (PurpleLogLogger *logger);
48.524 -
48.525 -/**
48.526 - *
48.527 - * Removes a logger
48.528 - *
48.529 - * @param logger The logger to remove
48.530 - */
48.531 -void purple_log_logger_remove (PurpleLogLogger *logger);
48.532 -
48.533 -/**
48.534 - *
48.535 - * Sets the current logger
48.536 - *
48.537 - * @param logger The logger to set
48.538 - */
48.539 -void purple_log_logger_set (PurpleLogLogger *logger);
48.540 -
48.541 -/**
48.542 - *
48.543 - * Returns the current logger
48.544 - *
48.545 - * @return logger The current logger
48.546 - */
48.547 -PurpleLogLogger *purple_log_logger_get (void);
48.548 -
48.549 -/**
48.550 - * Returns a GList containing the IDs and names of the registered
48.551 - * loggers.
48.552 - *
48.553 - * @return The list of IDs and names.
48.554 - */
48.555 -GList *purple_log_logger_get_options(void);
48.556 -
48.557 -/**************************************************************************/
48.558 -/** @name Log Subsystem */
48.559 -/**************************************************************************/
48.560 -/*@{*/
48.561 -
48.562 -/**
48.563 - * Initializes the log subsystem.
48.564 - */
48.565 -void purple_log_init(void);
48.566 -
48.567 -/**
48.568 - * Returns the log subsystem handle.
48.569 - *
48.570 - * @return The log subsystem handle.
48.571 - */
48.572 -void *purple_log_get_handle(void);
48.573 -
48.574 -/**
48.575 - * Uninitializes the log subsystem.
48.576 - */
48.577 -void purple_log_uninit(void);
48.578 -
48.579 -/*@}*/
48.580 -
48.581 -
48.582 -#ifdef __cplusplus
48.583 -}
48.584 -#endif
48.585 -
48.586 -#endif /* _PURPLE_LOG_H_ */
49.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/marshallers.h Fri Aug 21 13:24:36 2009 -0700
49.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
49.3 @@ -1,52 +0,0 @@
49.4 -
49.5 -#ifndef __purple_smarshal_MARSHAL_H__
49.6 -#define __purple_smarshal_MARSHAL_H__
49.7 -
49.8 -#include <glib-object.h>
49.9 -
49.10 -G_BEGIN_DECLS
49.11 -
49.12 -/* VOID:POINTER,POINTER,OBJECT (/Users/evands/adium-1.4/Utilities/dep-build-scripts/source/im.pidgin.adium/libpurple/marshallers.list:1) */
49.13 -extern void purple_smarshal_VOID__POINTER_POINTER_OBJECT (GClosure *closure,
49.14 - GValue *return_value,
49.15 - guint n_param_values,
49.16 - const GValue *param_values,
49.17 - gpointer invocation_hint,
49.18 - gpointer marshal_data);
49.19 -
49.20 -/* BOOLEAN:OBJECT,POINTER,STRING (/Users/evands/adium-1.4/Utilities/dep-build-scripts/source/im.pidgin.adium/libpurple/marshallers.list:2) */
49.21 -extern void purple_smarshal_BOOLEAN__OBJECT_POINTER_STRING (GClosure *closure,
49.22 - GValue *return_value,
49.23 - guint n_param_values,
49.24 - const GValue *param_values,
49.25 - gpointer invocation_hint,
49.26 - gpointer marshal_data);
49.27 -
49.28 -/* VOID:STRING,STRING (/Users/evands/adium-1.4/Utilities/dep-build-scripts/source/im.pidgin.adium/libpurple/marshallers.list:3) */
49.29 -extern void purple_smarshal_VOID__STRING_STRING (GClosure *closure,
49.30 - GValue *return_value,
49.31 - guint n_param_values,
49.32 - const GValue *param_values,
49.33 - gpointer invocation_hint,
49.34 - gpointer marshal_data);
49.35 -
49.36 -/* VOID:ENUM,STRING,STRING (/Users/evands/adium-1.4/Utilities/dep-build-scripts/source/im.pidgin.adium/libpurple/marshallers.list:4) */
49.37 -extern void purple_smarshal_VOID__ENUM_STRING_STRING (GClosure *closure,
49.38 - GValue *return_value,
49.39 - guint n_param_values,
49.40 - const GValue *param_values,
49.41 - gpointer invocation_hint,
49.42 - gpointer marshal_data);
49.43 -
49.44 -/* VOID:ENUM,STRING,STRING,BOOLEAN (/Users/evands/adium-1.4/Utilities/dep-build-scripts/source/im.pidgin.adium/libpurple/marshallers.list:5) */
49.45 -extern void purple_smarshal_VOID__ENUM_STRING_STRING_BOOLEAN (GClosure *closure,
49.46 - GValue *return_value,
49.47 - guint n_param_values,
49.48 - const GValue *param_values,
49.49 - gpointer invocation_hint,
49.50 - gpointer marshal_data);
49.51 -
49.52 -G_END_DECLS
49.53 -
49.54 -#endif /* __purple_smarshal_MARSHAL_H__ */
49.55 -
50.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/media-gst.h Fri Aug 21 13:24:36 2009 -0700
50.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
50.3 @@ -1,173 +0,0 @@
50.4 -/**
50.5 - * @file media-gst.h Media API
50.6 - * @ingroup core
50.7 - */
50.8 -
50.9 -/* purple
50.10 - *
50.11 - * Purple is the legal property of its developers, whose names are too numerous
50.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
50.13 - * source distribution.
50.14 - *
50.15 - * This program is free software; you can redistribute it and/or modify
50.16 - * it under the terms of the GNU General Public License as published by
50.17 - * the Free Software Foundation; either version 2 of the License, or
50.18 - * (at your option) any later version.
50.19 - *
50.20 - * This program is distributed in the hope that it will be useful,
50.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
50.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50.23 - * GNU General Public License for more details.
50.24 - *
50.25 - * You should have received a copy of the GNU General Public License
50.26 - * along with this program; if not, write to the Free Software
50.27 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
50.28 - */
50.29 -
50.30 -#ifndef _PURPLE_MEDIA_GST_H_
50.31 -#define _PURPLE_MEDIA_GST_H_
50.32 -
50.33 -#include "media.h"
50.34 -#include "mediamanager.h"
50.35 -
50.36 -#include <gst/gst.h>
50.37 -
50.38 -G_BEGIN_DECLS
50.39 -
50.40 -#define PURPLE_TYPE_MEDIA_ELEMENT_TYPE (purple_media_element_type_get_type())
50.41 -#define PURPLE_TYPE_MEDIA_ELEMENT_INFO (purple_media_element_info_get_type())
50.42 -#define PURPLE_MEDIA_ELEMENT_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_ELEMENT_INFO, PurpleMediaElementInfo))
50.43 -#define PURPLE_MEDIA_ELEMENT_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_ELEMENT_INFO, PurpleMediaElementInfo))
50.44 -#define PURPLE_IS_MEDIA_ELEMENT_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA_ELEMENT_INFO))
50.45 -#define PURPLE_IS_MEDIA_ELEMENT_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_ELEMENT_INFO))
50.46 -#define PURPLE_MEDIA_ELEMENT_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_ELEMENT_INFO, PurpleMediaElementInfo))
50.47 -
50.48 -/** @copydoc _PurpleMediaElementInfo */
50.49 -typedef struct _PurpleMediaElementInfo PurpleMediaElementInfo;
50.50 -typedef struct _PurpleMediaElementInfoClass PurpleMediaElementInfoClass;
50.51 -typedef GstElement *(*PurpleMediaElementCreateCallback)(PurpleMedia *media,
50.52 - const gchar *session_id, const gchar *participant);
50.53 -
50.54 -typedef enum {
50.55 - PURPLE_MEDIA_ELEMENT_NONE = 0, /** empty element */
50.56 - PURPLE_MEDIA_ELEMENT_AUDIO = 1, /** supports audio */
50.57 - PURPLE_MEDIA_ELEMENT_VIDEO = 1 << 1, /** supports video */
50.58 - PURPLE_MEDIA_ELEMENT_AUDIO_VIDEO = PURPLE_MEDIA_ELEMENT_AUDIO
50.59 - | PURPLE_MEDIA_ELEMENT_VIDEO, /** supports audio and video */
50.60 -
50.61 - PURPLE_MEDIA_ELEMENT_NO_SRCS = 0, /** has no src pads */
50.62 - PURPLE_MEDIA_ELEMENT_ONE_SRC = 1 << 2, /** has one src pad */
50.63 - PURPLE_MEDIA_ELEMENT_MULTI_SRC = 1 << 3, /** has multiple src pads */
50.64 - PURPLE_MEDIA_ELEMENT_REQUEST_SRC = 1 << 4, /** src pads must be requested */
50.65 -
50.66 - PURPLE_MEDIA_ELEMENT_NO_SINKS = 0, /** has no sink pads */
50.67 - PURPLE_MEDIA_ELEMENT_ONE_SINK = 1 << 5, /** has one sink pad */
50.68 - PURPLE_MEDIA_ELEMENT_MULTI_SINK = 1 << 6, /** has multiple sink pads */
50.69 - PURPLE_MEDIA_ELEMENT_REQUEST_SINK = 1 << 7, /** sink pads must be requested */
50.70 -
50.71 - PURPLE_MEDIA_ELEMENT_UNIQUE = 1 << 8, /** This element is unique and
50.72 - only one instance of it should
50.73 - be created at a time */
50.74 -
50.75 - PURPLE_MEDIA_ELEMENT_SRC = 1 << 9, /** can be set as an active src */
50.76 - PURPLE_MEDIA_ELEMENT_SINK = 1 << 10, /** can be set as an active sink */
50.77 -} PurpleMediaElementType;
50.78 -
50.79 -#ifdef __cplusplus
50.80 -extern "C" {
50.81 -#endif
50.82 -
50.83 -/**
50.84 - * Gets the element type's GType.
50.85 - *
50.86 - * @return The element type's GType.
50.87 - *
50.88 - * @since 2.6.0
50.89 - */
50.90 -GType purple_media_element_type_get_type(void);
50.91 -
50.92 -/**
50.93 - * Gets the element info's GType.
50.94 - *
50.95 - * @return The element info's GType.
50.96 - *
50.97 - * @since 2.6.0
50.98 - */
50.99 -GType purple_media_element_info_get_type(void);
50.100 -
50.101 -/**
50.102 - * Gets the source from a session
50.103 - *
50.104 - * @param media The media object the session is in.
50.105 - * @param sess_id The session id of the session to get the source from.
50.106 - *
50.107 - * @return The source retrieved.
50.108 - *
50.109 - * @since 2.6.0
50.110 - */
50.111 -GstElement *purple_media_get_src(PurpleMedia *media, const gchar *sess_id);
50.112 -
50.113 -/**
50.114 - * Gets the tee from a given session/stream.
50.115 - *
50.116 - * @param media The instance to get the tee from.
50.117 - * @param session_id The id of the session to get the tee from.
50.118 - * @param participant Optionally, the participant of the stream to get the tee from.
50.119 - *
50.120 - * @return The GstTee element from the chosen session/stream.
50.121 - *
50.122 - * @since 2.6.0
50.123 - */
50.124 -GstElement *purple_media_get_tee(PurpleMedia *media,
50.125 - const gchar *session_id, const gchar *participant);
50.126 -
50.127 -
50.128 -/**
50.129 - * Gets the pipeline from the media manager.
50.130 - *
50.131 - * @param manager The media manager to get the pipeline from.
50.132 - *
50.133 - * @return The pipeline.
50.134 - *
50.135 - * @since 2.6.0
50.136 - */
50.137 -GstElement *purple_media_manager_get_pipeline(PurpleMediaManager *manager);
50.138 -
50.139 -/**
50.140 - * Returns a GStreamer source or sink for audio or video.
50.141 - *
50.142 - * @param manager The media manager to use to obtain the source/sink.
50.143 - * @param type The type of source/sink to get.
50.144 - *
50.145 - * @since 2.6.0
50.146 - */
50.147 -GstElement *purple_media_manager_get_element(PurpleMediaManager *manager,
50.148 - PurpleMediaSessionType type, PurpleMedia *media,
50.149 - const gchar *session_id, const gchar *participant);
50.150 -
50.151 -PurpleMediaElementInfo *purple_media_manager_get_element_info(
50.152 - PurpleMediaManager *manager, const gchar *name);
50.153 -gboolean purple_media_manager_register_element(PurpleMediaManager *manager,
50.154 - PurpleMediaElementInfo *info);
50.155 -gboolean purple_media_manager_unregister_element(PurpleMediaManager *manager,
50.156 - const gchar *name);
50.157 -gboolean purple_media_manager_set_active_element(PurpleMediaManager *manager,
50.158 - PurpleMediaElementInfo *info);
50.159 -PurpleMediaElementInfo *purple_media_manager_get_active_element(
50.160 - PurpleMediaManager *manager, PurpleMediaElementType type);
50.161 -
50.162 -gchar *purple_media_element_info_get_id(PurpleMediaElementInfo *info);
50.163 -gchar *purple_media_element_info_get_name(PurpleMediaElementInfo *info);
50.164 -PurpleMediaElementType purple_media_element_info_get_element_type(
50.165 - PurpleMediaElementInfo *info);
50.166 -GstElement *purple_media_element_info_call_create(
50.167 - PurpleMediaElementInfo *info, PurpleMedia *media,
50.168 - const gchar *session_id, const gchar *participant);
50.169 -
50.170 -#ifdef __cplusplus
50.171 -}
50.172 -#endif
50.173 -
50.174 -G_END_DECLS
50.175 -
50.176 -#endif /* _PURPLE_MEDIA_GST_H_ */
51.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/media.h Fri Aug 21 13:24:36 2009 -0700
51.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
51.3 @@ -1,690 +0,0 @@
51.4 -/**
51.5 - * @file media.h Media API
51.6 - * @ingroup core
51.7 - */
51.8 -
51.9 -/* purple
51.10 - *
51.11 - * Purple is the legal property of its developers, whose names are too numerous
51.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
51.13 - * source distribution.
51.14 - *
51.15 - * This program is free software; you can redistribute it and/or modify
51.16 - * it under the terms of the GNU General Public License as published by
51.17 - * the Free Software Foundation; either version 2 of the License, or
51.18 - * (at your option) any later version.
51.19 - *
51.20 - * This program is distributed in the hope that it will be useful,
51.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
51.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51.23 - * GNU General Public License for more details.
51.24 - *
51.25 - * You should have received a copy of the GNU General Public License
51.26 - * along with this program; if not, write to the Free Software
51.27 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51.28 - */
51.29 -
51.30 -#ifndef _PURPLE_MEDIA_H_
51.31 -#define _PURPLE_MEDIA_H_
51.32 -
51.33 -#include <glib.h>
51.34 -#include <glib-object.h>
51.35 -
51.36 -G_BEGIN_DECLS
51.37 -
51.38 -#define PURPLE_TYPE_MEDIA_CANDIDATE (purple_media_candidate_get_type())
51.39 -#define PURPLE_MEDIA_CANDIDATE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_CANDIDATE, PurpleMediaCandidate))
51.40 -#define PURPLE_MEDIA_CANDIDATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_CANDIDATE, PurpleMediaCandidate))
51.41 -#define PURPLE_IS_MEDIA_CANDIDATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA_CANDIDATE))
51.42 -#define PURPLE_IS_MEDIA_CANDIDATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_CANDIDATE))
51.43 -#define PURPLE_MEDIA_CANDIDATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_CANDIDATE, PurpleMediaCandidate))
51.44 -
51.45 -#define PURPLE_TYPE_MEDIA_CODEC (purple_media_codec_get_type())
51.46 -#define PURPLE_MEDIA_CODEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_CODEC, PurpleMediaCodec))
51.47 -#define PURPLE_MEDIA_CODEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_CODEC, PurpleMediaCodec))
51.48 -#define PURPLE_IS_MEDIA_CODEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA_CODEC))
51.49 -#define PURPLE_IS_MEDIA_CODEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_CODEC))
51.50 -#define PURPLE_MEDIA_CODEC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_CODEC, PurpleMediaCodec))
51.51 -
51.52 -#define PURPLE_TYPE_MEDIA_SESSION_TYPE (purple_media_session_type_get_type())
51.53 -#define PURPLE_TYPE_MEDIA (purple_media_get_type())
51.54 -#define PURPLE_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA, PurpleMedia))
51.55 -#define PURPLE_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA, PurpleMediaClass))
51.56 -#define PURPLE_IS_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA))
51.57 -#define PURPLE_IS_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA))
51.58 -#define PURPLE_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA, PurpleMediaClass))
51.59 -
51.60 -#define PURPLE_TYPE_MEDIA_CANDIDATE_TYPE (purple_media_candidate_type_get_type())
51.61 -#define PURPLE_TYPE_MEDIA_NETWORK_PROTOCOL (purple_media_network_protocol_get_type())
51.62 -#define PURPLE_MEDIA_TYPE_STATE (purple_media_state_changed_get_type())
51.63 -#define PURPLE_MEDIA_TYPE_INFO_TYPE (purple_media_info_type_get_type())
51.64 -
51.65 -/** @copydoc _PurpleMedia */
51.66 -typedef struct _PurpleMedia PurpleMedia;
51.67 -/** @copydoc _PurpleMediaCandidate */
51.68 -typedef struct _PurpleMediaCandidate PurpleMediaCandidate;
51.69 -/** @copydoc _PurpleMediaCodec */
51.70 -typedef struct _PurpleMediaCodec PurpleMediaCodec;
51.71 -
51.72 -/** Media caps */
51.73 -typedef enum {
51.74 - PURPLE_MEDIA_CAPS_NONE = 0,
51.75 - PURPLE_MEDIA_CAPS_AUDIO = 1,
51.76 - PURPLE_MEDIA_CAPS_AUDIO_SINGLE_DIRECTION = 1 << 1,
51.77 - PURPLE_MEDIA_CAPS_VIDEO = 1 << 2,
51.78 - PURPLE_MEDIA_CAPS_VIDEO_SINGLE_DIRECTION = 1 << 3,
51.79 - PURPLE_MEDIA_CAPS_AUDIO_VIDEO = 1 << 4,
51.80 - PURPLE_MEDIA_CAPS_MODIFY_SESSION = 1 << 5,
51.81 - PURPLE_MEDIA_CAPS_CHANGE_DIRECTION = 1 << 6,
51.82 -} PurpleMediaCaps;
51.83 -
51.84 -/** Media session types */
51.85 -typedef enum {
51.86 - PURPLE_MEDIA_NONE = 0,
51.87 - PURPLE_MEDIA_RECV_AUDIO = 1 << 0,
51.88 - PURPLE_MEDIA_SEND_AUDIO = 1 << 1,
51.89 - PURPLE_MEDIA_RECV_VIDEO = 1 << 2,
51.90 - PURPLE_MEDIA_SEND_VIDEO = 1 << 3,
51.91 - PURPLE_MEDIA_AUDIO = PURPLE_MEDIA_RECV_AUDIO | PURPLE_MEDIA_SEND_AUDIO,
51.92 - PURPLE_MEDIA_VIDEO = PURPLE_MEDIA_RECV_VIDEO | PURPLE_MEDIA_SEND_VIDEO
51.93 -} PurpleMediaSessionType;
51.94 -
51.95 -/** Media state-changed types */
51.96 -typedef enum {
51.97 - PURPLE_MEDIA_STATE_NEW = 0,
51.98 - PURPLE_MEDIA_STATE_CONNECTED,
51.99 - PURPLE_MEDIA_STATE_END,
51.100 -} PurpleMediaState;
51.101 -
51.102 -/** Media info types */
51.103 -typedef enum {
51.104 - PURPLE_MEDIA_INFO_HANGUP = 0,
51.105 - PURPLE_MEDIA_INFO_ACCEPT,
51.106 - PURPLE_MEDIA_INFO_REJECT,
51.107 - PURPLE_MEDIA_INFO_MUTE,
51.108 - PURPLE_MEDIA_INFO_UNMUTE,
51.109 - PURPLE_MEDIA_INFO_HOLD,
51.110 - PURPLE_MEDIA_INFO_UNHOLD,
51.111 -} PurpleMediaInfoType;
51.112 -
51.113 -typedef enum {
51.114 - PURPLE_MEDIA_CANDIDATE_TYPE_HOST,
51.115 - PURPLE_MEDIA_CANDIDATE_TYPE_SRFLX,
51.116 - PURPLE_MEDIA_CANDIDATE_TYPE_PRFLX,
51.117 - PURPLE_MEDIA_CANDIDATE_TYPE_RELAY,
51.118 - PURPLE_MEDIA_CANDIDATE_TYPE_MULTICAST,
51.119 -} PurpleMediaCandidateType;
51.120 -
51.121 -typedef enum {
51.122 - PURPLE_MEDIA_COMPONENT_NONE = 0,
51.123 - PURPLE_MEDIA_COMPONENT_RTP = 1,
51.124 - PURPLE_MEDIA_COMPONENT_RTCP = 2,
51.125 -} PurpleMediaComponentType;
51.126 -
51.127 -typedef enum {
51.128 - PURPLE_MEDIA_NETWORK_PROTOCOL_UDP,
51.129 - PURPLE_MEDIA_NETWORK_PROTOCOL_TCP,
51.130 -} PurpleMediaNetworkProtocol;
51.131 -
51.132 -#include "signals.h"
51.133 -#include "util.h"
51.134 -
51.135 -#ifdef __cplusplus
51.136 -extern "C" {
51.137 -#endif
51.138 -
51.139 -/**
51.140 - * Gets the media session type's GType
51.141 - *
51.142 - * @return The media session type's GType.
51.143 - *
51.144 - * @since 2.6.0
51.145 - */
51.146 -GType purple_media_session_type_get_type(void);
51.147 -
51.148 -/**
51.149 - * Gets the media candidate type's GType
51.150 - *
51.151 - * @return The media candidate type's GType.
51.152 - *
51.153 - * @since 2.6.0
51.154 - */
51.155 -GType purple_media_candidate_type_get_type(void);
51.156 -
51.157 -/**
51.158 - * Gets the media network protocol's GType
51.159 - *
51.160 - * @return The media network protocol's GType.
51.161 - *
51.162 - * @since 2.6.0
51.163 - */
51.164 -GType purple_media_network_protocol_get_type(void);
51.165 -
51.166 -/**
51.167 - * Gets the media class's GType
51.168 - *
51.169 - * @return The media class's GType.
51.170 - *
51.171 - * @since 2.6.0
51.172 - */
51.173 -GType purple_media_get_type(void);
51.174 -
51.175 -/**
51.176 - * Gets the type of the state-changed enum
51.177 - *
51.178 - * @return The state-changed enum's GType
51.179 - *
51.180 - * @since 2.6.0
51.181 - */
51.182 -GType purple_media_state_changed_get_type(void);
51.183 -
51.184 -/**
51.185 - * Gets the type of the info type enum
51.186 - *
51.187 - * @return The info type enum's GType
51.188 - *
51.189 - * @since 2.6.0
51.190 - */
51.191 -GType purple_media_info_type_get_type(void);
51.192 -
51.193 -/**
51.194 - * Gets the type of the media candidate structure.
51.195 - *
51.196 - * @return The media canditate's GType
51.197 - *
51.198 - * @since 2.6.0
51.199 - */
51.200 -GType purple_media_candidate_get_type(void);
51.201 -
51.202 -/**
51.203 - * Creates a PurpleMediaCandidate instance.
51.204 - *
51.205 - * @param foundation The foundation of the candidate.
51.206 - * @param component_id The component this candidate is for.
51.207 - * @param type The type of candidate.
51.208 - * @param proto The protocol this component is for.
51.209 - * @param ip The IP address of this component.
51.210 - * @param port The network port.
51.211 - *
51.212 - * @return The newly created PurpleMediaCandidate instance.
51.213 - *
51.214 - * @since 2.6.0
51.215 - */
51.216 -PurpleMediaCandidate *purple_media_candidate_new(
51.217 - const gchar *foundation, guint component_id,
51.218 - PurpleMediaCandidateType type,
51.219 - PurpleMediaNetworkProtocol proto,
51.220 - const gchar *ip, guint port);
51.221 -
51.222 -/**
51.223 - * Copies a GList of PurpleMediaCandidate and its contents.
51.224 - *
51.225 - * @param candidates The list of candidates to be copied.
51.226 - *
51.227 - * @return The copy of the GList.
51.228 - *
51.229 - * @since 2.6.0
51.230 - */
51.231 -GList *purple_media_candidate_list_copy(GList *candidates);
51.232 -
51.233 -/**
51.234 - * Frees a GList of PurpleMediaCandidate and its contents.
51.235 - *
51.236 - * @param candidates The list of candidates to be freed.
51.237 - *
51.238 - * @since 2.6.0
51.239 - */
51.240 -void purple_media_candidate_list_free(GList *candidates);
51.241 -
51.242 -gchar *purple_media_candidate_get_foundation(PurpleMediaCandidate *candidate);
51.243 -guint purple_media_candidate_get_component_id(PurpleMediaCandidate *candidate);
51.244 -gchar *purple_media_candidate_get_ip(PurpleMediaCandidate *candidate);
51.245 -guint16 purple_media_candidate_get_port(PurpleMediaCandidate *candidate);
51.246 -gchar *purple_media_candidate_get_base_ip(PurpleMediaCandidate *candidate);
51.247 -guint16 purple_media_candidate_get_base_port(PurpleMediaCandidate *candidate);
51.248 -PurpleMediaNetworkProtocol purple_media_candidate_get_protocol(
51.249 - PurpleMediaCandidate *candidate);
51.250 -guint32 purple_media_candidate_get_priority(PurpleMediaCandidate *candidate);
51.251 -PurpleMediaCandidateType purple_media_candidate_get_candidate_type(
51.252 - PurpleMediaCandidate *candidate);
51.253 -gchar *purple_media_candidate_get_username(PurpleMediaCandidate *candidate);
51.254 -gchar *purple_media_candidate_get_password(PurpleMediaCandidate *candidate);
51.255 -guint purple_media_candidate_get_ttl(PurpleMediaCandidate *candidate);
51.256 -
51.257 -/**
51.258 - * Gets the type of the media codec structure.
51.259 - *
51.260 - * @return The media codec's GType
51.261 - *
51.262 - * @since 2.6.0
51.263 - */
51.264 -GType purple_media_codec_get_type(void);
51.265 -
51.266 -/**
51.267 - * Creates a new PurpleMediaCodec instance.
51.268 - *
51.269 - * @param id Codec identifier.
51.270 - * @param encoding_name Name of the media type this encodes.
51.271 - * @param media_type PurpleMediaSessionType of this codec.
51.272 - * @param clock_rate The clock rate this codec encodes at, if applicable.
51.273 - *
51.274 - * @return The newly created PurpleMediaCodec.
51.275 - *
51.276 - * @since 2.6.0
51.277 - */
51.278 -PurpleMediaCodec *purple_media_codec_new(int id, const char *encoding_name,
51.279 - PurpleMediaSessionType media_type, guint clock_rate);
51.280 -
51.281 -guint purple_media_codec_get_id(PurpleMediaCodec *codec);
51.282 -gchar *purple_media_codec_get_encoding_name(PurpleMediaCodec *codec);
51.283 -guint purple_media_codec_get_clock_rate(PurpleMediaCodec *codec);
51.284 -guint purple_media_codec_get_channels(PurpleMediaCodec *codec);
51.285 -GList *purple_media_codec_get_optional_parameters(PurpleMediaCodec *codec);
51.286 -
51.287 -/**
51.288 - * Creates a string representation of the codec.
51.289 - *
51.290 - * @param codec The codec to create the string of.
51.291 - *
51.292 - * @return The new string representation.
51.293 - *
51.294 - * @since 2.6.0
51.295 - */
51.296 -gchar *purple_media_codec_to_string(const PurpleMediaCodec *codec);
51.297 -
51.298 -/**
51.299 - * Adds an optional parameter to the codec.
51.300 - *
51.301 - * @param codec The codec to add the parameter to.
51.302 - * @param name The name of the parameter to add.
51.303 - * @param value The value of the parameter to add.
51.304 - *
51.305 - * @since 2.6.0
51.306 - */
51.307 -void purple_media_codec_add_optional_parameter(PurpleMediaCodec *codec,
51.308 - const gchar *name, const gchar *value);
51.309 -
51.310 -/**
51.311 - * Removes an optional parameter from the codec.
51.312 - *
51.313 - * @param codec The codec to remove the parameter from.
51.314 - * @param param A pointer to the parameter to remove.
51.315 - *
51.316 - * @since 2.6.0
51.317 - */
51.318 -void purple_media_codec_remove_optional_parameter(PurpleMediaCodec *codec,
51.319 - PurpleKeyValuePair *param);
51.320 -
51.321 -/**
51.322 - * Gets an optional parameter based on the values given.
51.323 - *
51.324 - * @param codec The codec to find the parameter in.
51.325 - * @param name The name of the parameter to search for.
51.326 - * @param value The value to search for or NULL.
51.327 - *
51.328 - * @return The value found or NULL.
51.329 - *
51.330 - * @since 2.6.0
51.331 - */
51.332 -PurpleKeyValuePair *purple_media_codec_get_optional_parameter(
51.333 - PurpleMediaCodec *codec, const gchar *name,
51.334 - const gchar *value);
51.335 -
51.336 -/**
51.337 - * Copies a GList of PurpleMediaCodec and its contents.
51.338 - *
51.339 - * @param codecs The list of codecs to be copied.
51.340 - *
51.341 - * @return The copy of the GList.
51.342 - *
51.343 - * @since 2.6.0
51.344 - */
51.345 -GList *purple_media_codec_list_copy(GList *codecs);
51.346 -
51.347 -/**
51.348 - * Frees a GList of PurpleMediaCodec and its contents.
51.349 - *
51.350 - * @param codecs The list of codecs to be freed.
51.351 - *
51.352 - * @since 2.6.0
51.353 - */
51.354 -void purple_media_codec_list_free(GList *codecs);
51.355 -
51.356 -/**
51.357 - * Gets a list of session IDs.
51.358 - *
51.359 - * @param media The media session from which to retrieve session IDs.
51.360 - *
51.361 - * @return GList of session IDs. The caller must free the list.
51.362 - *
51.363 - * @since 2.6.0
51.364 - */
51.365 -GList *purple_media_get_session_ids(PurpleMedia *media);
51.366 -
51.367 -/**
51.368 - * Gets the PurpleAccount this media session is on.
51.369 - *
51.370 - * @param media The media session to retrieve the account from.
51.371 - *
51.372 - * @return The account retrieved.
51.373 - *
51.374 - * @since 2.6.0
51.375 - */
51.376 -PurpleAccount *purple_media_get_account(PurpleMedia *media);
51.377 -
51.378 -/**
51.379 - * Gets the prpl data from the media session.
51.380 - *
51.381 - * @param media The media session to retrieve the prpl data from.
51.382 - *
51.383 - * @return The prpl data retrieved.
51.384 - *
51.385 - * @since 2.6.0
51.386 - */
51.387 -gpointer purple_media_get_prpl_data(PurpleMedia *media);
51.388 -
51.389 -/**
51.390 - * Sets the prpl data on the media session.
51.391 - *
51.392 - * @param media The media session to set the prpl data on.
51.393 - * @param prpl_data The data to set on the media session.
51.394 - *
51.395 - * @since 2.6.0
51.396 - */
51.397 -void purple_media_set_prpl_data(PurpleMedia *media, gpointer prpl_data);
51.398 -
51.399 -/**
51.400 - * Signals an error in the media session.
51.401 - *
51.402 - * @param media The media object to set the state on.
51.403 - * @param error The format of the error message to send in the signal.
51.404 - * @param ... The arguments to plug into the format.
51.405 - *
51.406 - * @since 2.6.0
51.407 - */
51.408 -void purple_media_error(PurpleMedia *media, const gchar *error, ...);
51.409 -
51.410 -/**
51.411 - * Ends all streams that match the given parameters
51.412 - *
51.413 - * @param media The media object with which to end streams.
51.414 - * @param session_id The session to end streams on.
51.415 - * @param participant The participant to end streams with.
51.416 - *
51.417 - * @since 2.6.0
51.418 - */
51.419 -void purple_media_end(PurpleMedia *media, const gchar *session_id,
51.420 - const gchar *participant);
51.421 -
51.422 -/**
51.423 - * Signals different information about the given stream.
51.424 - *
51.425 - * @param media The media instance to containing the stream to signal.
51.426 - * @param type The type of info being signaled.
51.427 - * @param session_id The id of the session of the stream being signaled.
51.428 - * @param participant The participant of the stream being signaled.
51.429 - * @param local TRUE if the info originated locally, FALSE if on the remote end.
51.430 - *
51.431 - * @since 2.6.0
51.432 - */
51.433 -void purple_media_stream_info(PurpleMedia *media, PurpleMediaInfoType type,
51.434 - const gchar *session_id, const gchar *participant,
51.435 - gboolean local);
51.436 -
51.437 -/**
51.438 - * Adds a stream to a session.
51.439 - *
51.440 - * It only adds a stream to one audio session or video session as
51.441 - * the @c sess_id must be unique between sessions.
51.442 - *
51.443 - * @param media The media object to find the session in.
51.444 - * @param sess_id The session id of the session to add the stream to.
51.445 - * @param who The name of the remote user to add the stream for.
51.446 - * @param type The type of stream to create.
51.447 - * @param initiator Whether or not the local user initiated the stream.
51.448 - * @param transmitter The transmitter to use for the stream.
51.449 - * @param num_params The number of parameters to pass to Farsight.
51.450 - * @param params The parameters to pass to Farsight.
51.451 - *
51.452 - * @return @c TRUE The stream was added successfully, @c FALSE otherwise.
51.453 - *
51.454 - * @since 2.6.0
51.455 - */
51.456 -gboolean purple_media_add_stream(PurpleMedia *media, const gchar *sess_id,
51.457 - const gchar *who, PurpleMediaSessionType type,
51.458 - gboolean initiator, const gchar *transmitter,
51.459 - guint num_params, GParameter *params);
51.460 -
51.461 -/**
51.462 - * Gets the session type from a session
51.463 - *
51.464 - * @param media The media object to find the session in.
51.465 - * @param sess_id The session id of the session to get the type from.
51.466 - *
51.467 - * @return The retreived session type.
51.468 - *
51.469 - * @since 2.6.0
51.470 - */
51.471 -PurpleMediaSessionType purple_media_get_session_type(PurpleMedia *media, const gchar *sess_id);
51.472 -
51.473 -/**
51.474 - * Gets the PurpleMediaManager this media session is a part of.
51.475 - *
51.476 - * @param media The media object to get the manager instance from.
51.477 - *
51.478 - * @return The PurpleMediaManager instance retrieved.
51.479 - *
51.480 - * @since 2.6.0
51.481 - */
51.482 -struct _PurpleMediaManager *purple_media_get_manager(PurpleMedia *media);
51.483 -
51.484 -/**
51.485 - * Gets the codecs from a session.
51.486 - *
51.487 - * @param media The media object to find the session in.
51.488 - * @param sess_id The session id of the session to get the codecs from.
51.489 - *
51.490 - * @return The retreieved codecs.
51.491 - *
51.492 - * @since 2.6.0
51.493 - */
51.494 -GList *purple_media_get_codecs(PurpleMedia *media, const gchar *sess_id);
51.495 -
51.496 -/**
51.497 - * Adds remote candidates to the stream.
51.498 - *
51.499 - * @param media The media object to find the session in.
51.500 - * @param sess_id The session id of the session find the stream in.
51.501 - * @param participant The name of the remote user to add the candidates for.
51.502 - * @param remote_candidates The remote candidates to add.
51.503 - *
51.504 - * @since 2.6.0
51.505 - */
51.506 -void purple_media_add_remote_candidates(PurpleMedia *media,
51.507 - const gchar *sess_id,
51.508 - const gchar *participant,
51.509 - GList *remote_candidates);
51.510 -
51.511 -/**
51.512 - * Gets the local candidates from a stream.
51.513 - *
51.514 - * @param media The media object to find the session in.
51.515 - * @param sess_id The session id of the session to find the stream in.
51.516 - * @param participant The name of the remote user to get the candidates from.
51.517 - *
51.518 - * @since 2.6.0
51.519 - */
51.520 -GList *purple_media_get_local_candidates(PurpleMedia *media,
51.521 - const gchar *sess_id,
51.522 - const gchar *participant);
51.523 -
51.524 -#if 0
51.525 -/*
51.526 - * These two functions aren't being used and I'd rather not lock in the API
51.527 - * until they are needed. If they ever are.
51.528 - */
51.529 -
51.530 -/**
51.531 - * Gets the active local candidates for the stream.
51.532 - *
51.533 - * @param media The media object to find the session in.
51.534 - * @param sess_id The session id of the session to find the stream in.
51.535 - * @param participant The name of the remote user to get the active candidate
51.536 - * from.
51.537 - *
51.538 - * @return The active candidates retrieved.
51.539 - */
51.540 -GList *purple_media_get_active_local_candidates(PurpleMedia *media,
51.541 - const gchar *sess_id, const gchar *participant);
51.542 -
51.543 -/**
51.544 - * Gets the active remote candidates for the stream.
51.545 - *
51.546 - * @param media The media object to find the session in.
51.547 - * @param sess_id The session id of the session to find the stream in.
51.548 - * @param participant The name of the remote user to get the remote candidate
51.549 - * from.
51.550 - *
51.551 - * @return The remote candidates retrieved.
51.552 - */
51.553 -GList *purple_media_get_active_remote_candidates(PurpleMedia *media,
51.554 - const gchar *sess_id, const gchar *participant);
51.555 -#endif
51.556 -
51.557 -/**
51.558 - * Sets remote candidates from the stream.
51.559 - *
51.560 - * @param media The media object to find the session in.
51.561 - * @param sess_id The session id of the session find the stream in.
51.562 - * @param participant The name of the remote user to set the candidates from.
51.563 - *
51.564 - * @return @c TRUE The codecs were set successfully, or @c FALSE otherwise.
51.565 - *
51.566 - * @since 2.6.0
51.567 - */
51.568 -gboolean purple_media_set_remote_codecs(PurpleMedia *media, const gchar *sess_id,
51.569 - const gchar *participant, GList *codecs);
51.570 -
51.571 -/**
51.572 - * Returns whether or not the candidates for set of streams are prepared
51.573 - *
51.574 - * @param media The media object to find the remote user in.
51.575 - * @param session_id The session id of the session to check.
51.576 - * @param participant The remote user to check for.
51.577 - *
51.578 - * @return @c TRUE All streams for the given session_id/participant combination have candidates prepared, @c FALSE otherwise.
51.579 - *
51.580 - * @since 2.6.0
51.581 - */
51.582 -gboolean purple_media_candidates_prepared(PurpleMedia *media,
51.583 - const gchar *session_id, const gchar *participant);
51.584 -
51.585 -/**
51.586 - * Sets the send codec for the a session.
51.587 - *
51.588 - * @param media The media object to find the session in.
51.589 - * @param sess_id The session id of the session to set the codec for.
51.590 - * @param codec The codec to set the session to stream.
51.591 - *
51.592 - * @return @c TRUE The codec was successfully changed, or @c FALSE otherwise.
51.593 - *
51.594 - * @since 2.6.0
51.595 - */
51.596 -gboolean purple_media_set_send_codec(PurpleMedia *media, const gchar *sess_id, PurpleMediaCodec *codec);
51.597 -
51.598 -/**
51.599 - * Gets whether a session's codecs are ready to be used.
51.600 - *
51.601 - * @param media The media object to find the session in.
51.602 - * @param sess_id The session id of the session to check.
51.603 - *
51.604 - * @return @c TRUE The codecs are ready, or @c FALSE otherwise.
51.605 - *
51.606 - * @since 2.6.0
51.607 - */
51.608 -gboolean purple_media_codecs_ready(PurpleMedia *media, const gchar *sess_id);
51.609 -
51.610 -/**
51.611 - * Gets whether the local user is the conference/session/stream's initiator.
51.612 - *
51.613 - * @param media The media instance to find the session in.
51.614 - * @param sess_id The session id of the session to check.
51.615 - * @param participant The participant of the stream to check.
51.616 - *
51.617 - * @return TRUE if the local user is the stream's initator, else FALSE.
51.618 - *
51.619 - * @since 2.6.0
51.620 - */
51.621 -gboolean purple_media_is_initiator(PurpleMedia *media,
51.622 - const gchar *sess_id, const gchar *participant);
51.623 -
51.624 -/**
51.625 - * Gets whether a streams selected have been accepted.
51.626 - *
51.627 - * @param media The media object to find the session in.
51.628 - * @param sess_id The session id of the session to check.
51.629 - * @param participant The participant to check.
51.630 - *
51.631 - * @return @c TRUE The selected streams have been accepted, or @c FALSE otherwise.
51.632 - *
51.633 - * @since 2.6.0
51.634 - */
51.635 -gboolean purple_media_accepted(PurpleMedia *media, const gchar *sess_id,
51.636 - const gchar *participant);
51.637 -
51.638 -/**
51.639 - * Sets the input volume of all the selected sessions.
51.640 - *
51.641 - * @param media The media object the sessions are in.
51.642 - * @param session_id The session to select (if any).
51.643 - * @param level The level to set the volume to.
51.644 - *
51.645 - * @since 2.6.0
51.646 - */
51.647 -void purple_media_set_input_volume(PurpleMedia *media, const gchar *session_id, double level);
51.648 -
51.649 -/**
51.650 - * Sets the output volume of all the selected streams.
51.651 - *
51.652 - * @param media The media object the streams are in.
51.653 - * @param session_id The session to limit the streams to (if any).
51.654 - * @param participant The participant to limit the streams to (if any).
51.655 - * @param level The level to set the volume to.
51.656 - *
51.657 - * @since 2.6.0
51.658 - */
51.659 -void purple_media_set_output_volume(PurpleMedia *media, const gchar *session_id,
51.660 - const gchar *participant, double level);
51.661 -
51.662 -/**
51.663 - * Sets a video output window for the given session/stream.
51.664 - *
51.665 - * @param media The media instance to set the output window on.
51.666 - * @param session_id The session to set the output window on.
51.667 - * @param participant Optionally, the participant to set the output window on.
51.668 - * @param window_id The window id use for embedding the video in.
51.669 - *
51.670 - * @return An id to reference the output window.
51.671 - *
51.672 - * @since 2.6.0
51.673 - */
51.674 -gulong purple_media_set_output_window(PurpleMedia *media,
51.675 - const gchar *session_id, const gchar *participant,
51.676 - gulong window_id);
51.677 -
51.678 -/**
51.679 - * Removes all output windows from a given media session.
51.680 - *
51.681 - * @param media The instance to remove all output windows from.
51.682 - *
51.683 - * @since 2.6.0
51.684 - */
51.685 -void purple_media_remove_output_windows(PurpleMedia *media);
51.686 -
51.687 -#ifdef __cplusplus
51.688 -}
51.689 -#endif
51.690 -
51.691 -G_END_DECLS
51.692 -
51.693 -#endif /* _PURPLE_MEDIA_H_ */
52.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/mediamanager.h Fri Aug 21 13:24:36 2009 -0700
52.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
52.3 @@ -1,223 +0,0 @@
52.4 -/**
52.5 - * @file mediamanager.h Media Manager API
52.6 - * @ingroup core
52.7 - */
52.8 -
52.9 -/* purple
52.10 - *
52.11 - * Purple is the legal property of its developers, whose names are too numerous
52.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
52.13 - * source distribution.
52.14 - *
52.15 - * This program is free software; you can redistribute it and/or modify
52.16 - * it under the terms of the GNU General Public License as published by
52.17 - * the Free Software Foundation; either version 2 of the License, or
52.18 - * (at your option) any later version.
52.19 - *
52.20 - * This program is distributed in the hope that it will be useful,
52.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
52.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52.23 - * GNU General Public License for more details.
52.24 - *
52.25 - * You should have received a copy of the GNU General Public License
52.26 - * along with this program; if not, write to the Free Software
52.27 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
52.28 - */
52.29 -
52.30 -#ifndef _PURPLE_MEDIA_MANAGER_H_
52.31 -#define _PURPLE_MEDIA_MANAGER_H_
52.32 -
52.33 -#include <glib.h>
52.34 -#include <glib-object.h>
52.35 -
52.36 -/** @copydoc _PurpleMediaManager */
52.37 -typedef struct _PurpleMediaManager PurpleMediaManager;
52.38 -/** @copydoc _PurpleMediaManagerClass */
52.39 -typedef struct _PurpleMediaManagerClass PurpleMediaManagerClass;
52.40 -
52.41 -#include "account.h"
52.42 -#include "media.h"
52.43 -
52.44 -G_BEGIN_DECLS
52.45 -
52.46 -#define PURPLE_TYPE_MEDIA_MANAGER (purple_media_manager_get_type())
52.47 -#define PURPLE_MEDIA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManager))
52.48 -#define PURPLE_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManagerClass))
52.49 -#define PURPLE_IS_MEDIA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA_MANAGER))
52.50 -#define PURPLE_IS_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_MANAGER))
52.51 -#define PURPLE_MEDIA_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManagerClass))
52.52 -
52.53 -#ifdef __cplusplus
52.54 -extern "C" {
52.55 -#endif
52.56 -
52.57 -/**************************************************************************/
52.58 -/** @name Media Manager API */
52.59 -/**************************************************************************/
52.60 -/*@{*/
52.61 -
52.62 -/**
52.63 - * Gets the media manager's GType.
52.64 - *
52.65 - * @return The media manager's GType.
52.66 - *
52.67 - * @since 2.6.0
52.68 - */
52.69 -GType purple_media_manager_get_type(void);
52.70 -
52.71 -/**
52.72 - * Gets the "global" media manager object. It's created if it doesn't already exist.
52.73 - *
52.74 - * @return The "global" instance of the media manager object.
52.75 - *
52.76 - * @since 2.6.0
52.77 - */
52.78 -PurpleMediaManager *purple_media_manager_get(void);
52.79 -
52.80 -/**
52.81 - * Creates a media session.
52.82 - *
52.83 - * @param manager The media manager to create the session under.
52.84 - * @param account The account to create the session on.
52.85 - * @param conference_type The conference type to feed into Farsight2.
52.86 - * @param remote_user The remote user to initiate the session with.
52.87 - *
52.88 - * @return A newly created media session.
52.89 - *
52.90 - * @since 2.6.0
52.91 - */
52.92 -PurpleMedia *purple_media_manager_create_media(PurpleMediaManager *manager,
52.93 - PurpleAccount *account,
52.94 - const char *conference_type,
52.95 - const char *remote_user,
52.96 - gboolean initiator);
52.97 -
52.98 -/**
52.99 - * Gets all of the media sessions.
52.100 - *
52.101 - * @param manager The media manager to get all of the sessions from.
52.102 - *
52.103 - * @return A list of all the media sessions.
52.104 - *
52.105 - * @since 2.6.0
52.106 - */
52.107 -GList *purple_media_manager_get_media(PurpleMediaManager *manager);
52.108 -
52.109 -/**
52.110 - * Gets all of the media sessions for a given account.
52.111 - *
52.112 - * @param manager The media manager to get the sessions from.
52.113 - * @param account The account the sessions are on.
52.114 - *
52.115 - * @return A list of the media sessions on the given account.
52.116 - *
52.117 - * @since 2.6.0
52.118 - */
52.119 -GList *purple_media_manager_get_media_by_account(
52.120 - PurpleMediaManager *manager, PurpleAccount *account);
52.121 -
52.122 -/**
52.123 - * Removes a media session from the media manager.
52.124 - *
52.125 - * @param manager The media manager to remove the media session from.
52.126 - * @param media The media session to remove.
52.127 - *
52.128 - * @since 2.6.0
52.129 - */
52.130 -void
52.131 -purple_media_manager_remove_media(PurpleMediaManager *manager,
52.132 - PurpleMedia *media);
52.133 -
52.134 -/**
52.135 - * Signals that output windows should be created for the chosen stream.
52.136 - *
52.137 - * This shouldn't be called outside of mediamanager.c and media.c
52.138 - *
52.139 - * @param manager Manager the output windows are registered with.
52.140 - * @param media Media session the output windows are registered for.
52.141 - * @param session_id The session the output windows are registered with.
52.142 - * @param participant The participant the output windows are registered with.
52.143 - *
52.144 - * @return TRUE if it succeeded, FALSE if it failed.
52.145 - *
52.146 - * @since 2.6.0
52.147 - */
52.148 -gboolean purple_media_manager_create_output_window(
52.149 - PurpleMediaManager *manager, PurpleMedia *media,
52.150 - const gchar *session_id, const gchar *participant);
52.151 -
52.152 -/**
52.153 - * Registers a video output window to be created for a given stream.
52.154 - *
52.155 - * @param manager The manager to register the output window with.
52.156 - * @param media The media instance to find the stream in.
52.157 - * @param session_id The session the stream is associated with.
52.158 - * @param participant The participant the stream is associated with.
52.159 - * @param window_id The window ID to embed the video in.
52.160 - *
52.161 - * @return A unique ID to the registered output window, 0 if it failed.
52.162 - *
52.163 - * @since 2.6.0
52.164 - */
52.165 -gulong purple_media_manager_set_output_window(PurpleMediaManager *manager,
52.166 - PurpleMedia *media, const gchar *session_id,
52.167 - const gchar *participant, gulong window_id);
52.168 -
52.169 -/**
52.170 - * Remove a previously registerd output window.
52.171 - *
52.172 - * @param manager The manager the output window was registered with.
52.173 - * @param output_window_id The ID of the output window.
52.174 - *
52.175 - * @return TRUE if it found the output window and was successful, else FALSE.
52.176 - *
52.177 - * @since 2.6.0
52.178 - */
52.179 -gboolean purple_media_manager_remove_output_window(
52.180 - PurpleMediaManager *manager, gulong output_window_id);
52.181 -
52.182 -/**
52.183 - * Remove all output windows for a given conference/session/participant/stream.
52.184 - *
52.185 - * @param manager The manager the output windows were registered with.
52.186 - * @param media The media instance the output windows were registered for.
52.187 - * @param session_id The session the output windows were registered for.
52.188 - * @param participant The participant the output windows were registered for.
52.189 - *
52.190 - * @since 2.6.0
52.191 - */
52.192 -void purple_media_manager_remove_output_windows(
52.193 - PurpleMediaManager *manager, PurpleMedia *media,
52.194 - const gchar *session_id, const gchar *participant);
52.195 -
52.196 -/**
52.197 - * Sets which media caps the UI supports.
52.198 - *
52.199 - * @param manager The manager to set the caps on.
52.200 - * @param caps The caps to set.
52.201 - *
52.202 - * @since 2.6.0
52.203 - */
52.204 -void purple_media_manager_set_ui_caps(PurpleMediaManager *manager,
52.205 - PurpleMediaCaps caps);
52.206 -
52.207 -/**
52.208 - * Gets which media caps the UI supports.
52.209 - *
52.210 - * @param manager The manager to get caps from.
52.211 - *
52.212 - * @return caps The caps retrieved.
52.213 - *
52.214 - * @since 2.6.0
52.215 - */
52.216 -PurpleMediaCaps purple_media_manager_get_ui_caps(PurpleMediaManager *manager);
52.217 -
52.218 -/*}@*/
52.219 -
52.220 -#ifdef __cplusplus
52.221 -}
52.222 -#endif
52.223 -
52.224 -G_END_DECLS
52.225 -
52.226 -#endif /* _PURPLE_MEDIA_MANAGER_H_ */
53.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/mime.h Fri Aug 21 13:24:36 2009 -0700
53.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
53.3 @@ -1,218 +0,0 @@
53.4 -/*
53.5 - * Purple
53.6 - *
53.7 - * Purple is the legal property of its developers, whose names are too
53.8 - * numerous to list here. Please refer to the COPYRIGHT file distributed
53.9 - * with this source distribution
53.10 - *
53.11 - * This program is free software; you can redistribute it and/or modify
53.12 - * it under the terms of the GNU General Public License as published by
53.13 - * the Free Software Foundation; either version 2 of the License, or (at
53.14 - * your option) any later version.
53.15 - *
53.16 - * This program is distributed in the hope that it will be useful, but
53.17 - * WITHOUT ANY WARRANTY; without even the implied warranty of
53.18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
53.19 - * General Public License for more details.
53.20 - *
53.21 - * You should have received a copy of the GNU General Public License
53.22 - * along with this program; if not, write to the Free Software
53.23 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301,
53.24 - * USA.
53.25 - */
53.26 -
53.27 -#ifndef _PURPLE_MIME_H
53.28 -#define _PURPLE_MIME_H
53.29 -
53.30 -#include <glib.h>
53.31 -
53.32 -#ifdef __cplusplus
53.33 -extern "C" {
53.34 -#endif
53.35 -
53.36 -/**
53.37 - * @file mime.h
53.38 - * @ingroup core
53.39 - *
53.40 - * Rudimentary parsing of multi-part MIME messages into more
53.41 - * accessible structures.
53.42 - */
53.43 -
53.44 -/**
53.45 - * A MIME document.
53.46 - */
53.47 -typedef struct _PurpleMimeDocument PurpleMimeDocument;
53.48 -
53.49 -/**
53.50 - * A part of a multipart MIME document.
53.51 - */
53.52 -typedef struct _PurpleMimePart PurpleMimePart;
53.53 -
53.54 -/**
53.55 - * Allocate an empty MIME document.
53.56 - */
53.57 -PurpleMimeDocument *purple_mime_document_new(void);
53.58 -
53.59 -/**
53.60 - * Frees memory used in a MIME document and all of its parts and fields
53.61 - *
53.62 - * @param doc The MIME document to free.
53.63 - */
53.64 -void purple_mime_document_free(PurpleMimeDocument *doc);
53.65 -
53.66 -/**
53.67 - * Parse a MIME document from a NUL-terminated string.
53.68 - *
53.69 - * @param buf The NULL-terminated string containing the MIME-encoded data.
53.70 - *
53.71 - * @returns A MIME document.
53.72 - */
53.73 -PurpleMimeDocument *purple_mime_document_parse(const char *buf);
53.74 -
53.75 -/**
53.76 - * Parse a MIME document from a string
53.77 - *
53.78 - * @param buf The string containing the MIME-encoded data.
53.79 - * @param len Length of buf.
53.80 - *
53.81 - * @returns A MIME document.
53.82 - */
53.83 -PurpleMimeDocument *purple_mime_document_parsen(const char *buf, gsize len);
53.84 -
53.85 -/**
53.86 - * Write (append) a MIME document onto a GString.
53.87 - */
53.88 -void purple_mime_document_write(PurpleMimeDocument *doc, GString *str);
53.89 -
53.90 -/**
53.91 - * The list of fields in the header of a document
53.92 - *
53.93 - * @param doc The MIME document.
53.94 - *
53.95 - * @constreturn A list of strings indicating the fields (but not the values
53.96 - * of the fields) in the header of doc.
53.97 - */
53.98 -GList *purple_mime_document_get_fields(PurpleMimeDocument *doc);
53.99 -
53.100 -/**
53.101 - * Get the value of a specific field in the header of a document.
53.102 - *
53.103 - * @param doc The MIME document.
53.104 - * @param field Case-insensitive field name.
53.105 - *
53.106 - * @returns Value associated with the indicated header field, or
53.107 - * NULL if the field doesn't exist.
53.108 - */
53.109 -const char *purple_mime_document_get_field(PurpleMimeDocument *doc,
53.110 - const char *field);
53.111 -
53.112 -/**
53.113 - * Set or replace the value of a specific field in the header of a
53.114 - * document.
53.115 - *
53.116 - * @param doc The MIME document.
53.117 - * @param field Case-insensitive field name.
53.118 - * @param value Value to associate with the indicated header field,
53.119 - * of NULL to remove the field.
53.120 - */
53.121 -void purple_mime_document_set_field(PurpleMimeDocument *doc,
53.122 - const char *field,
53.123 - const char *value);
53.124 -
53.125 -/**
53.126 - * The list of parts in a multipart document.
53.127 - *
53.128 - * @param doc The MIME document.
53.129 - *
53.130 - * @constreturn List of PurpleMimePart contained within doc.
53.131 - */
53.132 -GList *purple_mime_document_get_parts(PurpleMimeDocument *doc);
53.133 -
53.134 -/**
53.135 - * Create and insert a new part into a MIME document.
53.136 - *
53.137 - * @param doc The new part's parent MIME document.
53.138 - */
53.139 -PurpleMimePart *purple_mime_part_new(PurpleMimeDocument *doc);
53.140 -
53.141 -
53.142 -/**
53.143 - * The list of fields in the header of a document part.
53.144 - *
53.145 - * @param part The MIME document part.
53.146 - *
53.147 - * @constreturn List of strings indicating the fields (but not the values
53.148 - * of the fields) in the header of part.
53.149 - */
53.150 -GList *purple_mime_part_get_fields(PurpleMimePart *part);
53.151 -
53.152 -
53.153 -/**
53.154 - * Get the value of a specific field in the header of a document part.
53.155 - *
53.156 - * @param part The MIME document part.
53.157 - * @param field Case-insensitive name of the header field.
53.158 - *
53.159 - * @returns Value of the specified header field, or NULL if the
53.160 - * field doesn't exist.
53.161 - */
53.162 -const char *purple_mime_part_get_field(PurpleMimePart *part,
53.163 - const char *field);
53.164 -
53.165 -/**
53.166 - * Get the decoded value of a specific field in the header of a
53.167 - * document part.
53.168 - */
53.169 -char *purple_mime_part_get_field_decoded(PurpleMimePart *part,
53.170 - const char *field);
53.171 -
53.172 -/**
53.173 - * Set or replace the value of a specific field in the header of a
53.174 - * document.
53.175 - *
53.176 - * @param part The part of the MIME document.
53.177 - * @param field Case-insensitive field name
53.178 - * @param value Value to associate with the indicated header field,
53.179 - * of NULL to remove the field.
53.180 - */
53.181 -void purple_mime_part_set_field(PurpleMimePart *part,
53.182 - const char *field,
53.183 - const char *value);
53.184 -
53.185 -/**
53.186 - * Get the (possibly encoded) data portion of a MIME document part.
53.187 - *
53.188 - * @param part The MIME document part.
53.189 - *
53.190 - * @returns NULL-terminated data found in the document part
53.191 - */
53.192 -const char *purple_mime_part_get_data(PurpleMimePart *part);
53.193 -
53.194 -/**
53.195 - * Get the data portion of a MIME document part, after attempting to
53.196 - * decode it according to the content-transfer-encoding field. If the
53.197 - * specified encoding method is not supported, this function will
53.198 - * return NULL.
53.199 - *
53.200 - * @param part The MIME documemt part.
53.201 - * @param data Buffer for the data.
53.202 - * @param len The length of the buffer.
53.203 - */
53.204 -void purple_mime_part_get_data_decoded(PurpleMimePart *part,
53.205 - guchar **data, gsize *len);
53.206 -
53.207 -/**
53.208 - * Get the length of the data portion of a MIME document part.
53.209 - *
53.210 - * @param part The MIME document part.
53.211 - * @returns Length of the data in the document part.
53.212 - */
53.213 -gsize purple_mime_part_get_length(PurpleMimePart *part);
53.214 -
53.215 -void purple_mime_part_set_data(PurpleMimePart *part, const char *data);
53.216 -
53.217 -#ifdef __cplusplus
53.218 -}
53.219 -#endif
53.220 -
53.221 -#endif
54.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/msg.h Fri Aug 21 13:24:36 2009 -0700
54.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
54.3 @@ -1,350 +0,0 @@
54.4 -/**
54.5 - * @file msg.h Message functions
54.6 - *
54.7 - * purple
54.8 - *
54.9 - * Purple is the legal property of its developers, whose names are too numerous
54.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
54.11 - * source distribution.
54.12 - *
54.13 - * This program is free software; you can redistribute it and/or modify
54.14 - * it under the terms of the GNU General Public License as published by
54.15 - * the Free Software Foundation; either version 2 of the License, or
54.16 - * (at your option) any later version.
54.17 - *
54.18 - * This program is distributed in the hope that it will be useful,
54.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
54.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
54.21 - * GNU General Public License for more details.
54.22 - *
54.23 - * You should have received a copy of the GNU General Public License
54.24 - * along with this program; if not, write to the Free Software
54.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
54.26 - */
54.27 -#ifndef _MSN_MSG_H_
54.28 -#define _MSN_MSG_H_
54.29 -
54.30 -typedef struct _MsnMessage MsnMessage;
54.31 -
54.32 -#include "session.h"
54.33 -#include "user.h"
54.34 -
54.35 -#include "command.h"
54.36 -#include "transaction.h"
54.37 -
54.38 -typedef void (*MsnMsgCb)(MsnMessage *, void *data);
54.39 -
54.40 -#define MSG_BODY_DEM "\r\n\r\n"
54.41 -#define MSG_LINE_DEM "\r\n"
54.42 -
54.43 -#define MSG_OIM_BODY_DEM "\n\n"
54.44 -#define MSG_OIM_LINE_DEM "\n"
54.45 -
54.46 -/*
54.47 -typedef enum
54.48 -{
54.49 - MSN_MSG_NORMAL,
54.50 - MSN_MSG_SLP_SB,
54.51 - MSN_MSG_SLP_DC
54.52 -
54.53 -} MsnMsgType;
54.54 -*/
54.55 -
54.56 -typedef enum
54.57 -{
54.58 - MSN_MSG_UNKNOWN,
54.59 - MSN_MSG_TEXT,
54.60 - MSN_MSG_TYPING,
54.61 - MSN_MSG_CAPS,
54.62 - MSN_MSG_SLP,
54.63 - MSN_MSG_NUDGE
54.64 -
54.65 -} MsnMsgType;
54.66 -
54.67 -typedef enum
54.68 -{
54.69 - MSN_MSG_ERROR_NONE, /**< No error. */
54.70 - MSN_MSG_ERROR_TIMEOUT, /**< The message timedout. */
54.71 - MSN_MSG_ERROR_NAK, /**< The message could not be sent. */
54.72 - MSN_MSG_ERROR_SB, /**< The error comes from the switchboard. */
54.73 - MSN_MSG_ERROR_UNKNOWN /**< An unknown error occurred. */
54.74 -
54.75 -} MsnMsgErrorType;
54.76 -
54.77 -typedef struct
54.78 -{
54.79 - guint32 session_id;
54.80 - guint32 id;
54.81 - guint64 offset;
54.82 - guint64 total_size;
54.83 - guint32 length;
54.84 - guint32 flags;
54.85 - guint32 ack_id;
54.86 - guint32 ack_sub_id;
54.87 - guint64 ack_size;
54.88 -
54.89 -} MsnSlpHeader;
54.90 -
54.91 -typedef struct
54.92 -{
54.93 - guint32 value;
54.94 -
54.95 -} MsnSlpFooter;
54.96 -
54.97 -/**
54.98 - * A message.
54.99 - */
54.100 -struct _MsnMessage
54.101 -{
54.102 - size_t ref_count; /**< The reference count. */
54.103 -
54.104 - MsnMsgType type;
54.105 -
54.106 - gboolean msnslp_message;
54.107 -
54.108 - char *remote_user;
54.109 - char flag;
54.110 -
54.111 - char *content_type;
54.112 - char *charset;
54.113 - char *body;
54.114 - gsize body_len;
54.115 - guint total_chunks; /**< How many chunks in this multi-part message */
54.116 - guint received_chunks; /**< How many chunks we've received so far */
54.117 -
54.118 - MsnSlpHeader msnslp_header;
54.119 - MsnSlpFooter msnslp_footer;
54.120 -
54.121 - GHashTable *attr_table;
54.122 - GList *attr_list;
54.123 -
54.124 - gboolean ack_ref; /**< A flag that states if this message has
54.125 - been ref'ed for using it in a callback. */
54.126 -
54.127 - MsnCommand *cmd;
54.128 - MsnTransaction *trans;
54.129 -
54.130 - MsnMsgCb ack_cb; /**< The callback to call when we receive an ACK of this
54.131 - message. */
54.132 - MsnMsgCb nak_cb; /**< The callback to call when we receive a NAK of this
54.133 - message. */
54.134 - void *ack_data; /**< The data used by callbacks. */
54.135 -
54.136 - MsnMsgErrorType error; /**< The error of the message. */
54.137 -
54.138 - guint32 retries;
54.139 -};
54.140 -
54.141 -/**
54.142 - * Creates a new, empty message.
54.143 - *
54.144 - * @return A new message.
54.145 - */
54.146 -MsnMessage *msn_message_new(MsnMsgType type);
54.147 -
54.148 -/**
54.149 - * Creates a new, empty MSNSLP message.
54.150 - *
54.151 - * @return A new MSNSLP message.
54.152 - */
54.153 -MsnMessage *msn_message_new_msnslp(void);
54.154 -
54.155 -/**
54.156 - * Creates a new nudge message.
54.157 - *
54.158 - * @return A new nudge message.
54.159 - */
54.160 -MsnMessage *msn_message_new_nudge(void);
54.161 -
54.162 -/**
54.163 - * Creates a new plain message.
54.164 - *
54.165 - * @return A new plain message.
54.166 - */
54.167 -MsnMessage *msn_message_new_plain(const char *message);
54.168 -
54.169 -/**
54.170 - * Creates a MSNSLP ack message.
54.171 - *
54.172 - * @param acked_msg The message to acknowledge.
54.173 - *
54.174 - * @return A new MSNSLP ack message.
54.175 - */
54.176 -MsnMessage *msn_message_new_msnslp_ack(MsnMessage *acked_msg);
54.177 -
54.178 -/**
54.179 - * Creates a new message based off a command.
54.180 - *
54.181 - * @param session The MSN session.
54.182 - * @param cmd The command.
54.183 - *
54.184 - * @return The new message.
54.185 - */
54.186 -MsnMessage *msn_message_new_from_cmd(MsnSession *session, MsnCommand *cmd);
54.187 -
54.188 -/**
54.189 - * Parses the payload of a message.
54.190 - *
54.191 - * @param msg The message.
54.192 - * @param payload The payload.
54.193 - * @param payload_len The length of the payload.
54.194 - */
54.195 -void msn_message_parse_payload(MsnMessage *msg, const char *payload,
54.196 - size_t payload_len,
54.197 - const char *line_dem,const char *body_dem);
54.198 -
54.199 -/**
54.200 - * Destroys a message.
54.201 - *
54.202 - * @param msg The message to destroy.
54.203 - */
54.204 -void msn_message_destroy(MsnMessage *msg);
54.205 -
54.206 -/**
54.207 - * Increments the reference count on a message.
54.208 - *
54.209 - * @param msg The message.
54.210 - *
54.211 - * @return @a msg
54.212 - */
54.213 -MsnMessage *msn_message_ref(MsnMessage *msg);
54.214 -
54.215 -/**
54.216 - * Decrements the reference count on a message.
54.217 - *
54.218 - * This will destroy the structure if the count hits 0.
54.219 - *
54.220 - * @param msg The message.
54.221 - *
54.222 - * @return @a msg, or @c NULL if the new count is 0.
54.223 - */
54.224 -MsnMessage *msn_message_unref(MsnMessage *msg);
54.225 -
54.226 -/**
54.227 - * Generates the payload data of a message.
54.228 - *
54.229 - * @param msg The message.
54.230 - * @param ret_size The returned size of the payload.
54.231 - *
54.232 - * @return The payload data of the message.
54.233 - */
54.234 -char *msn_message_gen_payload(MsnMessage *msg, size_t *ret_size);
54.235 -
54.236 -/**
54.237 - * Sets the flag for an outgoing message.
54.238 - *
54.239 - * @param msg The message.
54.240 - * @param flag The flag.
54.241 - */
54.242 -void msn_message_set_flag(MsnMessage *msg, char flag);
54.243 -
54.244 -/**
54.245 - * Returns the flag for an outgoing message.
54.246 - *
54.247 - * @param msg The message.
54.248 - *
54.249 - * @return The flag.
54.250 - */
54.251 -char msn_message_get_flag(const MsnMessage *msg);
54.252 -
54.253 -/**
54.254 - * Sets the binary content of the message.
54.255 - *
54.256 - * @param msg The message.
54.257 - * @param data The binary data.
54.258 - * @param len The length of the data.
54.259 - */
54.260 -void msn_message_set_bin_data(MsnMessage *msg, const void *data, size_t len);
54.261 -
54.262 -/**
54.263 - * Returns the binary content of the message.
54.264 - *
54.265 - * @param msg The message.
54.266 - * @param len The returned length of the data.
54.267 - *
54.268 - * @return The binary data.
54.269 - */
54.270 -const void *msn_message_get_bin_data(const MsnMessage *msg, size_t *len);
54.271 -
54.272 -/**
54.273 - * Sets the content type in a message.
54.274 - *
54.275 - * @param msg The message.
54.276 - * @param type The content-type.
54.277 - */
54.278 -void msn_message_set_content_type(MsnMessage *msg, const char *type);
54.279 -
54.280 -/**
54.281 - * Returns the content type in a message.
54.282 - *
54.283 - * @param msg The message.
54.284 - *
54.285 - * @return The content-type.
54.286 - */
54.287 -const char *msn_message_get_content_type(const MsnMessage *msg);
54.288 -
54.289 -/**
54.290 - * Sets the charset in a message.
54.291 - *
54.292 - * @param msg The message.
54.293 - * @param charset The charset.
54.294 - */
54.295 -void msn_message_set_charset(MsnMessage *msg, const char *charset);
54.296 -
54.297 -/**
54.298 - * Returns the charset in a message.
54.299 - *
54.300 - * @param msg The message.
54.301 - *
54.302 - * @return The charset.
54.303 - */
54.304 -const char *msn_message_get_charset(const MsnMessage *msg);
54.305 -
54.306 -/**
54.307 - * Sets an attribute in a message.
54.308 - *
54.309 - * @param msg The message.
54.310 - * @param attr The attribute name.
54.311 - * @param value The attribute value.
54.312 - */
54.313 -void msn_message_set_attr(MsnMessage *msg, const char *attr,
54.314 - const char *value);
54.315 -
54.316 -/**
54.317 - * Returns an attribute from a message.
54.318 - *
54.319 - * @param msg The message.
54.320 - * @param attr The attribute.
54.321 - *
54.322 - * @return The value, or @c NULL if not found.
54.323 - */
54.324 -const char *msn_message_get_attr(const MsnMessage *msg, const char *attr);
54.325 -
54.326 -/**
54.327 - * Parses the body and returns it in the form of a hashtable.
54.328 - *
54.329 - * @param msg The message.
54.330 - *
54.331 - * @return The resulting hashtable.
54.332 - */
54.333 -GHashTable *msn_message_get_hashtable_from_body(const MsnMessage *msg);
54.334 -
54.335 -void msn_message_show_readable(MsnMessage *msg, const char *info,
54.336 - gboolean text_body);
54.337 -
54.338 -void msn_message_parse_slp_body(MsnMessage *msg, const char *body,
54.339 - size_t len);
54.340 -
54.341 -char *msn_message_gen_slp_body(MsnMessage *msg, size_t *ret_size);
54.342 -
54.343 -char *msn_message_to_string(MsnMessage *msg);
54.344 -
54.345 -void msn_plain_msg(MsnCmdProc *cmdproc, MsnMessage *msg);
54.346 -
54.347 -void msn_control_msg(MsnCmdProc *cmdproc, MsnMessage *msg);
54.348 -
54.349 -void msn_datacast_msg(MsnCmdProc *cmdproc, MsnMessage *msg);
54.350 -
54.351 -void msn_handwritten_msg(MsnCmdProc *cmdproc, MsnMessage *msg);
54.352 -
54.353 -#endif /* _MSN_MSG_H_ */
55.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/msn.h Fri Aug 21 13:24:36 2009 -0700
55.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
55.3 @@ -1,140 +0,0 @@
55.4 -/**
55.5 - * @file msn.h The MSN protocol plugin
55.6 - *
55.7 - * purple
55.8 - *
55.9 - * Purple is the legal property of its developers, whose names are too numerous
55.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
55.11 - * source distribution.
55.12 - *
55.13 - * This program is free software; you can redistribute it and/or modify
55.14 - * it under the terms of the GNU General Public License as published by
55.15 - * the Free Software Foundation; either version 2 of the License, or
55.16 - * (at your option) any later version.
55.17 - *
55.18 - * This program is distributed in the hope that it will be useful,
55.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
55.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
55.21 - * GNU General Public License for more details.
55.22 - *
55.23 - * You should have received a copy of the GNU General Public License
55.24 - * along with this program; if not, write to the Free Software
55.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
55.26 - */
55.27 -#ifndef _MSN_H_
55.28 -#define _MSN_H_
55.29 -
55.30 -#include "internal.h"
55.31 -
55.32 -#include "account.h"
55.33 -#include "accountopt.h"
55.34 -#include "blist.h"
55.35 -#include "connection.h"
55.36 -#include "conversation.h"
55.37 -#include "debug.h"
55.38 -#include "cipher.h"
55.39 -#include "notify.h"
55.40 -#include "privacy.h"
55.41 -#include "proxy.h"
55.42 -#include "prpl.h"
55.43 -#include "request.h"
55.44 -#include "servconn.h"
55.45 -#include "sslconn.h"
55.46 -#include "util.h"
55.47 -
55.48 -#include "ft.h"
55.49 -
55.50 -#include "msg.h"
55.51 -
55.52 -#define MSN_BUF_LEN 8192
55.53 -
55.54 -/* Windows Live Messenger Server*/
55.55 -#define MSN_SERVER "messenger.hotmail.com"
55.56 -#define MSN_HTTPCONN_SERVER "gateway.messenger.hotmail.com"
55.57 -#define MSN_PORT 1863
55.58 -#define WLM_PROT_VER 15
55.59 -
55.60 -#define WLM_MAX_PROTOCOL 15
55.61 -#define WLM_MIN_PROTOCOL 15
55.62 -
55.63 -#define MSN_TYPING_RECV_TIMEOUT 6
55.64 -#define MSN_TYPING_SEND_TIMEOUT 4
55.65 -
55.66 -#define PROFILE_URL "http://spaces.live.com/profile.aspx?mem="
55.67 -#define PHOTO_URL " contactparams:photopreauthurl=\""
55.68 -
55.69 -#define BUDDY_ALIAS_MAXLEN 387
55.70 -
55.71 -#define MSN_CAM_GUID "4BD96FC0-AB17-4425-A14A-439185962DC8"
55.72 -#define MSN_CAM_REQUEST_GUID "1C9AA97E-9C05-4583-A3BD-908A196F1E92"
55.73 -#define MSN_FT_GUID "5D3E02AB-6190-11D3-BBBB-00C04F795683"
55.74 -#define MSN_OBJ_GUID "A4268EEC-FEC5-49E5-95C3-F126696BDBF6"
55.75 -
55.76 -#define MSN_CLIENTINFO \
55.77 - "Client-Name: Purple/" VERSION "\r\n" \
55.78 - "Chat-Logging: Y\r\n"
55.79 -
55.80 -/* Index into attention_types */
55.81 -#define MSN_NUDGE 0
55.82 -
55.83 -typedef enum
55.84 -{
55.85 - MSN_LIST_FL_OP = 0x01,
55.86 - MSN_LIST_AL_OP = 0x02,
55.87 - MSN_LIST_BL_OP = 0x04,
55.88 - MSN_LIST_RL_OP = 0x08,
55.89 - MSN_LIST_PL_OP = 0x10
55.90 -
55.91 -} MsnListOp;
55.92 -#define MSN_LIST_OP_MASK 0x07
55.93 -
55.94 -typedef enum
55.95 -{
55.96 - MSN_CLIENT_CAP_WIN_MOBILE = 0x000001,
55.97 - MSN_CLIENT_CAP_INK_GIF = 0x000004,
55.98 - MSN_CLIENT_CAP_INK_ISF = 0x000008,
55.99 - MSN_CLIENT_CAP_VIDEO_CHAT = 0x000010,
55.100 - MSN_CLIENT_CAP_PACKET = 0x000020,
55.101 - MSN_CLIENT_CAP_MSNMOBILE = 0x000040,
55.102 - MSN_CLIENT_CAP_MSNDIRECT = 0x000080,
55.103 - MSN_CLIENT_CAP_WEBMSGR = 0x000200,
55.104 - MSN_CLIENT_CAP_TGW = 0x000800,
55.105 - MSN_CLIENT_CAP_SPACE = 0x001000,
55.106 - MSN_CLIENT_CAP_MCE = 0x002000,
55.107 - MSN_CLIENT_CAP_DIRECTIM = 0x004000,
55.108 - MSN_CLIENT_CAP_WINKS = 0x008000,
55.109 - MSN_CLIENT_CAP_SEARCH = 0x010000,
55.110 - MSN_CLIENT_CAP_BOT = 0x020000,
55.111 - MSN_CLIENT_CAP_VOICEIM = 0x040000,
55.112 - MSN_CLIENT_CAP_SCHANNEL = 0x080000,
55.113 - MSN_CLIENT_CAP_SIP_INVITE = 0x100000,
55.114 - MSN_CLIENT_CAP_SDRIVE = 0x400000
55.115 -
55.116 -} MsnClientCaps;
55.117 -
55.118 -typedef enum
55.119 -{
55.120 - MSN_CLIENT_VER_5_0 = 0x00,
55.121 - MSN_CLIENT_VER_6_0 = 0x10, /* MSNC1 */
55.122 - MSN_CLIENT_VER_6_1 = 0x20, /* MSNC2 */
55.123 - MSN_CLIENT_VER_6_2 = 0x30, /* MSNC3 */
55.124 - MSN_CLIENT_VER_7_0 = 0x40, /* MSNC4 */
55.125 - MSN_CLIENT_VER_7_5 = 0x50, /* MSNC5 */
55.126 - MSN_CLIENT_VER_8_0 = 0x60, /* MSNC6 */
55.127 - MSN_CLIENT_VER_8_1 = 0x70, /* MSNC7 */
55.128 - MSN_CLIENT_VER_8_5 = 0x80 /* MSNC8 */
55.129 -
55.130 -} MsnClientVerId;
55.131 -
55.132 -#define MSN_CLIENT_ID_VERSION MSN_CLIENT_VER_7_0
55.133 -#define MSN_CLIENT_ID_CAPABILITIES (MSN_CLIENT_CAP_PACKET|MSN_CLIENT_CAP_INK_GIF|MSN_CLIENT_CAP_VOICEIM|MSN_CLIENT_CAP_WINKS)
55.134 -
55.135 -#define MSN_CLIENT_ID \
55.136 - ((MSN_CLIENT_ID_VERSION << 24) | \
55.137 - (MSN_CLIENT_ID_CAPABILITIES))
55.138 -
55.139 -void msn_act_id(PurpleConnection *gc, const char *entry);
55.140 -void msn_send_privacy(PurpleConnection *gc);
55.141 -void msn_send_im_message(MsnSession *session, MsnMessage *msg);
55.142 -
55.143 -#endif /* _MSN_H_ */
56.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/msn_intl.h Fri Aug 21 13:24:36 2009 -0700
56.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
56.3 @@ -1,45 +0,0 @@
56.4 -/**
56.5 - * Copyright (C) 2008 Felipe Contreras
56.6 - *
56.7 - * Purple is the legal property of its developers, whose names are too numerous
56.8 - * to list here. Please refer to the COPYRIGHT file distributed with this
56.9 - * source distribution.
56.10 - *
56.11 - * This program is free software; you can redistribute it and/or modify
56.12 - * it under the terms of the GNU General Public License as published by
56.13 - * the Free Software Foundation; either version 2 of the License, or
56.14 - * (at your option) any later version.
56.15 - *
56.16 - * This program is distributed in the hope that it will be useful,
56.17 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
56.18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56.19 - * GNU General Public License for more details.
56.20 - *
56.21 - * You should have received a copy of the GNU General Public License
56.22 - * along with this program; if not, write to the Free Software
56.23 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
56.24 - */
56.25 -
56.26 -#ifndef MSN_INTL_H
56.27 -#define MSN_INTL_H
56.28 -
56.29 -#ifdef ENABLE_NLS
56.30 -# include <locale.h>
56.31 -# include <libintl.h>
56.32 -# define _(String) ((const char *)dgettext(PACKAGE, String))
56.33 -# ifdef gettext_noop
56.34 -# define N_(String) gettext_noop (String)
56.35 -# else
56.36 -# define N_(String) (String)
56.37 -# endif
56.38 -#else
56.39 -# include <locale.h>
56.40 -# define N_(String) (String)
56.41 -# ifndef _
56.42 -# define _(String) ((const char *)String)
56.43 -# endif
56.44 -# define ngettext(Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural))
56.45 -# define dngettext(Domain, Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural))
56.46 -#endif
56.47 -
56.48 -#endif /* MSN_INTL_H */
57.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/msnutils.h Fri Aug 21 13:24:36 2009 -0700
57.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
57.3 @@ -1,60 +0,0 @@
57.4 -/**
57.5 - * @file msnutils.h Utility functions
57.6 - *
57.7 - * purple
57.8 - *
57.9 - * Purple is the legal property of its developers, whose names are too numerous
57.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
57.11 - * source distribution.
57.12 - *
57.13 - * This program is free software; you can redistribute it and/or modify
57.14 - * it under the terms of the GNU General Public License as published by
57.15 - * the Free Software Foundation; either version 2 of the License, or
57.16 - * (at your option) any later version.
57.17 - *
57.18 - * This program is distributed in the hope that it will be useful,
57.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
57.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57.21 - * GNU General Public License for more details.
57.22 - *
57.23 - * You should have received a copy of the GNU General Public License
57.24 - * along with this program; if not, write to the Free Software
57.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
57.26 - */
57.27 -#ifndef _MSN_UTILS_H_
57.28 -#define _MSN_UTILS_H_
57.29 -
57.30 -/*encode the str to RFC2047 style*/
57.31 -char * msn_encode_mime(const char *str);
57.32 -
57.33 -/**
57.34 - * Generate the Random GUID
57.35 - */
57.36 -char * rand_guid(void);
57.37 -
57.38 -/**
57.39 - * Parses the MSN message formatting into a format compatible with Purple.
57.40 - *
57.41 - * @param mime The mime header with the formatting.
57.42 - * @param pre_ret The returned prefix string.
57.43 - * @param post_ret The returned postfix string.
57.44 - *
57.45 - * @return The new message.
57.46 - */
57.47 -void msn_parse_format(const char *mime, char **pre_ret, char **post_ret);
57.48 -
57.49 -/**
57.50 - * Parses the Purple message formatting (html) into the MSN format.
57.51 - *
57.52 - * @param html The html message to format.
57.53 - * @param attributes The returned attributes string.
57.54 - * @param message The returned message string.
57.55 - *
57.56 - * @return The new message.
57.57 - */
57.58 -void msn_import_html(const char *html, char **attributes, char **message);
57.59 -
57.60 -void msn_parse_socket(const char *str, char **ret_host, int *ret_port);
57.61 -void msn_handle_chl(char *input, char *output);
57.62 -
57.63 -#endif /* _MSN_UTILS_H_ */
58.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/nat-pmp.h Fri Aug 21 13:24:36 2009 -0700
58.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
58.3 @@ -1,77 +0,0 @@
58.4 -/**
58.5 - * @file nat-pmp.h NAT-PMP Implementation
58.6 - * @ingroup core
58.7 - */
58.8 -
58.9 -/* purple
58.10 - *
58.11 - * Purple is the legal property of its developers, whose names are too numerous
58.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
58.13 - * source distribution.
58.14 - *
58.15 - * Most code in nat-pmp.h copyright (C) 2007, R. Tyler Ballance, bleep, LLC.
58.16 - * This file is distributed under the 3-clause (modified) BSD license:
58.17 - * Redistribution and use in source and binary forms, with or without modification, are permitted
58.18 - * provided that the following conditions are met:
58.19 - *
58.20 - * Redistributions of source code must retain the above copyright notice, this list of conditions and
58.21 - * the following disclaimer.
58.22 - * Neither the name of the bleep. LLC nor the names of its contributors may be used to endorse or promote
58.23 - * products derived from this software without specific prior written permission.
58.24 - *
58.25 - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
58.26 - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
58.27 - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
58.28 - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
58.29 - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
58.30 - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
58.31 - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
58.32 - * OF SUCH DAMAGE.
58.33 - */
58.34 -
58.35 -#ifndef _PURPLE_NAT_PMP_H
58.36 -#define _PURPLE_NAT_PMP_H
58.37 -
58.38 -#include <glib.h>
58.39 -
58.40 -#define PURPLE_PMP_LIFETIME 3600 /* 3600 seconds */
58.41 -
58.42 -typedef enum {
58.43 - PURPLE_PMP_TYPE_UDP,
58.44 - PURPLE_PMP_TYPE_TCP
58.45 -} PurplePmpType;
58.46 -
58.47 -/**
58.48 - * Initialize nat-pmp
58.49 - */
58.50 -void purple_pmp_init(void);
58.51 -
58.52 -/**
58.53 - *
58.54 - */
58.55 -char *purple_pmp_get_public_ip(void);
58.56 -
58.57 -/**
58.58 - * Remove the NAT-PMP mapping for a specified type on a specified port
58.59 - *
58.60 - * @param type The PurplePmpType
58.61 - * @param privateport The private port on which we are listening locally
58.62 - * @param publicport The public port on which we are expecting a response
58.63 - * @param lifetime The lifetime of the mapping. It is recommended that this be PURPLE_PMP_LIFETIME.
58.64 - *
58.65 - * @returns TRUE if succesful; FALSE if unsuccessful
58.66 - */
58.67 -gboolean purple_pmp_create_map(PurplePmpType type, unsigned short privateport, unsigned short publicport, int lifetime);
58.68 -
58.69 -/**
58.70 - * Remove the NAT-PMP mapping for a specified type on a specified port
58.71 - *
58.72 - * @param type The PurplePmpType
58.73 - * @param privateport The private port on which the mapping was previously made
58.74 - *
58.75 - * @returns TRUE if succesful; FALSE if unsuccessful
58.76 - */
58.77 -gboolean purple_pmp_destroy_map(PurplePmpType type, unsigned short privateport);
58.78 -
58.79 -#endif
58.80 -
59.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/network.h Fri Aug 21 13:24:36 2009 -0700
59.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
59.3 @@ -1,305 +0,0 @@
59.4 -/**
59.5 - * @file network.h Network API
59.6 - * @ingroup core
59.7 - */
59.8 -
59.9 -/* purple
59.10 - *
59.11 - * Purple is the legal property of its developers, whose names are too numerous
59.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
59.13 - * source distribution.
59.14 - *
59.15 - * This program is free software; you can redistribute it and/or modify
59.16 - * it under the terms of the GNU General Public License as published by
59.17 - * the Free Software Foundation; either version 2 of the License, or
59.18 - * (at your option) any later version.
59.19 - *
59.20 - * This program is distributed in the hope that it will be useful,
59.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
59.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
59.23 - * GNU General Public License for more details.
59.24 - *
59.25 - * You should have received a copy of the GNU General Public License
59.26 - * along with this program; if not, write to the Free Software
59.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
59.28 - */
59.29 -#ifndef _PURPLE_NETWORK_H_
59.30 -#define _PURPLE_NETWORK_H_
59.31 -
59.32 -#ifdef __cplusplus
59.33 -extern "C" {
59.34 -#endif
59.35 -
59.36 -/**************************************************************************/
59.37 -/** @name Network API */
59.38 -/**************************************************************************/
59.39 -/*@{*/
59.40 -
59.41 -typedef struct _PurpleNetworkListenData PurpleNetworkListenData;
59.42 -
59.43 -typedef void (*PurpleNetworkListenCallback) (int listenfd, gpointer data);
59.44 -
59.45 -/**
59.46 - * Converts a dot-decimal IP address to an array of unsigned
59.47 - * chars. For example, converts 192.168.0.1 to a 4 byte
59.48 - * array containing 192, 168, 0 and 1.
59.49 - *
59.50 - * @param ip An IP address in dot-decimal notiation.
59.51 - * @return An array of 4 bytes containing an IP addresses
59.52 - * equivalent to the given parameter, or NULL if
59.53 - * the given IP address is invalid. This value
59.54 - * is statically allocated and should not be
59.55 - * freed.
59.56 - */
59.57 -const unsigned char *purple_network_ip_atoi(const char *ip);
59.58 -
59.59 -/**
59.60 - * Sets the IP address of the local system in preferences. This
59.61 - * is the IP address that should be used for incoming connections
59.62 - * (file transfer, direct IM, etc.) and should therefore be
59.63 - * publicly accessible.
59.64 - *
59.65 - * @param ip The local IP address.
59.66 - */
59.67 -void purple_network_set_public_ip(const char *ip);
59.68 -
59.69 -/**
59.70 - * Returns the IP address of the local system set in preferences.
59.71 - *
59.72 - * This returns the value set via purple_network_set_public_ip().
59.73 - * You probably want to use purple_network_get_my_ip() instead.
59.74 - *
59.75 - * @return The local IP address set in preferences.
59.76 - */
59.77 -const char *purple_network_get_public_ip(void);
59.78 -
59.79 -/**
59.80 - * Returns the IP address of the local system.
59.81 - *
59.82 - * You probably want to use purple_network_get_my_ip() instead.
59.83 - *
59.84 - * @note The returned string is a pointer to a static buffer. If this
59.85 - * function is called twice, it may be important to make a copy
59.86 - * of the returned string.
59.87 - *
59.88 - * @param fd The fd to use to help figure out the IP, or else -1.
59.89 - * @return The local IP address.
59.90 - */
59.91 -const char *purple_network_get_local_system_ip(int fd);
59.92 -
59.93 -/**
59.94 - * Returns the IP address that should be used anywhere a
59.95 - * public IP addresses is needed (listening for an incoming
59.96 - * file transfer, etc).
59.97 - *
59.98 - * If the user has manually specified an IP address via
59.99 - * preferences, then this IP is returned. Otherwise the
59.100 - * IP address returned by purple_network_get_local_system_ip()
59.101 - * is returned.
59.102 - *
59.103 - * @note The returned string is a pointer to a static buffer. If this
59.104 - * function is called twice, it may be important to make a copy
59.105 - * of the returned string.
59.106 - *
59.107 - * @param fd The fd to use to help figure out the IP, or -1.
59.108 - * @return The local IP address to be used.
59.109 - */
59.110 -const char *purple_network_get_my_ip(int fd);
59.111 -
59.112 -/**
59.113 - * Should calls to purple_network_listen() and purple_network_listen_range()
59.114 - * map the port externally using NAT-PMP or UPnP?
59.115 - * The default value is TRUE
59.116 - *
59.117 - * @param map_external Should the open port be mapped externally?
59.118 - * @deprecated In 3.0.0 a boolean will be added to the above functions to
59.119 - * perform the same function.
59.120 - * @since 2.3.0
59.121 - */
59.122 -void purple_network_listen_map_external(gboolean map_external);
59.123 -
59.124 -/**
59.125 - * Attempts to open a listening port ONLY on the specified port number.
59.126 - * You probably want to use purple_network_listen_range() instead of this.
59.127 - * This function is useful, for example, if you wanted to write a telnet
59.128 - * server as a Purple plugin, and you HAD to listen on port 23. Why anyone
59.129 - * would want to do that is beyond me.
59.130 - *
59.131 - * This opens a listening port. The caller will want to set up a watcher
59.132 - * of type PURPLE_INPUT_READ on the fd returned in cb. It will probably call
59.133 - * accept in the watcher callback, and then possibly remove the watcher and close
59.134 - * the listening socket, and add a new watcher on the new socket accept
59.135 - * returned.
59.136 - *
59.137 - * @param port The port number to bind to. Must be greater than 0.
59.138 - * @param socket_type The type of socket to open for listening.
59.139 - * This will be either SOCK_STREAM for TCP or SOCK_DGRAM for UDP.
59.140 - * @param cb The callback to be invoked when the port to listen on is available.
59.141 - * The file descriptor of the listening socket will be specified in
59.142 - * this callback, or -1 if no socket could be established.
59.143 - * @param cb_data extra data to be returned when cb is called
59.144 - *
59.145 - * @return A pointer to a data structure that can be used to cancel
59.146 - * the pending listener, or NULL if unable to obtain a local
59.147 - * socket to listen on.
59.148 - */
59.149 -PurpleNetworkListenData *purple_network_listen(unsigned short port,
59.150 - int socket_type, PurpleNetworkListenCallback cb, gpointer cb_data);
59.151 -
59.152 -/**
59.153 - * Opens a listening port selected from a range of ports. The range of
59.154 - * ports used is chosen in the following manner:
59.155 - * If a range is specified in preferences, these values are used.
59.156 - * If a non-0 values are passed to the function as parameters, these
59.157 - * values are used.
59.158 - * Otherwise a port is chosen at random by the operating system.
59.159 - *
59.160 - * This opens a listening port. The caller will want to set up a watcher
59.161 - * of type PURPLE_INPUT_READ on the fd returned in cb. It will probably call
59.162 - * accept in the watcher callback, and then possibly remove the watcher and close
59.163 - * the listening socket, and add a new watcher on the new socket accept
59.164 - * returned.
59.165 - *
59.166 - * @param start The port number to bind to, or 0 to pick a random port.
59.167 - * Users are allowed to override this arg in prefs.
59.168 - * @param end The highest possible port in the range of ports to listen on,
59.169 - * or 0 to pick a random port. Users are allowed to override this
59.170 - * arg in prefs.
59.171 - * @param socket_type The type of socket to open for listening.
59.172 - * This will be either SOCK_STREAM for TCP or SOCK_DGRAM for UDP.
59.173 - * @param cb The callback to be invoked when the port to listen on is available.
59.174 - * The file descriptor of the listening socket will be specified in
59.175 - * this callback, or -1 if no socket could be established.
59.176 - * @param cb_data extra data to be returned when cb is called
59.177 - *
59.178 - * @return A pointer to a data structure that can be used to cancel
59.179 - * the pending listener, or NULL if unable to obtain a local
59.180 - * socket to listen on.
59.181 - */
59.182 -PurpleNetworkListenData *purple_network_listen_range(unsigned short start,
59.183 - unsigned short end, int socket_type,
59.184 - PurpleNetworkListenCallback cb, gpointer cb_data);
59.185 -
59.186 -/**
59.187 - * This can be used to cancel any in-progress listener connection
59.188 - * by passing in the return value from either purple_network_listen()
59.189 - * or purple_network_listen_range().
59.190 - *
59.191 - * @param listen_data This listener attempt will be canceled and
59.192 - * the struct will be freed.
59.193 - */
59.194 -void purple_network_listen_cancel(PurpleNetworkListenData *listen_data);
59.195 -
59.196 -/**
59.197 - * Gets a port number from a file descriptor.
59.198 - *
59.199 - * @param fd The file descriptor. This should be a tcp socket. The current
59.200 - * implementation probably dies on anything but IPv4. Perhaps this
59.201 - * possible bug will inspire new and valuable contributors to Purple.
59.202 - * @return The port number, in host byte order.
59.203 - */
59.204 -unsigned short purple_network_get_port_from_fd(int fd);
59.205 -
59.206 -/**
59.207 - * Detects if there is an available network connection.
59.208 - *
59.209 - * @return TRUE if the network is available
59.210 - */
59.211 -gboolean purple_network_is_available(void);
59.212 -
59.213 -/**
59.214 - * Makes purple_network_is_available() always return @c TRUE.
59.215 - *
59.216 - * This is what backs the --force-online command line argument in Pidgin,
59.217 - * for example. This is useful for offline testing, especially when
59.218 - * combined with nullprpl.
59.219 - *
59.220 - * @since 2.6.0
59.221 - */
59.222 -void purple_network_force_online(void);
59.223 -
59.224 -/**
59.225 - * Get the handle for the network system
59.226 - *
59.227 - * @return the handle to the network system
59.228 - */
59.229 -void *purple_network_get_handle(void);
59.230 -
59.231 -/**
59.232 - * Update the STUN server IP given the host name
59.233 - * Will result in a DNS query being executed asynchronous
59.234 - *
59.235 - * @param stun_server The host name of the STUN server to set
59.236 - * @since 2.6.0
59.237 - */
59.238 -void purple_network_set_stun_server(const gchar *stun_server);
59.239 -
59.240 -/**
59.241 - * Get the IP address of the STUN server as a string representation
59.242 - *
59.243 - * @return the IP address
59.244 - * @since 2.6.0
59.245 - */
59.246 -const gchar *purple_network_get_stun_ip(void);
59.247 -
59.248 -/**
59.249 - * Update the TURN server IP given the host name
59.250 - * Will result in a DNS query being executed asynchronous
59.251 - *
59.252 - * @param turn_server The host name of the TURN server to set
59.253 - * @since 2.6.0
59.254 - */
59.255 -void purple_network_set_turn_server(const gchar *turn_server);
59.256 -
59.257 -/**
59.258 - * Get the IP address of the STUN server as a string representation
59.259 - *
59.260 - * @return the IP address
59.261 - * @since 2.6.0
59.262 - */
59.263 -const gchar *purple_network_get_turn_ip(void);
59.264 -
59.265 -/**
59.266 - * Remove a port mapping (UPnP or NAT-PMP) associated with listening socket
59.267 - *
59.268 - * @param fd Socket to remove the port mapping for
59.269 - * @since 2.6.0
59.270 - */
59.271 -void purple_network_remove_port_mapping(gint fd);
59.272 -
59.273 -/**
59.274 - * Convert a UTF-8 domain name to ASCII in accordance with the IDNA
59.275 - * specification. If libpurple is compiled without IDN support, this function
59.276 - * copies the input into the output buffer.
59.277 - *
59.278 - * Because this function is used by DNS resolver child/threads, it uses no
59.279 - * other libpurple API and is threadsafe.
59.280 - *
59.281 - * In general, a buffer of about 512 bytes is the appropriate size to use.
59.282 - *
59.283 - * @param in The hostname to be converted.
59.284 - * @param out The output buffer where an allocated string will be returned.
59.285 - * The caller is responsible for freeing this.
59.286 - * @returns 0 on success, -1 if the out is NULL, or an error code
59.287 - * that currently corresponds to the Idna_rc enum in libidn.
59.288 - * @since 2.6.0
59.289 - */
59.290 -int purple_network_convert_idn_to_ascii(const gchar *in, gchar **out);
59.291 -
59.292 -/**
59.293 - * Initializes the network subsystem.
59.294 - */
59.295 -void purple_network_init(void);
59.296 -
59.297 -/**
59.298 - * Shuts down the network subsystem.
59.299 - */
59.300 -void purple_network_uninit(void);
59.301 -
59.302 -/*@}*/
59.303 -
59.304 -#ifdef __cplusplus
59.305 -}
59.306 -#endif
59.307 -
59.308 -#endif /* _PURPLE_NETWORK_H_ */
60.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/nexus.h Fri Aug 21 13:24:36 2009 -0700
60.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
60.3 @@ -1,234 +0,0 @@
60.4 -/**
60.5 - * @file nexus.h MSN Nexus functions
60.6 - *
60.7 - * purple
60.8 - *
60.9 - * Purple is the legal property of its developers, whose names are too numerous
60.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
60.11 - * source distribution.
60.12 - *
60.13 - * This program is free software; you can redistribute it and/or modify
60.14 - * it under the terms of the GNU General Public License as published by
60.15 - * the Free Software Foundation; either version 2 of the License, or
60.16 - * (at your option) any later version.
60.17 - *
60.18 - * This program is distributed in the hope that it will be useful,
60.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
60.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
60.21 - * GNU General Public License for more details.
60.22 - *
60.23 - * You should have received a copy of the GNU General Public License
60.24 - * along with this program; if not, write to the Free Software
60.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
60.26 - */
60.27 -#ifndef _MSN_NEXUS_H_
60.28 -#define _MSN_NEXUS_H_
60.29 -
60.30 -/* Index into ticket_tokens in nexus.c Keep updated! */
60.31 -typedef enum
60.32 -{
60.33 - MSN_AUTH_MESSENGER = 0,
60.34 - MSN_AUTH_MESSENGER_WEB = 1,
60.35 - MSN_AUTH_CONTACTS = 2,
60.36 - MSN_AUTH_LIVE_SECURE = 3,
60.37 - MSN_AUTH_SPACES = 4,
60.38 - MSN_AUTH_LIVE_CONTACTS = 5,
60.39 - MSN_AUTH_STORAGE = 6
60.40 -} MsnAuthDomains;
60.41 -
60.42 -#define MSN_SSO_SERVER "login.live.com"
60.43 -#define SSO_POST_URL "/RST.srf"
60.44 -
60.45 -#define MSN_SSO_RST_TEMPLATE \
60.46 -"<wst:RequestSecurityToken xmlns=\"http://schemas.xmlsoap.org/ws/2004/04/trust\" Id=\"RST%d\">"\
60.47 - "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>"\
60.48 - "<wsp:AppliesTo xmlns=\"http://schemas.xmlsoap.org/ws/2002/12/policy\">"\
60.49 - "<wsa:EndpointReference xmlns=\"http://schemas.xmlsoap.org/ws/2004/03/addressing\">"\
60.50 - "<wsa:Address>%s</wsa:Address>"\
60.51 - "</wsa:EndpointReference>"\
60.52 - "</wsp:AppliesTo>"\
60.53 - "<wsse:PolicyReference xmlns=\"http://schemas.xmlsoap.org/ws/2003/06/secext\" URI=\"%s\"></wsse:PolicyReference>"\
60.54 -"</wst:RequestSecurityToken>"
60.55 -
60.56 -#define MSN_SSO_TEMPLATE "<?xml version='1.0' encoding='utf-8'?>"\
60.57 -"<Envelope xmlns=\"http://schemas.xmlsoap.org/soap/envelope/\""\
60.58 - " xmlns:wsse=\"http://schemas.xmlsoap.org/ws/2003/06/secext\""\
60.59 - " xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\""\
60.60 - " xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2002/12/policy\""\
60.61 - " xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\""\
60.62 - " xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/03/addressing\""\
60.63 - " xmlns:wssc=\"http://schemas.xmlsoap.org/ws/2004/04/sc\""\
60.64 - " xmlns:wst=\"http://schemas.xmlsoap.org/ws/2004/04/trust\">"\
60.65 - "<Header>"\
60.66 - "<ps:AuthInfo"\
60.67 - " xmlns:ps=\"http://schemas.microsoft.com/Passport/SoapServices/PPCRL\""\
60.68 - " Id=\"PPAuthInfo\">"\
60.69 - "<ps:HostingApp>{7108E71A-9926-4FCB-BCC9-9A9D3F32E423}</ps:HostingApp>"\
60.70 - "<ps:BinaryVersion>4</ps:BinaryVersion>"\
60.71 - "<ps:UIVersion>1</ps:UIVersion>"\
60.72 - "<ps:Cookies></ps:Cookies>"\
60.73 - "<ps:RequestParams>AQAAAAIAAABsYwQAAAAxMDMz</ps:RequestParams>"\
60.74 - "</ps:AuthInfo>"\
60.75 - "<wsse:Security>"\
60.76 - "<wsse:UsernameToken Id=\"user\">"\
60.77 - "<wsse:Username>%s</wsse:Username>"\
60.78 - "<wsse:Password>%s</wsse:Password>"\
60.79 - "</wsse:UsernameToken>"\
60.80 - "</wsse:Security>"\
60.81 - "</Header>"\
60.82 - "<Body>"\
60.83 - "<ps:RequestMultipleSecurityTokens"\
60.84 - " xmlns:ps=\"http://schemas.microsoft.com/Passport/SoapServices/PPCRL\""\
60.85 - " Id=\"RSTS\">"\
60.86 - "<wst:RequestSecurityToken Id=\"RST0\">"\
60.87 - "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>"\
60.88 - "<wsp:AppliesTo>"\
60.89 - "<wsa:EndpointReference>"\
60.90 - "<wsa:Address>http://Passport.NET/tb</wsa:Address>"\
60.91 - "</wsa:EndpointReference>"\
60.92 - "</wsp:AppliesTo>"\
60.93 - "</wst:RequestSecurityToken>"\
60.94 - "%s" /* Other RSTn tokens */\
60.95 - "</ps:RequestMultipleSecurityTokens>"\
60.96 - "</Body>"\
60.97 -"</Envelope>"
60.98 -
60.99 -#define MSN_SSO_AUTHINFO_TEMPLATE \
60.100 -"<ps:AuthInfo xmlns:ps=\"http://schemas.microsoft.com/Passport/SoapServices/PPCRL\" Id=\"PPAuthInfo\">"\
60.101 - "<ps:HostingApp>{7108E71A-9926-4FCB-BCC9-9A9D3F32E423}</ps:HostingApp>"\
60.102 - "<ps:BinaryVersion>4</ps:BinaryVersion>"\
60.103 - "<ps:UIVersion>1</ps:UIVersion>"\
60.104 - "<ps:Cookies></ps:Cookies>"\
60.105 - "<ps:RequestParams>AQAAAAIAAABsYwQAAAA0MTA1</ps:RequestParams>"\
60.106 -"</ps:AuthInfo>"
60.107 -/* Not sure what's editable here, so I'll just hard-code the SHA1 hash */
60.108 -#define MSN_SSO_AUTHINFO_SHA1_BASE64 "d2IeTF4DAkPEa/tVETHznsivEpc="
60.109 -
60.110 -#define MSN_SSO_TIMESTAMP_TEMPLATE \
60.111 -"<wsu:Timestamp xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" Id=\"Timestamp\">"\
60.112 - "<wsu:Created>%s</wsu:Created>"\
60.113 - "<wsu:Expires>%s</wsu:Expires>"\
60.114 -"</wsu:Timestamp>"
60.115 -
60.116 -#define MSN_SSO_SIGNEDINFO_TEMPLATE \
60.117 -"<SignedInfo xmlns=\"http://www.w3.org/2000/09/xmldsig#\">"\
60.118 - "<CanonicalizationMethod Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"></CanonicalizationMethod>"\
60.119 - "<SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#hmac-sha1\"></SignatureMethod>"\
60.120 - "<Reference URI=\"#RST%d\">"\
60.121 - "<Transforms>"\
60.122 - "<Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"></Transform>"\
60.123 - "</Transforms>"\
60.124 - "<DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"></DigestMethod>"\
60.125 - "<DigestValue>%s</DigestValue>"\
60.126 - "</Reference>"\
60.127 - "<Reference URI=\"#Timestamp\">"\
60.128 - "<Transforms>"\
60.129 - "<Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"></Transform>"\
60.130 - "</Transforms>"\
60.131 - "<DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"></DigestMethod>"\
60.132 - "<DigestValue>%s</DigestValue>"\
60.133 - "</Reference>"\
60.134 - "<Reference URI=\"#PPAuthInfo\">"\
60.135 - "<Transforms>"\
60.136 - "<Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"></Transform>"\
60.137 - "</Transforms>"\
60.138 - "<DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"></DigestMethod>"\
60.139 - "<DigestValue>" MSN_SSO_AUTHINFO_SHA1_BASE64 "</DigestValue>"\
60.140 - "</Reference>"\
60.141 -"</SignedInfo>"
60.142 -
60.143 -#define MSN_SSO_TOKEN_UPDATE_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
60.144 -"<Envelope"\
60.145 - " xmlns=\"http://schemas.xmlsoap.org/soap/envelope/\""\
60.146 - " xmlns:wsse=\"http://schemas.xmlsoap.org/ws/2003/06/secext\""\
60.147 - " xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\""\
60.148 - " xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2002/12/policy\""\
60.149 - " xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\""\
60.150 - " xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/03/addressing\""\
60.151 - " xmlns:wssc=\"http://schemas.xmlsoap.org/ws/2004/04/sc\""\
60.152 - " xmlns:wst=\"http://schemas.xmlsoap.org/ws/2004/04/trust\">"\
60.153 - "<Header>"\
60.154 - MSN_SSO_AUTHINFO_TEMPLATE /* ps:AuthInfo */ \
60.155 - "<wsse:Security>"\
60.156 - "<EncryptedData xmlns=\"http://www.w3.org/2001/04/xmlenc#\" Id=\"BinaryDAToken0\" Type=\"http://www.w3.org/2001/04/xmlenc#Element\">"\
60.157 - "<EncryptionMethod Algorithm=\"http://www.w3.org/2001/04/xmlenc#tripledes-cbc\"></EncryptionMethod>"\
60.158 - "<ds:KeyInfo xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">"\
60.159 - "<ds:KeyName>http://Passport.NET/STS</ds:KeyName>"\
60.160 - "</ds:KeyInfo>"\
60.161 - "<CipherData>"\
60.162 - "<CipherValue>%s</CipherValue>"\
60.163 - "</CipherData>"\
60.164 - "</EncryptedData>"\
60.165 - "<wssc:DerivedKeyToken Id=\"SignKey\">"\
60.166 - "<wsse:RequestedTokenReference>"\
60.167 - "<wsse:KeyIdentifier ValueType=\"http://docs.oasis-open.org/wss/2004/XX/oasis-2004XX-wss-saml-token-profile-1.0#SAMLAssertionID\" />"\
60.168 - "<wsse:Reference URI=\"#BinaryDAToken0\" />"\
60.169 - "</wsse:RequestedTokenReference>"\
60.170 - "<wssc:Nonce>%s</wssc:Nonce>"\
60.171 - "</wssc:DerivedKeyToken>"\
60.172 - "%s" /* wsu:Timestamp */\
60.173 - "<Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#\">"\
60.174 - "%s" /* SignedInfo */\
60.175 - "<SignatureValue>%s</SignatureValue>"\
60.176 - "<KeyInfo>"\
60.177 - "<wsse:SecurityTokenReference>"\
60.178 - "<wsse:Reference URI=\"#SignKey\" />"\
60.179 - "</wsse:SecurityTokenReference>"\
60.180 - "</KeyInfo>"\
60.181 - "</Signature>"\
60.182 - "</wsse:Security>"\
60.183 - "</Header>"\
60.184 - "<Body>"\
60.185 - "%s" /* wst:RequestSecurityToken */ \
60.186 - "</Body>"\
60.187 -"</Envelope>"
60.188 -
60.189 -typedef struct _MsnUsrKey MsnUsrKey;
60.190 -struct _MsnUsrKey
60.191 -{
60.192 - int size; /* 28. Does not count data */
60.193 - int crypt_mode; /* CRYPT_MODE_CBC (1) */
60.194 - int cipher_type; /* TripleDES (0x6603) */
60.195 - int hash_type; /* SHA1 (0x8004) */
60.196 - int iv_len; /* 8 */
60.197 - int hash_len; /* 20 */
60.198 - int cipher_len; /* 72 */
60.199 - /* Data */
60.200 - char iv[8];
60.201 - char hash[20];
60.202 - char cipher[72];
60.203 -};
60.204 -
60.205 -typedef struct _MsnTicketToken MsnTicketToken;
60.206 -struct _MsnTicketToken {
60.207 - GHashTable *token;
60.208 - char *secret;
60.209 - time_t expiry;
60.210 - GSList *updates;
60.211 -};
60.212 -
60.213 -typedef struct _MsnNexus MsnNexus;
60.214 -
60.215 -struct _MsnNexus
60.216 -{
60.217 - MsnSession *session;
60.218 -
60.219 - /* From server via USR command */
60.220 - char *policy;
60.221 - char *nonce;
60.222 -
60.223 - /* From server via SOAP stuff */
60.224 - char *cipher;
60.225 - char *secret;
60.226 - MsnTicketToken *tokens;
60.227 - int token_len;
60.228 -};
60.229 -
60.230 -void msn_nexus_connect(MsnNexus *nexus);
60.231 -MsnNexus *msn_nexus_new(MsnSession *session);
60.232 -void msn_nexus_destroy(MsnNexus *nexus);
60.233 -GHashTable *msn_nexus_get_token(MsnNexus *nexus, MsnAuthDomains id);
60.234 -const char *msn_nexus_get_token_str(MsnNexus *nexus, MsnAuthDomains id);
60.235 -void msn_nexus_update_token(MsnNexus *nexus, int id, GSourceFunc cb, gpointer data);
60.236 -#endif /* _MSN_NEXUS_H_ */
60.237 -
61.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/notification.h Fri Aug 21 13:24:36 2009 -0700
61.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
61.3 @@ -1,96 +0,0 @@
61.4 -/**
61.5 - * @file notification.h Notification server functions
61.6 - *
61.7 - * purple
61.8 - *
61.9 - * Purple is the legal property of its developers, whose names are too numerous
61.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
61.11 - * source distribution.
61.12 - *
61.13 - * This program is free software; you can redistribute it and/or modify
61.14 - * it under the terms of the GNU General Public License as published by
61.15 - * the Free Software Foundation; either version 2 of the License, or
61.16 - * (at your option) any later version.
61.17 - *
61.18 - * This program is distributed in the hope that it will be useful,
61.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
61.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
61.21 - * GNU General Public License for more details.
61.22 - *
61.23 - * You should have received a copy of the GNU General Public License
61.24 - * along with this program; if not, write to the Free Software
61.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
61.26 - */
61.27 -#ifndef _MSN_NOTIFICATION_H_
61.28 -#define _MSN_NOTIFICATION_H_
61.29 -
61.30 -/*MSN protocol challenge info*/
61.31 -
61.32 -/*MSNP15 challenge: WLM 8.5.1288.816*/
61.33 -#define MSNP15_WLM_PRODUCT_KEY "ILTXC!4IXB5FB*PX"
61.34 -#define MSNP15_WLM_PRODUCT_ID "PROD0119GSJUC$18"
61.35 -
61.36 -/*MSNP13 challenge*/
61.37 -#define MSNP13_WLM_PRODUCT_KEY "O4BG@C7BWLYQX?5G"
61.38 -#define MSNP13_WLM_PRODUCT_ID "PROD01065C%ZFN6F"
61.39 -
61.40 -#define MSNP10_PRODUCT_KEY "VT6PX?UQTM4WM%YR"
61.41 -#define MSNP10_PRODUCT_ID "PROD0038W!61ZTF9"
61.42 -
61.43 -typedef struct _MsnNotification MsnNotification;
61.44 -
61.45 -#include "session.h"
61.46 -#include "servconn.h"
61.47 -#include "cmdproc.h"
61.48 -#include "user.h"
61.49 -
61.50 -struct _MsnNotification
61.51 -{
61.52 - MsnSession *session;
61.53 -
61.54 - /**
61.55 - * This is a convenience pointer that always points to
61.56 - * servconn->cmdproc
61.57 - */
61.58 - MsnCmdProc *cmdproc;
61.59 - MsnServConn *servconn;
61.60 -
61.61 - gboolean in_use;
61.62 -};
61.63 -
61.64 -typedef void (*MsnFqyCb)(MsnSession *session, const char *passport, MsnNetwork network, gpointer data);
61.65 -
61.66 -#include "state.h"
61.67 -void uum_send_msg(MsnSession *session,MsnMessage *msg);
61.68 -
61.69 -void msn_notification_end(void);
61.70 -void msn_notification_init(void);
61.71 -
61.72 -void msn_notification_add_buddy_to_list(MsnNotification *notification,
61.73 - MsnListId list_id, MsnUser *user);
61.74 -void msn_notification_rem_buddy_from_list(MsnNotification *notification,
61.75 - MsnListId list_id, MsnUser *user);
61.76 -
61.77 -void msn_notification_send_fqy(MsnSession *session,
61.78 - const char *payload, int payload_len,
61.79 - MsnFqyCb cb, gpointer cb_data);
61.80 -
61.81 -MsnNotification *msn_notification_new(MsnSession *session);
61.82 -void msn_notification_destroy(MsnNotification *notification);
61.83 -gboolean msn_notification_connect(MsnNotification *notification,
61.84 - const char *host, int port);
61.85 -void msn_notification_disconnect(MsnNotification *notification);
61.86 -void msn_notification_dump_contact(MsnSession *session);
61.87 -
61.88 -/**
61.89 - * Closes a notification.
61.90 - *
61.91 - * It's first closed, and then disconnected.
61.92 - *
61.93 - * @param notification The notification object to close.
61.94 - */
61.95 -void msn_notification_close(MsnNotification *notification);
61.96 -
61.97 -void msn_got_login_params(MsnSession *session, const char *ticket, const char *response);
61.98 -
61.99 -#endif /* _MSN_NOTIFICATION_H_ */
62.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/notify.h Fri Aug 21 13:24:36 2009 -0700
62.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
62.3 @@ -1,799 +0,0 @@
62.4 -/**
62.5 - * @file notify.h Notification API
62.6 - * @ingroup core
62.7 - * @see @ref notify-signals
62.8 - */
62.9 -
62.10 -/* purple
62.11 - *
62.12 - * Purple is the legal property of its developers, whose names are too numerous
62.13 - * to list here. Please refer to the COPYRIGHT file distributed with this
62.14 - * source distribution.
62.15 - *
62.16 - * This program is free software; you can redistribute it and/or modify
62.17 - * it under the terms of the GNU General Public License as published by
62.18 - * the Free Software Foundation; either version 2 of the License, or
62.19 - * (at your option) any later version.
62.20 - *
62.21 - * This program is distributed in the hope that it will be useful,
62.22 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
62.23 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
62.24 - * GNU General Public License for more details.
62.25 - *
62.26 - * You should have received a copy of the GNU General Public License
62.27 - * along with this program; if not, write to the Free Software
62.28 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
62.29 - */
62.30 -#ifndef _PURPLE_NOTIFY_H_
62.31 -#define _PURPLE_NOTIFY_H_
62.32 -
62.33 -#include <stdlib.h>
62.34 -#include <glib-object.h>
62.35 -#include <glib.h>
62.36 -
62.37 -typedef struct _PurpleNotifyUserInfoEntry PurpleNotifyUserInfoEntry;
62.38 -typedef struct _PurpleNotifyUserInfo PurpleNotifyUserInfo;
62.39 -
62.40 -#include "connection.h"
62.41 -
62.42 -/**
62.43 - * Notification close callbacks.
62.44 - */
62.45 -typedef void (*PurpleNotifyCloseCallback) (gpointer user_data);
62.46 -
62.47 -
62.48 -/**
62.49 - * Notification types.
62.50 - */
62.51 -typedef enum
62.52 -{
62.53 - PURPLE_NOTIFY_MESSAGE = 0, /**< Message notification. */
62.54 - PURPLE_NOTIFY_EMAIL, /**< Single email notification. */
62.55 - PURPLE_NOTIFY_EMAILS, /**< Multiple email notification. */
62.56 - PURPLE_NOTIFY_FORMATTED, /**< Formatted text. */
62.57 - PURPLE_NOTIFY_SEARCHRESULTS, /**< Buddy search results. */
62.58 - PURPLE_NOTIFY_USERINFO, /**< Formatted userinfo text. */
62.59 - PURPLE_NOTIFY_URI /**< URI notification or display. */
62.60 -
62.61 -} PurpleNotifyType;
62.62 -
62.63 -
62.64 -/**
62.65 - * Notification message types.
62.66 - */
62.67 -typedef enum
62.68 -{
62.69 - PURPLE_NOTIFY_MSG_ERROR = 0, /**< Error notification. */
62.70 - PURPLE_NOTIFY_MSG_WARNING, /**< Warning notification. */
62.71 - PURPLE_NOTIFY_MSG_INFO /**< Information notification. */
62.72 -
62.73 -} PurpleNotifyMsgType;
62.74 -
62.75 -
62.76 -/**
62.77 - * The types of buttons
62.78 - */
62.79 -typedef enum
62.80 -{
62.81 - PURPLE_NOTIFY_BUTTON_LABELED = 0, /**< special use, see _button_add_labeled */
62.82 - PURPLE_NOTIFY_BUTTON_CONTINUE = 1,
62.83 - PURPLE_NOTIFY_BUTTON_ADD,
62.84 - PURPLE_NOTIFY_BUTTON_INFO,
62.85 - PURPLE_NOTIFY_BUTTON_IM,
62.86 - PURPLE_NOTIFY_BUTTON_JOIN,
62.87 - PURPLE_NOTIFY_BUTTON_INVITE
62.88 -} PurpleNotifySearchButtonType;
62.89 -
62.90 -
62.91 -/**
62.92 - * Search results object.
62.93 - */
62.94 -typedef struct
62.95 -{
62.96 - GList *columns; /**< List of the search column objects. */
62.97 - GList *rows; /**< List of rows in the result. */
62.98 - GList *buttons; /**< List of buttons to display. */
62.99 -
62.100 -} PurpleNotifySearchResults;
62.101 -
62.102 -/**
62.103 - * Types of PurpleNotifyUserInfoEntry objects
62.104 - */
62.105 -typedef enum
62.106 -{
62.107 - PURPLE_NOTIFY_USER_INFO_ENTRY_PAIR = 0,
62.108 - PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK,
62.109 - PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER
62.110 -} PurpleNotifyUserInfoEntryType;
62.111 -
62.112 -/**
62.113 - * Single column of a search result.
62.114 - */
62.115 -typedef struct
62.116 -{
62.117 - char *title; /**< Title of the column. */
62.118 -
62.119 -} PurpleNotifySearchColumn;
62.120 -
62.121 -
62.122 -/**
62.123 - * Callback for a button in a search result.
62.124 - *
62.125 - * @param c the PurpleConnection passed to purple_notify_searchresults
62.126 - * @param row the contents of the selected row
62.127 - * @param user_data User defined data.
62.128 - */
62.129 -typedef void (*PurpleNotifySearchResultsCallback)(PurpleConnection *c, GList *row,
62.130 - gpointer user_data);
62.131 -
62.132 -
62.133 -/**
62.134 - * Definition of a button.
62.135 - */
62.136 -typedef struct
62.137 -{
62.138 - PurpleNotifySearchButtonType type;
62.139 - PurpleNotifySearchResultsCallback callback; /**< Function to be called when clicked. */
62.140 - char *label; /**< only for PURPLE_NOTIFY_BUTTON_LABELED */
62.141 -} PurpleNotifySearchButton;
62.142 -
62.143 -
62.144 -/**
62.145 - * Notification UI operations.
62.146 - */
62.147 -typedef struct
62.148 -{
62.149 - void *(*notify_message)(PurpleNotifyMsgType type, const char *title,
62.150 - const char *primary, const char *secondary);
62.151 -
62.152 - void *(*notify_email)(PurpleConnection *gc,
62.153 - const char *subject, const char *from,
62.154 - const char *to, const char *url);
62.155 -
62.156 - void *(*notify_emails)(PurpleConnection *gc,
62.157 - size_t count, gboolean detailed,
62.158 - const char **subjects, const char **froms,
62.159 - const char **tos, const char **urls);
62.160 -
62.161 - void *(*notify_formatted)(const char *title, const char *primary,
62.162 - const char *secondary, const char *text);
62.163 -
62.164 - void *(*notify_searchresults)(PurpleConnection *gc, const char *title,
62.165 - const char *primary, const char *secondary,
62.166 - PurpleNotifySearchResults *results, gpointer user_data);
62.167 -
62.168 - void (*notify_searchresults_new_rows)(PurpleConnection *gc,
62.169 - PurpleNotifySearchResults *results,
62.170 - void *data);
62.171 -
62.172 - void *(*notify_userinfo)(PurpleConnection *gc, const char *who,
62.173 - PurpleNotifyUserInfo *user_info);
62.174 -
62.175 - void *(*notify_uri)(const char *uri);
62.176 -
62.177 - void (*close_notify)(PurpleNotifyType type, void *ui_handle);
62.178 -
62.179 - void (*_purple_reserved1)(void);
62.180 - void (*_purple_reserved2)(void);
62.181 - void (*_purple_reserved3)(void);
62.182 - void (*_purple_reserved4)(void);
62.183 -} PurpleNotifyUiOps;
62.184 -
62.185 -
62.186 -#ifdef __cplusplus
62.187 -extern "C" {
62.188 -#endif
62.189 -
62.190 -
62.191 -/**************************************************************************/
62.192 -/** Search results notification API */
62.193 -/**************************************************************************/
62.194 -/*@{*/
62.195 -
62.196 -/**
62.197 - * Displays results from a buddy search. This can be, for example,
62.198 - * a window with a list of all found buddies, where you are given the
62.199 - * option of adding buddies to your buddy list.
62.200 - *
62.201 - * @param gc The PurpleConnection handle associated with the information.
62.202 - * @param title The title of the message. If this is NULL, the title
62.203 - * will be "Search Results."
62.204 - * @param primary The main point of the message.
62.205 - * @param secondary The secondary information.
62.206 - * @param results The PurpleNotifySearchResults instance.
62.207 - * @param cb The callback to call when the user closes
62.208 - * the notification.
62.209 - * @param user_data The data to pass to the close callback and any other
62.210 - * callback associated with a button.
62.211 - *
62.212 - * @return A UI-specific handle.
62.213 - */
62.214 -void *purple_notify_searchresults(PurpleConnection *gc, const char *title,
62.215 - const char *primary, const char *secondary,
62.216 - PurpleNotifySearchResults *results, PurpleNotifyCloseCallback cb,
62.217 - gpointer user_data);
62.218 -
62.219 -/**
62.220 - * Frees a PurpleNotifySearchResults object.
62.221 - *
62.222 - * @param results The PurpleNotifySearchResults to free.
62.223 - */
62.224 -void purple_notify_searchresults_free(PurpleNotifySearchResults *results);
62.225 -
62.226 -/**
62.227 - * Replace old rows with the new. Reuse an existing window.
62.228 - *
62.229 - * @param gc The PurpleConnection structure.
62.230 - * @param results The PurpleNotifySearchResults structure.
62.231 - * @param data Data returned by the purple_notify_searchresults().
62.232 - */
62.233 -void purple_notify_searchresults_new_rows(PurpleConnection *gc,
62.234 - PurpleNotifySearchResults *results,
62.235 - void *data);
62.236 -
62.237 -
62.238 -/**
62.239 - * Adds a stock button that will be displayed in the search results dialog.
62.240 - *
62.241 - * @param results The search results object.
62.242 - * @param type Type of the button. (TODO: Only one button of a given type
62.243 - * can be displayed.)
62.244 - * @param cb Function that will be called on the click event.
62.245 - */
62.246 -void purple_notify_searchresults_button_add(PurpleNotifySearchResults *results,
62.247 - PurpleNotifySearchButtonType type,
62.248 - PurpleNotifySearchResultsCallback cb);
62.249 -
62.250 -
62.251 -/**
62.252 - * Adds a plain labelled button that will be displayed in the search results
62.253 - * dialog.
62.254 - *
62.255 - * @param results The search results object
62.256 - * @param label The label to display
62.257 - * @param cb Function that will be called on the click event
62.258 - */
62.259 -void purple_notify_searchresults_button_add_labeled(PurpleNotifySearchResults *results,
62.260 - const char *label,
62.261 - PurpleNotifySearchResultsCallback cb);
62.262 -
62.263 -
62.264 -/**
62.265 - * Returns a newly created search results object.
62.266 - *
62.267 - * @return The new search results object.
62.268 - */
62.269 -PurpleNotifySearchResults *purple_notify_searchresults_new(void);
62.270 -
62.271 -/**
62.272 - * Returns a newly created search result column object.
62.273 - *
62.274 - * @param title Title of the column. NOTE: Title will get g_strdup()ed.
62.275 - *
62.276 - * @return The new search column object.
62.277 - */
62.278 -PurpleNotifySearchColumn *purple_notify_searchresults_column_new(const char *title);
62.279 -
62.280 -/**
62.281 - * Adds a new column to the search result object.
62.282 - *
62.283 - * @param results The result object to which the column will be added.
62.284 - * @param column The column that will be added to the result object.
62.285 - */
62.286 -void purple_notify_searchresults_column_add(PurpleNotifySearchResults *results,
62.287 - PurpleNotifySearchColumn *column);
62.288 -
62.289 -/**
62.290 - * Adds a new row of the results to the search results object.
62.291 - *
62.292 - * @param results The search results object.
62.293 - * @param row The row of the results.
62.294 - */
62.295 -void purple_notify_searchresults_row_add(PurpleNotifySearchResults *results,
62.296 - GList *row);
62.297 -
62.298 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_NOTIFY_C_)
62.299 -/**
62.300 - * Returns a number of the rows in the search results object.
62.301 - *
62.302 - * @deprecated This function will be removed in Pidgin 3.0.0 unless
62.303 - * there is sufficient demand to keep it. Using this
62.304 - * function encourages looping through the results
62.305 - * inefficiently. Instead of using this function you
62.306 - * should iterate through the results using a loop
62.307 - * similar to this:
62.308 - * for (l = results->rows; l != NULL; l = l->next)
62.309 - * If you really need to get the number of rows you
62.310 - * can use g_list_length(results->rows).
62.311 - *
62.312 - * @param results The search results object.
62.313 - *
62.314 - * @return Number of the result rows.
62.315 - */
62.316 -guint purple_notify_searchresults_get_rows_count(PurpleNotifySearchResults *results);
62.317 -#endif
62.318 -
62.319 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_NOTIFY_C_)
62.320 -/**
62.321 - * Returns a number of the columns in the search results object.
62.322 - *
62.323 - * @deprecated This function will be removed in Pidgin 3.0.0 unless
62.324 - * there is sufficient demand to keep it. Using this
62.325 - * function encourages looping through the columns
62.326 - * inefficiently. Instead of using this function you
62.327 - * should iterate through the columns using a loop
62.328 - * similar to this:
62.329 - * for (l = results->columns; l != NULL; l = l->next)
62.330 - * If you really need to get the number of columns you
62.331 - * can use g_list_length(results->columns).
62.332 - *
62.333 - * @param results The search results object.
62.334 - *
62.335 - * @return Number of the columns.
62.336 - */
62.337 -guint purple_notify_searchresults_get_columns_count(PurpleNotifySearchResults *results);
62.338 -#endif
62.339 -
62.340 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_NOTIFY_C_)
62.341 -/**
62.342 - * Returns a row of the results from the search results object.
62.343 - *
62.344 - * @deprecated This function will be removed in Pidgin 3.0.0 unless
62.345 - * there is sufficient demand to keep it. Using this
62.346 - * function encourages looping through the results
62.347 - * inefficiently. Instead of using this function you
62.348 - * should iterate through the results using a loop
62.349 - * similar to this:
62.350 - * for (l = results->rows; l != NULL; l = l->next)
62.351 - * If you really need to get the data for a particular
62.352 - * row you can use g_list_nth_data(results->rows, row_id).
62.353 - *
62.354 - * @param results The search results object.
62.355 - * @param row_id Index of the row to be returned.
62.356 - *
62.357 - * @return Row of the results.
62.358 - */
62.359 -GList *purple_notify_searchresults_row_get(PurpleNotifySearchResults *results,
62.360 - unsigned int row_id);
62.361 -#endif
62.362 -
62.363 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_NOTIFY_C_)
62.364 -/**
62.365 - * Returns a title of the search results object's column.
62.366 - *
62.367 - * @deprecated This function will be removed in Pidgin 3.0.0 unless
62.368 - * there is sufficient demand to keep it. Using this
62.369 - * function encourages looping through the columns
62.370 - * inefficiently. Instead of using this function you
62.371 - * should iterate through the name of a particular
62.372 - * column you can use
62.373 - * g_list_nth_data(results->columns, row_id).
62.374 - *
62.375 - * @param results The search results object.
62.376 - * @param column_id Index of the column.
62.377 - *
62.378 - * @return Title of the column.
62.379 - */
62.380 -char *purple_notify_searchresults_column_get_title(PurpleNotifySearchResults *results,
62.381 - unsigned int column_id);
62.382 -#endif
62.383 -
62.384 -/*@}*/
62.385 -
62.386 -/**************************************************************************/
62.387 -/** @name Notification API */
62.388 -/**************************************************************************/
62.389 -/*@{*/
62.390 -
62.391 -/**
62.392 - * Displays a notification message to the user.
62.393 - *
62.394 - * @param handle The plugin or connection handle.
62.395 - * @param type The notification type.
62.396 - * @param title The title of the message.
62.397 - * @param primary The main point of the message.
62.398 - * @param secondary The secondary information.
62.399 - * @param cb The callback to call when the user closes
62.400 - * the notification.
62.401 - * @param user_data The data to pass to the callback.
62.402 - *
62.403 - * @return A UI-specific handle.
62.404 - */
62.405 -void *purple_notify_message(void *handle, PurpleNotifyMsgType type,
62.406 - const char *title, const char *primary,
62.407 - const char *secondary, PurpleNotifyCloseCallback cb,
62.408 - gpointer user_data);
62.409 -
62.410 -/**
62.411 - * Displays a single email notification to the user.
62.412 - *
62.413 - * @param handle The plugin or connection handle.
62.414 - * @param subject The subject of the email.
62.415 - * @param from The from address.
62.416 - * @param to The destination address.
62.417 - * @param url The URL where the message can be read.
62.418 - * @param cb The callback to call when the user closes
62.419 - * the notification.
62.420 - * @param user_data The data to pass to the callback.
62.421 - *
62.422 - * @return A UI-specific handle.
62.423 - */
62.424 -void *purple_notify_email(void *handle, const char *subject,
62.425 - const char *from, const char *to,
62.426 - const char *url, PurpleNotifyCloseCallback cb,
62.427 - gpointer user_data);
62.428 -
62.429 -/**
62.430 - * Displays a notification for multiple emails to the user.
62.431 - *
62.432 - * @param handle The plugin or connection handle.
62.433 - * @param count The number of emails. '0' can be used to signify that
62.434 - * the user has no unread emails and the UI should remove
62.435 - * the mail notification.
62.436 - * @param detailed @c TRUE if there is information for each email in the
62.437 - * arrays.
62.438 - * @param subjects The array of subjects.
62.439 - * @param froms The array of from addresses.
62.440 - * @param tos The array of destination addresses.
62.441 - * @param urls The URLs where the messages can be read.
62.442 - * @param cb The callback to call when the user closes
62.443 - * the notification.
62.444 - * @param user_data The data to pass to the callback.
62.445 - *
62.446 - * @return A UI-specific handle.
62.447 - */
62.448 -void *purple_notify_emails(void *handle, size_t count, gboolean detailed,
62.449 - const char **subjects, const char **froms,
62.450 - const char **tos, const char **urls,
62.451 - PurpleNotifyCloseCallback cb, gpointer user_data);
62.452 -
62.453 -/**
62.454 - * Displays a notification with formatted text.
62.455 - *
62.456 - * The text is essentially a stripped-down format of HTML, the same that
62.457 - * IMs may send.
62.458 - *
62.459 - * @param handle The plugin or connection handle.
62.460 - * @param title The title of the message.
62.461 - * @param primary The main point of the message.
62.462 - * @param secondary The secondary information.
62.463 - * @param text The formatted text.
62.464 - * @param cb The callback to call when the user closes
62.465 - * the notification.
62.466 - * @param user_data The data to pass to the callback.
62.467 - *
62.468 - * @return A UI-specific handle.
62.469 - */
62.470 -void *purple_notify_formatted(void *handle, const char *title,
62.471 - const char *primary, const char *secondary,
62.472 - const char *text, PurpleNotifyCloseCallback cb, gpointer user_data);
62.473 -
62.474 -/**
62.475 - * Displays user information with formatted text, passing information giving
62.476 - * the connection and username from which the user information came.
62.477 - *
62.478 - * The text is essentially a stripped-down format of HTML, the same that
62.479 - * IMs may send.
62.480 - *
62.481 - * @param gc The PurpleConnection handle associated with the information.
62.482 - * @param who The username associated with the information.
62.483 - * @param user_info The PurpleNotifyUserInfo which contains the information
62.484 - * @param cb The callback to call when the user closes the notification.
62.485 - * @param user_data The data to pass to the callback.
62.486 - *
62.487 - * @return A UI-specific handle.
62.488 - */
62.489 -void *purple_notify_userinfo(PurpleConnection *gc, const char *who,
62.490 - PurpleNotifyUserInfo *user_info, PurpleNotifyCloseCallback cb,
62.491 - gpointer user_data);
62.492 -
62.493 -/**
62.494 - * Create a new PurpleNotifyUserInfo which is suitable for passing to
62.495 - * purple_notify_userinfo()
62.496 - *
62.497 - * @return A new PurpleNotifyUserInfo, which the caller must destroy when done
62.498 - */
62.499 -PurpleNotifyUserInfo *purple_notify_user_info_new(void);
62.500 -
62.501 -/**
62.502 - * Destroy a PurpleNotifyUserInfo
62.503 - *
62.504 - * @param user_info The PurpleNotifyUserInfo
62.505 - */
62.506 -void purple_notify_user_info_destroy(PurpleNotifyUserInfo *user_info);
62.507 -
62.508 -/**
62.509 - * Retrieve the array of PurpleNotifyUserInfoEntry objects from a
62.510 - * PurpleNotifyUserInfo
62.511 - *
62.512 - * This GList may be manipulated directly with normal GList functions such
62.513 - * as g_list_insert(). Only PurpleNotifyUserInfoEntry are allowed in the
62.514 - * list. If a PurpleNotifyUserInfoEntry item is added to the list, it
62.515 - * should not be g_free()'d by the caller; PurpleNotifyUserInfo will g_free
62.516 - * it when destroyed.
62.517 - *
62.518 - * To remove a PurpleNotifyUserInfoEntry, use
62.519 - * purple_notify_user_info_remove_entry(). Do not use the GList directly.
62.520 - *
62.521 - * @param user_info The PurpleNotifyUserInfo
62.522 - *
62.523 - * @constreturn A GList of PurpleNotifyUserInfoEntry objects
62.524 - */
62.525 -GList *purple_notify_user_info_get_entries(PurpleNotifyUserInfo *user_info);
62.526 -
62.527 -/**
62.528 - * Create a textual representation of a PurpleNotifyUserInfo, separating
62.529 - * entries with newline
62.530 - *
62.531 - * @param user_info The PurpleNotifyUserInfo
62.532 - * @param newline The separation character
62.533 - */
62.534 -char *purple_notify_user_info_get_text_with_newline(PurpleNotifyUserInfo *user_info, const char *newline);
62.535 -
62.536 -/**
62.537 - * Add a label/value pair to a PurpleNotifyUserInfo object.
62.538 - * PurpleNotifyUserInfo keeps track of the order in which pairs are added.
62.539 - *
62.540 - * @param user_info The PurpleNotifyUserInfo
62.541 - * @param label A label, which for example might be displayed by a
62.542 - * UI with a colon after it ("Status:"). Do not include
62.543 - * a colon. If NULL, value will be displayed without a
62.544 - * label.
62.545 - * @param value The value, which might be displayed by a UI after
62.546 - * the label. If NULL, label will still be displayed;
62.547 - * the UI should then treat label as independent and not
62.548 - * include a colon if it would otherwise.
62.549 - */
62.550 -void purple_notify_user_info_add_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value);
62.551 -
62.552 -/**
62.553 - * Prepend a label/value pair to a PurpleNotifyUserInfo object
62.554 - *
62.555 - * @param user_info The PurpleNotifyUserInfo
62.556 - * @param label A label, which for example might be displayed by a
62.557 - * UI with a colon after it ("Status:"). Do not include
62.558 - * a colon. If NULL, value will be displayed without a
62.559 - * label.
62.560 - * @param value The value, which might be displayed by a UI after
62.561 - * the label. If NULL, label will still be displayed;
62.562 - * the UI should then treat label as independent and not
62.563 - * include a colon if it would otherwise.
62.564 - */
62.565 -void purple_notify_user_info_prepend_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value);
62.566 -
62.567 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_NOTIFY_C_)
62.568 -/**
62.569 - * Remove a PurpleNotifyUserInfoEntry from a PurpleNotifyUserInfo object
62.570 - * without freeing the entry.
62.571 - *
62.572 - * @param user_info The PurpleNotifyUserInfo
62.573 - * @param user_info_entry The PurpleNotifyUserInfoEntry
62.574 - *
62.575 - * @deprecated Nothing is using this function and it should be removed
62.576 - * in 3.0.0. Or, if we decide we want to keep it in 3.0.0
62.577 - * then we should make purple_notify_user_info_entry_destroy
62.578 - * public so that entries can be free'd after they're removed.
62.579 - */
62.580 -void purple_notify_user_info_remove_entry(PurpleNotifyUserInfo *user_info, PurpleNotifyUserInfoEntry *user_info_entry);
62.581 -#endif
62.582 -
62.583 -/**
62.584 - * Create a new PurpleNotifyUserInfoEntry
62.585 - *
62.586 - * If added to a PurpleNotifyUserInfo object, this should not be free()'d,
62.587 - * as PurpleNotifyUserInfo will do so when destroyed.
62.588 - * purple_notify_user_info_add_pair() and
62.589 - * purple_notify_user_info_prepend_pair() are convenience methods for
62.590 - * creating entries and adding them to a PurpleNotifyUserInfo.
62.591 - *
62.592 - * @param label A label, which for example might be displayed by a UI
62.593 - * with a colon after it ("Status:"). Do not include a
62.594 - * colon. If NULL, value will be displayed without a label.
62.595 - * @param value The value, which might be displayed by a UI after the
62.596 - * label. If NULL, label will still be displayed; the UI
62.597 - * should then treat label as independent and not include a
62.598 - * colon if it would otherwise.
62.599 - *
62.600 - * @result A new PurpleNotifyUserInfoEntry
62.601 - */
62.602 -PurpleNotifyUserInfoEntry *purple_notify_user_info_entry_new(const char *label, const char *value);
62.603 -
62.604 -/**
62.605 - * Add a section break. A UI might display this as a horizontal line.
62.606 - *
62.607 - * @param user_info The PurpleNotifyUserInfo
62.608 - */
62.609 -void purple_notify_user_info_add_section_break(PurpleNotifyUserInfo *user_info);
62.610 -
62.611 -/**
62.612 - * Prepend a section break. A UI might display this as a horizontal line.
62.613 - *
62.614 - * @param user_info The PurpleNotifyUserInfo
62.615 - * @since 2.5.0
62.616 - */
62.617 -void purple_notify_user_info_prepend_section_break(PurpleNotifyUserInfo *user_info);
62.618 -
62.619 -/**
62.620 - * Add a section header. A UI might display this in a different font
62.621 - * from other text.
62.622 - *
62.623 - * @param user_info The PurpleNotifyUserInfo
62.624 - * @param label The name of the section
62.625 - */
62.626 -void purple_notify_user_info_add_section_header(PurpleNotifyUserInfo *user_info, const char *label);
62.627 -
62.628 -/**
62.629 - * Prepend a section header. A UI might display this in a different font
62.630 - * from other text.
62.631 - *
62.632 - * @param user_info The PurpleNotifyUserInfo
62.633 - * @param label The name of the section
62.634 - * @since 2.5.0
62.635 - */
62.636 -void purple_notify_user_info_prepend_section_header(PurpleNotifyUserInfo *user_info, const char *label);
62.637 -
62.638 -/**
62.639 - * Remove the last item which was added to a PurpleNotifyUserInfo. This
62.640 - * could be used to remove a section header which is not needed.
62.641 - */
62.642 -void purple_notify_user_info_remove_last_item(PurpleNotifyUserInfo *user_info);
62.643 -
62.644 -/**
62.645 - * Get the label for a PurpleNotifyUserInfoEntry
62.646 - *
62.647 - * @param user_info_entry The PurpleNotifyUserInfoEntry
62.648 - *
62.649 - * @return The label
62.650 - */
62.651 -const gchar *purple_notify_user_info_entry_get_label(PurpleNotifyUserInfoEntry *user_info_entry);
62.652 -
62.653 -/**
62.654 - * Set the label for a PurpleNotifyUserInfoEntry
62.655 - *
62.656 - * @param user_info_entry The PurpleNotifyUserInfoEntry
62.657 - * @param label The label
62.658 - */
62.659 -void purple_notify_user_info_entry_set_label(PurpleNotifyUserInfoEntry *user_info_entry, const char *label);
62.660 -
62.661 -/**
62.662 - * Get the value for a PurpleNotifyUserInfoEntry
62.663 - *
62.664 - * @param user_info_entry The PurpleNotifyUserInfoEntry
62.665 - *
62.666 - * @result The value
62.667 - */
62.668 -const gchar *purple_notify_user_info_entry_get_value(PurpleNotifyUserInfoEntry *user_info_entry);
62.669 -
62.670 -/**
62.671 - * Set the value for a PurpleNotifyUserInfoEntry
62.672 - *
62.673 - * @param user_info_entry The PurpleNotifyUserInfoEntry
62.674 - * @param value The value
62.675 - */
62.676 -void purple_notify_user_info_entry_set_value(PurpleNotifyUserInfoEntry *user_info_entry, const char *value);
62.677 -
62.678 -
62.679 -/**
62.680 - * Get the type of a PurpleNotifyUserInfoEntry
62.681 - *
62.682 - * @param user_info_entry The PurpleNotifyUserInfoEntry
62.683 - *
62.684 - * @return The PurpleNotifyUserInfoEntryType
62.685 - */
62.686 -PurpleNotifyUserInfoEntryType purple_notify_user_info_entry_get_type(PurpleNotifyUserInfoEntry *user_info_entry);
62.687 -
62.688 -/**
62.689 - * Set the type of a PurpleNotifyUserInfoEntry
62.690 - *
62.691 - * @param user_info_entry The PurpleNotifyUserInfoEntry
62.692 - * @param type The PurpleNotifyUserInfoEntryType
62.693 - */
62.694 -void purple_notify_user_info_entry_set_type(PurpleNotifyUserInfoEntry *user_info_entry,
62.695 - PurpleNotifyUserInfoEntryType type);
62.696 -
62.697 -/**
62.698 - * Opens a URI or somehow presents it to the user.
62.699 - *
62.700 - * @param handle The plugin or connection handle.
62.701 - * @param uri The URI to display or go to.
62.702 - *
62.703 - * @return A UI-specific handle, if any. This may only be presented if
62.704 - * the UI code displays a dialog instead of a webpage, or something
62.705 - * similar.
62.706 - */
62.707 -void *purple_notify_uri(void *handle, const char *uri);
62.708 -
62.709 -/**
62.710 - * Closes a notification.
62.711 - *
62.712 - * This should be used only by the UI operation functions and part of the
62.713 - * core.
62.714 - *
62.715 - * @param type The notification type.
62.716 - * @param ui_handle The notification UI handle.
62.717 - */
62.718 -void purple_notify_close(PurpleNotifyType type, void *ui_handle);
62.719 -
62.720 -/**
62.721 - * Closes all notifications registered with the specified handle.
62.722 - *
62.723 - * @param handle The handle.
62.724 - */
62.725 -void purple_notify_close_with_handle(void *handle);
62.726 -
62.727 -/**
62.728 - * A wrapper for purple_notify_message that displays an information message.
62.729 - */
62.730 -#define purple_notify_info(handle, title, primary, secondary) \
62.731 - purple_notify_message((handle), PURPLE_NOTIFY_MSG_INFO, (title), \
62.732 - (primary), (secondary), NULL, NULL)
62.733 -
62.734 -/**
62.735 - * A wrapper for purple_notify_message that displays a warning message.
62.736 - */
62.737 -#define purple_notify_warning(handle, title, primary, secondary) \
62.738 - purple_notify_message((handle), PURPLE_NOTIFY_MSG_WARNING, (title), \
62.739 - (primary), (secondary), NULL, NULL)
62.740 -
62.741 -/**
62.742 - * A wrapper for purple_notify_message that displays an error message.
62.743 - */
62.744 -#define purple_notify_error(handle, title, primary, secondary) \
62.745 - purple_notify_message((handle), PURPLE_NOTIFY_MSG_ERROR, (title), \
62.746 - (primary), (secondary), NULL, NULL)
62.747 -
62.748 -/*@}*/
62.749 -
62.750 -/**************************************************************************/
62.751 -/** @name UI Registration Functions */
62.752 -/**************************************************************************/
62.753 -/*@{*/
62.754 -
62.755 -/**
62.756 - * Sets the UI operations structure to be used when displaying a
62.757 - * notification.
62.758 - *
62.759 - * @param ops The UI operations structure.
62.760 - */
62.761 -void purple_notify_set_ui_ops(PurpleNotifyUiOps *ops);
62.762 -
62.763 -/**
62.764 - * Returns the UI operations structure to be used when displaying a
62.765 - * notification.
62.766 - *
62.767 - * @return The UI operations structure.
62.768 - */
62.769 -PurpleNotifyUiOps *purple_notify_get_ui_ops(void);
62.770 -
62.771 -/*@}*/
62.772 -
62.773 -/**************************************************************************/
62.774 -/** @name Notify Subsystem */
62.775 -/**************************************************************************/
62.776 -/*@{*/
62.777 -
62.778 -/**
62.779 - * Returns the notify subsystem handle.
62.780 - *
62.781 - * @return The notify subsystem handle.
62.782 - */
62.783 -void *purple_notify_get_handle(void);
62.784 -
62.785 -/**
62.786 - * Initializes the notify subsystem.
62.787 - */
62.788 -void purple_notify_init(void);
62.789 -
62.790 -/**
62.791 - * Uninitializes the notify subsystem.
62.792 - */
62.793 -void purple_notify_uninit(void);
62.794 -
62.795 -/*@}*/
62.796 -
62.797 -
62.798 -#ifdef __cplusplus
62.799 -}
62.800 -#endif
62.801 -
62.802 -#endif /* _PURPLE_NOTIFY_H_ */
63.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/ntlm.h Fri Aug 21 13:24:36 2009 -0700
63.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
63.3 @@ -1,73 +0,0 @@
63.4 -/**
63.5 - * @file ntlm.h
63.6 - */
63.7 -
63.8 -/* purple
63.9 - *
63.10 - * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de>
63.11 - *
63.12 - * ntlm structs are taken from NTLM description on
63.13 - * http://www.innovation.ch/java/ntlm.html
63.14 - *
63.15 - * This program is free software; you can redistribute it and/or modify
63.16 - * it under the terms of the GNU General Public License as published by
63.17 - * the Free Software Foundation; either version 2 of the License, or
63.18 - * (at your option) any later version.
63.19 - *
63.20 - * This program is distributed in the hope that it will be useful,
63.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
63.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
63.23 - * GNU General Public License for more details.
63.24 - *
63.25 - * You should have received a copy of the GNU General Public License
63.26 - * along with this program; if not, write to the Free Software
63.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
63.28 - */
63.29 -
63.30 -#ifndef _PURPLE_NTLM_H
63.31 -#define _PURPLE_NTLM_H
63.32 -
63.33 -#ifdef __cplusplus
63.34 -extern "C" {
63.35 -#endif
63.36 -
63.37 -/**
63.38 - * Generates the base64 encoded type 1 message needed for NTLM authentication
63.39 - *
63.40 - * @param hostname Your hostname
63.41 - * @param domain The domain to authenticate to
63.42 - * @return base64 encoded string to send to the server. This should
63.43 - * be g_free'd by the caller.
63.44 - */
63.45 -gchar *purple_ntlm_gen_type1(const gchar *hostname, const gchar *domain);
63.46 -
63.47 -/**
63.48 - * Parses the ntlm type 2 message
63.49 - *
63.50 - * @param type2 String containing the base64 encoded type2 message
63.51 - * @param flags If not @c NULL, this will store the flags for the message
63.52 - *
63.53 - * @return The nonce for use in message type3. This is a statically
63.54 - * allocated 8 byte binary string.
63.55 - */
63.56 -guint8 *purple_ntlm_parse_type2(const gchar *type2, guint32 *flags);
63.57 -
63.58 -/**
63.59 - * Generates a type3 message
63.60 - *
63.61 - * @param username The username
63.62 - * @param passw The password
63.63 - * @param hostname The hostname
63.64 - * @param domain The domain to authenticate against
63.65 - * @param nonce The nonce returned by purple_ntlm_parse_type2
63.66 - * @param flags Pointer to the flags returned by purple_ntlm_parse_type2
63.67 - * @return A base64 encoded type3 message. This should be g_free'd by
63.68 - * the caller.
63.69 - */
63.70 -gchar *purple_ntlm_gen_type3(const gchar *username, const gchar *passw, const gchar *hostname, const gchar *domain, const guint8 *nonce, guint32 *flags);
63.71 -
63.72 -#ifdef __cplusplus
63.73 -}
63.74 -#endif
63.75 -
63.76 -#endif /* _PURPLE_NTLM_H */
64.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/object.h Fri Aug 21 13:24:36 2009 -0700
64.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
64.3 @@ -1,242 +0,0 @@
64.4 -/**
64.5 - * @file object.h MSNObject API
64.6 - *
64.7 - * purple
64.8 - *
64.9 - * Purple is the legal property of its developers, whose names are too numerous
64.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
64.11 - * source distribution.
64.12 - *
64.13 - * This program is free software; you can redistribute it and/or modify
64.14 - * it under the terms of the GNU General Public License as published by
64.15 - * the Free Software Foundation; either version 2 of the License, or
64.16 - * (at your option) any later version.
64.17 - *
64.18 - * This program is distributed in the hope that it will be useful,
64.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
64.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.21 - * GNU General Public License for more details.
64.22 - *
64.23 - * You should have received a copy of the GNU General Public License
64.24 - * along with this program; if not, write to the Free Software
64.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
64.26 - */
64.27 -#ifndef _MSN_OBJECT_H_
64.28 -#define _MSN_OBJECT_H_
64.29 -
64.30 -#include "imgstore.h"
64.31 -
64.32 -#include "internal.h"
64.33 -
64.34 -typedef enum
64.35 -{
64.36 - MSN_OBJECT_UNKNOWN = -1, /**< Unknown object */
64.37 - MSN_OBJECT_RESERVED1 = 1, /**< Reserved */
64.38 - MSN_OBJECT_EMOTICON = 2, /**< Custom Emoticon */
64.39 - MSN_OBJECT_USERTILE = 3, /**< UserTile (buddy icon) */
64.40 - MSN_OBJECT_RESERVED2 = 4, /**< Reserved */
64.41 - MSN_OBJECT_BACKGROUND = 5 /**< Background */
64.42 -
64.43 -} MsnObjectType;
64.44 -
64.45 -typedef struct
64.46 -{
64.47 - gboolean local;
64.48 -
64.49 - char *creator;
64.50 - int size;
64.51 - MsnObjectType type;
64.52 - PurpleStoredImage *img;
64.53 - char *location;
64.54 - char *friendly;
64.55 - char *sha1d;
64.56 - char *sha1c;
64.57 -
64.58 -} MsnObject;
64.59 -
64.60 -/**
64.61 - * Creates a MsnObject structure.
64.62 - *
64.63 - * @return A new MsnObject structure.
64.64 - */
64.65 -MsnObject *msn_object_new(void);
64.66 -
64.67 -/**
64.68 - * Creates a MsnObject structure from a string.
64.69 - *
64.70 - * @param str The string.
64.71 - *
64.72 - * @return The new MsnObject structure.
64.73 - */
64.74 -MsnObject *msn_object_new_from_string(const char *str);
64.75 -
64.76 -/**
64.77 - * Creates a MsnObject structure from a stored image
64.78 - *
64.79 - * @param img The image associated to object
64.80 - * @param location The object location as stored in MsnObject
64.81 - * @param creator The creator of the object
64.82 - * @param type The type of the object
64.83 - *
64.84 - * @return A new MsnObject structure
64.85 - */
64.86 -MsnObject *msn_object_new_from_image(PurpleStoredImage *img,
64.87 - const char *location, const char *creator, MsnObjectType type);
64.88 -
64.89 -/**
64.90 - * Destroys an MsnObject structure.
64.91 - *
64.92 - * @param obj The object structure.
64.93 - */
64.94 -void msn_object_destroy(MsnObject *obj);
64.95 -
64.96 -/**
64.97 - * Outputs a string representation of an MsnObject.
64.98 - *
64.99 - * @param obj The object.
64.100 - *
64.101 - * @return The string representation. This must be freed.
64.102 - */
64.103 -char *msn_object_to_string(const MsnObject *obj);
64.104 -
64.105 -/**
64.106 - * Sets the creator field in a MsnObject.
64.107 - *
64.108 - * @param creator The creator value.
64.109 - */
64.110 -void msn_object_set_creator(MsnObject *obj, const char *creator);
64.111 -
64.112 -/**
64.113 - * Sets the size field in a MsnObject.
64.114 - *
64.115 - * @param size The size value.
64.116 - */
64.117 -void msn_object_set_size(MsnObject *obj, int size);
64.118 -
64.119 -/**
64.120 - * Sets the type field in a MsnObject.
64.121 - *
64.122 - * @param type The type value.
64.123 - */
64.124 -void msn_object_set_type(MsnObject *obj, MsnObjectType type);
64.125 -
64.126 -/**
64.127 - * Sets the location field in a MsnObject.
64.128 - *
64.129 - * @param location The location value.
64.130 - */
64.131 -void msn_object_set_location(MsnObject *obj, const char *location);
64.132 -
64.133 -/**
64.134 - * Sets the friendly name field in a MsnObject.
64.135 - *
64.136 - * @param friendly The friendly name value.
64.137 - */
64.138 -void msn_object_set_friendly(MsnObject *obj, const char *friendly);
64.139 -
64.140 -/**
64.141 - * Sets the SHA1D field in a MsnObject.
64.142 - *
64.143 - * @param sha1d The sha1d value.
64.144 - */
64.145 -void msn_object_set_sha1d(MsnObject *obj, const char *sha1d);
64.146 -
64.147 -/**
64.148 - * Sets the SHA1C field in a MsnObject.
64.149 - *
64.150 - * @param sha1c The sha1c value.
64.151 - */
64.152 -void msn_object_set_sha1c(MsnObject *obj, const char *sha1c);
64.153 -
64.154 -/**
64.155 - * Associates an image with a MsnObject.
64.156 - *
64.157 - * @param obj The object.
64.158 - * @param img The image to associate.
64.159 - */
64.160 -void msn_object_set_image(MsnObject *obj, PurpleStoredImage *img);
64.161 -
64.162 -/**
64.163 - * Returns a MsnObject's creator value.
64.164 - *
64.165 - * @param obj The object.
64.166 - *
64.167 - * @return The creator value.
64.168 - */
64.169 -const char *msn_object_get_creator(const MsnObject *obj);
64.170 -
64.171 -/**
64.172 - * Returns a MsnObject's size value.
64.173 - *
64.174 - * @param obj The object.
64.175 - *
64.176 - * @return The size value.
64.177 - */
64.178 -int msn_object_get_size(const MsnObject *obj);
64.179 -
64.180 -/**
64.181 - * Returns a MsnObject's type.
64.182 - *
64.183 - * @param obj The object.
64.184 - *
64.185 - * @return The object type.
64.186 - */
64.187 -MsnObjectType msn_object_get_type(const MsnObject *obj);
64.188 -
64.189 -/**
64.190 - * Returns a MsnObject's location value.
64.191 - *
64.192 - * @param obj The object.
64.193 - *
64.194 - * @return The location value.
64.195 - */
64.196 -const char *msn_object_get_location(const MsnObject *obj);
64.197 -
64.198 -/**
64.199 - * Returns a MsnObject's friendly name value.
64.200 - *
64.201 - * @param obj The object.
64.202 - *
64.203 - * @return The friendly name value.
64.204 - */
64.205 -const char *msn_object_get_friendly(const MsnObject *obj);
64.206 -
64.207 -/**
64.208 - * Returns a MsnObject's SHA1D value.
64.209 - *
64.210 - * @param obj The object.
64.211 - *
64.212 - * @return The SHA1D value.
64.213 - */
64.214 -const char *msn_object_get_sha1d(const MsnObject *obj);
64.215 -
64.216 -/**
64.217 - * Returns a MsnObject's SHA1C value.
64.218 - *
64.219 - * @param obj The object.
64.220 - *
64.221 - * @return The SHA1C value.
64.222 - */
64.223 -const char *msn_object_get_sha1c(const MsnObject *obj);
64.224 -
64.225 -/**
64.226 - * Returns a MsnObject's SHA1C value if it exists, otherwise SHA1D.
64.227 - *
64.228 - * @param obj The object.
64.229 - *
64.230 - * @return The SHA1C value.
64.231 - */
64.232 -const char *msn_object_get_sha1(const MsnObject *obj);
64.233 -
64.234 -/**
64.235 - * Returns the image associated with the MsnObject.
64.236 - *
64.237 - * @param obj The object.
64.238 - *
64.239 - * @return The associated image.
64.240 - */
64.241 -PurpleStoredImage *msn_object_get_image(const MsnObject *obj);
64.242 -
64.243 -void msn_object_set_local(MsnObject *obj);
64.244 -
64.245 -#endif /* _MSN_OBJECT_H_ */
65.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/oim.h Fri Aug 21 13:24:36 2009 -0700
65.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
65.3 @@ -1,163 +0,0 @@
65.4 -/**
65.5 - * @file oim.h Header file for oim.c
65.6 - * Author
65.7 - * MaYuan<mayuan2006@gmail.com>
65.8 - * purple
65.9 - *
65.10 - * Purple is the legal property of its developers, whose names are too numerous
65.11 - * to list here. Please refer to the COPYRIGHT file distributed with this
65.12 - * source distribution.
65.13 - *
65.14 - * This program is free software; you can redistribute it and/or modify
65.15 - * it under the terms of the GNU General Public License as published by
65.16 - * the Free Software Foundation; either version 2 of the License, or
65.17 - * (at your option) any later version.
65.18 - *
65.19 - * This program is distributed in the hope that it will be useful,
65.20 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
65.21 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
65.22 - * GNU General Public License for more details.
65.23 - *
65.24 - * You should have received a copy of the GNU General Public License
65.25 - * along with this program; if not, write to the Free Software
65.26 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
65.27 - */
65.28 -#ifndef _MSN_OIM_H_
65.29 -#define _MSN_OIM_H_
65.30 -
65.31 -/* OIM Retrieval Info */
65.32 -#define MSN_OIM_RETRIEVE_HOST "rsi.hotmail.com"
65.33 -#define MSN_OIM_RETRIEVE_URL "/rsi/rsi.asmx"
65.34 -
65.35 -/* OIM GetMetadata SOAP Template */
65.36 -#define MSN_OIM_GET_METADATA_ACTION "http://www.hotmail.msn.com/ws/2004/09/oim/rsi/GetMetadata"
65.37 -
65.38 -#define MSN_OIM_GET_METADATA_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
65.39 -"<soap:Envelope"\
65.40 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
65.41 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
65.42 - " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
65.43 - "<soap:Header>"\
65.44 - "<PassportCookie xmlns=\"http://www.hotmail.msn.com/ws/2004/09/oim/rsi\">"\
65.45 - "<t>EMPTY</t>"\
65.46 - "<p>EMPTY</p>"\
65.47 - "</PassportCookie>"\
65.48 - "</soap:Header>"\
65.49 - "<soap:Body>"\
65.50 - "<GetMetadata xmlns=\"http://www.hotmail.msn.com/ws/2004/09/oim/rsi\" />"\
65.51 - "</soap:Body>"\
65.52 -"</soap:Envelope>"
65.53 -
65.54 -/*OIM GetMessage SOAP Template*/
65.55 -#define MSN_OIM_GET_SOAP_ACTION "http://www.hotmail.msn.com/ws/2004/09/oim/rsi/GetMessage"
65.56 -
65.57 -#define MSN_OIM_GET_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
65.58 -"<soap:Envelope"\
65.59 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
65.60 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
65.61 - " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
65.62 - "<soap:Header>"\
65.63 - "<PassportCookie xmlns=\"http://www.hotmail.msn.com/ws/2004/09/oim/rsi\">"\
65.64 - "<t>EMPTY</t>"\
65.65 - "<p>EMPTY</p>"\
65.66 - "</PassportCookie>"\
65.67 - "</soap:Header>"\
65.68 - "<soap:Body>"\
65.69 - "<GetMessage xmlns=\"http://www.hotmail.msn.com/ws/2004/09/oim/rsi\">"\
65.70 - "<messageId>%s</messageId>"\
65.71 - "<alsoMarkAsRead>false</alsoMarkAsRead>"\
65.72 - "</GetMessage>"\
65.73 - "</soap:Body>"\
65.74 -"</soap:Envelope>"
65.75 -
65.76 -/*OIM DeleteMessages SOAP Template*/
65.77 -#define MSN_OIM_DEL_SOAP_ACTION "http://www.hotmail.msn.com/ws/2004/09/oim/rsi/DeleteMessages"
65.78 -
65.79 -#define MSN_OIM_DEL_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
65.80 -"<soap:Envelope"\
65.81 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
65.82 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
65.83 - " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
65.84 - "<soap:Header>"\
65.85 - "<PassportCookie xmlns=\"http://www.hotmail.msn.com/ws/2004/09/oim/rsi\">"\
65.86 - "<t>EMPTY</t>"\
65.87 - "<p>EMPTY</p>"\
65.88 - "</PassportCookie>"\
65.89 - "</soap:Header>"\
65.90 - "<soap:Body>"\
65.91 - "<DeleteMessages xmlns=\"http://www.hotmail.msn.com/ws/2004/09/oim/rsi\">"\
65.92 - "<messageIds>"\
65.93 - "<messageId>%s</messageId>"\
65.94 - "</messageIds>"\
65.95 - "</DeleteMessages>"\
65.96 - "</soap:Body>"\
65.97 -"</soap:Envelope>"
65.98 -
65.99 -/*OIM Send SOAP Template*/
65.100 -#define MSN_OIM_MSG_TEMPLATE "MIME-Version: 1.0\n"\
65.101 - "Content-Type: text/plain; charset=UTF-8\n"\
65.102 - "Content-Transfer-Encoding: base64\n"\
65.103 - "X-OIM-Message-Type: OfflineMessage\n"\
65.104 - "X-OIM-Run-Id: {%s}\n"\
65.105 - "X-OIM-Sequence-Num: %d\n\n"
65.106 -
65.107 -#define MSN_OIM_SEND_HOST "ows.messenger.msn.com"
65.108 -#define MSN_OIM_SEND_URL "/OimWS/oim.asmx"
65.109 -#define MSN_OIM_SEND_SOAP_ACTION "http://messenger.live.com/ws/2006/09/oim/Store2"
65.110 -#define MSN_OIM_SEND_TEMPLATE "<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
65.111 -"<soap:Envelope"\
65.112 - " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""\
65.113 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""\
65.114 - " xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"\
65.115 - "<soap:Header>"\
65.116 - "<From"\
65.117 - " memberName=\"%s\""\
65.118 - " friendlyName=\"%s\""\
65.119 - " xml:lang=\"en-US\""\
65.120 - " proxy=\"MSNMSGR\""\
65.121 - " xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\""\
65.122 - " msnpVer=\"MSNP15\""\
65.123 - " buildVer=\"8.5.1288\"/>"\
65.124 - "<To memberName=\"%s\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\"/>"\
65.125 - "<Ticket passport=\"EMPTY\" appid=\"%s\" lockkey=\"%s\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\"/>"\
65.126 - "<Sequence xmlns=\"http://schemas.xmlsoap.org/ws/2003/03/rm\">"\
65.127 - "<Identifier xmlns=\"http://schemas.xmlsoap.org/ws/2002/07/utility\">http://messenger.msn.com</Identifier>"\
65.128 - "<MessageNumber>%d</MessageNumber>"\
65.129 - "</Sequence>"\
65.130 - "</soap:Header>"\
65.131 - "<soap:Body>"\
65.132 - "<MessageType xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\">text</MessageType>"\
65.133 - "<Content xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\">%s</Content>"\
65.134 - "</soap:Body>"\
65.135 -"</soap:Envelope>"
65.136 -
65.137 -typedef struct _MsnOim MsnOim;
65.138 -
65.139 -struct _MsnOim
65.140 -{
65.141 - MsnSession *session;
65.142 -
65.143 - GList * oim_list;
65.144 -
65.145 - char *challenge;
65.146 - char *run_id;
65.147 - gint send_seq;
65.148 - GQueue *send_queue;
65.149 -};
65.150 -
65.151 -/****************************************************
65.152 - * function prototype
65.153 - * **************************************************/
65.154 -MsnOim * msn_oim_new(MsnSession *session);
65.155 -void msn_oim_destroy(MsnOim *oim);
65.156 -
65.157 -void msn_parse_oim_msg(MsnOim *oim,const char *xmlmsg);
65.158 -
65.159 -/*Send OIM Message*/
65.160 -void msn_oim_prep_send_msg_info(MsnOim *oim, const char *membername,
65.161 - const char *friendname, const char *tomember,
65.162 - const char * msg);
65.163 -
65.164 -void msn_oim_send_msg(MsnOim *oim);
65.165 -
65.166 -#endif/* _MSN_OIM_H_*/
66.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/oscar.h Fri Aug 21 13:24:36 2009 -0700
66.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
66.3 @@ -1,1707 +0,0 @@
66.4 -/*
66.5 - * Purple's oscar protocol plugin
66.6 - * This file is the legal property of its developers.
66.7 - * Please see the AUTHORS file distributed alongside this file.
66.8 - *
66.9 - * This library is free software; you can redistribute it and/or
66.10 - * modify it under the terms of the GNU Lesser General Public
66.11 - * License as published by the Free Software Foundation; either
66.12 - * version 2 of the License, or (at your option) any later version.
66.13 - *
66.14 - * This library is distributed in the hope that it will be useful,
66.15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
66.16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
66.17 - * Lesser General Public License for more details.
66.18 - *
66.19 - * You should have received a copy of the GNU Lesser General Public
66.20 - * License along with this library; if not, write to the Free Software
66.21 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
66.22 -*/
66.23 -
66.24 -/*
66.25 - * Main libfaim header. Must be included in client for prototypes/macros.
66.26 - *
66.27 - * "come on, i turned a chick lesbian; i think this is the hackish equivalent"
66.28 - * -- Josh Myer
66.29 - *
66.30 - */
66.31 -
66.32 -#ifndef _OSCAR_H_
66.33 -#define _OSCAR_H_
66.34 -
66.35 -#include "circbuffer.h"
66.36 -#include "debug.h"
66.37 -#include "eventloop.h"
66.38 -#include "internal.h"
66.39 -#include "proxy.h"
66.40 -#include "sslconn.h"
66.41 -
66.42 -#include <stdio.h>
66.43 -#include <string.h>
66.44 -#include <fcntl.h>
66.45 -#include <sys/types.h>
66.46 -#include <stdlib.h>
66.47 -#include <stdarg.h>
66.48 -#include <errno.h>
66.49 -#include <time.h>
66.50 -
66.51 -#ifndef _WIN32
66.52 -#include <sys/time.h>
66.53 -#include <unistd.h>
66.54 -#include <netdb.h>
66.55 -#include <netinet/in.h>
66.56 -#include <sys/socket.h>
66.57 -#else
66.58 -#include "libc_interface.h"
66.59 -#endif
66.60 -
66.61 -typedef struct _ByteStream ByteStream;
66.62 -typedef struct _ClientInfo ClientInfo;
66.63 -typedef struct _FlapConnection FlapConnection;
66.64 -typedef struct _FlapFrame FlapFrame;
66.65 -typedef struct _IcbmArgsCh2 IcbmArgsCh2;
66.66 -typedef struct _IcbmCookie IcbmCookie;
66.67 -typedef struct _OscarData OscarData;
66.68 -typedef struct _QueuedSnac QueuedSnac;
66.69 -
66.70 -typedef guint32 aim_snacid_t;
66.71 -
66.72 -#include "snactypes.h"
66.73 -
66.74 -#ifdef __cplusplus
66.75 -extern "C" {
66.76 -#endif
66.77 -
66.78 -#define FAIM_SNAC_HASH_SIZE 16
66.79 -
66.80 -/*
66.81 - * Current Maximum Length for usernames (not including NULL)
66.82 - *
66.83 - * Currently only names up to 16 characters can be registered
66.84 - * however it is apparently legal for them to be larger.
66.85 - */
66.86 -#define MAXSNLEN 97
66.87 -
66.88 -/*
66.89 - * Current Maximum Length for Instant Messages
66.90 - *
66.91 - * This was found basically by experiment, but not wholly
66.92 - * accurate experiment. It should not be regarded
66.93 - * as completely correct. But its a decent approximation.
66.94 - *
66.95 - * Note that although we can send this much, its impossible
66.96 - * for WinAIM clients (up through the latest (4.0.1957)) to
66.97 - * send any more than 1kb. Amaze all your windows friends
66.98 - * with utterly oversized instant messages!
66.99 - */
66.100 -#define MAXMSGLEN 2544
66.101 -
66.102 -/*
66.103 - * Maximum size of a Buddy Icon.
66.104 - */
66.105 -#define MAXICONLEN 7168
66.106 -#define AIM_ICONIDENT "AVT1picture.id"
66.107 -
66.108 -/*
66.109 - * Current Maximum Length for Chat Room Messages
66.110 - *
66.111 - * This is actually defined by the protocol to be
66.112 - * dynamic, but I have yet to see due cause to
66.113 - * define it dynamically here. Maybe later.
66.114 - *
66.115 - */
66.116 -#define MAXCHATMSGLEN 512
66.117 -
66.118 -/*
66.119 - * Found by trial and error.
66.120 - */
66.121 -#define MAXAVAILMSGLEN 251
66.122 -
66.123 -/**
66.124 - * Maximum length for the password of an ICQ account
66.125 - */
66.126 -#define MAXICQPASSLEN 8
66.127 -
66.128 -#define AIM_MD5_STRING "AOL Instant Messenger (SM)"
66.129 -
66.130 -/*
66.131 - * Client info. Filled in by the client and passed in to
66.132 - * aim_send_login(). The information ends up getting passed to OSCAR
66.133 - * through the initial login command.
66.134 - *
66.135 - */
66.136 -struct _ClientInfo
66.137 -{
66.138 - const char *clientstring;
66.139 - guint16 clientid;
66.140 - guint16 major;
66.141 - guint16 minor;
66.142 - guint16 point;
66.143 - guint16 build;
66.144 - guint32 distrib;
66.145 - const char *country; /* two-letter abbrev */
66.146 - const char *lang; /* two-letter abbrev */
66.147 -};
66.148 -
66.149 -/* Needs to be checked */
66.150 -#define CLIENTINFO_AIM_3_5_1670 { \
66.151 - "AOL Instant Messenger (SM), version 3.5.1670/WIN32", \
66.152 - 0x0004, \
66.153 - 0x0003, 0x0005, \
66.154 - 0x0000, 0x0686, \
66.155 - 0x0000002a, \
66.156 - "us", "en", \
66.157 -}
66.158 -
66.159 -/* Needs to be checked */
66.160 -/* Latest winaim without ssi */
66.161 -#define CLIENTINFO_AIM_4_1_2010 { \
66.162 - "AOL Instant Messenger (SM), version 4.1.2010/WIN32", \
66.163 - 0x0004, \
66.164 - 0x0004, 0x0001, \
66.165 - 0x0000, 0x07da, \
66.166 - 0x0000004b, \
66.167 - "us", "en", \
66.168 -}
66.169 -
66.170 -/* Needs to be checked */
66.171 -#define CLIENTINFO_AIM_4_3_2188 { \
66.172 - "AOL Instant Messenger (SM), version 4.3.2188/WIN32", \
66.173 - 0x0109, \
66.174 - 0x0400, 0x0003, \
66.175 - 0x0000, 0x088c, \
66.176 - 0x00000086, \
66.177 - "us", "en", \
66.178 -}
66.179 -
66.180 -/* Needs to be checked */
66.181 -#define CLIENTINFO_AIM_4_8_2540 { \
66.182 - "AOL Instant Messenger (SM), version 4.8.2540/WIN32", \
66.183 - 0x0109, \
66.184 - 0x0004, 0x0008, \
66.185 - 0x0000, 0x09ec, \
66.186 - 0x000000af, \
66.187 - "us", "en", \
66.188 -}
66.189 -
66.190 -/* Needs to be checked */
66.191 -#define CLIENTINFO_AIM_5_0_2938 { \
66.192 - "AOL Instant Messenger, version 5.0.2938/WIN32", \
66.193 - 0x0109, \
66.194 - 0x0005, 0x0000, \
66.195 - 0x0000, 0x0b7a, \
66.196 - 0x00000000, \
66.197 - "us", "en", \
66.198 -}
66.199 -
66.200 -#define CLIENTINFO_AIM_5_1_3036 { \
66.201 - "AOL Instant Messenger, version 5.1.3036/WIN32", \
66.202 - 0x0109, \
66.203 - 0x0005, 0x0001, \
66.204 - 0x0000, 0x0bdc, \
66.205 - 0x000000d2, \
66.206 - "us", "en", \
66.207 -}
66.208 -
66.209 -#define CLIENTINFO_AIM_5_5_3415 { \
66.210 - "AOL Instant Messenger, version 5.5.3415/WIN32", \
66.211 - 0x0109, \
66.212 - 0x0005, 0x0005, \
66.213 - 0x0000, 0x0057, \
66.214 - 0x000000ef, \
66.215 - "us", "en", \
66.216 -}
66.217 -
66.218 -#define CLIENTINFO_AIM_5_9_3702 { \
66.219 - "AOL Instant Messenger, version 5.9.3702/WIN32", \
66.220 - 0x0109, \
66.221 - 0x0005, 0x0009, \
66.222 - 0x0000, 0x0e76, \
66.223 - 0x00000111, \
66.224 - "us", "en", \
66.225 -}
66.226 -
66.227 -#define CLIENTINFO_ICHAT_1_0 { \
66.228 - "Apple iChat", \
66.229 - 0x311a, \
66.230 - 0x0001, 0x0000, \
66.231 - 0x0000, 0x003c, \
66.232 - 0x000000c6, \
66.233 - "us", "en", \
66.234 -}
66.235 -
66.236 -/* Needs to be checked */
66.237 -#define CLIENTINFO_ICQ_4_65_3281 { \
66.238 - "ICQ Inc. - Product of ICQ (TM) 2000b.4.65.1.3281.85", \
66.239 - 0x010a, \
66.240 - 0x0004, 0x0041, \
66.241 - 0x0001, 0x0cd1, \
66.242 - 0x00000055, \
66.243 - "us", "en", \
66.244 -}
66.245 -
66.246 -/* Needs to be checked */
66.247 -#define CLIENTINFO_ICQ_5_34_3728 { \
66.248 - "ICQ Inc. - Product of ICQ (TM).2002a.5.34.1.3728.85", \
66.249 - 0x010a, \
66.250 - 0x0005, 0x0022, \
66.251 - 0x0001, 0x0e8f, \
66.252 - 0x00000055, \
66.253 - "us", "en", \
66.254 -}
66.255 -
66.256 -#define CLIENTINFO_ICQ_5_45_3777 { \
66.257 - "ICQ Inc. - Product of ICQ (TM).2003a.5.45.1.3777.85", \
66.258 - 0x010a, \
66.259 - 0x0005, 0x002d, \
66.260 - 0x0001, 0x0ec1, \
66.261 - 0x00000055, \
66.262 - "us", "en", \
66.263 -}
66.264 -
66.265 -#define CLIENTINFO_ICQ6_6_0_6059 { \
66.266 - "ICQ Client", \
66.267 - 0x010a, \
66.268 - 0x0006, 0x0000, \
66.269 - 0x0000, 0x17ab, \
66.270 - 0x00007535, \
66.271 - "us", "en", \
66.272 -}
66.273 -
66.274 -#define CLIENTINFO_ICQBASIC_14_3_1068 { \
66.275 - "ICQBasic", \
66.276 - 0x010a, \
66.277 - 0x0014, 0x0003, \
66.278 - 0x0000, 0x042c, \
66.279 - 0x0000043d, \
66.280 - "us", "en", \
66.281 -}
66.282 -
66.283 -#define CLIENTINFO_ICQBASIC_14_34_3000 { \
66.284 - "ICQBasic", \
66.285 - 0x010a, \
66.286 - 0x0014, 0x0034, \
66.287 - 0x0000, 0x0bb8, \
66.288 - 0x0000043d, \
66.289 - "us", "en", \
66.290 -}
66.291 -
66.292 -#define CLIENTINFO_ICQBASIC_14_34_3096 { \
66.293 - "ICQBasic", \
66.294 - 0x010a, \
66.295 - 0x0014, 0x0034, \
66.296 - 0x0000, 0x0c18, \
66.297 - 0x0000043d, \
66.298 - "us", "en", \
66.299 -}
66.300 -
66.301 -#define CLIENTINFO_NETSCAPE_7_0_1 { \
66.302 - "Netscape 2000 an approved user of AOL Instant Messenger (SM)", \
66.303 - 0x1d0d, \
66.304 - 0x0007, 0x0000, \
66.305 - 0x0001, 0x0000, \
66.306 - 0x00000058, \
66.307 - "us", "en", \
66.308 -}
66.309 -
66.310 -/*
66.311 - * We need to use the major-minor-micro versions from the official
66.312 - * AIM and ICQ programs here or AOL won't let us use certain features.
66.313 - *
66.314 - * 0x00000611 is the distid given to us by AOL for use as the default
66.315 - * libpurple distid.
66.316 - */
66.317 -#define CLIENTINFO_PURPLE_AIM { \
66.318 - NULL, \
66.319 - 0x0109, \
66.320 - 0x0005, 0x0001, \
66.321 - 0x0000, 0x0bdc, \
66.322 - 0x00000611, \
66.323 - "us", "en", \
66.324 -}
66.325 -
66.326 -#define CLIENTINFO_PURPLE_ICQ { \
66.327 - NULL, \
66.328 - 0x010a, \
66.329 - 0x0014, 0x0034, \
66.330 - 0x0000, 0x0c18, \
66.331 - 0x00000611, \
66.332 - "us", "en", \
66.333 -}
66.334 -
66.335 -#define CLIENTINFO_AIM_KNOWNGOOD CLIENTINFO_AIM_5_1_3036
66.336 -#define CLIENTINFO_ICQ_KNOWNGOOD CLIENTINFO_ICQBASIC_14_34_3096
66.337 -
66.338 -typedef enum
66.339 -{
66.340 - OSCAR_DISCONNECT_DONE, /* not considered an error */
66.341 - OSCAR_DISCONNECT_LOCAL_CLOSED, /* peer connections only, not considered an error */
66.342 - OSCAR_DISCONNECT_REMOTE_CLOSED,
66.343 - OSCAR_DISCONNECT_REMOTE_REFUSED, /* peer connections only */
66.344 - OSCAR_DISCONNECT_LOST_CONNECTION,
66.345 - OSCAR_DISCONNECT_INVALID_DATA,
66.346 - OSCAR_DISCONNECT_COULD_NOT_CONNECT,
66.347 - OSCAR_DISCONNECT_RETRYING /* peer connections only */
66.348 -} OscarDisconnectReason;
66.349 -
66.350 -typedef enum
66.351 -{
66.352 - OSCAR_CAPABILITY_BUDDYICON = 0x00000001,
66.353 - OSCAR_CAPABILITY_TALK = 0x00000002,
66.354 - OSCAR_CAPABILITY_DIRECTIM = 0x00000004,
66.355 - OSCAR_CAPABILITY_CHAT = 0x00000008,
66.356 - OSCAR_CAPABILITY_GETFILE = 0x00000010,
66.357 - OSCAR_CAPABILITY_SENDFILE = 0x00000020,
66.358 - OSCAR_CAPABILITY_GAMES = 0x00000040,
66.359 - OSCAR_CAPABILITY_ADDINS = 0x00000080,
66.360 - OSCAR_CAPABILITY_SENDBUDDYLIST = 0x00000100,
66.361 - OSCAR_CAPABILITY_GAMES2 = 0x00000200,
66.362 - OSCAR_CAPABILITY_ICQ_DIRECT = 0x00000400,
66.363 - OSCAR_CAPABILITY_APINFO = 0x00000800,
66.364 - OSCAR_CAPABILITY_ICQRTF = 0x00001000,
66.365 - OSCAR_CAPABILITY_EMPTY = 0x00002000,
66.366 - OSCAR_CAPABILITY_ICQSERVERRELAY = 0x00004000,
66.367 - OSCAR_CAPABILITY_UNICODEOLD = 0x00008000,
66.368 - OSCAR_CAPABILITY_TRILLIANCRYPT = 0x00010000,
66.369 - OSCAR_CAPABILITY_UNICODE = 0x00020000,
66.370 - OSCAR_CAPABILITY_INTEROPERATE = 0x00040000,
66.371 - OSCAR_CAPABILITY_SHORTCAPS = 0x00080000,
66.372 - OSCAR_CAPABILITY_HIPTOP = 0x00100000,
66.373 - OSCAR_CAPABILITY_SECUREIM = 0x00200000,
66.374 - OSCAR_CAPABILITY_SMS = 0x00400000,
66.375 - OSCAR_CAPABILITY_VIDEO = 0x00800000,
66.376 - OSCAR_CAPABILITY_ICHATAV = 0x01000000,
66.377 - OSCAR_CAPABILITY_LIVEVIDEO = 0x02000000,
66.378 - OSCAR_CAPABILITY_CAMERA = 0x04000000,
66.379 - OSCAR_CAPABILITY_ICHAT_SCREENSHARE = 0x08000000,
66.380 - OSCAR_CAPABILITY_TYPING = 0x10000000,
66.381 - OSCAR_CAPABILITY_GENERICUNKNOWN = 0x20000000,
66.382 - OSCAR_CAPABILITY_LAST = 0x40000000
66.383 -} OscarCapability;
66.384 -
66.385 -/*
66.386 - * Byte Stream type. Sort of.
66.387 - *
66.388 - * Use of this type serves a couple purposes:
66.389 - * - Buffer/buflen pairs are passed all around everywhere. This turns
66.390 - * that into one value, as well as abstracting it slightly.
66.391 - * - Through the abstraction, it is possible to enable bounds checking
66.392 - * for robustness at the cost of performance. But a clean failure on
66.393 - * weird packets is much better than a segfault.
66.394 - * - I like having variables named "bs".
66.395 - *
66.396 - * Don't touch the insides of this struct. Or I'll have to kill you.
66.397 - *
66.398 - */
66.399 -struct _ByteStream
66.400 -{
66.401 - guint8 *data;
66.402 - guint32 len;
66.403 - guint32 offset;
66.404 -};
66.405 -
66.406 -struct _QueuedSnac
66.407 -{
66.408 - guint16 family;
66.409 - guint16 subtype;
66.410 - FlapFrame *frame;
66.411 -};
66.412 -
66.413 -struct _FlapFrame
66.414 -{
66.415 - guint8 channel;
66.416 - guint16 seqnum;
66.417 - ByteStream data; /* payload stream */
66.418 -};
66.419 -
66.420 -struct _FlapConnection
66.421 -{
66.422 - OscarData *od; /**< Pointer to parent session. */
66.423 - gboolean connected;
66.424 - time_t lastactivity; /**< Time of last transmit. */
66.425 - guint destroy_timeout;
66.426 - OscarDisconnectReason disconnect_reason;
66.427 - gchar *error_message;
66.428 - guint16 disconnect_code;
66.429 -
66.430 - /* A few variables that are only used when connecting */
66.431 - PurpleProxyConnectData *connect_data;
66.432 - guint16 cookielen;
66.433 - guint8 *cookie;
66.434 - gpointer new_conn_data;
66.435 -
66.436 - int fd;
66.437 - PurpleSslConnection *gsc;
66.438 - guint8 header[6];
66.439 - gssize header_received;
66.440 - FlapFrame buffer_incoming;
66.441 - PurpleCircBuffer *buffer_outgoing;
66.442 - guint watcher_incoming;
66.443 - guint watcher_outgoing;
66.444 -
66.445 - guint16 type;
66.446 - guint16 subtype;
66.447 - guint16 seqnum_out; /**< The sequence number of most recently sent packet. */
66.448 - guint16 seqnum_in; /**< The sequence number of most recently received packet. */
66.449 - GSList *groups;
66.450 - GSList *rateclasses; /* Contains nodes of struct rateclass. */
66.451 -
66.452 - GQueue *queued_snacs; /**< Contains QueuedSnacs. */
66.453 - GQueue *queued_lowpriority_snacs; /**< Contains QueuedSnacs to send only once queued_snacs is empty */
66.454 - guint queued_timeout;
66.455 -
66.456 - void *internal; /* internal conn-specific libfaim data */
66.457 -};
66.458 -
66.459 -struct _IcbmCookie
66.460 -{
66.461 - guchar cookie[8];
66.462 - int type;
66.463 - void *data;
66.464 - time_t addtime;
66.465 - struct _IcbmCookie *next;
66.466 -};
66.467 -
66.468 -#include "peer.h"
66.469 -
66.470 -/*
66.471 - * AIM Session: The main client-data interface.
66.472 - *
66.473 - */
66.474 -struct _OscarData
66.475 -{
66.476 - /** Only used when connecting with clientLogin */
66.477 - PurpleUtilFetchUrlData *url_data;
66.478 -
66.479 - gboolean iconconnecting;
66.480 - gboolean set_icon;
66.481 -
66.482 - GSList *create_rooms;
66.483 -
66.484 - gboolean conf;
66.485 - gboolean reqemail;
66.486 - gboolean setemail;
66.487 - char *email;
66.488 - gboolean setnick;
66.489 - char *newformatting;
66.490 - gboolean chpass;
66.491 - char *oldp;
66.492 - char *newp;
66.493 -
66.494 - GSList *oscar_chats;
66.495 - GHashTable *buddyinfo;
66.496 - GSList *requesticon;
66.497 -
66.498 - gboolean use_ssl;
66.499 - gboolean icq;
66.500 - guint getblisttimer;
66.501 -
66.502 - struct {
66.503 - guint maxwatchers; /* max users who can watch you */
66.504 - guint maxbuddies; /* max users you can watch */
66.505 - guint maxgroups; /* max groups in server list */
66.506 - guint maxpermits; /* max users on permit list */
66.507 - guint maxdenies; /* max users on deny list */
66.508 - guint maxsiglen; /* max size (bytes) of profile */
66.509 - guint maxawaymsglen; /* max size (bytes) of posted away message */
66.510 - } rights;
66.511 -
66.512 - PurpleConnection *gc;
66.513 -
66.514 - void *modlistv;
66.515 -
66.516 - /*
66.517 - * Outstanding snac handling
66.518 - *
66.519 - * TODO: Should these be per-connection? -mid
66.520 - */
66.521 - void *snac_hash[FAIM_SNAC_HASH_SIZE];
66.522 - aim_snacid_t snacid_next;
66.523 -
66.524 - /*
66.525 - * TODO: Data specific to a certain family should go into a
66.526 - * hashtable and the core parts of libfaim shouldn't
66.527 - * need to know about them.
66.528 - */
66.529 -
66.530 - IcbmCookie *msgcookies;
66.531 - struct aim_icq_info *icq_info;
66.532 -
66.533 - /** Only used when connecting with the old-style BUCP login. */
66.534 - struct aim_authresp_info *authinfo;
66.535 - struct aim_emailinfo *emailinfo;
66.536 -
66.537 - struct {
66.538 - struct aim_userinfo_s *userinfo;
66.539 - struct userinfo_node *requested;
66.540 - } locate;
66.541 -
66.542 - /* Server-stored information (ssi) */
66.543 - struct {
66.544 - gboolean received_data;
66.545 - guint16 numitems;
66.546 - struct aim_ssi_item *official;
66.547 - struct aim_ssi_item *local;
66.548 - struct aim_ssi_tmp *pending;
66.549 - time_t timestamp;
66.550 - gboolean waiting_for_ack;
66.551 - gboolean in_transaction;
66.552 - } ssi;
66.553 -
66.554 - /** Contains pointers to handler functions for each family/subtype. */
66.555 - GHashTable *handlerlist;
66.556 -
66.557 - /** A linked list containing FlapConnections. */
66.558 - GSList *oscar_connections;
66.559 - guint16 default_port;
66.560 -
66.561 - /** A linked list containing PeerConnections. */
66.562 - GSList *peer_connections;
66.563 -};
66.564 -
66.565 -/* Valid for calling aim_icq_setstatus() and for aim_userinfo_t->icqinfo.status */
66.566 -#define AIM_ICQ_STATE_NORMAL 0x00000000
66.567 -#define AIM_ICQ_STATE_AWAY 0x00000001
66.568 -#define AIM_ICQ_STATE_DND 0x00000002
66.569 -#define AIM_ICQ_STATE_OUT 0x00000004
66.570 -#define AIM_ICQ_STATE_BUSY 0x00000010
66.571 -#define AIM_ICQ_STATE_CHAT 0x00000020
66.572 -#define AIM_ICQ_STATE_INVISIBLE 0x00000100
66.573 -#define AIM_ICQ_STATE_WEBAWARE 0x00010000
66.574 -#define AIM_ICQ_STATE_HIDEIP 0x00020000
66.575 -#define AIM_ICQ_STATE_BIRTHDAY 0x00080000
66.576 -#define AIM_ICQ_STATE_DIRECTDISABLED 0x00100000
66.577 -#define AIM_ICQ_STATE_ICQHOMEPAGE 0x00200000
66.578 -#define AIM_ICQ_STATE_DIRECTREQUIREAUTH 0x10000000
66.579 -#define AIM_ICQ_STATE_DIRECTCONTACTLIST 0x20000000
66.580 -
66.581 -/**
66.582 - * Only used when connecting with the old-style BUCP login.
66.583 - */
66.584 -struct aim_clientrelease
66.585 -{
66.586 - char *name;
66.587 - guint32 build;
66.588 - char *url;
66.589 - char *info;
66.590 -};
66.591 -
66.592 -/**
66.593 - * Only used when connecting with the old-style BUCP login.
66.594 - */
66.595 -struct aim_authresp_info
66.596 -{
66.597 - char *bn;
66.598 - guint16 errorcode;
66.599 - char *errorurl;
66.600 - guint16 regstatus;
66.601 - char *email;
66.602 - char *bosip;
66.603 - guint16 cookielen;
66.604 - guint8 *cookie;
66.605 - char *chpassurl;
66.606 - struct aim_clientrelease latestrelease;
66.607 - struct aim_clientrelease latestbeta;
66.608 -};
66.609 -
66.610 -/* Callback data for redirect. */
66.611 -struct aim_redirect_data
66.612 -{
66.613 - guint16 group;
66.614 - const char *ip;
66.615 - guint16 cookielen;
66.616 - const guint8 *cookie;
66.617 - const char *ssl_cert_cn;
66.618 - guint8 use_ssl;
66.619 - struct { /* group == SNAC_FAMILY_CHAT */
66.620 - guint16 exchange;
66.621 - const char *room;
66.622 - guint16 instance;
66.623 - } chat;
66.624 -};
66.625 -
66.626 -int oscar_connect_to_bos(PurpleConnection *gc, OscarData *od, const char *host, guint16 port, guint8 *cookie, guint16 cookielen);
66.627 -
66.628 -/* family_auth.c */
66.629 -
66.630 -/**
66.631 - * Only used when connecting with the old-style BUCP login.
66.632 - */
66.633 -int aim_request_login(OscarData *od, FlapConnection *conn, const char *bn);
66.634 -
66.635 -/**
66.636 - * Only used when connecting with the old-style BUCP login.
66.637 - */
66.638 -int aim_send_login(OscarData *od, FlapConnection *conn, const char *bn, const char *password, gboolean truncate_pass, ClientInfo *ci, const char *key, gboolean allow_multiple_logins);
66.639 -
66.640 -/**
66.641 - * Only used when connecting with the old-style BUCP login.
66.642 - */
66.643 -/* 0x000b */ int aim_auth_securid_send(OscarData *od, const char *securid);
66.644 -
66.645 -/**
66.646 - * Only used when connecting with clientLogin.
66.647 - */
66.648 -void send_client_login(OscarData *od, const char *username);
66.649 -
66.650 -/* flap_connection.c */
66.651 -FlapConnection *flap_connection_new(OscarData *, int type);
66.652 -void flap_connection_close(OscarData *od, FlapConnection *conn);
66.653 -void flap_connection_destroy(FlapConnection *conn, OscarDisconnectReason reason, const gchar *error_message);
66.654 -void flap_connection_schedule_destroy(FlapConnection *conn, OscarDisconnectReason reason, const gchar *error_message);
66.655 -FlapConnection *flap_connection_findbygroup(OscarData *od, guint16 group);
66.656 -FlapConnection *flap_connection_getbytype(OscarData *, int type);
66.657 -FlapConnection *flap_connection_getbytype_all(OscarData *, int type);
66.658 -void flap_connection_recv_cb(gpointer data, gint source, PurpleInputCondition cond);
66.659 -void flap_connection_recv_cb_ssl(gpointer data, PurpleSslConnection *gsc, PurpleInputCondition cond);
66.660 -
66.661 -void flap_connection_send(FlapConnection *conn, FlapFrame *frame);
66.662 -void flap_connection_send_version(OscarData *od, FlapConnection *conn);
66.663 -void flap_connection_send_version_with_cookie(OscarData *od, FlapConnection *conn, guint16 length, const guint8 *chipsahoy);
66.664 -void flap_connection_send_version_with_cookie_and_clientinfo(OscarData *od, FlapConnection *conn, guint16 length, const guint8 *chipsahoy, ClientInfo *ci);
66.665 -void flap_connection_send_snac(OscarData *od, FlapConnection *conn, guint16 family, const guint16 subtype, guint16 flags, aim_snacid_t snacid, ByteStream *data);
66.666 -void flap_connection_send_snac_with_priority(OscarData *od, FlapConnection *conn, guint16 family, const guint16 subtype, guint16 flags, aim_snacid_t snacid, ByteStream *data, gboolean high_priority);
66.667 -void flap_connection_send_keepalive(OscarData *od, FlapConnection *conn);
66.668 -FlapFrame *flap_frame_new(OscarData *od, guint16 channel, int datalen);
66.669 -
66.670 -/* oscar_data.c */
66.671 -typedef int (*aim_rxcallback_t)(OscarData *od, FlapConnection *conn, FlapFrame *frame, ...);
66.672 -
66.673 -OscarData *oscar_data_new(void);
66.674 -void oscar_data_destroy(OscarData *);
66.675 -void oscar_data_addhandler(OscarData *od, guint16 family, guint16 subtype, aim_rxcallback_t newhandler, guint16 flags);
66.676 -aim_rxcallback_t aim_callhandler(OscarData *od, guint16 family, guint16 subtype);
66.677 -
66.678 -/* misc.c */
66.679 -#define AIM_VISIBILITYCHANGE_PERMITADD 0x05
66.680 -#define AIM_VISIBILITYCHANGE_PERMITREMOVE 0x06
66.681 -#define AIM_VISIBILITYCHANGE_DENYADD 0x07
66.682 -#define AIM_VISIBILITYCHANGE_DENYREMOVE 0x08
66.683 -
66.684 -#define AIM_PRIVFLAGS_ALLOWIDLE 0x01
66.685 -#define AIM_PRIVFLAGS_ALLOWMEMBERSINCE 0x02
66.686 -
66.687 -#define AIM_WARN_ANON 0x01
66.688 -
66.689 -
66.690 -
66.691 -/* 0x0001 - family_oservice.c */
66.692 -/* 0x0002 */ void aim_srv_clientready(OscarData *od, FlapConnection *conn);
66.693 -/* 0x0004 */ void aim_srv_requestnew(OscarData *od, guint16 serviceid);
66.694 -/* 0x0006 */ void aim_srv_reqrates(OscarData *od, FlapConnection *conn);
66.695 -/* 0x0008 */ void aim_srv_rates_addparam(OscarData *od, FlapConnection *conn);
66.696 -/* 0x0009 */ void aim_srv_rates_delparam(OscarData *od, FlapConnection *conn);
66.697 -/* 0x000c */ void aim_srv_sendpauseack(OscarData *od, FlapConnection *conn);
66.698 -/* 0x000e */ void aim_srv_reqpersonalinfo(OscarData *od, FlapConnection *conn);
66.699 -/* 0x0011 */ void aim_srv_setidle(OscarData *od, guint32 idletime);
66.700 -/* 0x0014 */ void aim_srv_setprivacyflags(OscarData *od, FlapConnection *conn, guint32);
66.701 -/* 0x0016 */ void aim_srv_nop(OscarData *od, FlapConnection *conn);
66.702 -/* 0x0017 */ void aim_srv_setversions(OscarData *od, FlapConnection *conn);
66.703 -/* 0x001e */ int aim_srv_setextrainfo(OscarData *od, gboolean seticqstatus, guint32 icqstatus, gboolean setstatusmsg, const char *statusmsg, const char *itmsurl);
66.704 -
66.705 -
66.706 -void aim_bos_reqrights(OscarData *od, FlapConnection *conn);
66.707 -int aim_bos_changevisibility(OscarData *od, FlapConnection *conn, int, const char *);
66.708 -void aim_bos_setgroupperm(OscarData *od, FlapConnection *conn, guint32 mask);
66.709 -
66.710 -
66.711 -
66.712 -#define AIM_CLIENTTYPE_UNKNOWN 0x0000
66.713 -#define AIM_CLIENTTYPE_MC 0x0001
66.714 -#define AIM_CLIENTTYPE_WINAIM 0x0002
66.715 -#define AIM_CLIENTTYPE_WINAIM41 0x0003
66.716 -#define AIM_CLIENTTYPE_AOL_TOC 0x0004
66.717 -guint16 aim_im_fingerprint(const guint8 *msghdr, int len);
66.718 -
66.719 -#define AIM_RATE_CODE_CHANGE 0x0001
66.720 -#define AIM_RATE_CODE_WARNING 0x0002
66.721 -#define AIM_RATE_CODE_LIMIT 0x0003
66.722 -#define AIM_RATE_CODE_CLEARLIMIT 0x0004
66.723 -void aim_ads_requestads(OscarData *od, FlapConnection *conn);
66.724 -
66.725 -
66.726 -
66.727 -/* family_icbm.c */
66.728 -#define AIM_OFT_SUBTYPE_SEND_FILE 0x0001
66.729 -#define AIM_OFT_SUBTYPE_SEND_DIR 0x0002
66.730 -#define AIM_OFT_SUBTYPE_GET_FILE 0x0011
66.731 -#define AIM_OFT_SUBTYPE_GET_LIST 0x0012
66.732 -
66.733 -#define AIM_TRANSFER_DENY_NOTSUPPORTED 0x0000
66.734 -#define AIM_TRANSFER_DENY_DECLINE 0x0001
66.735 -#define AIM_TRANSFER_DENY_NOTACCEPTING 0x0002
66.736 -
66.737 -#define AIM_IMPARAM_FLAG_CHANNEL_MSGS_ALLOWED 0x00000001
66.738 -#define AIM_IMPARAM_FLAG_MISSED_CALLS_ENABLED 0x00000002
66.739 -#define AIM_IMPARAM_FLAG_EVENTS_ALLOWED 0x00000008
66.740 -#define AIM_IMPARAM_FLAG_SMS_SUPPORTED 0x00000010
66.741 -#define AIM_IMPARAM_FLAG_OFFLINE_MSGS_ALLOWED 0x00000100
66.742 -
66.743 -/* This is what the server will give you if you don't set them yourself. */
66.744 -/* This is probably out of date. */
66.745 -#define AIM_IMPARAM_DEFAULTS { \
66.746 - 0, \
66.747 - AIM_IMPARAM_FLAG_CHANNEL_MSGS_ALLOWED | AIM_IMPARAM_FLAG_MISSED_CALLS_ENABLED, \
66.748 - 512, /* !! Note how small this is. */ \
66.749 - (99.9)*10, (99.9)*10, \
66.750 - 1000 /* !! And how large this is. */ \
66.751 -}
66.752 -
66.753 -/* This is what most AIM versions use. */
66.754 -/* This is probably out of date. */
66.755 -#define AIM_IMPARAM_REASONABLE { \
66.756 - 0, \
66.757 - AIM_IMPARAM_FLAG_CHANNEL_MSGS_ALLOWED | AIM_IMPARAM_FLAG_MISSED_CALLS_ENABLED, \
66.758 - 8000, \
66.759 - (99.9)*10, (99.9)*10, \
66.760 - 0 \
66.761 -}
66.762 -
66.763 -struct aim_icbmparameters
66.764 -{
66.765 - guint16 maxchan;
66.766 - guint32 flags; /* AIM_IMPARAM_FLAG_ */
66.767 - guint16 maxmsglen; /* message size that you will accept */
66.768 - guint16 maxsenderwarn; /* this and below are *10 (999=99.9%) */
66.769 - guint16 maxrecverwarn;
66.770 - guint32 minmsginterval; /* in milliseconds? */
66.771 -};
66.772 -
66.773 -/*
66.774 - * TODO: Should probably combine this with struct chat_connection.
66.775 - */
66.776 -struct aim_chat_roominfo
66.777 -{
66.778 - guint16 exchange;
66.779 - char *name;
66.780 - guint8 namelen;
66.781 - guint16 instance;
66.782 -};
66.783 -
66.784 -struct chat_connection
66.785 -{
66.786 - char *name;
66.787 - char *show; /* AOL did something funny to us */
66.788 - guint16 exchange;
66.789 - guint16 instance;
66.790 - FlapConnection *conn;
66.791 - int id;
66.792 - PurpleConnection *gc;
66.793 - PurpleConversation *conv;
66.794 - int maxlen;
66.795 - int maxvis;
66.796 -};
66.797 -
66.798 -/*
66.799 - * All this chat struct stuff should be in family_chat.c
66.800 - */
66.801 -void oscar_chat_destroy(struct chat_connection *cc);
66.802 -
66.803 -#define AIM_IMFLAGS_AWAY 0x0001 /* mark as an autoreply */
66.804 -#define AIM_IMFLAGS_ACK 0x0002 /* request a receipt notice */
66.805 -#define AIM_IMFLAGS_BUDDYREQ 0x0010 /* buddy icon requested */
66.806 -#define AIM_IMFLAGS_HASICON 0x0020 /* already has icon */
66.807 -#define AIM_IMFLAGS_SUBENC_MACINTOSH 0x0040 /* damn that Steve Jobs! */
66.808 -#define AIM_IMFLAGS_CUSTOMFEATURES 0x0080 /* features field present */
66.809 -#define AIM_IMFLAGS_EXTDATA 0x0100
66.810 -#define AIM_IMFLAGS_X 0x0200
66.811 -#define AIM_IMFLAGS_MULTIPART 0x0400 /* ->mpmsg section valid */
66.812 -#define AIM_IMFLAGS_OFFLINE 0x0800 /* send to offline user */
66.813 -#define AIM_IMFLAGS_TYPINGNOT 0x1000 /* typing notification */
66.814 -
66.815 -#define AIM_CHARSET_ASCII 0x0000
66.816 -#define AIM_CHARSET_UNICODE 0x0002 /* UTF-16BE */
66.817 -#define AIM_CHARSET_CUSTOM 0x0003
66.818 -
66.819 -/*
66.820 - * Multipart message structures.
66.821 - */
66.822 -typedef struct aim_mpmsg_section_s
66.823 -{
66.824 - guint16 charset;
66.825 - guint16 charsubset;
66.826 - gchar *data;
66.827 - guint16 datalen;
66.828 - struct aim_mpmsg_section_s *next;
66.829 -} aim_mpmsg_section_t;
66.830 -
66.831 -typedef struct aim_mpmsg_s
66.832 -{
66.833 - unsigned int numparts;
66.834 - aim_mpmsg_section_t *parts;
66.835 -} aim_mpmsg_t;
66.836 -
66.837 -int aim_mpmsg_init(OscarData *od, aim_mpmsg_t *mpm);
66.838 -int aim_mpmsg_addraw(OscarData *od, aim_mpmsg_t *mpm, guint16 charset, guint16 charsubset, const gchar *data, guint16 datalen);
66.839 -int aim_mpmsg_addascii(OscarData *od, aim_mpmsg_t *mpm, const char *ascii);
66.840 -int aim_mpmsg_addunicode(OscarData *od, aim_mpmsg_t *mpm, const guint16 *unicode, guint16 unicodelen);
66.841 -void aim_mpmsg_free(OscarData *od, aim_mpmsg_t *mpm);
66.842 -
66.843 -/*
66.844 - * Arguments to aim_send_im_ext().
66.845 - *
66.846 - * This is really complicated. But immensely versatile.
66.847 - *
66.848 - */
66.849 -struct aim_sendimext_args
66.850 -{
66.851 -
66.852 - /* These are _required_ */
66.853 - const char *destbn;
66.854 - guint32 flags; /* often 0 */
66.855 -
66.856 - /* Only required if not using multipart messages */
66.857 - const char *msg;
66.858 - int msglen;
66.859 -
66.860 - /* Required if ->msg is not provided */
66.861 - aim_mpmsg_t *mpmsg;
66.862 -
66.863 - /* Only used if AIM_IMFLAGS_HASICON is set */
66.864 - guint32 iconlen;
66.865 - time_t iconstamp;
66.866 - guint32 iconsum;
66.867 -
66.868 - /* Only used if AIM_IMFLAGS_CUSTOMFEATURES is set */
66.869 - guint16 featureslen;
66.870 - guint8 *features;
66.871 -
66.872 - /* Only used if AIM_IMFLAGS_CUSTOMCHARSET is set and mpmsg not used */
66.873 - guint16 charset;
66.874 - guint16 charsubset;
66.875 -};
66.876 -
66.877 -/*
66.878 - * Arguments to aim_send_rtfmsg().
66.879 - */
66.880 -struct aim_sendrtfmsg_args
66.881 -{
66.882 - const char *destbn;
66.883 - guint32 fgcolor;
66.884 - guint32 bgcolor;
66.885 - const char *rtfmsg; /* must be in RTF */
66.886 -};
66.887 -
66.888 -/*
66.889 - * This information is provided in the Incoming ICBM callback for
66.890 - * Channel 1 ICBM's.
66.891 - *
66.892 - * Note that although CUSTOMFEATURES and CUSTOMCHARSET say they
66.893 - * are optional, both are always set by the current libfaim code.
66.894 - * That may or may not change in the future. It is mainly for
66.895 - * consistency with aim_sendimext_args.
66.896 - *
66.897 - * Multipart messages require some explanation. If you want to use them,
66.898 - * I suggest you read all the comments in family_icbm.c.
66.899 - *
66.900 - */
66.901 -struct aim_incomingim_ch1_args
66.902 -{
66.903 -
66.904 - /* Always provided */
66.905 - aim_mpmsg_t mpmsg;
66.906 - guint32 icbmflags; /* some flags apply only to ->msg, not all mpmsg */
66.907 - time_t timestamp; /* Only set for offline messages */
66.908 -
66.909 - /* Only provided if message has a human-readable section */
66.910 - gchar *msg;
66.911 - int msglen;
66.912 -
66.913 - /* Only provided if AIM_IMFLAGS_HASICON is set */
66.914 - time_t iconstamp;
66.915 - guint32 iconlen;
66.916 - guint16 iconsum;
66.917 -
66.918 - /* Only provided if AIM_IMFLAGS_CUSTOMFEATURES is set */
66.919 - guint8 *features;
66.920 - guint8 featureslen;
66.921 -
66.922 - /* Only provided if AIM_IMFLAGS_EXTDATA is set */
66.923 - guint8 extdatalen;
66.924 - guint8 *extdata;
66.925 -
66.926 - /* Only used if AIM_IMFLAGS_CUSTOMCHARSET is set */
66.927 - guint16 charset;
66.928 - guint16 charsubset;
66.929 -};
66.930 -
66.931 -/* Valid values for channel 2 args->status */
66.932 -#define AIM_RENDEZVOUS_PROPOSE 0x0000
66.933 -#define AIM_RENDEZVOUS_CANCEL 0x0001
66.934 -#define AIM_RENDEZVOUS_CONNECTED 0x0002
66.935 -
66.936 -struct _IcbmArgsCh2
66.937 -{
66.938 - guint16 status;
66.939 - guchar cookie[8];
66.940 - int type; /* One of the OSCAR_CAPABILITY_ constants */
66.941 - const char *proxyip;
66.942 - const char *clientip;
66.943 - const char *verifiedip;
66.944 - guint16 port;
66.945 - gboolean use_proxy;
66.946 - guint16 errorcode;
66.947 - const char *msg; /* invite message or file description */
66.948 - guint16 msglen;
66.949 - const char *encoding;
66.950 - const char *language;
66.951 - guint16 requestnumber;
66.952 - union {
66.953 - struct {
66.954 - guint32 checksum;
66.955 - guint32 length;
66.956 - time_t timestamp;
66.957 - guint8 *icon;
66.958 - } icon;
66.959 - struct {
66.960 - struct aim_chat_roominfo roominfo;
66.961 - } chat;
66.962 - struct {
66.963 - guint16 msgtype;
66.964 - guint32 fgcolor;
66.965 - guint32 bgcolor;
66.966 - const char *rtfmsg;
66.967 - } rtfmsg;
66.968 - struct {
66.969 - guint16 subtype;
66.970 - guint16 totfiles;
66.971 - guint32 totsize;
66.972 - char *filename;
66.973 - } sendfile;
66.974 - } info;
66.975 - void *destructor; /* used internally only */
66.976 -};
66.977 -
66.978 -/* Valid values for channel 4 args->type */
66.979 -#define AIM_ICQMSG_AUTHREQUEST 0x0006
66.980 -#define AIM_ICQMSG_AUTHDENIED 0x0007
66.981 -#define AIM_ICQMSG_AUTHGRANTED 0x0008
66.982 -
66.983 -struct aim_incomingim_ch4_args
66.984 -{
66.985 - guint32 uin; /* Of the sender of the ICBM */
66.986 - guint8 type;
66.987 - guint8 flags;
66.988 - gchar *msg; /* Reason for auth request, deny, or accept */
66.989 - int msglen;
66.990 -};
66.991 -
66.992 -/* SNAC sending functions */
66.993 -/* 0x0002 */ int aim_im_setparams(OscarData *od, struct aim_icbmparameters *params);
66.994 -/* 0x0004 */ int aim_im_reqparams(OscarData *od);
66.995 -/* 0x0006 */ int aim_im_sendch1_ext(OscarData *od, struct aim_sendimext_args *args);
66.996 -/* 0x0006 */ int aim_im_sendch1(OscarData *, const char *destbn, guint16 flags, const char *msg);
66.997 -/* 0x0006 */ int aim_im_sendch2_chatinvite(OscarData *od, const char *bn, const char *msg, guint16 exchange, const char *roomname, guint16 instance);
66.998 -/* 0x0006 */ int aim_im_sendch2_icon(OscarData *od, const char *bn, const guint8 *icon, int iconlen, time_t stamp, guint16 iconsum);
66.999 -/* 0x0006 */ int aim_im_sendch2_rtfmsg(OscarData *od, struct aim_sendrtfmsg_args *args);
66.1000 -
66.1001 -/* 0x0006 */ void aim_im_sendch2_cancel(PeerConnection *peer_conn);
66.1002 -/* 0x0006 */ void aim_im_sendch2_connected(PeerConnection *peer_conn);
66.1003 -/* 0x0006 */ void aim_im_sendch2_odc_requestdirect(OscarData *od, guchar *cookie, const char *bn, const guint8 *ip, guint16 port, guint16 requestnumber);
66.1004 -/* 0x0006 */ void aim_im_sendch2_odc_requestproxy(OscarData *od, guchar *cookie, const char *bn, const guint8 *ip, guint16 pin, guint16 requestnumber);
66.1005 -/* 0x0006 */ void aim_im_sendch2_sendfile_requestdirect(OscarData *od, guchar *cookie, const char *bn, const guint8 *ip, guint16 port, guint16 requestnumber, const gchar *filename, guint32 size, guint16 numfiles);
66.1006 -/* 0x0006 */ void aim_im_sendch2_sendfile_requestproxy(OscarData *od, guchar *cookie, const char *bn, const guint8 *ip, guint16 pin, guint16 requestnumber, const gchar *filename, guint32 size, guint16 numfiles);
66.1007 -
66.1008 -/* 0x0006 */ int aim_im_sendch2_geticqaway(OscarData *od, const char *bn, int type);
66.1009 -/* 0x0006 */ int aim_im_sendch4(OscarData *od, const char *bn, guint16 type, const char *message);
66.1010 -/* 0x0008 */ int aim_im_warn(OscarData *od, FlapConnection *conn, const char *destbn, guint32 flags);
66.1011 -/* 0x000b */ int aim_im_denytransfer(OscarData *od, const char *bn, const guchar *cookie, guint16 code);
66.1012 -/* 0x0010 */ int aim_im_reqofflinemsgs(OscarData *od);
66.1013 -/* 0x0014 */ int aim_im_sendmtn(OscarData *od, guint16 type1, const char *bn, guint16 type2);
66.1014 -void aim_icbm_makecookie(guchar* cookie);
66.1015 -gchar *oscar_encoding_extract(const char *encoding);
66.1016 -gchar *oscar_encoding_to_utf8(PurpleAccount *account, const char *encoding, const char *text, int textlen);
66.1017 -gchar *purple_plugin_oscar_decode_im_part(PurpleAccount *account, const char *sourcebn, guint16 charset, guint16 charsubset, const gchar *data, gsize datalen);
66.1018 -
66.1019 -
66.1020 -/* 0x0002 - family_locate.c */
66.1021 -/*
66.1022 - * AIM User Info, Standard Form.
66.1023 - */
66.1024 -#define AIM_FLAG_UNCONFIRMED 0x0001 /* "damned transients" */
66.1025 -#define AIM_FLAG_ADMINISTRATOR 0x0002
66.1026 -#define AIM_FLAG_AOL 0x0004
66.1027 -#define AIM_FLAG_OSCAR_PAY 0x0008
66.1028 -#define AIM_FLAG_FREE 0x0010
66.1029 -#define AIM_FLAG_AWAY 0x0020
66.1030 -#define AIM_FLAG_ICQ 0x0040
66.1031 -#define AIM_FLAG_WIRELESS 0x0080
66.1032 -#define AIM_FLAG_UNKNOWN100 0x0100
66.1033 -#define AIM_FLAG_UNKNOWN200 0x0200
66.1034 -#define AIM_FLAG_ACTIVEBUDDY 0x0400
66.1035 -#define AIM_FLAG_UNKNOWN800 0x0800
66.1036 -#define AIM_FLAG_ABINTERNAL 0x1000
66.1037 -#define AIM_FLAG_ALLUSERS 0x001f
66.1038 -
66.1039 -#define AIM_USERINFO_PRESENT_FLAGS 0x00000001
66.1040 -#define AIM_USERINFO_PRESENT_MEMBERSINCE 0x00000002
66.1041 -#define AIM_USERINFO_PRESENT_ONLINESINCE 0x00000004
66.1042 -#define AIM_USERINFO_PRESENT_IDLE 0x00000008
66.1043 -#define AIM_USERINFO_PRESENT_ICQEXTSTATUS 0x00000010
66.1044 -#define AIM_USERINFO_PRESENT_ICQIPADDR 0x00000020
66.1045 -#define AIM_USERINFO_PRESENT_ICQDATA 0x00000040
66.1046 -#define AIM_USERINFO_PRESENT_CAPABILITIES 0x00000080
66.1047 -#define AIM_USERINFO_PRESENT_SESSIONLEN 0x00000100
66.1048 -#define AIM_USERINFO_PRESENT_CREATETIME 0x00000200
66.1049 -
66.1050 -struct userinfo_node
66.1051 -{
66.1052 - char *bn;
66.1053 - struct userinfo_node *next;
66.1054 -};
66.1055 -
66.1056 -typedef struct aim_userinfo_s
66.1057 -{
66.1058 - char *bn;
66.1059 - guint16 warnlevel; /* evil percent * 10 (999 = 99.9%) */
66.1060 - guint16 idletime; /* in seconds */
66.1061 - guint16 flags;
66.1062 - guint32 createtime; /* time_t */
66.1063 - guint32 membersince; /* time_t */
66.1064 - guint32 onlinesince; /* time_t */
66.1065 - guint32 sessionlen; /* in seconds */
66.1066 - guint32 capabilities;
66.1067 - struct {
66.1068 - guint32 status;
66.1069 - guint32 ipaddr;
66.1070 - guint8 crap[0x25]; /* until we figure it out... */
66.1071 - } icqinfo;
66.1072 - guint32 present;
66.1073 -
66.1074 - guint8 iconcsumtype;
66.1075 - guint16 iconcsumlen;
66.1076 - guint8 *iconcsum;
66.1077 -
66.1078 - char *info;
66.1079 - char *info_encoding;
66.1080 - guint16 info_len;
66.1081 -
66.1082 - char *status;
66.1083 - char *status_encoding;
66.1084 - guint16 status_len;
66.1085 -
66.1086 - char *itmsurl;
66.1087 - char *itmsurl_encoding;
66.1088 - guint16 itmsurl_len;
66.1089 -
66.1090 - char *away;
66.1091 - char *away_encoding;
66.1092 - guint16 away_len;
66.1093 -
66.1094 - struct aim_userinfo_s *next;
66.1095 -} aim_userinfo_t;
66.1096 -
66.1097 -#define AIM_SENDMEMBLOCK_FLAG_ISREQUEST 0
66.1098 -#define AIM_SENDMEMBLOCK_FLAG_ISHASH 1
66.1099 -
66.1100 -int aim_sendmemblock(OscarData *od, FlapConnection *conn, guint32 offset, guint32 len, const guint8 *buf, guint8 flag);
66.1101 -
66.1102 -struct aim_invite_priv
66.1103 -{
66.1104 - char *bn;
66.1105 - char *roomname;
66.1106 - guint16 exchange;
66.1107 - guint16 instance;
66.1108 -};
66.1109 -
66.1110 -#define AIM_COOKIETYPE_UNKNOWN 0x00
66.1111 -#define AIM_COOKIETYPE_ICBM 0x01
66.1112 -#define AIM_COOKIETYPE_ADS 0x02
66.1113 -#define AIM_COOKIETYPE_BOS 0x03
66.1114 -#define AIM_COOKIETYPE_IM 0x04
66.1115 -#define AIM_COOKIETYPE_CHAT 0x05
66.1116 -#define AIM_COOKIETYPE_CHATNAV 0x06
66.1117 -#define AIM_COOKIETYPE_INVITE 0x07
66.1118 -/* we'll move OFT up a bit to give breathing room. not like it really
66.1119 - * matters. */
66.1120 -#define AIM_COOKIETYPE_OFTIM 0x10
66.1121 -#define AIM_COOKIETYPE_OFTGET 0x11
66.1122 -#define AIM_COOKIETYPE_OFTSEND 0x12
66.1123 -#define AIM_COOKIETYPE_OFTVOICE 0x13
66.1124 -#define AIM_COOKIETYPE_OFTIMAGE 0x14
66.1125 -#define AIM_COOKIETYPE_OFTICON 0x15
66.1126 -
66.1127 -aim_userinfo_t *aim_locate_finduserinfo(OscarData *od, const char *bn);
66.1128 -void aim_locate_dorequest(OscarData *od);
66.1129 -
66.1130 -/* 0x0002 */ int aim_locate_reqrights(OscarData *od);
66.1131 -/* 0x0004 */ int aim_locate_setcaps(OscarData *od, guint32 caps);
66.1132 -/* 0x0004 */ int aim_locate_setprofile(OscarData *od, const char *profile_encoding, const gchar *profile, const int profile_len, const char *awaymsg_encoding, const gchar *awaymsg, const int awaymsg_len);
66.1133 -/* 0x0005 */ int aim_locate_getinfo(OscarData *od, const char *, guint16);
66.1134 -/* 0x0009 */ int aim_locate_setdirinfo(OscarData *od, const char *first, const char *middle, const char *last, const char *maiden, const char *nickname, const char *street, const char *city, const char *state, const char *zip, int country, guint16 privacy);
66.1135 -/* 0x000b */ int aim_locate_000b(OscarData *od, const char *bn);
66.1136 -/* 0x000f */ int aim_locate_setinterests(OscarData *od, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, guint16 privacy);
66.1137 -/* 0x0015 */ int aim_locate_getinfoshort(OscarData *od, const char *bn, guint32 flags);
66.1138 -
66.1139 -void aim_locate_autofetch_away_message(OscarData *od, const char *bn);
66.1140 -guint32 aim_locate_getcaps(OscarData *od, ByteStream *bs, int len);
66.1141 -guint32 aim_locate_getcaps_short(OscarData *od, ByteStream *bs, int len);
66.1142 -void aim_info_free(aim_userinfo_t *);
66.1143 -int aim_info_extract(OscarData *od, ByteStream *bs, aim_userinfo_t *);
66.1144 -int aim_putuserinfo(ByteStream *bs, aim_userinfo_t *info);
66.1145 -
66.1146 -
66.1147 -
66.1148 -/* 0x0003 - family_buddy.c */
66.1149 -/* 0x0002 */ void aim_buddylist_reqrights(OscarData *, FlapConnection *);
66.1150 -/* 0x0004 */ int aim_buddylist_set(OscarData *, FlapConnection *, const char *);
66.1151 -/* 0x0004 */ int aim_buddylist_addbuddy(OscarData *, FlapConnection *, const char *);
66.1152 -/* 0x0005 */ int aim_buddylist_removebuddy(OscarData *, FlapConnection *, const char *);
66.1153 -
66.1154 -
66.1155 -
66.1156 -/* 0x000a - family_userlookup.c */
66.1157 -int aim_search_address(OscarData *, const char *);
66.1158 -
66.1159 -
66.1160 -
66.1161 -/* 0x000d - family_chatnav.c */
66.1162 -/* 0x000e - family_chat.c */
66.1163 -/* These apply to exchanges as well. */
66.1164 -#define AIM_CHATROOM_FLAG_EVILABLE 0x0001
66.1165 -#define AIM_CHATROOM_FLAG_NAV_ONLY 0x0002
66.1166 -#define AIM_CHATROOM_FLAG_INSTANCING_ALLOWED 0x0004
66.1167 -#define AIM_CHATROOM_FLAG_OCCUPANT_PEEK_ALLOWED 0x0008
66.1168 -
66.1169 -struct aim_chat_exchangeinfo
66.1170 -{
66.1171 - guint16 number;
66.1172 - guint16 flags;
66.1173 - char *name;
66.1174 - char *charset1;
66.1175 - char *lang1;
66.1176 - char *charset2;
66.1177 - char *lang2;
66.1178 -};
66.1179 -
66.1180 -#define AIM_CHATFLAGS_NOREFLECT 0x0001
66.1181 -#define AIM_CHATFLAGS_AWAY 0x0002
66.1182 -int aim_chat_send_im(OscarData *od, FlapConnection *conn, guint16 flags, const gchar *msg, int msglen, const char *encoding, const char *language);
66.1183 -int aim_chat_join(OscarData *od, guint16 exchange, const char *roomname, guint16 instance);
66.1184 -int aim_chat_attachname(FlapConnection *conn, guint16 exchange, const char *roomname, guint16 instance);
66.1185 -char *aim_chat_getname(FlapConnection *conn);
66.1186 -FlapConnection *aim_chat_getconn(OscarData *, const char *name);
66.1187 -
66.1188 -void aim_chatnav_reqrights(OscarData *od, FlapConnection *conn);
66.1189 -
66.1190 -int aim_chatnav_createroom(OscarData *od, FlapConnection *conn, const char *name, guint16 exchange);
66.1191 -int aim_chat_leaveroom(OscarData *od, const char *name);
66.1192 -
66.1193 -
66.1194 -
66.1195 -/* 0x000f - family_odir.c */
66.1196 -struct aim_odir
66.1197 -{
66.1198 - char *first;
66.1199 - char *last;
66.1200 - char *middle;
66.1201 - char *maiden;
66.1202 - char *email;
66.1203 - char *country;
66.1204 - char *state;
66.1205 - char *city;
66.1206 - char *bn;
66.1207 - char *interest;
66.1208 - char *nick;
66.1209 - char *zip;
66.1210 - char *region;
66.1211 - char *address;
66.1212 - struct aim_odir *next;
66.1213 -};
66.1214 -
66.1215 -int aim_odir_email(OscarData *, const char *, const char *);
66.1216 -int aim_odir_name(OscarData *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *);
66.1217 -int aim_odir_interest(OscarData *, const char *, const char *);
66.1218 -
66.1219 -
66.1220 -
66.1221 -/* 0x0010 - family_bart.c */
66.1222 -int aim_bart_upload(OscarData *od, const guint8 *icon, guint16 iconlen);
66.1223 -int aim_bart_request(OscarData *od, const char *bn, guint8 iconcsumtype, const guint8 *iconstr, guint16 iconstrlen);
66.1224 -
66.1225 -
66.1226 -
66.1227 -/* 0x0013 - family_feedbag.c */
66.1228 -#define AIM_SSI_TYPE_BUDDY 0x0000
66.1229 -#define AIM_SSI_TYPE_GROUP 0x0001
66.1230 -#define AIM_SSI_TYPE_PERMIT 0x0002
66.1231 -#define AIM_SSI_TYPE_DENY 0x0003
66.1232 -#define AIM_SSI_TYPE_PDINFO 0x0004
66.1233 -#define AIM_SSI_TYPE_PRESENCEPREFS 0x0005
66.1234 -#define AIM_SSI_TYPE_ICONINFO 0x0014
66.1235 -
66.1236 -#define AIM_SSI_ACK_SUCCESS 0x0000
66.1237 -#define AIM_SSI_ACK_ITEMNOTFOUND 0x0002
66.1238 -#define AIM_SSI_ACK_IDNUMINUSE 0x000a
66.1239 -#define AIM_SSI_ACK_ATMAX 0x000c
66.1240 -#define AIM_SSI_ACK_INVALIDNAME 0x000d
66.1241 -#define AIM_SSI_ACK_AUTHREQUIRED 0x000e
66.1242 -
66.1243 -/* These flags are set in the 0x00c9 TLV of SSI teyp 0x0005 */
66.1244 -#define AIM_SSI_PRESENCE_FLAG_SHOWIDLE 0x00000400
66.1245 -#define AIM_SSI_PRESENCE_FLAG_NORECENTBUDDIES 0x00020000
66.1246 -
66.1247 -struct aim_ssi_item
66.1248 -{
66.1249 - char *name;
66.1250 - guint16 gid;
66.1251 - guint16 bid;
66.1252 - guint16 type;
66.1253 - GSList *data;
66.1254 - struct aim_ssi_item *next;
66.1255 -};
66.1256 -
66.1257 -struct aim_ssi_tmp
66.1258 -{
66.1259 - guint16 action;
66.1260 - guint16 ack;
66.1261 - char *name;
66.1262 - struct aim_ssi_item *item;
66.1263 - struct aim_ssi_tmp *next;
66.1264 -};
66.1265 -
66.1266 -/* These build the actual SNACs and queue them to be sent */
66.1267 -/* 0x0002 */ int aim_ssi_reqrights(OscarData *od);
66.1268 -/* 0x0004 */ int aim_ssi_reqdata(OscarData *od);
66.1269 -/* 0x0005 */ int aim_ssi_reqifchanged(OscarData *od, time_t localstamp, guint16 localrev);
66.1270 -/* 0x0007 */ int aim_ssi_enable(OscarData *od);
66.1271 -/* 0x0011 */ int aim_ssi_modbegin(OscarData *od);
66.1272 -/* 0x0012 */ int aim_ssi_modend(OscarData *od);
66.1273 -/* 0x0014 */ int aim_ssi_sendauth(OscarData *od, char *bn, char *msg);
66.1274 -/* 0x0018 */ int aim_ssi_sendauthrequest(OscarData *od, char *bn, const char *msg);
66.1275 -/* 0x001a */ int aim_ssi_sendauthreply(OscarData *od, char *bn, guint8 reply, const char *msg);
66.1276 -
66.1277 -/* Client functions for retrieving SSI data */
66.1278 -struct aim_ssi_item *aim_ssi_itemlist_find(struct aim_ssi_item *list, guint16 gid, guint16 bid);
66.1279 -struct aim_ssi_item *aim_ssi_itemlist_finditem(struct aim_ssi_item *list, const char *gn, const char *bn, guint16 type);
66.1280 -struct aim_ssi_item *aim_ssi_itemlist_exists(struct aim_ssi_item *list, const char *bn);
66.1281 -char *aim_ssi_itemlist_findparentname(struct aim_ssi_item *list, const char *bn);
66.1282 -int aim_ssi_getpermdeny(struct aim_ssi_item *list);
66.1283 -guint32 aim_ssi_getpresence(struct aim_ssi_item *list);
66.1284 -char *aim_ssi_getalias(struct aim_ssi_item *list, const char *gn, const char *bn);
66.1285 -char *aim_ssi_getcomment(struct aim_ssi_item *list, const char *gn, const char *bn);
66.1286 -gboolean aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *bn);
66.1287 -
66.1288 -/* Client functions for changing SSI data */
66.1289 -int aim_ssi_addbuddy(OscarData *od, const char *name, const char *group, GSList *tlvlist, const char *alias, const char *comment, const char *smsnum, gboolean needauth);
66.1290 -int aim_ssi_addpermit(OscarData *od, const char *name);
66.1291 -int aim_ssi_adddeny(OscarData *od, const char *name);
66.1292 -int aim_ssi_delbuddy(OscarData *od, const char *name, const char *group);
66.1293 -int aim_ssi_delgroup(OscarData *od, const char *group);
66.1294 -int aim_ssi_delpermit(OscarData *od, const char *name);
66.1295 -int aim_ssi_deldeny(OscarData *od, const char *name);
66.1296 -int aim_ssi_movebuddy(OscarData *od, const char *oldgn, const char *newgn, const char *bn);
66.1297 -int aim_ssi_aliasbuddy(OscarData *od, const char *gn, const char *bn, const char *alias);
66.1298 -int aim_ssi_editcomment(OscarData *od, const char *gn, const char *bn, const char *alias);
66.1299 -int aim_ssi_rename_group(OscarData *od, const char *oldgn, const char *newgn);
66.1300 -int aim_ssi_cleanlist(OscarData *od);
66.1301 -int aim_ssi_deletelist(OscarData *od);
66.1302 -int aim_ssi_setpermdeny(OscarData *od, guint8 permdeny, guint32 vismask);
66.1303 -int aim_ssi_setpresence(OscarData *od, guint32 presence);
66.1304 -int aim_ssi_seticon(OscarData *od, const guint8 *iconsum, guint8 iconsumlen);
66.1305 -int aim_ssi_delicon(OscarData *od);
66.1306 -
66.1307 -
66.1308 -
66.1309 -/* 0x0015 - family_icq.c */
66.1310 -#define AIM_ICQ_INFO_SIMPLE 0x001
66.1311 -#define AIM_ICQ_INFO_SUMMARY 0x002
66.1312 -#define AIM_ICQ_INFO_EMAIL 0x004
66.1313 -#define AIM_ICQ_INFO_PERSONAL 0x008
66.1314 -#define AIM_ICQ_INFO_ADDITIONAL 0x010
66.1315 -#define AIM_ICQ_INFO_WORK 0x020
66.1316 -#define AIM_ICQ_INFO_INTERESTS 0x040
66.1317 -#define AIM_ICQ_INFO_ORGS 0x080
66.1318 -#define AIM_ICQ_INFO_UNKNOWN 0x100
66.1319 -#define AIM_ICQ_INFO_HAVEALL 0x1ff
66.1320 -
66.1321 -#ifdef OLDSTYLE_ICQ_OFFLINEMSGS
66.1322 -struct aim_icq_offlinemsg
66.1323 -{
66.1324 - guint32 sender;
66.1325 - guint16 year;
66.1326 - guint8 month, day, hour, minute;
66.1327 - guint8 type;
66.1328 - guint8 flags;
66.1329 - char *msg;
66.1330 - int msglen;
66.1331 -};
66.1332 -#endif /* OLDSTYLE_ICQ_OFFLINEMSGS */
66.1333 -
66.1334 -struct aim_icq_info
66.1335 -{
66.1336 - guint16 reqid;
66.1337 -
66.1338 - /* simple */
66.1339 - guint32 uin;
66.1340 -
66.1341 - /* general and "home" information (0x00c8) */
66.1342 - char *nick;
66.1343 - char *first;
66.1344 - char *last;
66.1345 - char *email;
66.1346 - char *homecity;
66.1347 - char *homestate;
66.1348 - char *homephone;
66.1349 - char *homefax;
66.1350 - char *homeaddr;
66.1351 - char *mobile;
66.1352 - char *homezip;
66.1353 - guint16 homecountry;
66.1354 -/* guint8 timezone;
66.1355 - guint8 hideemail; */
66.1356 -
66.1357 - /* personal (0x00dc) */
66.1358 - guint8 age;
66.1359 - guint8 unknown;
66.1360 - guint8 gender;
66.1361 - char *personalwebpage;
66.1362 - guint16 birthyear;
66.1363 - guint8 birthmonth;
66.1364 - guint8 birthday;
66.1365 - guint8 language1;
66.1366 - guint8 language2;
66.1367 - guint8 language3;
66.1368 -
66.1369 - /* work (0x00d2) */
66.1370 - char *workcity;
66.1371 - char *workstate;
66.1372 - char *workphone;
66.1373 - char *workfax;
66.1374 - char *workaddr;
66.1375 - char *workzip;
66.1376 - guint16 workcountry;
66.1377 - char *workcompany;
66.1378 - char *workdivision;
66.1379 - char *workposition;
66.1380 - char *workwebpage;
66.1381 -
66.1382 - /* additional personal information (0x00e6) */
66.1383 - char *info;
66.1384 -
66.1385 - /* email (0x00eb) */
66.1386 - guint16 numaddresses;
66.1387 - char **email2;
66.1388 -
66.1389 - /* we keep track of these in a linked list because we're 1337 */
66.1390 - struct aim_icq_info *next;
66.1391 -
66.1392 - /* status note info */
66.1393 - guint8 icbm_cookie[8];
66.1394 - char *status_note_title;
66.1395 -};
66.1396 -
66.1397 -#ifdef OLDSTYLE_ICQ_OFFLINEMSGS
66.1398 -int aim_icq_reqofflinemsgs(OscarData *od);
66.1399 -int aim_icq_ackofflinemsgs(OscarData *od);
66.1400 -#endif
66.1401 -int aim_icq_setsecurity(OscarData *od, gboolean auth_required, gboolean webaware);
66.1402 -int aim_icq_changepasswd(OscarData *od, const char *passwd);
66.1403 -int aim_icq_getsimpleinfo(OscarData *od, const char *uin);
66.1404 -int aim_icq_getalias(OscarData *od, const char *uin);
66.1405 -int aim_icq_getallinfo(OscarData *od, const char *uin);
66.1406 -int aim_icq_sendsms(OscarData *od, const char *name, const char *msg, const char *alias);
66.1407 -
66.1408 -
66.1409 -/* 0x0017 - family_auth.c */
66.1410 -void aim_sendcookie(OscarData *, FlapConnection *, const guint16 length, const guint8 *);
66.1411 -void aim_admin_changepasswd(OscarData *, FlapConnection *, const char *newpw, const char *curpw);
66.1412 -void aim_admin_reqconfirm(OscarData *od, FlapConnection *conn);
66.1413 -void aim_admin_getinfo(OscarData *od, FlapConnection *conn, guint16 info);
66.1414 -void aim_admin_setemail(OscarData *od, FlapConnection *conn, const char *newemail);
66.1415 -void aim_admin_setnick(OscarData *od, FlapConnection *conn, const char *newnick);
66.1416 -
66.1417 -
66.1418 -
66.1419 -/* 0x0018 - family_alert.c */
66.1420 -struct aim_emailinfo
66.1421 -{
66.1422 - guint8 *cookie16;
66.1423 - guint8 *cookie8;
66.1424 - char *url;
66.1425 - guint16 nummsgs;
66.1426 - guint8 unread;
66.1427 - char *domain;
66.1428 - guint16 flag;
66.1429 - struct aim_emailinfo *next;
66.1430 -};
66.1431 -
66.1432 -int aim_email_sendcookies(OscarData *od);
66.1433 -int aim_email_activate(OscarData *od);
66.1434 -
66.1435 -
66.1436 -
66.1437 -/* tlv.c - TLV handling */
66.1438 -
66.1439 -/* TLV structure */
66.1440 -typedef struct aim_tlv_s
66.1441 -{
66.1442 - guint16 type;
66.1443 - guint16 length;
66.1444 - guint8 *value;
66.1445 -} aim_tlv_t;
66.1446 -
66.1447 -/* TLV handling functions */
66.1448 -char *aim_tlv_getvalue_as_string(aim_tlv_t *tlv);
66.1449 -
66.1450 -aim_tlv_t *aim_tlv_gettlv(GSList *list, const guint16 type, const int nth);
66.1451 -int aim_tlv_getlength(GSList *list, const guint16 type, const int nth);
66.1452 -char *aim_tlv_getstr(GSList *list, const guint16 type, const int nth);
66.1453 -guint8 aim_tlv_get8(GSList *list, const guint16 type, const int nth);
66.1454 -guint16 aim_tlv_get16(GSList *list, const guint16 type, const int nth);
66.1455 -guint32 aim_tlv_get32(GSList *list, const guint16 type, const int nth);
66.1456 -
66.1457 -/* TLV list handling functions */
66.1458 -GSList *aim_tlvlist_read(ByteStream *bs);
66.1459 -GSList *aim_tlvlist_readnum(ByteStream *bs, guint16 num);
66.1460 -GSList *aim_tlvlist_readlen(ByteStream *bs, guint16 len);
66.1461 -GSList *aim_tlvlist_copy(GSList *orig);
66.1462 -
66.1463 -int aim_tlvlist_count(GSList *list);
66.1464 -int aim_tlvlist_size(GSList *list);
66.1465 -int aim_tlvlist_cmp(GSList *one, GSList *two);
66.1466 -int aim_tlvlist_write(ByteStream *bs, GSList **list);
66.1467 -void aim_tlvlist_free(GSList *list);
66.1468 -
66.1469 -int aim_tlvlist_add_raw(GSList **list, const guint16 type, const guint16 length, const guint8 *value);
66.1470 -int aim_tlvlist_add_noval(GSList **list, const guint16 type);
66.1471 -int aim_tlvlist_add_8(GSList **list, const guint16 type, const guint8 value);
66.1472 -int aim_tlvlist_add_16(GSList **list, const guint16 type, const guint16 value);
66.1473 -int aim_tlvlist_add_32(GSList **list, const guint16 type, const guint32 value);
66.1474 -int aim_tlvlist_add_str(GSList **list, const guint16 type, const char *value);
66.1475 -int aim_tlvlist_add_caps(GSList **list, const guint16 type, const guint32 caps);
66.1476 -int aim_tlvlist_add_userinfo(GSList **list, guint16 type, aim_userinfo_t *userinfo);
66.1477 -int aim_tlvlist_add_chatroom(GSList **list, guint16 type, guint16 exchange, const char *roomname, guint16 instance);
66.1478 -int aim_tlvlist_add_frozentlvlist(GSList **list, guint16 type, GSList **tl);
66.1479 -
66.1480 -int aim_tlvlist_replace_raw(GSList **list, const guint16 type, const guint16 lenth, const guint8 *value);
66.1481 -int aim_tlvlist_replace_str(GSList **list, const guint16 type, const char *str);
66.1482 -int aim_tlvlist_replace_noval(GSList **list, const guint16 type);
66.1483 -int aim_tlvlist_replace_8(GSList **list, const guint16 type, const guint8 value);
66.1484 -int aim_tlvlist_replace_16(GSList **list, const guint16 type, const guint16 value);
66.1485 -int aim_tlvlist_replace_32(GSList **list, const guint16 type, const guint32 value);
66.1486 -
66.1487 -void aim_tlvlist_remove(GSList **list, const guint16 type);
66.1488 -
66.1489 -
66.1490 -
66.1491 -/* util.c */
66.1492 -/* These are really ugly. You'd think this was LISP. I wish it was. */
66.1493 -#define aimutil_put8(buf, data) ((*(buf) = (guint8)(data)&0xff),1)
66.1494 -#define aimutil_get8(buf) ((*(buf))&0xff)
66.1495 -#define aimutil_put16(buf, data) ( \
66.1496 - (*(buf) = (guint8)((data)>>8)&0xff), \
66.1497 - (*((buf)+1) = (guint8)(data)&0xff), \
66.1498 - 2)
66.1499 -#define aimutil_get16(buf) ((((*(buf))<<8)&0xff00) + ((*((buf)+1)) & 0xff))
66.1500 -#define aimutil_put32(buf, data) ( \
66.1501 - (*((buf)) = (guint8)((data)>>24)&0xff), \
66.1502 - (*((buf)+1) = (guint8)((data)>>16)&0xff), \
66.1503 - (*((buf)+2) = (guint8)((data)>>8)&0xff), \
66.1504 - (*((buf)+3) = (guint8)(data)&0xff), \
66.1505 - 4)
66.1506 -#define aimutil_get32(buf) ((((*(buf))<<24)&0xff000000) + \
66.1507 - (((*((buf)+1))<<16)&0x00ff0000) + \
66.1508 - (((*((buf)+2))<< 8)&0x0000ff00) + \
66.1509 - (((*((buf)+3) )&0x000000ff)))
66.1510 -
66.1511 -/* Little-endian versions (damn ICQ) */
66.1512 -#define aimutil_putle8(buf, data) ( \
66.1513 - (*(buf) = (guint8)(data) & 0xff), \
66.1514 - 1)
66.1515 -#define aimutil_getle8(buf) ( \
66.1516 - (*(buf)) & 0xff \
66.1517 - )
66.1518 -#define aimutil_putle16(buf, data) ( \
66.1519 - (*((buf)+0) = (guint8)((data) >> 0) & 0xff), \
66.1520 - (*((buf)+1) = (guint8)((data) >> 8) & 0xff), \
66.1521 - 2)
66.1522 -#define aimutil_getle16(buf) ( \
66.1523 - (((*((buf)+0)) << 0) & 0x00ff) + \
66.1524 - (((*((buf)+1)) << 8) & 0xff00) \
66.1525 - )
66.1526 -#define aimutil_putle32(buf, data) ( \
66.1527 - (*((buf)+0) = (guint8)((data) >> 0) & 0xff), \
66.1528 - (*((buf)+1) = (guint8)((data) >> 8) & 0xff), \
66.1529 - (*((buf)+2) = (guint8)((data) >> 16) & 0xff), \
66.1530 - (*((buf)+3) = (guint8)((data) >> 24) & 0xff), \
66.1531 - 4)
66.1532 -#define aimutil_getle32(buf) ( \
66.1533 - (((*((buf)+0)) << 0) & 0x000000ff) + \
66.1534 - (((*((buf)+1)) << 8) & 0x0000ff00) + \
66.1535 - (((*((buf)+2)) << 16) & 0x00ff0000) + \
66.1536 - (((*((buf)+3)) << 24) & 0xff000000))
66.1537 -
66.1538 -int oscar_get_ui_info_int(const char *str, int default_value);
66.1539 -const char *oscar_get_ui_info_string(const char *str, const char *default_value);
66.1540 -gchar *oscar_get_clientstring(void);
66.1541 -
66.1542 -guint16 aimutil_iconsum(const guint8 *buf, int buflen);
66.1543 -int aimutil_tokslen(char *toSearch, int theindex, char dl);
66.1544 -int aimutil_itemcnt(char *toSearch, char dl);
66.1545 -char *aimutil_itemindex(char *toSearch, int theindex, char dl);
66.1546 -
66.1547 -gboolean oscar_util_valid_name(const char *bn);
66.1548 -gboolean oscar_util_valid_name_icq(const char *bn);
66.1549 -gboolean oscar_util_valid_name_sms(const char *bn);
66.1550 -int oscar_util_name_compare(const char *bn1, const char *bn2);
66.1551 -
66.1552 -
66.1553 -
66.1554 -
66.1555 -typedef struct {
66.1556 - guint16 family;
66.1557 - guint16 subtype;
66.1558 - guint16 flags;
66.1559 - guint32 id;
66.1560 -} aim_modsnac_t;
66.1561 -
66.1562 -#define AIM_MODULENAME_MAXLEN 16
66.1563 -#define AIM_MODFLAG_MULTIFAMILY 0x0001
66.1564 -typedef struct aim_module_s
66.1565 -{
66.1566 - guint16 family;
66.1567 - guint16 version;
66.1568 - guint16 toolid;
66.1569 - guint16 toolversion;
66.1570 - guint16 flags;
66.1571 - char name[AIM_MODULENAME_MAXLEN+1];
66.1572 - int (*snachandler)(OscarData *od, FlapConnection *conn, struct aim_module_s *mod, FlapFrame *rx, aim_modsnac_t *snac, ByteStream *bs);
66.1573 - void (*shutdown)(OscarData *od, struct aim_module_s *mod);
66.1574 - void *priv;
66.1575 - struct aim_module_s *next;
66.1576 -} aim_module_t;
66.1577 -
66.1578 -int aim__registermodule(OscarData *od, int (*modfirst)(OscarData *, aim_module_t *));
66.1579 -void aim__shutdownmodules(OscarData *od);
66.1580 -aim_module_t *aim__findmodulebygroup(OscarData *od, guint16 group);
66.1581 -aim_module_t *aim__findmodule(OscarData *od, const char *name);
66.1582 -
66.1583 -int admin_modfirst(OscarData *od, aim_module_t *mod);
66.1584 -int buddylist_modfirst(OscarData *od, aim_module_t *mod);
66.1585 -int bos_modfirst(OscarData *od, aim_module_t *mod);
66.1586 -int search_modfirst(OscarData *od, aim_module_t *mod);
66.1587 -int stats_modfirst(OscarData *od, aim_module_t *mod);
66.1588 -int auth_modfirst(OscarData *od, aim_module_t *mod);
66.1589 -int msg_modfirst(OscarData *od, aim_module_t *mod);
66.1590 -int misc_modfirst(OscarData *od, aim_module_t *mod);
66.1591 -int chatnav_modfirst(OscarData *od, aim_module_t *mod);
66.1592 -int chat_modfirst(OscarData *od, aim_module_t *mod);
66.1593 -int locate_modfirst(OscarData *od, aim_module_t *mod);
66.1594 -int service_modfirst(OscarData *od, aim_module_t *mod);
66.1595 -int invite_modfirst(OscarData *od, aim_module_t *mod);
66.1596 -int translate_modfirst(OscarData *od, aim_module_t *mod);
66.1597 -int popups_modfirst(OscarData *od, aim_module_t *mod);
66.1598 -int adverts_modfirst(OscarData *od, aim_module_t *mod);
66.1599 -int odir_modfirst(OscarData *od, aim_module_t *mod);
66.1600 -int bart_modfirst(OscarData *od, aim_module_t *mod);
66.1601 -int ssi_modfirst(OscarData *od, aim_module_t *mod);
66.1602 -int icq_modfirst(OscarData *od, aim_module_t *mod);
66.1603 -int email_modfirst(OscarData *od, aim_module_t *mod);
66.1604 -
66.1605 -void aim_genericreq_n(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype);
66.1606 -void aim_genericreq_n_snacid(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype);
66.1607 -void aim_genericreq_l(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype, guint32 *);
66.1608 -void aim_genericreq_s(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype, guint16 *);
66.1609 -
66.1610 -/* bstream.c */
66.1611 -int byte_stream_new(ByteStream *bs, guint32 len);
66.1612 -int byte_stream_init(ByteStream *bs, guint8 *data, int len);
66.1613 -void byte_stream_destroy(ByteStream *bs);
66.1614 -int byte_stream_empty(ByteStream *bs);
66.1615 -int byte_stream_curpos(ByteStream *bs);
66.1616 -int byte_stream_setpos(ByteStream *bs, unsigned int off);
66.1617 -void byte_stream_rewind(ByteStream *bs);
66.1618 -int byte_stream_advance(ByteStream *bs, int n);
66.1619 -guint8 byte_stream_get8(ByteStream *bs);
66.1620 -guint16 byte_stream_get16(ByteStream *bs);
66.1621 -guint32 byte_stream_get32(ByteStream *bs);
66.1622 -guint8 byte_stream_getle8(ByteStream *bs);
66.1623 -guint16 byte_stream_getle16(ByteStream *bs);
66.1624 -guint32 byte_stream_getle32(ByteStream *bs);
66.1625 -int byte_stream_getrawbuf(ByteStream *bs, guint8 *buf, int len);
66.1626 -guint8 *byte_stream_getraw(ByteStream *bs, int len);
66.1627 -char *byte_stream_getstr(ByteStream *bs, int len);
66.1628 -int byte_stream_put8(ByteStream *bs, guint8 v);
66.1629 -int byte_stream_put16(ByteStream *bs, guint16 v);
66.1630 -int byte_stream_put32(ByteStream *bs, guint32 v);
66.1631 -int byte_stream_putle8(ByteStream *bs, guint8 v);
66.1632 -int byte_stream_putle16(ByteStream *bs, guint16 v);
66.1633 -int byte_stream_putle32(ByteStream *bs, guint32 v);
66.1634 -int byte_stream_putraw(ByteStream *bs, const guint8 *v, int len);
66.1635 -int byte_stream_putstr(ByteStream *bs, const char *str);
66.1636 -int byte_stream_putbs(ByteStream *bs, ByteStream *srcbs, int len);
66.1637 -int byte_stream_putuid(ByteStream *bs, OscarData *od);
66.1638 -int byte_stream_putcaps(ByteStream *bs, guint32 caps);
66.1639 -
66.1640 -/**
66.1641 - * Inserts a BART asset block into the given byte stream. The flags
66.1642 - * and length are set appropriately based on the value of data.
66.1643 - */
66.1644 -void byte_stream_put_bart_asset(ByteStream *bs, guint16 type, ByteStream *data);
66.1645 -
66.1646 -/**
66.1647 - * A helper function that calls byte_stream_put_bart_asset with the
66.1648 - * appropriate data ByteStream given the datastr.
66.1649 - */
66.1650 -void byte_stream_put_bart_asset_str(ByteStream *bs, guint16 type, const char *datastr);
66.1651 -
66.1652 -/*
66.1653 - * Generic SNAC structure. Rarely if ever used.
66.1654 - */
66.1655 -typedef struct aim_snac_s {
66.1656 - aim_snacid_t id;
66.1657 - guint16 family;
66.1658 - guint16 type;
66.1659 - guint16 flags;
66.1660 - void *data;
66.1661 - time_t issuetime;
66.1662 - struct aim_snac_s *next;
66.1663 -} aim_snac_t;
66.1664 -
66.1665 -/* snac.c */
66.1666 -void aim_initsnachash(OscarData *od);
66.1667 -aim_snacid_t aim_newsnac(OscarData *, aim_snac_t *newsnac);
66.1668 -aim_snacid_t aim_cachesnac(OscarData *od, const guint16 family, const guint16 type, const guint16 flags, const void *data, const int datalen);
66.1669 -aim_snac_t *aim_remsnac(OscarData *, aim_snacid_t id);
66.1670 -void aim_cleansnacs(OscarData *, int maxage);
66.1671 -int aim_putsnac(ByteStream *, guint16 family, guint16 type, guint16 flags, aim_snacid_t id);
66.1672 -
66.1673 -struct chatsnacinfo {
66.1674 - guint16 exchange;
66.1675 - char name[128];
66.1676 - guint16 instance;
66.1677 -};
66.1678 -
66.1679 -struct rateclass {
66.1680 - guint16 classid;
66.1681 - guint32 windowsize;
66.1682 - guint32 clear;
66.1683 - guint32 alert;
66.1684 - guint32 limit;
66.1685 - guint32 disconnect;
66.1686 - guint32 current;
66.1687 - guint32 max;
66.1688 - guint8 unknown[5]; /* only present in versions >= 3 */
66.1689 - GHashTable *members; /* Key is family and subtype, value is TRUE. */
66.1690 -
66.1691 - struct timeval last; /**< The time when we last sent a SNAC of this rate class. */
66.1692 -};
66.1693 -
66.1694 -int aim_cachecookie(OscarData *od, IcbmCookie *cookie);
66.1695 -IcbmCookie *aim_uncachecookie(OscarData *od, guint8 *cookie, int type);
66.1696 -IcbmCookie *aim_mkcookie(guint8 *, int, void *);
66.1697 -IcbmCookie *aim_checkcookie(OscarData *, const unsigned char *, const int);
66.1698 -int aim_freecookie(OscarData *od, IcbmCookie *cookie);
66.1699 -int aim_msgcookie_gettype(int type);
66.1700 -int aim_cookie_free(OscarData *od, IcbmCookie *cookie);
66.1701 -
66.1702 -int aim_chat_readroominfo(ByteStream *bs, struct aim_chat_roominfo *outinfo);
66.1703 -
66.1704 -void flap_connection_destroy_chat(OscarData *od, FlapConnection *conn);
66.1705 -
66.1706 -#ifdef __cplusplus
66.1707 -}
66.1708 -#endif
66.1709 -
66.1710 -#endif /* _OSCAR_H_ */
67.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/page.h Fri Aug 21 13:24:36 2009 -0700
67.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
67.3 @@ -1,81 +0,0 @@
67.4 -/**
67.5 - * @file page.h Paging functions
67.6 - *
67.7 - * purple
67.8 - *
67.9 - * Purple is the legal property of its developers, whose names are too numerous
67.10 - * to list here. Please refer to the COPYRIGHT file distributed with this
67.11 - * source distribution.
67.12 - *
67.13 - * This program is free software; you can redistribute it and/or modify
67.14 - * it under the terms of the GNU General Public License as published by
67.15 - * the Free Software Foundation; either version 2 of the License, or
67.16 - * (at your option) any later version.
67.17 - *
67.18 - * This program is distributed in the hope that it will be useful,
67.19 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
67.20 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
67.21 - * GNU General Public License for more details.
67.22 - *
67.23 - * You should have received a copy of the GNU General Public License
67.24 - * along with this program; if not, write to the Free Software
67.25 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
67.26 - */
67.27 -#ifndef _MSN_PAGE_H_
67.28 -#define _MSN_PAGE_H_
67.29 -
67.30 -typedef struct _MsnPage MsnPage;
67.31 -
67.32 -#include "session.h"
67.33 -
67.34 -/**
67.35 - * A page.
67.36 - */
67.37 -struct _MsnPage
67.38 -{
67.39 - char *from_location;
67.40 - char *from_phone;
67.41 -
67.42 - char *body;
67.43 -};
67.44 -
67.45 -/**
67.46 - * Creates a new, empty page.
67.47 - *
67.48 - * @return A new page.
67.49 - */
67.50 -MsnPage *msn_page_new(void);
67.51 -
67.52 -/**
67.53 - * Destroys a page.
67.54 - */
67.55 -void msn_page_destroy(MsnPage *page);
67.56 -
67.57 -/**
67.58 - * Generates the payload data of a page.
67.59 - *
67.60 - * @param page The page.
67.61 - * @param ret_size The returned size of the payload.
67.62 - *
67.63 - * @return The payload data of a page.
67.64 - */
67.65 -char *msn_page_gen_payload(const MsnPage *page, size_t *ret_size);
67.66 -
67.67 -/**
67.68 - * Sets the body of a page.
67.69 - *
67.70 - * @param page The page.
67.71 - * @param body The body of the page.
67.72 - */
67.73 -void msn_page_set_body(MsnPage *page, const char *body);
67.74 -
67.75 -/**
67.76 - * Returns the body of the page.
67.77 - *
67.78 - * @param page The page.
67.79 - *
67.80 - * @return The body of the page.
67.81 - */
67.82 -const char *msn_page_get_body(const MsnPage *page);
67.83 -
67.84 -#endif /* _MSN_PAGE_H_ */
68.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/pecan_config.h Fri Aug 21 13:24:36 2009 -0700
68.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
68.3 @@ -1,26 +0,0 @@
68.4 -/**
68.5 - * Copyright (C) 2008 Felipe Contreras
68.6 - *
68.7 - * This program is free software; you can redistribute it and/or modify
68.8 - * it under the terms of the GNU General Public License as published by
68.9 - * the Free Software Foundation; either version 2 of the License, or
68.10 - * (at your option) any later version.
68.11 - *
68.12 - * This program is distributed in the hope that it will be useful,
68.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
68.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
68.15 - * GNU General Public License for more details.
68.16 - *
68.17 - * You should have received a copy of the GNU General Public License
68.18 - * along with this program; if not, write to the Free Software
68.19 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
68.20 - */
68.21 -
68.22 -#ifndef PECAN_CONFIG_H
68.23 -#define PECAN_CONFIG_H
68.24 -
68.25 -#define PACKAGE_NAME "msn-pecan"
68.26 -
68.27 -#define PECAN_MAX_MESSAGE_LENGTH 1564
68.28 -
68.29 -#endif /* PECAN_CONFIG_H */
69.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/pecan_log.h Fri Aug 21 13:24:36 2009 -0700
69.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
69.3 @@ -1,79 +0,0 @@
69.4 -/**
69.5 - * Copyright (C) 2007-2008 Felipe Contreras
69.6 - *
69.7 - * This program is free software; you can redistribute it and/or modify
69.8 - * it under the terms of the GNU General Public License as published by
69.9 - * the Free Software Foundation; either version 2 of the License, or
69.10 - * (at your option) any later version.
69.11 - *
69.12 - * This program is distributed in the hope that it will be useful,
69.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
69.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
69.15 - * GNU General Public License for more details.
69.16 - *
69.17 - * You should have received a copy of the GNU General Public License
69.18 - * along with this program; if not, write to the Free Software
69.19 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
69.20 - */
69.21 -
69.22 -#ifndef PECAN_LOG_H
69.23 -#define PECAN_LOG_H
69.24 -
69.25 -#include <glib.h>
69.26 -#include "msn.h"
69.27 -
69.28 -#define PECAN_DEBUG
69.29 -
69.30 -#if defined(PECAN_DEBUG)
69.31 -
69.32 -/* #define PECAN_DEBUG_MSG */
69.33 -/* #define PECAN_DEBUG_SLPMSG */
69.34 -/* #define PECAN_DEBUG_HTTP */
69.35 -
69.36 -/* #define PECAN_DEBUG_SLP_VERBOSE */
69.37 -/* #define PECAN_DEBUG_SLP_FILES */
69.38 -
69.39 -/* #define PECAN_DEBUG_NS */
69.40 -/* #define PECAN_DEBUG_SB */
69.41 -/* #define PECAN_DEBUG_DC */
69.42 -
69.43 -/* #define PECAN_DEBUG_DC_FILES */
69.44 -
69.45 -enum PecanLogLevel
69.46 -{
69.47 - PECAN_LOG_LEVEL_NONE,
69.48 - PECAN_LOG_LEVEL_ERROR,
69.49 - PECAN_LOG_LEVEL_WARNING,
69.50 - PECAN_LOG_LEVEL_INFO,
69.51 - PECAN_LOG_LEVEL_DEBUG,
69.52 - PECAN_LOG_LEVEL_LOG
69.53 -};
69.54 -
69.55 -typedef enum PecanLogLevel PecanLogLevel;
69.56 -
69.57 -void msn_base_log_helper (PecanLogLevel level, const gchar *file, const gchar *function, gint line, const gchar *fmt, ...);
69.58 -void msn_dump_file (const gchar *buffer, gsize len);
69.59 -
69.60 -#define pecan_print(...) g_print (__VA_ARGS__);
69.61 -
69.62 -#define msn_base_log(level, ...) msn_base_log_helper (level, __FILE__, __func__, __LINE__, __VA_ARGS__);
69.63 -
69.64 -#define pecan_error(...) msn_base_log (PECAN_LOG_LEVEL_ERROR, __VA_ARGS__);
69.65 -#define pecan_warning(...) msn_base_log (PECAN_LOG_LEVEL_WARNING, __VA_ARGS__);
69.66 -#define pecan_info(...) msn_base_log (PECAN_LOG_LEVEL_INFO, __VA_ARGS__);
69.67 -#define pecan_debug(...) msn_base_log (PECAN_LOG_LEVEL_DEBUG, __VA_ARGS__);
69.68 -#define pecan_log(...) msn_base_log (PECAN_LOG_LEVEL_LOG, __VA_ARGS__);
69.69 -
69.70 -#elif !defined(PECAN_DEBUG)
69.71 -
69.72 -#define pecan_print(...) {}
69.73 -#define pecan_error(...) {}
69.74 -#define pecan_warning(...) {}
69.75 -#define pecan_info(...) {}
69.76 -#define pecan_debug(...) {}
69.77 -#define pecan_log(...) {}
69.78 -#define msn_dump_file(...) {}
69.79 -
69.80 -#endif /* !defined(PECAN_DEBUG) */
69.81 -
69.82 -#endif /* PECAN_LOG_H */
70.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/pecan_printf.h Fri Aug 21 13:24:36 2009 -0700
70.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
70.3 @@ -1,34 +0,0 @@
70.4 -/**
70.5 - * Copyright (C) 2007-2008 Felipe Contreras
70.6 - *
70.7 - * This program is free software; you can redistribute it and/or modify
70.8 - * it under the terms of the GNU General Public License as published by
70.9 - * the Free Software Foundation; either version 2 of the License, or
70.10 - * (at your option) any later version.
70.11 - *
70.12 - * This program is distributed in the hope that it will be useful,
70.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
70.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
70.15 - * GNU General Public License for more details.
70.16 - *
70.17 - * You should have received a copy of the GNU General Public License
70.18 - * along with this program; if not, write to the Free Software
70.19 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
70.20 - */
70.21 -
70.22 -#ifndef PECAN_PRINTF_H
70.23 -#define PECAN_PRINTF_H
70.24 -
70.25 -#include <glib.h>
70.26 -
70.27 -#define PECAN_CUSTOM_PRINTF
70.28 -
70.29 -#ifdef PECAN_CUSTOM_PRINTF
70.30 -gchar *pecan_strdup_vprintf (const gchar *format, va_list args);
70.31 -gchar *pecan_strdup_printf (const gchar *format, ...);
70.32 -#else
70.33 -#define pecan_strdup_vprintf g_strdup_vprintf
70.34 -#define pecan_strdup_printf g_strdup_printf
70.35 -#endif /* PECAN_CUSTOM_PRINTF */
70.36 -
70.37 -#endif /* PECAN_PRINTF_H */
71.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/pecan_status.h Fri Aug 21 13:24:36 2009 -0700
71.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
71.3 @@ -1,60 +0,0 @@
71.4 -/**
71.5 - * Copyright (C) 2007-2008 Felipe Contreras
71.6 - *
71.7 - * Purple is the legal property of its developers, whose names are too numerous
71.8 - * to list here. Please refer to the COPYRIGHT file distributed with this
71.9 - * source distribution.
71.10 - *
71.11 - * This program is free software; you can redistribute it and/or modify
71.12 - * it under the terms of the GNU General Public License as published by
71.13 - * the Free Software Foundation; either version 2 of the License, or
71.14 - * (at your option) any later version.
71.15 - *
71.16 - * This program is distributed in the hope that it will be useful,
71.17 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
71.18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
71.19 - * GNU General Public License for more details.
71.20 - *
71.21 - * You should have received a copy of the GNU General Public License
71.22 - * along with this program; if not, write to the Free Software
71.23 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
71.24 - */
71.25 -
71.26 -#ifndef PECAN_STATUS_H
71.27 -#define PECAN_STATUS_H
71.28 -
71.29 -/**
71.30 - * Status types.
71.31 - */
71.32 -typedef enum
71.33 -{
71.34 - PECAN_STATUS_NONE,
71.35 - PECAN_STATUS_ONLINE,
71.36 - PECAN_STATUS_BUSY,
71.37 - PECAN_STATUS_IDLE,
71.38 - PECAN_STATUS_BRB,
71.39 - PECAN_STATUS_AWAY,
71.40 - PECAN_STATUS_PHONE,
71.41 - PECAN_STATUS_LUNCH,
71.42 - PECAN_STATUS_OFFLINE,
71.43 - PECAN_STATUS_HIDDEN
71.44 -
71.45 -} PecanStatusType;
71.46 -
71.47 -struct MsnSession;
71.48 -
71.49 -/**
71.50 - * Updates the status of the user.
71.51 - *
71.52 - * @param session The MSN session.
71.53 - */
71.54 -void pecan_update_status (struct MsnSession *session);
71.55 -
71.56 -/**
71.57 - * Updates the personal message of the user.
71.58 - *
71.59 - * @param session The MSN session.
71.60 - */
71.61 -void pecan_update_personal_message (struct MsnSession *session);
71.62 -
71.63 -#endif /* PECAN_STATUS_H */
72.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/pecan_util.h Fri Aug 21 13:24:36 2009 -0700
72.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
72.3 @@ -1,66 +0,0 @@
72.4 -/**
72.5 - * Copyright (C) 2007-2008 Felipe Contreras
72.6 - *
72.7 - * Purple is the legal property of its developers, whose names are too numerous
72.8 - * to list here. Please refer to the COPYRIGHT file distributed with this
72.9 - * source distribution.
72.10 - *
72.11 - * This program is free software; you can redistribute it and/or modify
72.12 - * it under the terms of the GNU General Public License as published by
72.13 - * the Free Software Foundation; either version 2 of the License, or
72.14 - * (at your option) any later version.
72.15 - *
72.16 - * This program is distributed in the hope that it will be useful,
72.17 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
72.18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
72.19 - * GNU General Public License for more details.
72.20 - *
72.21 - * You should have received a copy of the GNU General Public License
72.22 - * along with this program; if not, write to the Free Software
72.23 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
72.24 - */
72.25 -
72.26 -#ifndef PECAN_UTIL_H
72.27 -#define PECAN_UTIL_H
72.28 -
72.29 -#include <glib.h>
72.30 -
72.31 -/**
72.32 - * Parses the MSN message formatting into a format compatible with Purple.
72.33 - *
72.34 - * @param mime The mime header with the formatting.
72.35 - * @param pre_ret The returned prefix string.
72.36 - * @param post_ret The returned postfix string.
72.37 - *
72.38 - * @return The new message.
72.39 - */
72.40 -void msn_parse_format(const char *mime, char **pre_ret, char **post_ret);
72.41 -
72.42 -/**
72.43 - * Parses the Purple message formatting (html) into the MSN format.
72.44 - *
72.45 - * @param html The html message to format.
72.46 - * @param attributes The returned attributes string.
72.47 - * @param message The returned message string.
72.48 - *
72.49 - * @return The new message.
72.50 - */
72.51 -void msn_import_html(const char *html, char **attributes, char **message);
72.52 -
72.53 -void
72.54 -pecan_handle_challenge (const gchar *input,
72.55 - const gchar *product_id,
72.56 - gchar *output);
72.57 -
72.58 -void msn_parse_socket(const char *str, char **ret_host, int *ret_port);
72.59 -char *msn_rand_guid(void);
72.60 -gchar *pecan_normalize (const gchar *str);
72.61 -
72.62 -#if !GLIB_CHECK_VERSION(2,12,0)
72.63 -void g_hash_table_remove_all (GHashTable *hash_table);
72.64 -#endif /* !GLIB_CHECK_VERSION(2,12,0) */
72.65 -gpointer g_hash_table_peek_first (GHashTable *hash_table);
72.66 -gboolean g_ascii_strcase_equal (gconstpointer v1, gconstpointer v2);
72.67 -guint g_ascii_strcase_hash (gconstpointer v);
72.68 -
72.69 -#endif /* PECAN_UTIL_H */
73.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/peer.h Fri Aug 21 13:24:36 2009 -0700
73.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
73.3 @@ -1,281 +0,0 @@
73.4 -/*
73.5 - * Purple's oscar protocol plugin
73.6 - * This file is the legal property of its developers.
73.7 - * Please see the AUTHORS file distributed alongside this file.
73.8 - *
73.9 - * This library is free software; you can redistribute it and/or
73.10 - * modify it under the terms of the GNU Lesser General Public
73.11 - * License as published by the Free Software Foundation; either
73.12 - * version 2 of the License, or (at your option) any later version.
73.13 - *
73.14 - * This library is distributed in the hope that it will be useful,
73.15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
73.16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
73.17 - * Lesser General Public License for more details.
73.18 - *
73.19 - * You should have received a copy of the GNU Lesser General Public
73.20 - * License along with this library; if not, write to the Free Software
73.21 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
73.22 -*/
73.23 -
73.24 -/*
73.25 - * OFT and ODC Services
73.26 - */
73.27 -
73.28 -#ifndef _PEER_H_
73.29 -#define _PEER_H_
73.30 -
73.31 -#include "ft.h"
73.32 -#include "network.h"
73.33 -#include "proxy.h"
73.34 -
73.35 -typedef struct _ChecksumData ChecksumData;
73.36 -typedef struct _OdcFrame OdcFrame;
73.37 -typedef struct _OftFrame OftFrame;
73.38 -typedef struct _ProxyFrame ProxyFrame;
73.39 -typedef struct _PeerConnection PeerConnection;
73.40 -
73.41 -#define PEER_CONNECTION_FLAG_INITIATED_BY_ME 0x0001
73.42 -#define PEER_CONNECTION_FLAG_APPROVED 0x0002
73.43 -#define PEER_CONNECTION_FLAG_TRIED_DIRECT 0x0004
73.44 -#define PEER_CONNECTION_FLAG_TRIED_INCOMING 0x0008
73.45 -#define PEER_CONNECTION_FLAG_TRIED_PROXY 0x0010
73.46 -#define PEER_CONNECTION_FLAG_IS_INCOMING 0x0020
73.47 -
73.48 -#define PEER_TYPE_PROMPT 0x0101 /* "I am going to send you this file, is that ok?" */
73.49 -#define PEER_TYPE_RESUMEACCEPT 0x0106 /* We are accepting the resume */
73.50 -#define PEER_TYPE_ACK 0x0202 /* "Yes, it is ok for you to send me that file" */
73.51 -#define PEER_TYPE_DONE 0x0204 /* "I received that file with no problems, thanks a bunch" */
73.52 -#define PEER_TYPE_RESUME 0x0205 /* Resume transferring, sent by whoever receives */
73.53 -#define PEER_TYPE_RESUMEACK 0x0207 /* Our resume accept was ACKed */
73.54 -
73.55 -#define PEER_TYPE_GETFILE_REQUESTLISTING 0x1108 /* "I have a listing.txt file, do you want it?" */
73.56 -#define PEER_TYPE_GETFILE_RECEIVELISTING 0x1209 /* "Yes, please send me your listing.txt file" */
73.57 -#define PEER_TYPE_GETFILE_RECEIVEDLISTING 0x120a /* received corrupt listing.txt file? I'm just guessing about this one... */
73.58 -#define PEER_TYPE_GETFILE_ACKLISTING 0x120b /* "I received the listing.txt file successfully" */
73.59 -#define PEER_TYPE_GETFILE_REQUESTFILE 0x120c /* "Please send me this file" */
73.60 -
73.61 -/*
73.62 - * For peer proxying
73.63 - */
73.64 -#define PEER_PROXY_SERVER "ars.oscar.aol.com"
73.65 -#define PEER_PROXY_PORT 5190 /* The port we should always connect to */
73.66 -#define PEER_PROXY_PACKET_VERSION 0x044a
73.67 -
73.68 -/* Thanks to Keith Lea and the Joust project for documenting these */
73.69 -#define PEER_PROXY_TYPE_ERROR 0x0001
73.70 -#define PEER_PROXY_TYPE_CREATE 0x0002
73.71 -#define PEER_PROXY_TYPE_CREATED 0x0003
73.72 -#define PEER_PROXY_TYPE_JOIN 0x0004
73.73 -#define PEER_PROXY_TYPE_READY 0x0005
73.74 -
73.75 -struct _OdcFrame
73.76 -{
73.77 - /* guchar magic[4]; */ /* 0 */
73.78 - /* guint16 length; */ /* 4 */
73.79 - guint16 type; /* 6 */
73.80 - guint16 subtype; /* 8 */
73.81 - /* Unknown */ /* 10 */
73.82 - guchar cookie[8]; /* 12 */
73.83 - /* Unknown */
73.84 - /* guint32 payloadlength; */ /* 28 */
73.85 - guint16 encoding; /* 32 */
73.86 - /* Unknown */
73.87 - guint16 flags; /* 38 */
73.88 - /* Unknown */
73.89 - guchar bn[32]; /* 44 */
73.90 - /* Unknown */
73.91 - ByteStream payload; /* 76 */
73.92 -};
73.93 -
73.94 -struct _OftFrame
73.95 -{
73.96 - /* guchar magic[4]; */ /* 0 */
73.97 - /* guint16 length; */ /* 4 */
73.98 - guint16 type; /* 6 */
73.99 - guchar cookie[8]; /* 8 */
73.100 - guint16 encrypt; /* 16 */
73.101 - guint16 compress; /* 18 */
73.102 - guint16 totfiles; /* 20 */
73.103 - guint16 filesleft; /* 22 */
73.104 - guint16 totparts; /* 24 */
73.105 - guint16 partsleft; /* 26 */
73.106 - guint32 totsize; /* 28 */
73.107 - guint32 size; /* 32 */
73.108 - guint32 modtime; /* 36 */
73.109 - guint32 checksum; /* 40 */
73.110 - guint32 rfrcsum; /* 44 */
73.111 - guint32 rfsize; /* 48 */
73.112 - guint32 cretime; /* 52 */
73.113 - guint32 rfcsum; /* 56 */
73.114 - guint32 nrecvd; /* 60 */
73.115 - guint32 recvcsum; /* 64 */
73.116 - guchar idstring[32]; /* 68 */
73.117 - guint8 flags; /* 100 */
73.118 - guint8 lnameoffset; /* 101 */
73.119 - guint8 lsizeoffset; /* 102 */
73.120 - guchar dummy[69]; /* 103 */
73.121 - guchar macfileinfo[16]; /* 172 */
73.122 - guint16 nencode; /* 188 */
73.123 - guint16 nlanguage; /* 190 */
73.124 - guchar *name; /* 192 */
73.125 - size_t name_length;
73.126 - /* Payload? */ /* 256 */
73.127 -};
73.128 -
73.129 -struct _ProxyFrame
73.130 -{
73.131 - /* guint16 length; */ /* 0 */
73.132 - guint16 version; /* 2 */
73.133 - guint16 type; /* 4 */
73.134 - guint32 unknown; /* 6 */
73.135 - guint16 flags; /* 10 */
73.136 - ByteStream payload; /* 12 */
73.137 -};
73.138 -
73.139 -struct _PeerConnection
73.140 -{
73.141 - OscarData *od;
73.142 - OscarCapability type;
73.143 - char *bn;
73.144 - guchar magic[4];
73.145 - guchar cookie[8];
73.146 - guint16 lastrequestnumber;
73.147 -
73.148 - gboolean ready;
73.149 - int flags; /**< Bitmask of PEER_CONNECTION_FLAG_ */
73.150 - time_t lastactivity; /**< Time of last transmit. */
73.151 - guint destroy_timeout;
73.152 - OscarDisconnectReason disconnect_reason;
73.153 - char *error_message;
73.154 -
73.155 - /**
73.156 - * A pointer to either an OdcFrame or an OftFrame.
73.157 - */
73.158 - gpointer frame;
73.159 -
73.160 - /**
73.161 - * This is only used when the peer connection is being established.
73.162 - */
73.163 - PurpleProxyConnectData *client_connect_data;
73.164 - PurpleProxyConnectData *verified_connect_data;
73.165 -
73.166 - /**
73.167 - * This is only used when the peer connection is being established.
73.168 - */
73.169 - PurpleNetworkListenData *listen_data;
73.170 -
73.171 -
73.172 - /**
73.173 - * This is only used when the peer connection is being established.
73.174 - */
73.175 - guint connect_timeout_timer;
73.176 -
73.177 - /**
73.178 - * This is only used while the remote user is attempting to
73.179 - * connect to us.
73.180 - */
73.181 - int listenerfd;
73.182 -
73.183 - int fd;
73.184 - guint8 header[6];
73.185 - gssize header_received;
73.186 - guint8 proxy_header[12];
73.187 - gssize proxy_header_received;
73.188 - ByteStream buffer_incoming;
73.189 - PurpleCircBuffer *buffer_outgoing;
73.190 - guint watcher_incoming;
73.191 - guint watcher_outgoing;
73.192 -
73.193 - /**
73.194 - * IP address of the proxy server, if applicable.
73.195 - */
73.196 - gchar *proxyip;
73.197 -
73.198 - /**
73.199 - * IP address of the remote user from THEIR point of view.
73.200 - */
73.201 - gchar *clientip;
73.202 -
73.203 - /**
73.204 - * IP address of the remote user from the oscar server's
73.205 - * point of view.
73.206 - */
73.207 - gchar *verifiedip;
73.208 -
73.209 - guint16 port;
73.210 - gboolean use_proxy;
73.211 -
73.212 - /**
73.213 - * Checksumming
73.214 - */
73.215 - ChecksumData *checksum_data;
73.216 -
73.217 - /* TODOFT */
73.218 - PurpleXfer *xfer;
73.219 - OftFrame xferdata;
73.220 - guint sending_data_timer;
73.221 -};
73.222 -
73.223 -/*
73.224 - * For all peer connections
73.225 - */
73.226 -
73.227 -/**
73.228 - * Create a new PeerConnection structure and initialize it with some
73.229 - * sane defaults.
73.230 - *
73.231 - * @param type The type of the peer connection. One of
73.232 - * OSCAR_CAPABILITY_DIRECTIM or OSCAR_CAPABILITY_SENDFILE.
73.233 - */
73.234 -PeerConnection *peer_connection_new(OscarData *od, OscarCapability type, const char *bn);
73.235 -
73.236 -void peer_connection_destroy(PeerConnection *conn, OscarDisconnectReason reason, const gchar *error_message);
73.237 -void peer_connection_schedule_destroy(PeerConnection *conn, OscarDisconnectReason reason, const gchar *error_message);
73.238 -PeerConnection *peer_connection_find_by_type(OscarData *od, const char *bn, OscarCapability type);
73.239 -PeerConnection *peer_connection_find_by_cookie(OscarData *od, const char *bn, const guchar *cookie);
73.240 -
73.241 -void peer_connection_listen_cb(gpointer data, gint source, PurpleInputCondition cond);
73.242 -void peer_connection_recv_cb(gpointer data, gint source, PurpleInputCondition cond);
73.243 -void peer_connection_send(PeerConnection *conn, ByteStream *bs);
73.244 -
73.245 -void peer_connection_trynext(PeerConnection *conn);
73.246 -void peer_connection_finalize_connection(PeerConnection *conn);
73.247 -void peer_connection_propose(OscarData *od, OscarCapability type, const char *bn);
73.248 -void peer_connection_got_proposition(OscarData *od, const gchar *bn, const gchar *message, IcbmArgsCh2 *args);
73.249 -
73.250 -/*
73.251 - * For ODC
73.252 - */
73.253 -void peer_odc_close(PeerConnection *conn);
73.254 -void peer_odc_recv_frame(PeerConnection *conn, ByteStream *bs);
73.255 -void peer_odc_send_cookie(PeerConnection *conn);
73.256 -void peer_odc_send_typing(PeerConnection *conn, PurpleTypingState typing);
73.257 -void peer_odc_send_im(PeerConnection *conn, const char *msg, int len, int encoding, gboolean autoreply);
73.258 -
73.259 -/*
73.260 - * For OFT
73.261 - */
73.262 -void peer_oft_close(PeerConnection *conn);
73.263 -void peer_oft_recv_frame(PeerConnection *conn, ByteStream *bs);
73.264 -void peer_oft_send_prompt(PeerConnection *conn);
73.265 -void peer_oft_checksum_destroy(ChecksumData *checksum_data);
73.266 -
73.267 -/* Xfer callbacks for receiving a file */
73.268 -void peer_oft_recvcb_init(PurpleXfer *xfer);
73.269 -void peer_oft_recvcb_end(PurpleXfer *xfer);
73.270 -void peer_oft_recvcb_ack_recv(PurpleXfer *xfer, const guchar *buffer, size_t size);
73.271 -
73.272 -/* Xfer callbacks for sending a file */
73.273 -void peer_oft_sendcb_init(PurpleXfer *xfer);
73.274 -void peer_oft_sendcb_ack(PurpleXfer *xfer, const guchar *buffer, size_t size);
73.275 -
73.276 -/* Xfer callbacks for both sending and receiving */
73.277 -void peer_oft_cb_generic_cancel(PurpleXfer *xfer);
73.278 -
73.279 -/*
73.280 - * For peer proxying
73.281 - */
73.282 -void peer_proxy_connection_established_cb(gpointer data, gint source, const gchar *error_message);
73.283 -
73.284 -#endif /* _PEER_H_ */
74.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/plugin.h Fri Aug 21 13:24:36 2009 -0700
74.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
74.3 @@ -1,740 +0,0 @@
74.4 -/**
74.5 - * @file plugin.h Plugin API
74.6 - * @ingroup core
74.7 - * @see @ref plugin-signals
74.8 - * @see @ref plugin-ids
74.9 - * @see @ref plugin-i18n
74.10 - */
74.11 -
74.12 -/* purple
74.13 - *
74.14 - * Purple is the legal property of its developers, whose names are too numerous
74.15 - * to list here. Please refer to the COPYRIGHT file distributed with this
74.16 - * source distribution.
74.17 - *
74.18 - * This program is free software; you can redistribute it and/or modify
74.19 - * it under the terms of the GNU General Public License as published by
74.20 - * the Free Software Foundation; either version 2 of the License, or
74.21 - * (at your option) any later version.
74.22 - *
74.23 - * This program is distributed in the hope that it will be useful,
74.24 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
74.25 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
74.26 - * GNU General Public License for more details.
74.27 - *
74.28 - * You should have received a copy of the GNU General Public License
74.29 - * along with this program; if not, write to the Free Software
74.30 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
74.31 - */
74.32 -#ifndef _PURPLE_PLUGIN_H_
74.33 -#define _PURPLE_PLUGIN_H_
74.34 -
74.35 -#include <glib.h>
74.36 -#include <gmodule.h>
74.37 -#include "signals.h"
74.38 -#include "value.h"
74.39 -
74.40 -/** @copydoc _PurplePlugin */
74.41 -typedef struct _PurplePlugin PurplePlugin;
74.42 -/** @copydoc _PurplePluginInfo */
74.43 -typedef struct _PurplePluginInfo PurplePluginInfo;
74.44 -/** @copydoc _PurplePluginUiInfo */
74.45 -typedef struct _PurplePluginUiInfo PurplePluginUiInfo;
74.46 -/** @copydoc _PurplePluginLoaderInfo */
74.47 -typedef struct _PurplePluginLoaderInfo PurplePluginLoaderInfo;
74.48 -
74.49 -/** @copydoc _PurplePluginAction */
74.50 -typedef struct _PurplePluginAction PurplePluginAction;
74.51 -
74.52 -typedef int PurplePluginPriority; /**< Plugin priority. */
74.53 -
74.54 -#include "pluginpref.h"
74.55 -
74.56 -/**
74.57 - * Plugin types.
74.58 - */
74.59 -typedef enum
74.60 -{
74.61 - PURPLE_PLUGIN_UNKNOWN = -1, /**< Unknown type. */
74.62 - PURPLE_PLUGIN_STANDARD = 0, /**< Standard plugin. */
74.63 - PURPLE_PLUGIN_LOADER, /**< Loader plugin. */
74.64 - PURPLE_PLUGIN_PROTOCOL /**< Protocol plugin. */
74.65 -
74.66 -} PurplePluginType;
74.67 -
74.68 -#define PURPLE_PRIORITY_DEFAULT 0
74.69 -#define PURPLE_PRIORITY_HIGHEST 9999
74.70 -#define PURPLE_PRIORITY_LOWEST -9999
74.71 -
74.72 -#define PURPLE_PLUGIN_FLAG_INVISIBLE 0x01
74.73 -
74.74 -#define PURPLE_PLUGIN_MAGIC 5 /* once we hit 6.0.0 I think we can remove this */
74.75 -
74.76 -/**
74.77 - * Detailed information about a plugin.
74.78 - *
74.79 - * This is used in the version 2.0 API and up.
74.80 - */
74.81 -struct _PurplePluginInfo
74.82 -{
74.83 - unsigned int magic;
74.84 - unsigned int major_version;
74.85 - unsigned int minor_version;
74.86 - PurplePluginType type;
74.87 - char *ui_requirement;
74.88 - unsigned long flags;
74.89 - GList *dependencies;
74.90 - PurplePluginPriority priority;
74.91 -
74.92 - char *id;
74.93 - char *name;
74.94 - char *version;
74.95 - char *summary;
74.96 - char *description;
74.97 - char *author;
74.98 - char *homepage;
74.99 -
74.100 - /**
74.101 - * If a plugin defines a 'load' function, and it returns FALSE,
74.102 - * then the plugin will not be loaded.
74.103 - */
74.104 - gboolean (*load)(PurplePlugin *plugin);
74.105 - gboolean (*unload)(PurplePlugin *plugin);
74.106 - void (*destroy)(PurplePlugin *plugin);
74.107 -
74.108 - void *ui_info; /**< Used only by UI-specific plugins to build a preference screen with a custom UI */
74.109 - void *extra_info;
74.110 - PurplePluginUiInfo *prefs_info; /**< Used by any plugin to display preferences. If #ui_info has been specified, this will be ignored. */
74.111 -
74.112 - /**
74.113 - * This callback has a different use depending on whether this
74.114 - * plugin type is PURPLE_PLUGIN_STANDARD or PURPLE_PLUGIN_PROTOCOL.
74.115 - *
74.116 - * If PURPLE_PLUGIN_STANDARD then the list of actions will show up
74.117 - * in the Tools menu, under a submenu with the name of the plugin.
74.118 - * context will be NULL.
74.119 - *
74.120 - * If PURPLE_PLUGIN_PROTOCOL then the list of actions will show up
74.121 - * in the Accounts menu, under a submenu with the name of the
74.122 - * account. context will be set to the PurpleConnection for that
74.123 - * account. This callback will only be called for online accounts.
74.124 - */
74.125 - GList *(*actions)(PurplePlugin *plugin, gpointer context);
74.126 -
74.127 - void (*_purple_reserved1)(void);
74.128 - void (*_purple_reserved2)(void);
74.129 - void (*_purple_reserved3)(void);
74.130 - void (*_purple_reserved4)(void);
74.131 -};
74.132 -
74.133 -/**
74.134 - * Extra information for loader plugins.
74.135 - */
74.136 -struct _PurplePluginLoaderInfo
74.137 -{
74.138 - GList *exts;
74.139 -
74.140 - gboolean (*probe)(PurplePlugin *plugin);
74.141 - gboolean (*load)(PurplePlugin *plugin);
74.142 - gboolean (*unload)(PurplePlugin *plugin);
74.143 - void (*destroy)(PurplePlugin *plugin);
74.144 -
74.145 - void (*_purple_reserved1)(void);
74.146 - void (*_purple_reserved2)(void);
74.147 - void (*_purple_reserved3)(void);
74.148 - void (*_purple_reserved4)(void);
74.149 -};
74.150 -
74.151 -/**
74.152 - * A plugin handle.
74.153 - */
74.154 -struct _PurplePlugin
74.155 -{
74.156 - gboolean native_plugin; /**< Native C plugin. */
74.157 - gboolean loaded; /**< The loaded state. */
74.158 - void *handle; /**< The module handle. */
74.159 - char *path; /**< The path to the plugin. */
74.160 - PurplePluginInfo *info; /**< The plugin information. */
74.161 - char *error;
74.162 - void *ipc_data; /**< IPC data. */
74.163 - void *extra; /**< Plugin-specific data. */
74.164 - gboolean unloadable; /**< Unloadable */
74.165 - GList *dependent_plugins; /**< Plugins depending on this */
74.166 -
74.167 - void (*_purple_reserved1)(void);
74.168 - void (*_purple_reserved2)(void);
74.169 - void (*_purple_reserved3)(void);
74.170 - void (*_purple_reserved4)(void);
74.171 -};
74.172 -
74.173 -#define PURPLE_PLUGIN_LOADER_INFO(plugin) \
74.174 - ((PurplePluginLoaderInfo *)(plugin)->info->extra_info)
74.175 -
74.176 -struct _PurplePluginUiInfo {
74.177 - PurplePluginPrefFrame *(*get_plugin_pref_frame)(PurplePlugin *plugin);
74.178 -
74.179 - int page_num; /**< Reserved */
74.180 - PurplePluginPrefFrame *frame; /**< Reserved */
74.181 -
74.182 - void (*_purple_reserved1)(void);
74.183 - void (*_purple_reserved2)(void);
74.184 - void (*_purple_reserved3)(void);
74.185 - void (*_purple_reserved4)(void);
74.186 -};
74.187 -
74.188 -#define PURPLE_PLUGIN_HAS_PREF_FRAME(plugin) \
74.189 - ((plugin)->info != NULL && (plugin)->info->prefs_info != NULL)
74.190 -
74.191 -#define PURPLE_PLUGIN_UI_INFO(plugin) \
74.192 - ((PurplePluginUiInfo*)(plugin)->info->prefs_info)
74.193 -
74.194 -
74.195 -/**
74.196 - * The structure used in the actions member of PurplePluginInfo
74.197 - */
74.198 -struct _PurplePluginAction {
74.199 - char *label;
74.200 - void (*callback)(PurplePluginAction *);
74.201 -
74.202 - /** set to the owning plugin */
74.203 - PurplePlugin *plugin;
74.204 -
74.205 - /** NULL for plugin actions menu, set to the PurpleConnection for
74.206 - account actions menu */
74.207 - gpointer context;
74.208 -
74.209 - gpointer user_data;
74.210 -};
74.211 -
74.212 -#define PURPLE_PLUGIN_HAS_ACTIONS(plugin) \
74.213 - ((plugin)->info != NULL && (plugin)->info->actions != NULL)
74.214 -
74.215 -#define PURPLE_PLUGIN_ACTIONS(plugin, context) \
74.216 - (PURPLE_PLUGIN_HAS_ACTIONS(plugin)? \
74.217 - (plugin)->info->actions(plugin, context): NULL)
74.218 -
74.219 -
74.220 -/**
74.221 - * Handles the initialization of modules.
74.222 - */
74.223 -#if !defined(PURPLE_PLUGINS) || defined(PURPLE_STATIC_PRPL)
74.224 -# define _FUNC_NAME(x) purple_init_##x##_plugin
74.225 -# define PURPLE_INIT_PLUGIN(pluginname, initfunc, plugininfo) \
74.226 - gboolean _FUNC_NAME(pluginname)(void);\
74.227 - gboolean _FUNC_NAME(pluginname)(void) { \
74.228 - PurplePlugin *plugin = purple_plugin_new(TRUE, NULL); \
74.229 - plugin->info = &(plugininfo); \
74.230 - initfunc((plugin)); \
74.231 - purple_plugin_load((plugin)); \
74.232 - return purple_plugin_register(plugin); \
74.233 - }
74.234 -#else /* PURPLE_PLUGINS && !PURPLE_STATIC_PRPL */
74.235 -# define PURPLE_INIT_PLUGIN(pluginname, initfunc, plugininfo) \
74.236 - G_MODULE_EXPORT gboolean purple_init_plugin(PurplePlugin *plugin); \
74.237 - G_MODULE_EXPORT gboolean purple_init_plugin(PurplePlugin *plugin) { \
74.238 - plugin->info = &(plugininfo); \
74.239 - initfunc((plugin)); \
74.240 - return purple_plugin_register(plugin); \
74.241 - }
74.242 -#endif
74.243 -
74.244 -
74.245 -#ifdef __cplusplus
74.246 -extern "C" {
74.247 -#endif
74.248 -
74.249 -/**************************************************************************/
74.250 -/** @name Plugin API */
74.251 -/**************************************************************************/
74.252 -/*@{*/
74.253 -
74.254 -/**
74.255 - * Creates a new plugin structure.
74.256 - *
74.257 - * @param native Whether or not the plugin is native.
74.258 - * @param path The path to the plugin, or @c NULL if statically compiled.
74.259 - *
74.260 - * @return A new PurplePlugin structure.
74.261 - */
74.262 -PurplePlugin *purple_plugin_new(gboolean native, const char *path);
74.263 -
74.264 -/**
74.265 - * Probes a plugin, retrieving the information on it and adding it to the
74.266 - * list of available plugins.
74.267 - *
74.268 - * @param filename The plugin's filename.
74.269 - *
74.270 - * @return The plugin handle.
74.271 - *
74.272 - * @see purple_plugin_load()
74.273 - * @see purple_plugin_destroy()
74.274 - */
74.275 -PurplePlugin *purple_plugin_probe(const char *filename);
74.276 -
74.277 -/**
74.278 - * Registers a plugin and prepares it for loading.
74.279 - *
74.280 - * This shouldn't be called by anything but the internal module code.
74.281 - * Plugins should use the PURPLE_INIT_PLUGIN() macro to register themselves
74.282 - * with the core.
74.283 - *
74.284 - * @param plugin The plugin to register.
74.285 - *
74.286 - * @return @c TRUE if the plugin was registered successfully. Otherwise
74.287 - * @c FALSE is returned (this happens if the plugin does not contain
74.288 - * the necessary information).
74.289 - */
74.290 -gboolean purple_plugin_register(PurplePlugin *plugin);
74.291 -
74.292 -/**
74.293 - * Attempts to load a previously probed plugin.
74.294 - *
74.295 - * @param plugin The plugin to load.
74.296 - *
74.297 - * @return @c TRUE if successful, or @c FALSE otherwise.
74.298 - *
74.299 - * @see purple_plugin_reload()
74.300 - * @see purple_plugin_unload()
74.301 - */
74.302 -gboolean purple_plugin_load(PurplePlugin *plugin);
74.303 -
74.304 -/**
74.305 - * Unloads the specified plugin.
74.306 - *
74.307 - * @param plugin The plugin handle.
74.308 - *
74.309 - * @return @c TRUE if successful, or @c FALSE otherwise.
74.310 - *
74.311 - * @see purple_plugin_load()
74.312 - * @see purple_plugin_reload()
74.313 - */
74.314 -gboolean purple_plugin_unload(PurplePlugin *plugin);
74.315 -
74.316 -/**
74.317 - * Disable a plugin.
74.318 - *
74.319 - * This function adds the plugin to a list of plugins to "disable at the next
74.320 - * startup" by excluding said plugins from the list of plugins to save. The
74.321 - * UI needs to call purple_plugins_save_loaded() after calling this for it
74.322 - * to have any effect.
74.323 - *
74.324 - * @since 2.3.0
74.325 - */
74.326 -void purple_plugin_disable(PurplePlugin *plugin);
74.327 -
74.328 -/**
74.329 - * Reloads a plugin.
74.330 - *
74.331 - * @param plugin The old plugin handle.
74.332 - *
74.333 - * @return @c TRUE if successful, or @c FALSE otherwise.
74.334 - *
74.335 - * @see purple_plugin_load()
74.336 - * @see purple_plugin_unload()
74.337 - */
74.338 -gboolean purple_plugin_reload(PurplePlugin *plugin);
74.339 -
74.340 -/**
74.341 - * Unloads a plugin and destroys the structure from memory.
74.342 - *
74.343 - * @param plugin The plugin handle.
74.344 - */
74.345 -void purple_plugin_destroy(PurplePlugin *plugin);
74.346 -
74.347 -/**
74.348 - * Returns whether or not a plugin is currently loaded.
74.349 - *
74.350 - * @param plugin The plugin.
74.351 - *
74.352 - * @return @c TRUE if loaded, or @c FALSE otherwise.
74.353 - */
74.354 -gboolean purple_plugin_is_loaded(const PurplePlugin *plugin);
74.355 -
74.356 -/**
74.357 - * Returns whether or not a plugin is unloadable.
74.358 - *
74.359 - * If this returns @c TRUE, the plugin is guaranteed to not
74.360 - * be loadable. However, a return value of @c FALSE does not
74.361 - * guarantee the plugin is loadable.
74.362 - *
74.363 - * @param plugin The plugin.
74.364 - *
74.365 - * @return @c TRUE if the plugin is known to be unloadable,\
74.366 - * @c FALSE otherwise
74.367 - */
74.368 -gboolean purple_plugin_is_unloadable(const PurplePlugin *plugin);
74.369 -
74.370 -/**
74.371 - * Returns a plugin's id.
74.372 - *
74.373 - * @param plugin The plugin.
74.374 - *
74.375 - * @return The plugin's id.
74.376 - */
74.377 -const gchar *purple_plugin_get_id(const PurplePlugin *plugin);
74.378 -
74.379 -/**
74.380 - * Returns a plugin's name.
74.381 - *
74.382 - * @param plugin The plugin.
74.383 - *
74.384 - * @return THe name of the plugin, or @c NULL.
74.385 - */
74.386 -const gchar *purple_plugin_get_name(const PurplePlugin *plugin);
74.387 -
74.388 -/**
74.389 - * Returns a plugin's version.
74.390 - *
74.391 - * @param plugin The plugin.
74.392 - *
74.393 - * @return The plugin's version or @c NULL.
74.394 - */
74.395 -const gchar *purple_plugin_get_version(const PurplePlugin *plugin);
74.396 -
74.397 -/**
74.398 - * Returns a plugin's summary.
74.399 - *
74.400 - * @param plugin The plugin.
74.401 - *
74.402 - * @return The plugin's summary.
74.403 - */
74.404 -const gchar *purple_plugin_get_summary(const PurplePlugin *plugin);
74.405 -
74.406 -/**
74.407 - * Returns a plugin's description.
74.408 - *
74.409 - * @param plugin The plugin.
74.410 - *
74.411 - * @return The plugin's description.
74.412 - */
74.413 -const gchar *purple_plugin_get_description(const PurplePlugin *plugin);
74.414 -
74.415 -/**
74.416 - * Returns a plugin's author.
74.417 - *
74.418 - * @param plugin The plugin.
74.419 - *
74.420 - * @return The plugin's author.
74.421 - */
74.422 -const gchar *purple_plugin_get_author(const PurplePlugin *plugin);
74.423 -
74.424 -/**
74.425 - * Returns a plugin's homepage.
74.426 - *
74.427 - * @param plugin The plugin.
74.428 - *
74.429 - * @return The plugin's homepage.
74.430 - */
74.431 -const gchar *purple_plugin_get_homepage(const PurplePlugin *plugin);
74.432 -
74.433 -/*@}*/
74.434 -
74.435 -/**************************************************************************/
74.436 -/** @name Plugin IPC API */
74.437 -/**************************************************************************/
74.438 -/*@{*/
74.439 -
74.440 -/**
74.441 - * Registers an IPC command in a plugin.
74.442 - *
74.443 - * @param plugin The plugin to register the command with.
74.444 - * @param command The name of the command.
74.445 - * @param func The function to execute.
74.446 - * @param marshal The marshalling function.
74.447 - * @param ret_value The return value type.
74.448 - * @param num_params The number of parameters.
74.449 - * @param ... The parameter types.
74.450 - *
74.451 - * @return TRUE if the function was registered successfully, or
74.452 - * FALSE otherwise.
74.453 - */
74.454 -gboolean purple_plugin_ipc_register(PurplePlugin *plugin, const char *command,
74.455 - PurpleCallback func,
74.456 - PurpleSignalMarshalFunc marshal,
74.457 - PurpleValue *ret_value, int num_params, ...);
74.458 -
74.459 -/**
74.460 - * Unregisters an IPC command in a plugin.
74.461 - *
74.462 - * @param plugin The plugin to unregister the command from.
74.463 - * @param command The name of the command.
74.464 - */
74.465 -void purple_plugin_ipc_unregister(PurplePlugin *plugin, const char *command);
74.466 -
74.467 -/**
74.468 - * Unregisters all IPC commands in a plugin.
74.469 - *
74.470 - * @param plugin The plugin to unregister the commands from.
74.471 - */
74.472 -void purple_plugin_ipc_unregister_all(PurplePlugin *plugin);
74.473 -
74.474 -/**
74.475 - * Returns a list of value types used for an IPC command.
74.476 - *
74.477 - * @param plugin The plugin.
74.478 - * @param command The name of the command.
74.479 - * @param ret_value The returned return value.
74.480 - * @param num_params The returned number of parameters.
74.481 - * @param params The returned list of parameters.
74.482 - *
74.483 - * @return TRUE if the command was found, or FALSE otherwise.
74.484 - */
74.485 -gboolean purple_plugin_ipc_get_params(PurplePlugin *plugin, const char *command,
74.486 - PurpleValue **ret_value, int *num_params,
74.487 - PurpleValue ***params);
74.488 -
74.489 -/**
74.490 - * Executes an IPC command.
74.491 - *
74.492 - * @param plugin The plugin to execute the command on.
74.493 - * @param command The name of the command.
74.494 - * @param ok TRUE if the call was successful, or FALSE otherwise.
74.495 - * @param ... The parameters to pass.
74.496 - *
74.497 - * @return The return value, which will be NULL if the command doesn't
74.498 - * return a value.
74.499 - */
74.500 -void *purple_plugin_ipc_call(PurplePlugin *plugin, const char *command,
74.501 - gboolean *ok, ...);
74.502 -
74.503 -/*@}*/
74.504 -
74.505 -/**************************************************************************/
74.506 -/** @name Plugins API */
74.507 -/**************************************************************************/
74.508 -/*@{*/
74.509 -
74.510 -/**
74.511 - * Add a new directory to search for plugins
74.512 - *
74.513 - * @param path The new search path.
74.514 - */
74.515 -void purple_plugins_add_search_path(const char *path);
74.516 -
74.517 -/**
74.518 - * Returns a list of plugin search paths.
74.519 - *
74.520 - * @constreturn A list of searched paths.
74.521 - *
74.522 - * @since 2.6.0
74.523 - */
74.524 -GList *purple_plugins_get_search_paths(void);
74.525 -
74.526 -/**
74.527 - * Unloads all loaded plugins.
74.528 - */
74.529 -void purple_plugins_unload_all(void);
74.530 -
74.531 -/**
74.532 - * Unloads all plugins of a specific type.
74.533 - */
74.534 -void purple_plugins_unload(PurplePluginType type);
74.535 -
74.536 -/**
74.537 - * Destroys all registered plugins.
74.538 - */
74.539 -void purple_plugins_destroy_all(void);
74.540 -
74.541 -/**
74.542 - * Saves the list of loaded plugins to the specified preference key
74.543 - *
74.544 - * @param key The preference key to save the list of plugins to.
74.545 - */
74.546 -void purple_plugins_save_loaded(const char *key);
74.547 -
74.548 -/**
74.549 - * Attempts to load all the plugins in the specified preference key
74.550 - * that were loaded when purple last quit.
74.551 - *
74.552 - * @param key The preference key containing the list of plugins.
74.553 - */
74.554 -void purple_plugins_load_saved(const char *key);
74.555 -
74.556 -/**
74.557 - * Probes for plugins in the registered module paths.
74.558 - *
74.559 - * @param ext The extension type to probe for, or @c NULL for all.
74.560 - *
74.561 - * @see purple_plugin_set_probe_path()
74.562 - */
74.563 -void purple_plugins_probe(const char *ext);
74.564 -
74.565 -/**
74.566 - * Returns whether or not plugin support is enabled.
74.567 - *
74.568 - * @return TRUE if plugin support is enabled, or FALSE otherwise.
74.569 - */
74.570 -gboolean purple_plugins_enabled(void);
74.571 -
74.572 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
74.573 -/**
74.574 - * Registers a function that will be called when probing is finished.
74.575 - *
74.576 - * @param func The callback function.
74.577 - * @param data Data to pass to the callback.
74.578 - * @deprecated If you need this, ask for a plugin-probe signal to be added.
74.579 - */
74.580 -void purple_plugins_register_probe_notify_cb(void (*func)(void *), void *data);
74.581 -#endif
74.582 -
74.583 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
74.584 -/**
74.585 - * Unregisters a function that would be called when probing is finished.
74.586 - *
74.587 - * @param func The callback function.
74.588 - * @deprecated If you need this, ask for a plugin-probe signal to be added.
74.589 - */
74.590 -void purple_plugins_unregister_probe_notify_cb(void (*func)(void *));
74.591 -#endif
74.592 -
74.593 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
74.594 -/**
74.595 - * Registers a function that will be called when a plugin is loaded.
74.596 - *
74.597 - * @param func The callback function.
74.598 - * @param data Data to pass to the callback.
74.599 - * @deprecated Use the plugin-load signal instead.
74.600 - */
74.601 -void purple_plugins_register_load_notify_cb(void (*func)(PurplePlugin *, void *),
74.602 - void *data);
74.603 -#endif
74.604 -
74.605 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
74.606 -/**
74.607 - * Unregisters a function that would be called when a plugin is loaded.
74.608 - *
74.609 - * @param func The callback function.
74.610 - * @deprecated Use the plugin-load signal instead.
74.611 - */
74.612 -void purple_plugins_unregister_load_notify_cb(void (*func)(PurplePlugin *, void *));
74.613 -#endif
74.614 -
74.615 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
74.616 -/**
74.617 - * Registers a function that will be called when a plugin is unloaded.
74.618 - *
74.619 - * @param func The callback function.
74.620 - * @param data Data to pass to the callback.
74.621 - * @deprecated Use the plugin-unload signal instead.
74.622 - */
74.623 -void purple_plugins_register_unload_notify_cb(void (*func)(PurplePlugin *, void *),
74.624 - void *data);
74.625 -#endif
74.626 -
74.627 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
74.628 -/**
74.629 - * Unregisters a function that would be called when a plugin is unloaded.
74.630 - *
74.631 - * @param func The callback function.
74.632 - * @deprecated Use the plugin-unload signal instead.
74.633 - */
74.634 -void purple_plugins_unregister_unload_notify_cb(void (*func)(PurplePlugin *,
74.635 - void *));
74.636 -#endif
74.637 -
74.638 -/**
74.639 - * Finds a plugin with the specified name.
74.640 - *
74.641 - * @param name The plugin name.
74.642 - *
74.643 - * @return The plugin if found, or @c NULL if not found.
74.644 - */
74.645 -PurplePlugin *purple_plugins_find_with_name(const char *name);
74.646 -
74.647 -/**
74.648 - * Finds a plugin with the specified filename (filename with a path).
74.649 - *
74.650 - * @param filename The plugin filename.
74.651 - *
74.652 - * @return The plugin if found, or @c NULL if not found.
74.653 - */
74.654 -PurplePlugin *purple_plugins_find_with_filename(const char *filename);
74.655 -
74.656 -/**
74.657 - * Finds a plugin with the specified basename (filename without a path).
74.658 - *
74.659 - * @param basename The plugin basename.
74.660 - *
74.661 - * @return The plugin if found, or @c NULL if not found.
74.662 - */
74.663 -PurplePlugin *purple_plugins_find_with_basename(const char *basename);
74.664 -
74.665 -/**
74.666 - * Finds a plugin with the specified plugin ID.
74.667 - *
74.668 - * @param id The plugin ID.
74.669 - *
74.670 - * @return The plugin if found, or @c NULL if not found.
74.671 - */
74.672 -PurplePlugin *purple_plugins_find_with_id(const char *id);
74.673 -
74.674 -/**
74.675 - * Returns a list of all loaded plugins.
74.676 - *
74.677 - * @constreturn A list of all loaded plugins.
74.678 - */
74.679 -GList *purple_plugins_get_loaded(void);
74.680 -
74.681 -/**
74.682 - * Returns a list of all valid protocol plugins. A protocol
74.683 - * plugin is considered invalid if it does not contain the call
74.684 - * to the PURPLE_INIT_PLUGIN() macro, or if it was compiled
74.685 - * against an incompatable API version.
74.686 - *
74.687 - * @constreturn A list of all protocol plugins.
74.688 - */
74.689 -GList *purple_plugins_get_protocols(void);
74.690 -
74.691 -/**
74.692 - * Returns a list of all plugins, whether loaded or not.
74.693 - *
74.694 - * @constreturn A list of all plugins.
74.695 - */
74.696 -GList *purple_plugins_get_all(void);
74.697 -
74.698 -/*@}*/
74.699 -
74.700 -/**************************************************************************/
74.701 -/** @name Plugins SubSytem API */
74.702 -/**************************************************************************/
74.703 -/*@{*/
74.704 -
74.705 -/**
74.706 - * Returns the plugin subsystem handle.
74.707 - *
74.708 - * @return The plugin sybsystem handle.
74.709 - */
74.710 -void *purple_plugins_get_handle(void);
74.711 -
74.712 -/**
74.713 - * Initializes the plugin subsystem
74.714 - */
74.715 -void purple_plugins_init(void);
74.716 -
74.717 -/**
74.718 - * Uninitializes the plugin subsystem
74.719 - */
74.720 -void purple_plugins_uninit(void);
74.721 -
74.722 -/*@}*/
74.723 -
74.724 -/**
74.725 - * Allocates and returns a new PurplePluginAction.
74.726 - *
74.727 - * @param label The description of the action to show to the user.
74.728 - * @param callback The callback to call when the user selects this action.
74.729 - */
74.730 -PurplePluginAction *purple_plugin_action_new(const char* label, void (*callback)(PurplePluginAction *));
74.731 -
74.732 -/**
74.733 - * Frees a PurplePluginAction
74.734 - *
74.735 - * @param action The PurplePluginAction to free.
74.736 - */
74.737 -void purple_plugin_action_free(PurplePluginAction *action);
74.738 -
74.739 -#ifdef __cplusplus
74.740 -}
74.741 -#endif
74.742 -
74.743 -#endif /* _PURPLE_PLUGIN_H_ */
75.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/pluginpref.h Fri Aug 21 13:24:36 2009 -0700
75.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
75.3 @@ -1,269 +0,0 @@
75.4 -/**
75.5 - * @file pluginpref.h Plugin Preferences API
75.6 - * @ingroup core
75.7 - */
75.8 -
75.9 -/* purple
75.10 - *
75.11 - * Purple is the legal property of its developers, whose names are too numerous
75.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
75.13 - * source distribution.
75.14 - *
75.15 - * This program is free software; you can redistribute it and/or modify
75.16 - * it under the terms of the GNU General Public License as published by
75.17 - * the Free Software Foundation; either version 2 of the License, or
75.18 - * (at your option) any later version.
75.19 - *
75.20 - * This program is distributed in the hope that it will be useful,
75.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
75.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.23 - * GNU General Public License for more details.
75.24 - *
75.25 - * You should have received a copy of the GNU General Public License
75.26 - * along with this program; if not, write to the Free Software
75.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
75.28 - *
75.29 - */
75.30 -#ifndef _PURPLE_PLUGINPREF_H_
75.31 -#define _PURPLE_PLUGINPREF_H_
75.32 -
75.33 -typedef struct _PurplePluginPrefFrame PurplePluginPrefFrame;
75.34 -typedef struct _PurplePluginPref PurplePluginPref;
75.35 -
75.36 -/**
75.37 - * String format for preferences.
75.38 - */
75.39 -typedef enum
75.40 -{
75.41 - PURPLE_STRING_FORMAT_TYPE_NONE = 0, /**< The string is plain text. */
75.42 - PURPLE_STRING_FORMAT_TYPE_MULTILINE = 1 << 0, /**< The string can have newlines. */
75.43 - PURPLE_STRING_FORMAT_TYPE_HTML = 1 << 1 /**< The string can be in HTML. */
75.44 -} PurpleStringFormatType;
75.45 -
75.46 -typedef enum {
75.47 - PURPLE_PLUGIN_PREF_NONE,
75.48 - PURPLE_PLUGIN_PREF_CHOICE,
75.49 - PURPLE_PLUGIN_PREF_INFO, /**< no-value label */
75.50 - PURPLE_PLUGIN_PREF_STRING_FORMAT /**< The preference has a string value. */
75.51 -} PurplePluginPrefType;
75.52 -
75.53 -#include <glib.h>
75.54 -#include "prefs.h"
75.55 -
75.56 -#ifdef __cplusplus
75.57 -extern "C" {
75.58 -#endif
75.59 -
75.60 -/**************************************************************************/
75.61 -/** @name Plugin Preference API */
75.62 -/**************************************************************************/
75.63 -/*@{*/
75.64 -
75.65 -/**
75.66 - * Create a new plugin preference frame
75.67 - *
75.68 - * @return a new PurplePluginPrefFrame
75.69 - */
75.70 -PurplePluginPrefFrame *purple_plugin_pref_frame_new(void);
75.71 -
75.72 -/**
75.73 - * Destroy a plugin preference frame
75.74 - *
75.75 - * @param frame The plugin frame to destroy
75.76 - */
75.77 -void purple_plugin_pref_frame_destroy(PurplePluginPrefFrame *frame);
75.78 -
75.79 -/**
75.80 - * Adds a plugin preference to a plugin preference frame
75.81 - *
75.82 - * @param frame The plugin frame to add the preference to
75.83 - * @param pref The preference to add to the frame
75.84 - */
75.85 -void purple_plugin_pref_frame_add(PurplePluginPrefFrame *frame, PurplePluginPref *pref);
75.86 -
75.87 -/**
75.88 - * Get the plugin preferences from a plugin preference frame
75.89 - *
75.90 - * @param frame The plugin frame to get the plugin preferences from
75.91 - * @constreturn a GList of plugin preferences
75.92 - */
75.93 -GList *purple_plugin_pref_frame_get_prefs(PurplePluginPrefFrame *frame);
75.94 -
75.95 -/**
75.96 - * Create a new plugin preference
75.97 - *
75.98 - * @return a new PurplePluginPref
75.99 - */
75.100 -PurplePluginPref *purple_plugin_pref_new(void);
75.101 -
75.102 -/**
75.103 - * Create a new plugin preference with name
75.104 - *
75.105 - * @param name The name of the pref
75.106 - * @return a new PurplePluginPref
75.107 - */
75.108 -PurplePluginPref *purple_plugin_pref_new_with_name(const char *name);
75.109 -
75.110 -/**
75.111 - * Create a new plugin preference with label
75.112 - *
75.113 - * @param label The label to be displayed
75.114 - * @return a new PurplePluginPref
75.115 - */
75.116 -PurplePluginPref *purple_plugin_pref_new_with_label(const char *label);
75.117 -
75.118 -/**
75.119 - * Create a new plugin preference with name and label
75.120 - *
75.121 - * @param name The name of the pref
75.122 - * @param label The label to be displayed
75.123 - * @return a new PurplePluginPref
75.124 - */
75.125 -PurplePluginPref *purple_plugin_pref_new_with_name_and_label(const char *name, const char *label);
75.126 -
75.127 -/**
75.128 - * Destroy a plugin preference
75.129 - *
75.130 - * @param pref The preference to destroy
75.131 - */
75.132 -void purple_plugin_pref_destroy(PurplePluginPref *pref);
75.133 -
75.134 -/**
75.135 - * Set a plugin pref name
75.136 - *
75.137 - * @param pref The plugin pref
75.138 - * @param name The name of the pref
75.139 - */
75.140 -void purple_plugin_pref_set_name(PurplePluginPref *pref, const char *name);
75.141 -
75.142 -/**
75.143 - * Get a plugin pref name
75.144 - *
75.145 - * @param pref The plugin pref
75.146 - * @return The name of the pref
75.147 - */
75.148 -const char *purple_plugin_pref_get_name(PurplePluginPref *pref);
75.149 -
75.150 -/**
75.151 - * Set a plugin pref label
75.152 - *
75.153 - * @param pref The plugin pref
75.154 - * @param label The label for the plugin pref
75.155 - */
75.156 -void purple_plugin_pref_set_label(PurplePluginPref *pref, const char *label);
75.157 -
75.158 -/**
75.159 - * Get a plugin pref label
75.160 - *
75.161 - * @param pref The plugin pref
75.162 - * @return The label for the plugin pref
75.163 - */
75.164 -const char *purple_plugin_pref_get_label(PurplePluginPref *pref);
75.165 -
75.166 -/**
75.167 - * Set the bounds for an integer pref
75.168 - *
75.169 - * @param pref The plugin pref
75.170 - * @param min The min value
75.171 - * @param max The max value
75.172 - */
75.173 -void purple_plugin_pref_set_bounds(PurplePluginPref *pref, int min, int max);
75.174 -
75.175 -/**
75.176 - * Get the bounds for an integer pref
75.177 - *
75.178 - * @param pref The plugin pref
75.179 - * @param min The min value
75.180 - * @param max The max value
75.181 - */
75.182 -void purple_plugin_pref_get_bounds(PurplePluginPref *pref, int *min, int *max);
75.183 -
75.184 -/**
75.185 - * Set the type of a plugin pref
75.186 - *
75.187 - * @param pref The plugin pref
75.188 - * @param type The type
75.189 - */
75.190 -void purple_plugin_pref_set_type(PurplePluginPref *pref, PurplePluginPrefType type);
75.191 -
75.192 -/**
75.193 - * Get the type of a plugin pref
75.194 - *
75.195 - * @param pref The plugin pref
75.196 - * @return The type
75.197 - */
75.198 -PurplePluginPrefType purple_plugin_pref_get_type(PurplePluginPref *pref);
75.199 -
75.200 -/**
75.201 - * Set the choices for a choices plugin pref
75.202 - *
75.203 - * @param pref The plugin pref
75.204 - * @param label The label for the choice
75.205 - * @param choice A gpointer of the choice
75.206 - */
75.207 -void purple_plugin_pref_add_choice(PurplePluginPref *pref, const char *label, gpointer choice);
75.208 -
75.209 -/**
75.210 - * Get the choices for a choices plugin pref
75.211 - *
75.212 - * @param pref The plugin pref
75.213 - * @constreturn GList of the choices
75.214 - */
75.215 -GList *purple_plugin_pref_get_choices(PurplePluginPref *pref);
75.216 -
75.217 -/**
75.218 - * Set the max length for a string plugin pref
75.219 - *
75.220 - * @param pref The plugin pref
75.221 - * @param max_length The max length of the string
75.222 - */
75.223 -void purple_plugin_pref_set_max_length(PurplePluginPref *pref, unsigned int max_length);
75.224 -
75.225 -/**
75.226 - * Get the max length for a string plugin pref
75.227 - *
75.228 - * @param pref The plugin pref
75.229 - * @return the max length
75.230 - */
75.231 -unsigned int purple_plugin_pref_get_max_length(PurplePluginPref *pref);
75.232 -
75.233 -/**
75.234 - * Sets the masking of a string plugin pref
75.235 - *
75.236 - * @param pref The plugin pref
75.237 - * @param mask The value to set
75.238 - */
75.239 -void purple_plugin_pref_set_masked(PurplePluginPref *pref, gboolean mask);
75.240 -
75.241 -/**
75.242 - * Gets the masking of a string plugin pref
75.243 - *
75.244 - * @param pref The plugin pref
75.245 - * @return The masking
75.246 - */
75.247 -gboolean purple_plugin_pref_get_masked(PurplePluginPref *pref);
75.248 -
75.249 -/**
75.250 - * Sets the format type for a formattable-string plugin pref. You need to set the
75.251 - * pref type to PURPLE_PLUGIN_PREF_STRING_FORMAT first before setting the format.
75.252 - *
75.253 - * @param pref The plugin pref
75.254 - * @param format The format of the string
75.255 - */
75.256 -void purple_plugin_pref_set_format_type(PurplePluginPref *pref, PurpleStringFormatType format);
75.257 -
75.258 -/**
75.259 - * Gets the format type of the formattable-string plugin pref.
75.260 - *
75.261 - * @param pref The plugin pref
75.262 - * @return The format of the pref
75.263 - */
75.264 -PurpleStringFormatType purple_plugin_pref_get_format_type(PurplePluginPref *pref);
75.265 -
75.266 -/*@}*/
75.267 -
75.268 -#ifdef __cplusplus
75.269 -}
75.270 -#endif
75.271 -
75.272 -#endif /* _PURPLE_PLUGINPREF_H_ */
76.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/pounce.h Fri Aug 21 13:24:36 2009 -0700
76.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
76.3 @@ -1,380 +0,0 @@
76.4 -/**
76.5 - * @file pounce.h Buddy Pounce API
76.6 - * @ingroup core
76.7 - */
76.8 -
76.9 -/* purple
76.10 - *
76.11 - * Purple is the legal property of its developers, whose names are too numerous
76.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
76.13 - * source distribution.
76.14 - *
76.15 - * This program is free software; you can redistribute it and/or modify
76.16 - * it under the terms of the GNU General Public License as published by
76.17 - * the Free Software Foundation; either version 2 of the License, or
76.18 - * (at your option) any later version.
76.19 - *
76.20 - * This program is distributed in the hope that it will be useful,
76.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
76.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
76.23 - * GNU General Public License for more details.
76.24 - *
76.25 - * You should have received a copy of the GNU General Public License
76.26 - * along with this program; if not, write to the Free Software
76.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
76.28 - */
76.29 -#ifndef _PURPLE_POUNCE_H_
76.30 -#define _PURPLE_POUNCE_H_
76.31 -
76.32 -typedef struct _PurplePounce PurplePounce;
76.33 -
76.34 -#include <glib.h>
76.35 -#include "account.h"
76.36 -
76.37 -/**
76.38 - * Events that trigger buddy pounces.
76.39 - */
76.40 -typedef enum
76.41 -{
76.42 - PURPLE_POUNCE_NONE = 0x000, /**< No events. */
76.43 - PURPLE_POUNCE_SIGNON = 0x001, /**< The buddy signed on. */
76.44 - PURPLE_POUNCE_SIGNOFF = 0x002, /**< The buddy signed off. */
76.45 - PURPLE_POUNCE_AWAY = 0x004, /**< The buddy went away. */
76.46 - PURPLE_POUNCE_AWAY_RETURN = 0x008, /**< The buddy returned from away. */
76.47 - PURPLE_POUNCE_IDLE = 0x010, /**< The buddy became idle. */
76.48 - PURPLE_POUNCE_IDLE_RETURN = 0x020, /**< The buddy is no longer idle. */
76.49 - PURPLE_POUNCE_TYPING = 0x040, /**< The buddy started typing. */
76.50 - PURPLE_POUNCE_TYPED = 0x080, /**< The buddy has entered text. */
76.51 - PURPLE_POUNCE_TYPING_STOPPED = 0x100, /**< The buddy stopped typing. */
76.52 - PURPLE_POUNCE_MESSAGE_RECEIVED = 0x200 /**< The buddy sent a message */
76.53 -
76.54 -} PurplePounceEvent;
76.55 -
76.56 -typedef enum
76.57 -{
76.58 - PURPLE_POUNCE_OPTION_NONE = 0x00, /**< No Option */
76.59 - PURPLE_POUNCE_OPTION_AWAY = 0x01 /**< Pounce only when away */
76.60 -} PurplePounceOption;
76.61 -
76.62 -/** A pounce callback. */
76.63 -typedef void (*PurplePounceCb)(PurplePounce *, PurplePounceEvent, void *);
76.64 -
76.65 -/**
76.66 - * A buddy pounce structure.
76.67 - *
76.68 - * Buddy pounces are actions triggered by a buddy-related event. For
76.69 - * example, a sound can be played or an IM window opened when a buddy
76.70 - * signs on or returns from away. Such responses are handled in the
76.71 - * UI. The events themselves are done in the core.
76.72 - */
76.73 -struct _PurplePounce
76.74 -{
76.75 - char *ui_type; /**< The type of UI. */
76.76 -
76.77 - PurplePounceEvent events; /**< The event(s) to pounce on. */
76.78 - PurplePounceOption options; /**< The pounce options */
76.79 - PurpleAccount *pouncer; /**< The user who is pouncing. */
76.80 -
76.81 - char *pouncee; /**< The buddy to pounce on. */
76.82 -
76.83 - GHashTable *actions; /**< The registered actions. */
76.84 -
76.85 - gboolean save; /**< Whether or not the pounce should
76.86 - be saved after activation. */
76.87 - void *data; /**< Pounce-specific data. */
76.88 -};
76.89 -
76.90 -#ifdef __cplusplus
76.91 -extern "C" {
76.92 -#endif
76.93 -
76.94 -/**************************************************************************/
76.95 -/** @name Buddy Pounce API */
76.96 -/**************************************************************************/
76.97 -/*@{*/
76.98 -
76.99 -/**
76.100 - * Creates a new buddy pounce.
76.101 - *
76.102 - * @param ui_type The type of UI the pounce is for.
76.103 - * @param pouncer The account that will pounce.
76.104 - * @param pouncee The buddy to pounce on.
76.105 - * @param event The event(s) to pounce on.
76.106 - * @param option Pounce options.
76.107 - *
76.108 - * @return The new buddy pounce structure.
76.109 - */
76.110 -PurplePounce *purple_pounce_new(const char *ui_type, PurpleAccount *pouncer,
76.111 - const char *pouncee, PurplePounceEvent event,
76.112 - PurplePounceOption option);
76.113 -
76.114 -/**
76.115 - * Destroys a buddy pounce.
76.116 - *
76.117 - * @param pounce The buddy pounce.
76.118 - */
76.119 -void purple_pounce_destroy(PurplePounce *pounce);
76.120 -
76.121 -/**
76.122 - * Destroys all buddy pounces for the account
76.123 - *
76.124 - * @param account The account to remove all pounces from.
76.125 - */
76.126 -void purple_pounce_destroy_all_by_account(PurpleAccount *account);
76.127 -
76.128 -/**
76.129 - * Sets the events a pounce should watch for.
76.130 - *
76.131 - * @param pounce The buddy pounce.
76.132 - * @param events The events to watch for.
76.133 - */
76.134 -void purple_pounce_set_events(PurplePounce *pounce, PurplePounceEvent events);
76.135 -
76.136 -/**
76.137 - * Sets the options for a pounce.
76.138 - *
76.139 - * @param pounce The buddy pounce.
76.140 - * @param options The options for the pounce.
76.141 - */
76.142 -void purple_pounce_set_options(PurplePounce *pounce, PurplePounceOption options);
76.143 -
76.144 -/**
76.145 - * Sets the account that will do the pouncing.
76.146 - *
76.147 - * @param pounce The buddy pounce.
76.148 - * @param pouncer The account that will pounce.
76.149 - */
76.150 -void purple_pounce_set_pouncer(PurplePounce *pounce, PurpleAccount *pouncer);
76.151 -
76.152 -/**
76.153 - * Sets the buddy a pounce should pounce on.
76.154 - *
76.155 - * @param pounce The buddy pounce.
76.156 - * @param pouncee The buddy to pounce on.
76.157 - */
76.158 -void purple_pounce_set_pouncee(PurplePounce *pounce, const char *pouncee);
76.159 -
76.160 -/**
76.161 - * Sets whether or not the pounce should be saved after execution.
76.162 - *
76.163 - * @param pounce The buddy pounce.
76.164 - * @param save @c TRUE if the pounce should be saved, or @c FALSE otherwise.
76.165 - */
76.166 -void purple_pounce_set_save(PurplePounce *pounce, gboolean save);
76.167 -
76.168 -/**
76.169 - * Registers an action type for the pounce.
76.170 - *
76.171 - * @param pounce The buddy pounce.
76.172 - * @param name The action name.
76.173 - */
76.174 -void purple_pounce_action_register(PurplePounce *pounce, const char *name);
76.175 -
76.176 -/**
76.177 - * Enables or disables an action for a pounce.
76.178 - *
76.179 - * @param pounce The buddy pounce.
76.180 - * @param action The name of the action.
76.181 - * @param enabled The enabled state.
76.182 - */
76.183 -void purple_pounce_action_set_enabled(PurplePounce *pounce, const char *action,
76.184 - gboolean enabled);
76.185 -
76.186 -/**
76.187 - * Sets a value for an attribute in an action.
76.188 - *
76.189 - * If @a value is @c NULL, the value will be unset.
76.190 - *
76.191 - * @param pounce The buddy pounce.
76.192 - * @param action The action name.
76.193 - * @param attr The attribute name.
76.194 - * @param value The value.
76.195 - */
76.196 -void purple_pounce_action_set_attribute(PurplePounce *pounce, const char *action,
76.197 - const char *attr, const char *value);
76.198 -
76.199 -/**
76.200 - * Sets the pounce-specific data.
76.201 - *
76.202 - * @param pounce The buddy pounce.
76.203 - * @param data Data specific to the pounce.
76.204 - */
76.205 -void purple_pounce_set_data(PurplePounce *pounce, void *data);
76.206 -
76.207 -/**
76.208 - * Returns the events a pounce should watch for.
76.209 - *
76.210 - * @param pounce The buddy pounce.
76.211 - *
76.212 - * @return The events the pounce is watching for.
76.213 - */
76.214 -PurplePounceEvent purple_pounce_get_events(const PurplePounce *pounce);
76.215 -
76.216 -/**
76.217 - * Returns the options for a pounce.
76.218 - *
76.219 - * @param pounce The buddy pounce.
76.220 - *
76.221 - * @return The options for the pounce.
76.222 - */
76.223 -PurplePounceOption purple_pounce_get_options(const PurplePounce *pounce);
76.224 -
76.225 -/**
76.226 - * Returns the account that will do the pouncing.
76.227 - *
76.228 - * @param pounce The buddy pounce.
76.229 - *
76.230 - * @return The account that will pounce.
76.231 - */
76.232 -PurpleAccount *purple_pounce_get_pouncer(const PurplePounce *pounce);
76.233 -
76.234 -/**
76.235 - * Returns the buddy a pounce should pounce on.
76.236 - *
76.237 - * @param pounce The buddy pounce.
76.238 - *
76.239 - * @return The buddy to pounce on.
76.240 - */
76.241 -const char *purple_pounce_get_pouncee(const PurplePounce *pounce);
76.242 -
76.243 -/**
76.244 - * Returns whether or not the pounce should save after execution.
76.245 - *
76.246 - * @param pounce The buddy pounce.
76.247 - *
76.248 - * @return @c TRUE if the pounce should be saved after execution, or
76.249 - * @c FALSE otherwise.
76.250 - */
76.251 -gboolean purple_pounce_get_save(const PurplePounce *pounce);
76.252 -
76.253 -/**
76.254 - * Returns whether or not an action is enabled.
76.255 - *
76.256 - * @param pounce The buddy pounce.
76.257 - * @param action The action name.
76.258 - *
76.259 - * @return @c TRUE if the action is enabled, or @c FALSE otherwise.
76.260 - */
76.261 -gboolean purple_pounce_action_is_enabled(const PurplePounce *pounce,
76.262 - const char *action);
76.263 -
76.264 -/**
76.265 - * Returns the value for an attribute in an action.
76.266 - *
76.267 - * @param pounce The buddy pounce.
76.268 - * @param action The action name.
76.269 - * @param attr The attribute name.
76.270 - *
76.271 - * @return The attribute value, if it exists, or @c NULL.
76.272 - */
76.273 -const char *purple_pounce_action_get_attribute(const PurplePounce *pounce,
76.274 - const char *action,
76.275 - const char *attr);
76.276 -
76.277 -/**
76.278 - * Returns the pounce-specific data.
76.279 - *
76.280 - * @param pounce The buddy pounce.
76.281 - *
76.282 - * @return The data specific to a buddy pounce.
76.283 - */
76.284 -void *purple_pounce_get_data(const PurplePounce *pounce);
76.285 -
76.286 -/**
76.287 - * Executes a pounce with the specified pouncer, pouncee, and event type.
76.288 - *
76.289 - * @param pouncer The account that will do the pouncing.
76.290 - * @param pouncee The buddy that is being pounced.
76.291 - * @param events The events that triggered the pounce.
76.292 - */
76.293 -void purple_pounce_execute(const PurpleAccount *pouncer, const char *pouncee,
76.294 - PurplePounceEvent events);
76.295 -
76.296 -/*@}*/
76.297 -
76.298 -/**************************************************************************/
76.299 -/** @name Buddy Pounce Subsystem API */
76.300 -/**************************************************************************/
76.301 -/*@{*/
76.302 -
76.303 -/**
76.304 - * Finds a pounce with the specified event(s) and buddy.
76.305 - *
76.306 - * @param pouncer The account to match against.
76.307 - * @param pouncee The buddy to match against.
76.308 - * @param events The event(s) to match against.
76.309 - *
76.310 - * @return The pounce if found, or @c NULL otherwise.
76.311 - */
76.312 -PurplePounce *purple_find_pounce(const PurpleAccount *pouncer,
76.313 - const char *pouncee, PurplePounceEvent events);
76.314 -
76.315 -
76.316 -/**
76.317 - * Loads the pounces.
76.318 - *
76.319 - * @return @c TRUE if the pounces could be loaded.
76.320 - */
76.321 -gboolean purple_pounces_load(void);
76.322 -
76.323 -/**
76.324 - * Registers a pounce handler for a UI.
76.325 - *
76.326 - * @param ui The UI name.
76.327 - * @param cb The callback function.
76.328 - * @param new_pounce The function called when a pounce is created.
76.329 - * @param free_pounce The function called when a pounce is freed.
76.330 - */
76.331 -void purple_pounces_register_handler(const char *ui, PurplePounceCb cb,
76.332 - void (*new_pounce)(PurplePounce *pounce),
76.333 - void (*free_pounce)(PurplePounce *pounce));
76.334 -
76.335 -/**
76.336 - * Unregisters a pounce handle for a UI.
76.337 - *
76.338 - * @param ui The UI name.
76.339 - */
76.340 -void purple_pounces_unregister_handler(const char *ui);
76.341 -
76.342 -/**
76.343 - * Returns a list of all registered buddy pounces.
76.344 - *
76.345 - * @constreturn The list of buddy pounces.
76.346 - */
76.347 -GList *purple_pounces_get_all(void);
76.348 -
76.349 -/**
76.350 - * Returns a list of registered buddy pounces for the ui-type.
76.351 - *
76.352 - * @param ui The ID of the UI using the core.
76.353 - *
76.354 - * @return The list of buddy pounces. The list should be freed by
76.355 - * the caller when it's no longer used.
76.356 - * @since 2.1.0
76.357 - */
76.358 -GList *purple_pounces_get_all_for_ui(const char *ui);
76.359 -
76.360 -/**
76.361 - * Returns the buddy pounce subsystem handle.
76.362 - *
76.363 - * @return The subsystem handle.
76.364 - */
76.365 -void *purple_pounces_get_handle(void);
76.366 -
76.367 -/**
76.368 - * Initializes the pounces subsystem.
76.369 - */
76.370 -void purple_pounces_init(void);
76.371 -
76.372 -/**
76.373 - * Uninitializes the pounces subsystem.
76.374 - */
76.375 -void purple_pounces_uninit(void);
76.376 -
76.377 -/*@}*/
76.378 -
76.379 -#ifdef __cplusplus
76.380 -}
76.381 -#endif
76.382 -
76.383 -#endif /* _PURPLE_POUNCE_H_ */
77.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/prefs.h Fri Aug 21 13:24:36 2009 -0700
77.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
77.3 @@ -1,362 +0,0 @@
77.4 -/**
77.5 - * @file prefs.h Prefs API
77.6 - * @ingroup core
77.7 - */
77.8 -
77.9 -/* purple
77.10 - *
77.11 - * Purple is the legal property of its developers, whose names are too numerous
77.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
77.13 - * source distribution.
77.14 - *
77.15 - * This program is free software; you can redistribute it and/or modify
77.16 - * it under the terms of the GNU General Public License as published by
77.17 - * the Free Software Foundation; either version 2 of the License, or
77.18 - * (at your option) any later version.
77.19 - *
77.20 - * This program is distributed in the hope that it will be useful,
77.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
77.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
77.23 - * GNU General Public License for more details.
77.24 - *
77.25 - * You should have received a copy of the GNU General Public License
77.26 - * along with this program; if not, write to the Free Software
77.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
77.28 - *
77.29 - */
77.30 -#ifndef _PURPLE_PREFS_H_
77.31 -#define _PURPLE_PREFS_H_
77.32 -
77.33 -#include <glib.h>
77.34 -
77.35 -/**
77.36 - * Preference data types.
77.37 - */
77.38 -typedef enum _PurplePrefType
77.39 -{
77.40 - PURPLE_PREF_NONE, /**< No type. */
77.41 - PURPLE_PREF_BOOLEAN, /**< Boolean. */
77.42 - PURPLE_PREF_INT, /**< Integer. */
77.43 - PURPLE_PREF_STRING, /**< String. */
77.44 - PURPLE_PREF_STRING_LIST, /**< List of strings. */
77.45 - PURPLE_PREF_PATH, /**< Path. */
77.46 - PURPLE_PREF_PATH_LIST /**< List of paths. */
77.47 -
77.48 -} PurplePrefType;
77.49 -
77.50 -/**
77.51 - * The type of callbacks for preference changes.
77.52 - *
77.53 - * @param name the name of the preference which has changed.
77.54 - * @param type the type of the preferenced named @a name
77.55 - * @param val the new value of the preferencs; should be cast to the correct
77.56 - * type. For instance, to recover the value of a #PURPLE_PREF_INT
77.57 - * preference, use <tt>GPOINTER_TO_INT(val)</tt>. Alternatively,
77.58 - * just call purple_prefs_get_int(), purple_prefs_get_string_list()
77.59 - * etc.
77.60 - * @param data Arbitrary data specified when the callback was connected with
77.61 - * purple_prefs_connect_callback().
77.62 - *
77.63 - * @see purple_prefs_connect_callback()
77.64 - */
77.65 -typedef void (*PurplePrefCallback) (const char *name, PurplePrefType type,
77.66 - gconstpointer val, gpointer data);
77.67 -
77.68 -#ifdef __cplusplus
77.69 -extern "C" {
77.70 -#endif
77.71 -
77.72 -/**************************************************************************/
77.73 -/** @name Prefs API
77.74 - Preferences are named according to a directory-like structure.
77.75 - Example: "/plugins/core/potato/is_from_idaho" (probably a boolean) */
77.76 -/**************************************************************************/
77.77 -/*@{*/
77.78 -
77.79 -/**
77.80 - * Returns the prefs subsystem handle.
77.81 - *
77.82 - * @return The prefs subsystem handle.
77.83 - */
77.84 -void *purple_prefs_get_handle(void);
77.85 -
77.86 -/**
77.87 - * Initialize core prefs
77.88 - */
77.89 -void purple_prefs_init(void);
77.90 -
77.91 -/**
77.92 - * Uninitializes the prefs subsystem.
77.93 - */
77.94 -void purple_prefs_uninit(void);
77.95 -
77.96 -/**
77.97 - * Add a new typeless pref.
77.98 - *
77.99 - * @param name The name of the pref
77.100 - */
77.101 -void purple_prefs_add_none(const char *name);
77.102 -
77.103 -/**
77.104 - * Add a new boolean pref.
77.105 - *
77.106 - * @param name The name of the pref
77.107 - * @param value The initial value to set
77.108 - */
77.109 -void purple_prefs_add_bool(const char *name, gboolean value);
77.110 -
77.111 -/**
77.112 - * Add a new integer pref.
77.113 - *
77.114 - * @param name The name of the pref
77.115 - * @param value The initial value to set
77.116 - */
77.117 -void purple_prefs_add_int(const char *name, int value);
77.118 -
77.119 -/**
77.120 - * Add a new string pref.
77.121 - *
77.122 - * @param name The name of the pref
77.123 - * @param value The initial value to set
77.124 - */
77.125 -void purple_prefs_add_string(const char *name, const char *value);
77.126 -
77.127 -/**
77.128 - * Add a new string list pref.
77.129 - *
77.130 - * @param name The name of the pref
77.131 - * @param value The initial value to set
77.132 - * @note This function takes a copy of the strings in the value list. The list
77.133 - * itself and original copies of the strings are up to the caller to
77.134 - * free.
77.135 - */
77.136 -void purple_prefs_add_string_list(const char *name, GList *value);
77.137 -
77.138 -/**
77.139 - * Add a new path pref.
77.140 - *
77.141 - * @param name The name of the pref
77.142 - * @param value The initial value to set
77.143 - */
77.144 -void purple_prefs_add_path(const char *name, const char *value);
77.145 -
77.146 -/**
77.147 - * Add a new path list pref.
77.148 - *
77.149 - * @param name The name of the pref
77.150 - * @param value The initial value to set
77.151 - * @note This function takes a copy of the strings in the value list. The list
77.152 - * itself and original copies of the strings are up to the caller to
77.153 - * free.
77.154 - */
77.155 -void purple_prefs_add_path_list(const char *name, GList *value);
77.156 -
77.157 -
77.158 -/**
77.159 - * Remove a pref.
77.160 - *
77.161 - * @param name The name of the pref
77.162 - */
77.163 -void purple_prefs_remove(const char *name);
77.164 -
77.165 -/**
77.166 - * Rename a pref
77.167 - *
77.168 - * @param oldname The old name of the pref
77.169 - * @param newname The new name for the pref
77.170 - */
77.171 -void purple_prefs_rename(const char *oldname, const char *newname);
77.172 -
77.173 -/**
77.174 - * Rename a boolean pref, toggling it's value
77.175 - *
77.176 - * @param oldname The old name of the pref
77.177 - * @param newname The new name for the pref
77.178 - */
77.179 -void purple_prefs_rename_boolean_toggle(const char *oldname, const char *newname);
77.180 -
77.181 -/**
77.182 - * Remove all prefs.
77.183 - */
77.184 -void purple_prefs_destroy(void);
77.185 -
77.186 -/**
77.187 - * Set raw pref value
77.188 - *
77.189 - * @param name The name of the pref
77.190 - * @param value The value to set
77.191 - */
77.192 -void purple_prefs_set_generic(const char *name, gpointer value);
77.193 -
77.194 -/**
77.195 - * Set boolean pref value
77.196 - *
77.197 - * @param name The name of the pref
77.198 - * @param value The value to set
77.199 - */
77.200 -void purple_prefs_set_bool(const char *name, gboolean value);
77.201 -
77.202 -/**
77.203 - * Set integer pref value
77.204 - *
77.205 - * @param name The name of the pref
77.206 - * @param value The value to set
77.207 - */
77.208 -void purple_prefs_set_int(const char *name, int value);
77.209 -
77.210 -/**
77.211 - * Set string pref value
77.212 - *
77.213 - * @param name The name of the pref
77.214 - * @param value The value to set
77.215 - */
77.216 -void purple_prefs_set_string(const char *name, const char *value);
77.217 -
77.218 -/**
77.219 - * Set string list pref value
77.220 - *
77.221 - * @param name The name of the pref
77.222 - * @param value The value to set
77.223 - */
77.224 -void purple_prefs_set_string_list(const char *name, GList *value);
77.225 -
77.226 -/**
77.227 - * Set path pref value
77.228 - *
77.229 - * @param name The name of the pref
77.230 - * @param value The value to set
77.231 - */
77.232 -void purple_prefs_set_path(const char *name, const char *value);
77.233 -
77.234 -/**
77.235 - * Set path list pref value
77.236 - *
77.237 - * @param name The name of the pref
77.238 - * @param value The value to set
77.239 - */
77.240 -void purple_prefs_set_path_list(const char *name, GList *value);
77.241 -
77.242 -
77.243 -/**
77.244 - * Check if a pref exists
77.245 - *
77.246 - * @param name The name of the pref
77.247 - * @return TRUE if the pref exists. Otherwise FALSE.
77.248 - */
77.249 -gboolean purple_prefs_exists(const char *name);
77.250 -
77.251 -/**
77.252 - * Get pref type
77.253 - *
77.254 - * @param name The name of the pref
77.255 - * @return The type of the pref
77.256 - */
77.257 -PurplePrefType purple_prefs_get_type(const char *name);
77.258 -
77.259 -/**
77.260 - * Get boolean pref value
77.261 - *
77.262 - * @param name The name of the pref
77.263 - * @return The value of the pref
77.264 - */
77.265 -gboolean purple_prefs_get_bool(const char *name);
77.266 -
77.267 -/**
77.268 - * Get integer pref value
77.269 - *
77.270 - * @param name The name of the pref
77.271 - * @return The value of the pref
77.272 - */
77.273 -int purple_prefs_get_int(const char *name);
77.274 -
77.275 -/**
77.276 - * Get string pref value
77.277 - *
77.278 - * @param name The name of the pref
77.279 - * @return The value of the pref
77.280 - */
77.281 -const char *purple_prefs_get_string(const char *name);
77.282 -
77.283 -/**
77.284 - * Get string list pref value
77.285 - *
77.286 - * @param name The name of the pref
77.287 - * @return The value of the pref
77.288 - */
77.289 -GList *purple_prefs_get_string_list(const char *name);
77.290 -
77.291 -/**
77.292 - * Get path pref value
77.293 - *
77.294 - * @param name The name of the pref
77.295 - * @return The value of the pref
77.296 - */
77.297 -const char *purple_prefs_get_path(const char *name);
77.298 -
77.299 -/**
77.300 - * Get path list pref value
77.301 - *
77.302 - * @param name The name of the pref
77.303 - * @return The value of the pref
77.304 - */
77.305 -GList *purple_prefs_get_path_list(const char *name);
77.306 -
77.307 -/**
77.308 - * Returns a list of children for a pref
77.309 - *
77.310 - * @param name The parent pref
77.311 - * @return A list of newly allocated strings denoting the names of the children.
77.312 - * Returns @c NULL if there are no children or if pref doesn't exist.
77.313 - * The caller must free all the strings and the list.
77.314 - *
77.315 - * @since 2.1.0
77.316 - */
77.317 -GList *purple_prefs_get_children_names(const char *name);
77.318 -
77.319 -/**
77.320 - * Add a callback to a pref (and its children)
77.321 - *
77.322 - * @param handle The handle of the receiver.
77.323 - * @param name The name of the preference
77.324 - * @param cb The callback function
77.325 - * @param data The data to pass to the callback function.
77.326 - *
77.327 - * @return An id to disconnect the callback
77.328 - *
77.329 - * @see purple_prefs_disconnect_callback
77.330 - */
77.331 -guint purple_prefs_connect_callback(void *handle, const char *name, PurplePrefCallback cb,
77.332 - gpointer data);
77.333 -
77.334 -/**
77.335 - * Remove a callback to a pref
77.336 - */
77.337 -void purple_prefs_disconnect_callback(guint callback_id);
77.338 -
77.339 -/**
77.340 - * Remove all pref callbacks by handle
77.341 - */
77.342 -void purple_prefs_disconnect_by_handle(void *handle);
77.343 -
77.344 -/**
77.345 - * Trigger callbacks as if the pref changed
77.346 - */
77.347 -void purple_prefs_trigger_callback(const char *name);
77.348 -
77.349 -/**
77.350 - * Read preferences
77.351 - */
77.352 -gboolean purple_prefs_load(void);
77.353 -
77.354 -/**
77.355 - * Rename legacy prefs and delete some that no longer exist.
77.356 - */
77.357 -void purple_prefs_update_old(void);
77.358 -
77.359 -/*@}*/
77.360 -
77.361 -#ifdef __cplusplus
77.362 -}
77.363 -#endif
77.364 -
77.365 -#endif /* _PURPLE_PREFS_H_ */
78.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/presence.h Fri Aug 21 13:24:36 2009 -0700
78.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
78.3 @@ -1,48 +0,0 @@
78.4 -/**
78.5 - * @file presence.h Presence
78.6 - *
78.7 - * purple
78.8 - *
78.9 - * Copyright (C) 2003 Nathan Walp <faceprint@faceprint.com>
78.10 - *
78.11 - * This program is free software; you can redistribute it and/or modify
78.12 - * it under the terms of the GNU General Public License as published by
78.13 - * the Free Software Foundation; either version 2 of the License, or
78.14 - * (at your option) any later version.
78.15 - *
78.16 - * This program is distributed in the hope that it will be useful,
78.17 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
78.18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
78.19 - * GNU General Public License for more details.
78.20 - *
78.21 - * You should have received a copy of the GNU General Public License
78.22 - * along with this program; if not, write to the Free Software
78.23 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
78.24 - */
78.25 -#ifndef PURPLE_JABBER_PRESENCE_H_
78.26 -#define PURPLE_JABBER_PRESENCE_H_
78.27 -
78.28 -#include "buddy.h"
78.29 -#include "jabber.h"
78.30 -#include "xmlnode.h"
78.31 -
78.32 -void jabber_set_status(PurpleAccount *account, PurpleStatus *status);
78.33 -
78.34 -/**
78.35 - * Send a full presence stanza.
78.36 - *
78.37 - * @param js A JabberStream object.
78.38 - * @param force Force sending the presence stanza, irrespective of whether
78.39 - * the contents seem to have changed.
78.40 - */
78.41 -void jabber_presence_send(JabberStream *js, gboolean force);
78.42 -
78.43 -xmlnode *jabber_presence_create(JabberBuddyState state, const char *msg, int priority); /* DEPRECATED */
78.44 -xmlnode *jabber_presence_create_js(JabberStream *js, JabberBuddyState state, const char *msg, int priority);
78.45 -void jabber_presence_parse(JabberStream *js, xmlnode *packet);
78.46 -void jabber_presence_subscription_set(JabberStream *js, const char *who,
78.47 - const char *type);
78.48 -void jabber_presence_fake_to_self(JabberStream *js, PurpleStatus *status);
78.49 -void purple_status_to_jabber(const PurpleStatus *status, JabberBuddyState *state, char **msg, int *priority);
78.50 -
78.51 -#endif /* PURPLE_JABBER_PRESENCE_H_ */
79.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/privacy.h Fri Aug 21 13:24:36 2009 -0700
79.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
79.3 @@ -1,194 +0,0 @@
79.4 -/**
79.5 - * @file privacy.h Privacy API
79.6 - * @ingroup core
79.7 - */
79.8 -
79.9 -/* purple
79.10 - *
79.11 - * Purple is the legal property of its developers, whose names are too numerous
79.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
79.13 - * source distribution.
79.14 - *
79.15 - * This program is free software; you can redistribute it and/or modify
79.16 - * it under the terms of the GNU General Public License as published by
79.17 - * the Free Software Foundation; either version 2 of the License, or
79.18 - * (at your option) any later version.
79.19 - *
79.20 - * This program is distributed in the hope that it will be useful,
79.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
79.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
79.23 - * GNU General Public License for more details.
79.24 - *
79.25 - * You should have received a copy of the GNU General Public License
79.26 - * along with this program; if not, write to the Free Software
79.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
79.28 - */
79.29 -#ifndef _PURPLE_PRIVACY_H_
79.30 -#define _PURPLE_PRIVACY_H_
79.31 -
79.32 -/**
79.33 - * Privacy data types.
79.34 - */
79.35 -typedef enum _PurplePrivacyType
79.36 -{
79.37 - PURPLE_PRIVACY_ALLOW_ALL = 1,
79.38 - PURPLE_PRIVACY_DENY_ALL,
79.39 - PURPLE_PRIVACY_ALLOW_USERS,
79.40 - PURPLE_PRIVACY_DENY_USERS,
79.41 - PURPLE_PRIVACY_ALLOW_BUDDYLIST
79.42 -} PurplePrivacyType;
79.43 -
79.44 -#include "account.h"
79.45 -
79.46 -#ifdef __cplusplus
79.47 -extern "C" {
79.48 -#endif
79.49 -
79.50 -/**
79.51 - * Privacy core/UI operations.
79.52 - */
79.53 -typedef struct
79.54 -{
79.55 - void (*permit_added)(PurpleAccount *account, const char *name);
79.56 - void (*permit_removed)(PurpleAccount *account, const char *name);
79.57 - void (*deny_added)(PurpleAccount *account, const char *name);
79.58 - void (*deny_removed)(PurpleAccount *account, const char *name);
79.59 -
79.60 - void (*_purple_reserved1)(void);
79.61 - void (*_purple_reserved2)(void);
79.62 - void (*_purple_reserved3)(void);
79.63 - void (*_purple_reserved4)(void);
79.64 -} PurplePrivacyUiOps;
79.65 -
79.66 -/**
79.67 - * Adds a user to the account's permit list.
79.68 - *
79.69 - * @param account The account.
79.70 - * @param name The name of the user to add to the list.
79.71 - * @param local_only If TRUE, only the local list is updated, and not
79.72 - * the server.
79.73 - *
79.74 - * @return TRUE if the user was added successfully, or @c FALSE otherwise.
79.75 - */
79.76 -gboolean purple_privacy_permit_add(PurpleAccount *account, const char *name,
79.77 - gboolean local_only);
79.78 -
79.79 -/**
79.80 - * Removes a user from the account's permit list.
79.81 - *
79.82 - * @param account The account.
79.83 - * @param name The name of the user to add to the list.
79.84 - * @param local_only If TRUE, only the local list is updated, and not
79.85 - * the server.
79.86 - *
79.87 - * @return TRUE if the user was removed successfully, or @c FALSE otherwise.
79.88 - */
79.89 -gboolean purple_privacy_permit_remove(PurpleAccount *account, const char *name,
79.90 - gboolean local_only);
79.91 -
79.92 -/**
79.93 - * Adds a user to the account's deny list.
79.94 - *
79.95 - * @param account The account.
79.96 - * @param name The name of the user to add to the list.
79.97 - * @param local_only If TRUE, only the local list is updated, and not
79.98 - * the server.
79.99 - *
79.100 - * @return TRUE if the user was added successfully, or @c FALSE otherwise.
79.101 - */
79.102 -gboolean purple_privacy_deny_add(PurpleAccount *account, const char *name,
79.103 - gboolean local_only);
79.104 -
79.105 -/**
79.106 - * Removes a user from the account's deny list.
79.107 - *
79.108 - * @param account The account.
79.109 - * @param name The name of the user to add to the list.
79.110 - * @param local_only If TRUE, only the local list is updated, and not
79.111 - * the server.
79.112 - *
79.113 - * @return TRUE if the user was removed successfully, or @c FALSE otherwise.
79.114 - */
79.115 -gboolean purple_privacy_deny_remove(PurpleAccount *account, const char *name,
79.116 - gboolean local_only);
79.117 -
79.118 -/**
79.119 - * Allow a user to send messages. If current privacy setting for the account is:
79.120 - * PURPLE_PRIVACY_ALLOW_USERS: The user is added to the allow-list.
79.121 - * PURPLE_PRIVACY_DENY_USERS : The user is removed from the deny-list.
79.122 - * PURPLE_PRIVACY_ALLOW_ALL : No changes made.
79.123 - * PURPLE_PRIVACY_DENY_ALL : The privacy setting is changed to
79.124 - * PURPLE_PRIVACY_ALLOW_USERS and the user
79.125 - * is added to the allow-list.
79.126 - * PURPLE_PRIVACY_ALLOW_BUDDYLIST: No changes made if the user is already in
79.127 - * the buddy-list. Otherwise the setting is
79.128 - * changed to PURPLE_PRIVACY_ALLOW_USERS, all the
79.129 - * buddies are added to the allow-list, and the
79.130 - * user is also added to the allow-list.
79.131 - *
79.132 - * @param account The account.
79.133 - * @param who The name of the user.
79.134 - * @param local Whether the change is local-only.
79.135 - * @param restore Should the previous allow/deny list be restored if the
79.136 - * privacy setting is changed.
79.137 - */
79.138 -void purple_privacy_allow(PurpleAccount *account, const char *who, gboolean local,
79.139 - gboolean restore);
79.140 -
79.141 -/**
79.142 - * Block messages from a user. If current privacy setting for the account is:
79.143 - * PURPLE_PRIVACY_ALLOW_USERS: The user is removed from the allow-list.
79.144 - * PURPLE_PRIVACY_DENY_USERS : The user is added to the deny-list.
79.145 - * PURPLE_PRIVACY_DENY_ALL : No changes made.
79.146 - * PURPLE_PRIVACY_ALLOW_ALL : The privacy setting is changed to
79.147 - * PURPLE_PRIVACY_DENY_USERS and the user is
79.148 - * added to the deny-list.
79.149 - * PURPLE_PRIVACY_ALLOW_BUDDYLIST: If the user is not in the buddy-list,
79.150 - * then no changes made. Otherwise, the setting
79.151 - * is changed to PURPLE_PRIVACY_ALLOW_USERS, all
79.152 - * the buddies are added to the allow-list, and
79.153 - * this user is removed from the list.
79.154 - *
79.155 - * @param account The account.
79.156 - * @param who The name of the user.
79.157 - * @param local Whether the change is local-only.
79.158 - * @param restore Should the previous allow/deny list be restored if the
79.159 - * privacy setting is changed.
79.160 - */
79.161 -void purple_privacy_deny(PurpleAccount *account, const char *who, gboolean local,
79.162 - gboolean restore);
79.163 -
79.164 -/**
79.165 - * Check the privacy-setting for a user.
79.166 - *
79.167 - * @param account The account.
79.168 - * @param who The name of the user.
79.169 - *
79.170 - * @return @c FALSE if the specified account's privacy settings block the user or @c TRUE otherwise. The meaning of "block" is protocol-dependent and generally relates to status and/or sending of messages.
79.171 - */
79.172 -gboolean purple_privacy_check(PurpleAccount *account, const char *who);
79.173 -
79.174 -/**
79.175 - * Sets the UI operations structure for the privacy subsystem.
79.176 - *
79.177 - * @param ops The UI operations structure.
79.178 - */
79.179 -void purple_privacy_set_ui_ops(PurplePrivacyUiOps *ops);
79.180 -
79.181 -/**
79.182 - * Returns the UI operations structure for the privacy subsystem.
79.183 - *
79.184 - * @return The UI operations structure.
79.185 - */
79.186 -PurplePrivacyUiOps *purple_privacy_get_ui_ops(void);
79.187 -
79.188 -/**
79.189 - * Initializes the privacy subsystem.
79.190 - */
79.191 -void purple_privacy_init(void);
79.192 -
79.193 -#ifdef __cplusplus
79.194 -}
79.195 -#endif
79.196 -
79.197 -#endif /* _PURPLE_PRIVACY_H_ */
80.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/proxy.h Fri Aug 21 13:24:36 2009 -0700
80.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
80.3 @@ -1,338 +0,0 @@
80.4 -/**
80.5 - * @file proxy.h Proxy API
80.6 - * @ingroup core
80.7 - */
80.8 -
80.9 -/* purple
80.10 - *
80.11 - * Purple is the legal property of its developers, whose names are too numerous
80.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
80.13 - * source distribution.
80.14 - *
80.15 - * This program is free software; you can redistribute it and/or modify
80.16 - * it under the terms of the GNU General Public License as published by
80.17 - * the Free Software Foundation; either version 2 of the License, or
80.18 - * (at your option) any later version.
80.19 - *
80.20 - * This program is distributed in the hope that it will be useful,
80.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
80.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
80.23 - * GNU General Public License for more details.
80.24 - *
80.25 - * You should have received a copy of the GNU General Public License
80.26 - * along with this program; if not, write to the Free Software
80.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
80.28 - */
80.29 -#ifndef _PURPLE_PROXY_H_
80.30 -#define _PURPLE_PROXY_H_
80.31 -
80.32 -#include <glib.h>
80.33 -#include "eventloop.h"
80.34 -
80.35 -/**
80.36 - * A type of proxy connection.
80.37 - */
80.38 -typedef enum
80.39 -{
80.40 - PURPLE_PROXY_USE_GLOBAL = -1, /**< Use the global proxy information. */
80.41 - PURPLE_PROXY_NONE = 0, /**< No proxy. */
80.42 - PURPLE_PROXY_HTTP, /**< HTTP proxy. */
80.43 - PURPLE_PROXY_SOCKS4, /**< SOCKS 4 proxy. */
80.44 - PURPLE_PROXY_SOCKS5, /**< SOCKS 5 proxy. */
80.45 - PURPLE_PROXY_USE_ENVVAR /**< Use environmental settings. */
80.46 -
80.47 -} PurpleProxyType;
80.48 -
80.49 -/**
80.50 - * Information on proxy settings.
80.51 - */
80.52 -typedef struct
80.53 -{
80.54 - PurpleProxyType type; /**< The proxy type. */
80.55 -
80.56 - char *host; /**< The host. */
80.57 - int port; /**< The port number. */
80.58 - char *username; /**< The username. */
80.59 - char *password; /**< The password. */
80.60 -
80.61 -} PurpleProxyInfo;
80.62 -
80.63 -typedef struct _PurpleProxyConnectData PurpleProxyConnectData;
80.64 -
80.65 -typedef void (*PurpleProxyConnectFunction)(gpointer data, gint source, const gchar *error_message);
80.66 -
80.67 -
80.68 -#include "account.h"
80.69 -
80.70 -#ifdef __cplusplus
80.71 -extern "C" {
80.72 -#endif
80.73 -
80.74 -/**************************************************************************/
80.75 -/** @name Proxy structure API */
80.76 -/**************************************************************************/
80.77 -/*@{*/
80.78 -
80.79 -/**
80.80 - * Creates a proxy information structure.
80.81 - *
80.82 - * @return The proxy information structure.
80.83 - */
80.84 -PurpleProxyInfo *purple_proxy_info_new(void);
80.85 -
80.86 -/**
80.87 - * Destroys a proxy information structure.
80.88 - *
80.89 - * @param info The proxy information structure to destroy.
80.90 - */
80.91 -void purple_proxy_info_destroy(PurpleProxyInfo *info);
80.92 -
80.93 -/**
80.94 - * Sets the type of proxy.
80.95 - *
80.96 - * @param info The proxy information.
80.97 - * @param type The proxy type.
80.98 - */
80.99 -void purple_proxy_info_set_type(PurpleProxyInfo *info, PurpleProxyType type);
80.100 -
80.101 -/**
80.102 - * Sets the proxy host.
80.103 - *
80.104 - * @param info The proxy information.
80.105 - * @param host The host.
80.106 - */
80.107 -void purple_proxy_info_set_host(PurpleProxyInfo *info, const char *host);
80.108 -
80.109 -/**
80.110 - * Sets the proxy port.
80.111 - *
80.112 - * @param info The proxy information.
80.113 - * @param port The port.
80.114 - */
80.115 -void purple_proxy_info_set_port(PurpleProxyInfo *info, int port);
80.116 -
80.117 -/**
80.118 - * Sets the proxy username.
80.119 - *
80.120 - * @param info The proxy information.
80.121 - * @param username The username.
80.122 - */
80.123 -void purple_proxy_info_set_username(PurpleProxyInfo *info, const char *username);
80.124 -
80.125 -/**
80.126 - * Sets the proxy password.
80.127 - *
80.128 - * @param info The proxy information.
80.129 - * @param password The password.
80.130 - */
80.131 -void purple_proxy_info_set_password(PurpleProxyInfo *info, const char *password);
80.132 -
80.133 -/**
80.134 - * Returns the proxy's type.
80.135 - *
80.136 - * @param info The proxy information.
80.137 - *
80.138 - * @return The type.
80.139 - */
80.140 -PurpleProxyType purple_proxy_info_get_type(const PurpleProxyInfo *info);
80.141 -
80.142 -/**
80.143 - * Returns the proxy's host.
80.144 - *
80.145 - * @param info The proxy information.
80.146 - *
80.147 - * @return The host.
80.148 - */
80.149 -const char *purple_proxy_info_get_host(const PurpleProxyInfo *info);
80.150 -
80.151 -/**
80.152 - * Returns the proxy's port.
80.153 - *
80.154 - * @param info The proxy information.
80.155 - *
80.156 - * @return The port.
80.157 - */
80.158 -int purple_proxy_info_get_port(const PurpleProxyInfo *info);
80.159 -
80.160 -/**
80.161 - * Returns the proxy's username.
80.162 - *
80.163 - * @param info The proxy information.
80.164 - *
80.165 - * @return The username.
80.166 - */
80.167 -const char *purple_proxy_info_get_username(const PurpleProxyInfo *info);
80.168 -
80.169 -/**
80.170 - * Returns the proxy's password.
80.171 - *
80.172 - * @param info The proxy information.
80.173 - *
80.174 - * @return The password.
80.175 - */
80.176 -const char *purple_proxy_info_get_password(const PurpleProxyInfo *info);
80.177 -
80.178 -/*@}*/
80.179 -
80.180 -/**************************************************************************/
80.181 -/** @name Global Proxy API */
80.182 -/**************************************************************************/
80.183 -/*@{*/
80.184 -
80.185 -/**
80.186 - * Returns purple's global proxy information.
80.187 - *
80.188 - * @return The global proxy information.
80.189 - */
80.190 -PurpleProxyInfo *purple_global_proxy_get_info(void);
80.191 -
80.192 -/**
80.193 - * Set purple's global proxy information.
80.194 - *
80.195 - * @param info The proxy information.
80.196 - * @since 2.6.0
80.197 - */
80.198 -void purple_global_proxy_set_info(PurpleProxyInfo *info);
80.199 -
80.200 -/*@}*/
80.201 -
80.202 -/**************************************************************************/
80.203 -/** @name Proxy API */
80.204 -/**************************************************************************/
80.205 -/*@{*/
80.206 -
80.207 -/**
80.208 - * Returns the proxy subsystem handle.
80.209 - *
80.210 - * @return The proxy subsystem handle.
80.211 - */
80.212 -void *purple_proxy_get_handle(void);
80.213 -
80.214 -/**
80.215 - * Initializes the proxy subsystem.
80.216 - */
80.217 -void purple_proxy_init(void);
80.218 -
80.219 -/**
80.220 - * Uninitializes the proxy subsystem.
80.221 - */
80.222 -void purple_proxy_uninit(void);
80.223 -
80.224 -/**
80.225 - * Returns configuration of a proxy.
80.226 - *
80.227 - * @param account The account for which the configuration is needed.
80.228 - *
80.229 - * @return The configuration of a proxy.
80.230 - */
80.231 -PurpleProxyInfo *purple_proxy_get_setup(PurpleAccount *account);
80.232 -
80.233 -/**
80.234 - * Makes a connection to the specified host and port. Note that this
80.235 - * function name can be misleading--although it is called "proxy
80.236 - * connect," it is used for establishing any outgoing TCP connection,
80.237 - * whether through a proxy or not.
80.238 - *
80.239 - * @param handle A handle that should be associated with this
80.240 - * connection attempt. The handle can be used
80.241 - * to cancel the connection attempt using the
80.242 - * purple_proxy_connect_cancel_with_handle()
80.243 - * function.
80.244 - * @param account The account making the connection.
80.245 - * @param host The destination host.
80.246 - * @param port The destination port.
80.247 - * @param connect_cb The function to call when the connection is
80.248 - * established. If the connection failed then
80.249 - * fd will be -1 and error message will be set
80.250 - * to something descriptive (hopefully).
80.251 - * @param data User-defined data.
80.252 - *
80.253 - * @return NULL if there was an error, or a reference to an
80.254 - * opaque data structure that can be used to cancel
80.255 - * the pending connection, if needed.
80.256 - */
80.257 -PurpleProxyConnectData *purple_proxy_connect(void *handle,
80.258 - PurpleAccount *account,
80.259 - const char *host, int port,
80.260 - PurpleProxyConnectFunction connect_cb, gpointer data);
80.261 -
80.262 -/**
80.263 - * Makes a connection to the specified host and port. Note that this
80.264 - * function name can be misleading--although it is called "proxy
80.265 - * connect," it is used for establishing any outgoing UDP connection,
80.266 - * whether through a proxy or not.
80.267 - *
80.268 - * @param handle A handle that should be associated with this
80.269 - * connection attempt. The handle can be used
80.270 - * to cancel the connection attempt using the
80.271 - * purple_proxy_connect_cancel_with_handle()
80.272 - * function.
80.273 - * @param account The account making the connection.
80.274 - * @param host The destination host.
80.275 - * @param port The destination port.
80.276 - * @param connect_cb The function to call when the connection is
80.277 - * established. If the connection failed then
80.278 - * fd will be -1 and error message will be set
80.279 - * to something descriptive (hopefully).
80.280 - * @param data User-defined data.
80.281 - *
80.282 - * @return NULL if there was an error, or a reference to an
80.283 - * opaque data structure that can be used to cancel
80.284 - * the pending connection, if needed.
80.285 - */
80.286 -PurpleProxyConnectData *purple_proxy_connect_udp(void *handle,
80.287 - PurpleAccount *account,
80.288 - const char *host, int port,
80.289 - PurpleProxyConnectFunction connect_cb, gpointer data);
80.290 -
80.291 -/**
80.292 - * Makes a connection through a SOCKS5 proxy.
80.293 - *
80.294 - * @param handle A handle that should be associated with this
80.295 - * connection attempt. The handle can be used
80.296 - * to cancel the connection attempt using the
80.297 - * purple_proxy_connect_cancel_with_handle()
80.298 - * function.
80.299 - * @param gpi The PurpleProxyInfo specifying the proxy settings
80.300 - * @param host The destination host.
80.301 - * @param port The destination port.
80.302 - * @param connect_cb The function to call when the connection is
80.303 - * established. If the connection failed then
80.304 - * fd will be -1 and error message will be set
80.305 - * to something descriptive (hopefully).
80.306 - * @param data User-defined data.
80.307 - *
80.308 - * @return NULL if there was an error, or a reference to an
80.309 - * opaque data structure that can be used to cancel
80.310 - * the pending connection, if needed.
80.311 - */
80.312 -PurpleProxyConnectData *purple_proxy_connect_socks5(void *handle,
80.313 - PurpleProxyInfo *gpi,
80.314 - const char *host, int port,
80.315 - PurpleProxyConnectFunction connect_cb, gpointer data);
80.316 -
80.317 -/**
80.318 - * Cancel an in-progress connection attempt. This should be called
80.319 - * by the PRPL if the user disables an account while it is still
80.320 - * performing the initial sign on. Or when establishing a file
80.321 - * transfer, if we attempt to connect to a remote user but they
80.322 - * are behind a firewall then the PRPL can cancel the connection
80.323 - * attempt early rather than just letting the OS's TCP/IP stack
80.324 - * time-out the connection.
80.325 - */
80.326 -void purple_proxy_connect_cancel(PurpleProxyConnectData *connect_data);
80.327 -
80.328 -/*
80.329 - * Closes all proxy connections registered with the specified handle.
80.330 - *
80.331 - * @param handle The handle.
80.332 - */
80.333 -void purple_proxy_connect_cancel_with_handle(void *handle);
80.334 -
80.335 -/*@}*/
80.336 -
80.337 -#ifdef __cplusplus
80.338 -}
80.339 -#endif
80.340 -
80.341 -#endif /* _PURPLE_PROXY_H_ */
81.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/prpl.h Fri Aug 21 13:24:36 2009 -0700
81.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
81.3 @@ -1,838 +0,0 @@
81.4 -/**
81.5 - * @file prpl.h Protocol Plugin functions
81.6 - * @ingroup core
81.7 - */
81.8 -
81.9 -/* purple
81.10 - *
81.11 - * Purple is the legal property of its developers, whose names are too numerous
81.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
81.13 - * source distribution.
81.14 - *
81.15 - * This program is free software; you can redistribute it and/or modify
81.16 - * it under the terms of the GNU General Public License as published by
81.17 - * the Free Software Foundation; either version 2 of the License, or
81.18 - * (at your option) any later version.
81.19 - *
81.20 - * This program is distributed in the hope that it will be useful,
81.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
81.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
81.23 - * GNU General Public License for more details.
81.24 - *
81.25 - * You should have received a copy of the GNU General Public License
81.26 - * along with this program; if not, write to the Free Software
81.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
81.28 - */
81.29 -
81.30 -/* this file should be all that prpls need to include. therefore, by including
81.31 - * this file, they should get glib, proxy, purple_connection, prpl, etc. */
81.32 -
81.33 -#ifndef _PURPLE_PRPL_H_
81.34 -#define _PURPLE_PRPL_H_
81.35 -
81.36 -typedef struct _PurplePluginProtocolInfo PurplePluginProtocolInfo;
81.37 -/** @copydoc _PurpleAttentionType */
81.38 -typedef struct _PurpleAttentionType PurpleAttentionType;
81.39 -
81.40 -/**************************************************************************/
81.41 -/** @name Basic Protocol Information */
81.42 -/**************************************************************************/
81.43 -
81.44 -typedef enum {
81.45 - PURPLE_ICON_SCALE_DISPLAY = 0x01, /**< We scale the icon when we display it */
81.46 - PURPLE_ICON_SCALE_SEND = 0x02 /**< We scale the icon before we send it to the server */
81.47 -} PurpleIconScaleRules;
81.48 -
81.49 -
81.50 -/**
81.51 - * A description of a Buddy Icon specification. This tells Purple what kind of image file
81.52 - * it should give this prpl, and what kind of image file it should expect back.
81.53 - * Dimensions less than 1 should be ignored and the image not scaled.
81.54 - */
81.55 -typedef struct _PurpleBuddyIconSpec PurpleBuddyIconSpec;
81.56 -
81.57 -/**
81.58 - * This \#define exists just to make it easier to fill out the buddy icon
81.59 - * field in the prpl info struct for protocols that couldn't care less.
81.60 - */
81.61 -#define NO_BUDDY_ICONS {NULL, 0, 0, 0, 0, 0, 0}
81.62 -
81.63 -#ifdef HAVE_UNISTD_H
81.64 -#include <unistd.h>
81.65 -#endif
81.66 -
81.67 -#include "blist.h"
81.68 -#include "conversation.h"
81.69 -#include "ft.h"
81.70 -#include "imgstore.h"
81.71 -#include "media.h"
81.72 -#include "notify.h"
81.73 -#include "proxy.h"
81.74 -#include "plugin.h"
81.75 -#include "roomlist.h"
81.76 -#include "status.h"
81.77 -#include "whiteboard.h"
81.78 -
81.79 -
81.80 -/** @copydoc PurpleBuddyIconSpec */
81.81 -struct _PurpleBuddyIconSpec {
81.82 - /** This is a comma-delimited list of image formats or @c NULL if icons
81.83 - * are not supported. Neither the core nor the prpl will actually
81.84 - * check to see if the data it's given matches this; it's entirely up
81.85 - * to the UI to do what it wants
81.86 - */
81.87 - char *format;
81.88 -
81.89 - int min_width; /**< Minimum width of this icon */
81.90 - int min_height; /**< Minimum height of this icon */
81.91 - int max_width; /**< Maximum width of this icon */
81.92 - int max_height; /**< Maximum height of this icon */
81.93 - size_t max_filesize; /**< Maximum size in bytes */
81.94 - PurpleIconScaleRules scale_rules; /**< How to stretch this icon */
81.95 -};
81.96 -
81.97 -struct proto_chat_entry {
81.98 - const char *label;
81.99 - const char *identifier;
81.100 - gboolean required;
81.101 - gboolean is_int;
81.102 - int min;
81.103 - int max;
81.104 - gboolean secret;
81.105 -};
81.106 -
81.107 -/** Represents "nudges" and "buzzes" that you may send to a buddy to attract
81.108 - * their attention (or vice-versa).
81.109 - */
81.110 -struct _PurpleAttentionType
81.111 -{
81.112 - const char *name; /**< Shown in GUI elements */
81.113 - const char *incoming_description; /**< Shown when sent */
81.114 - const char *outgoing_description; /**< Shown when receied */
81.115 - const char *icon_name; /**< Icon to display (optional) */
81.116 - const char *unlocalized_name; /**< Unlocalized name for UIs needing it */
81.117 -
81.118 - /* Reserved fields for future purposes */
81.119 - gpointer _reserved2;
81.120 - gpointer _reserved3;
81.121 - gpointer _reserved4;
81.122 -};
81.123 -
81.124 -/**
81.125 - * Protocol options
81.126 - *
81.127 - * These should all be stuff that some plugins can do and others can't.
81.128 - */
81.129 -typedef enum
81.130 -{
81.131 - /**
81.132 - * User names are unique to a chat and are not shared between rooms.
81.133 - *
81.134 - * XMPP lets you choose what name you want in chats, so it shouldn't
81.135 - * be pulling the aliases from the buddy list for the chat list;
81.136 - * it gets annoying.
81.137 - */
81.138 - OPT_PROTO_UNIQUE_CHATNAME = 0x00000004,
81.139 -
81.140 - /**
81.141 - * Chat rooms have topics.
81.142 - *
81.143 - * IRC and XMPP support this.
81.144 - */
81.145 - OPT_PROTO_CHAT_TOPIC = 0x00000008,
81.146 -
81.147 - /**
81.148 - * Don't require passwords for sign-in.
81.149 - *
81.150 - * Zephyr doesn't require passwords, so there's no
81.151 - * need for a password prompt.
81.152 - */
81.153 - OPT_PROTO_NO_PASSWORD = 0x00000010,
81.154 -
81.155 - /**
81.156 - * Notify on new mail.
81.157 - *
81.158 - * MSN and Yahoo notify you when you have new mail.
81.159 - */
81.160 - OPT_PROTO_MAIL_CHECK = 0x00000020,
81.161 -
81.162 - /**
81.163 - * Images in IMs.
81.164 - *
81.165 - * Oscar lets you send images in direct IMs.
81.166 - */
81.167 - OPT_PROTO_IM_IMAGE = 0x00000040,
81.168 -
81.169 - /**
81.170 - * Allow passwords to be optional.
81.171 - *
81.172 - * Passwords in IRC are optional, and are needed for certain
81.173 - * functionality.
81.174 - */
81.175 - OPT_PROTO_PASSWORD_OPTIONAL = 0x00000080,
81.176 -
81.177 - /**
81.178 - * Allows font size to be specified in sane point size
81.179 - *
81.180 - * Probably just XMPP and Y!M
81.181 - */
81.182 - OPT_PROTO_USE_POINTSIZE = 0x00000100,
81.183 -
81.184 - /**
81.185 - * Set the Register button active even when the username has not
81.186 - * been specified.
81.187 - *
81.188 - * Gadu-Gadu doesn't need a username to register new account (because
81.189 - * usernames are assigned by the server).
81.190 - */
81.191 - OPT_PROTO_REGISTER_NOSCREENNAME = 0x00000200,
81.192 -
81.193 - /**
81.194 - * Indicates that slash commands are native to this protocol.
81.195 - * Used as a hint that unknown commands should not be sent as messages.
81.196 - * @since 2.1.0
81.197 - */
81.198 - OPT_PROTO_SLASH_COMMANDS_NATIVE = 0x00000400
81.199 -
81.200 -} PurpleProtocolOptions;
81.201 -
81.202 -/**
81.203 - * A protocol plugin information structure.
81.204 - *
81.205 - * Every protocol plugin initializes this structure. It is the gateway
81.206 - * between purple and the protocol plugin. Many of these callbacks can be
81.207 - * NULL. If a callback must be implemented, it has a comment indicating so.
81.208 - */
81.209 -struct _PurplePluginProtocolInfo
81.210 -{
81.211 - PurpleProtocolOptions options; /**< Protocol options. */
81.212 -
81.213 - GList *user_splits; /**< A GList of PurpleAccountUserSplit */
81.214 - GList *protocol_options; /**< A GList of PurpleAccountOption */
81.215 -
81.216 - PurpleBuddyIconSpec icon_spec; /**< The icon spec. */
81.217 -
81.218 - /**
81.219 - * Returns the base icon name for the given buddy and account.
81.220 - * If buddy is NULL and the account is non-NULL, it will return the
81.221 - * name to use for the account's icon. If both are NULL, it will
81.222 - * return the name to use for the protocol's icon.
81.223 - *
81.224 - * This must be implemented.
81.225 - */
81.226 - const char *(*list_icon)(PurpleAccount *account, PurpleBuddy *buddy);
81.227 -
81.228 - /**
81.229 - * Fills the four char**'s with string identifiers for "emblems"
81.230 - * that the UI will interpret and display as relevant
81.231 - */
81.232 - const char *(*list_emblem)(PurpleBuddy *buddy);
81.233 -
81.234 - /**
81.235 - * Gets a short string representing this buddy's status. This will
81.236 - * be shown on the buddy list.
81.237 - */
81.238 - char *(*status_text)(PurpleBuddy *buddy);
81.239 -
81.240 - /**
81.241 - * Allows the prpl to add text to a buddy's tooltip.
81.242 - */
81.243 - void (*tooltip_text)(PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, gboolean full);
81.244 -
81.245 - /**
81.246 - * Returns a list of #PurpleStatusType which exist for this account;
81.247 - * this must be implemented, and must add at least the offline and
81.248 - * online states.
81.249 - */
81.250 - GList *(*status_types)(PurpleAccount *account);
81.251 -
81.252 - /**
81.253 - * Returns a list of #PurpleMenuAction structs, which represent extra
81.254 - * actions to be shown in (for example) the right-click menu for @a
81.255 - * node.
81.256 - */
81.257 - GList *(*blist_node_menu)(PurpleBlistNode *node);
81.258 - GList *(*chat_info)(PurpleConnection *);
81.259 - GHashTable *(*chat_info_defaults)(PurpleConnection *, const char *chat_name);
81.260 -
81.261 - /* All the server-related functions */
81.262 -
81.263 - /** This must be implemented. */
81.264 - void (*login)(PurpleAccount *);
81.265 -
81.266 - /** This must be implemented. */
81.267 - void (*close)(PurpleConnection *);
81.268 -
81.269 - /**
81.270 - * This PRPL function should return a positive value on success.
81.271 - * If the message is too big to be sent, return -E2BIG. If
81.272 - * the account is not connected, return -ENOTCONN. If the
81.273 - * PRPL is unable to send the message for another reason, return
81.274 - * some other negative value. You can use one of the valid
81.275 - * errno values, or just big something. If the message should
81.276 - * not be echoed to the conversation window, return 0.
81.277 - */
81.278 - int (*send_im)(PurpleConnection *, const char *who,
81.279 - const char *message,
81.280 - PurpleMessageFlags flags);
81.281 -
81.282 - void (*set_info)(PurpleConnection *, const char *info);
81.283 -
81.284 - /**
81.285 - * @return If this protocol requires the PURPLE_TYPING message to
81.286 - * be sent repeatedly to signify that the user is still
81.287 - * typing, then the PRPL should return the number of
81.288 - * seconds to wait before sending a subsequent notification.
81.289 - * Otherwise the PRPL should return 0.
81.290 - */
81.291 - unsigned int (*send_typing)(PurpleConnection *, const char *name, PurpleTypingState state);
81.292 -
81.293 - /**
81.294 - * Should arrange for purple_notify_userinfo() to be called with
81.295 - * @a who's user info.
81.296 - */
81.297 - void (*get_info)(PurpleConnection *, const char *who);
81.298 - void (*set_status)(PurpleAccount *account, PurpleStatus *status);
81.299 -
81.300 - void (*set_idle)(PurpleConnection *, int idletime);
81.301 - void (*change_passwd)(PurpleConnection *, const char *old_pass,
81.302 - const char *new_pass);
81.303 - /**
81.304 - * Add a buddy to a group on the server.
81.305 - *
81.306 - * This PRPL function may be called in situations in which the buddy is
81.307 - * already in the specified group. If the protocol supports
81.308 - * authorization and the user is not already authorized to see the
81.309 - * status of \a buddy, \a add_buddy should request authorization.
81.310 - */
81.311 - void (*add_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group);
81.312 - void (*add_buddies)(PurpleConnection *, GList *buddies, GList *groups);
81.313 - void (*remove_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group);
81.314 - void (*remove_buddies)(PurpleConnection *, GList *buddies, GList *groups);
81.315 - void (*add_permit)(PurpleConnection *, const char *name);
81.316 - void (*add_deny)(PurpleConnection *, const char *name);
81.317 - void (*rem_permit)(PurpleConnection *, const char *name);
81.318 - void (*rem_deny)(PurpleConnection *, const char *name);
81.319 - void (*set_permit_deny)(PurpleConnection *);
81.320 - void (*join_chat)(PurpleConnection *, GHashTable *components);
81.321 - void (*reject_chat)(PurpleConnection *, GHashTable *components);
81.322 - char *(*get_chat_name)(GHashTable *components);
81.323 - void (*chat_invite)(PurpleConnection *, int id,
81.324 - const char *message, const char *who);
81.325 - void (*chat_leave)(PurpleConnection *, int id);
81.326 - void (*chat_whisper)(PurpleConnection *, int id,
81.327 - const char *who, const char *message);
81.328 - int (*chat_send)(PurpleConnection *, int id, const char *message, PurpleMessageFlags flags);
81.329 -
81.330 - /** If implemented, this will be called regularly for this prpl's
81.331 - * active connections. You'd want to do this if you need to repeatedly
81.332 - * send some kind of keepalive packet to the server to avoid being
81.333 - * disconnected. ("Regularly" is defined by
81.334 - * <code>KEEPALIVE_INTERVAL</code> in <tt>libpurple/connection.c</tt>.)
81.335 - */
81.336 - void (*keepalive)(PurpleConnection *);
81.337 -
81.338 - /** new user registration */
81.339 - void (*register_user)(PurpleAccount *);
81.340 -
81.341 - /**
81.342 - * @deprecated Use #PurplePluginProtocolInfo.get_info instead.
81.343 - */
81.344 - void (*get_cb_info)(PurpleConnection *, int, const char *who);
81.345 - /**
81.346 - * @deprecated Use #PurplePluginProtocolInfo.get_cb_real_name and
81.347 - * #PurplePluginProtocolInfo.status_text instead.
81.348 - */
81.349 - void (*get_cb_away)(PurpleConnection *, int, const char *who);
81.350 -
81.351 - /** save/store buddy's alias on server list/roster */
81.352 - void (*alias_buddy)(PurpleConnection *, const char *who,
81.353 - const char *alias);
81.354 -
81.355 - /** change a buddy's group on a server list/roster */
81.356 - void (*group_buddy)(PurpleConnection *, const char *who,
81.357 - const char *old_group, const char *new_group);
81.358 -
81.359 - /** rename a group on a server list/roster */
81.360 - void (*rename_group)(PurpleConnection *, const char *old_name,
81.361 - PurpleGroup *group, GList *moved_buddies);
81.362 -
81.363 - void (*buddy_free)(PurpleBuddy *);
81.364 -
81.365 - void (*convo_closed)(PurpleConnection *, const char *who);
81.366 -
81.367 - /**
81.368 - * Convert the username @a who to its canonical form. (For example,
81.369 - * AIM treats "fOo BaR" and "foobar" as the same user; this function
81.370 - * should return the same normalized string for both of those.)
81.371 - */
81.372 - const char *(*normalize)(const PurpleAccount *, const char *who);
81.373 -
81.374 - /**
81.375 - * Set the buddy icon for the given connection to @a img. The prpl
81.376 - * does NOT own a reference to @a img; if it needs one, it must
81.377 - * #purple_imgstore_ref(@a img) itself.
81.378 - */
81.379 - void (*set_buddy_icon)(PurpleConnection *, PurpleStoredImage *img);
81.380 -
81.381 - void (*remove_group)(PurpleConnection *gc, PurpleGroup *group);
81.382 -
81.383 - /** Gets the real name of a participant in a chat. For example, on
81.384 - * XMPP this turns a chat room nick <tt>foo</tt> into
81.385 - * <tt>room\@server/foo</tt>
81.386 - * @param gc the connection on which the room is.
81.387 - * @param id the ID of the chat room.
81.388 - * @param who the nickname of the chat participant.
81.389 - * @return the real name of the participant. This string must be
81.390 - * freed by the caller.
81.391 - */
81.392 - char *(*get_cb_real_name)(PurpleConnection *gc, int id, const char *who);
81.393 -
81.394 - void (*set_chat_topic)(PurpleConnection *gc, int id, const char *topic);
81.395 -
81.396 - PurpleChat *(*find_blist_chat)(PurpleAccount *account, const char *name);
81.397 -
81.398 - /* room listing prpl callbacks */
81.399 - PurpleRoomlist *(*roomlist_get_list)(PurpleConnection *gc);
81.400 - void (*roomlist_cancel)(PurpleRoomlist *list);
81.401 - void (*roomlist_expand_category)(PurpleRoomlist *list, PurpleRoomlistRoom *category);
81.402 -
81.403 - /* file transfer callbacks */
81.404 - gboolean (*can_receive_file)(PurpleConnection *, const char *who);
81.405 - void (*send_file)(PurpleConnection *, const char *who, const char *filename);
81.406 - PurpleXfer *(*new_xfer)(PurpleConnection *, const char *who);
81.407 -
81.408 - /** Checks whether offline messages to @a buddy are supported.
81.409 - * @return @c TRUE if @a buddy can be sent messages while they are
81.410 - * offline, or @c FALSE if not.
81.411 - */
81.412 - gboolean (*offline_message)(const PurpleBuddy *buddy);
81.413 -
81.414 - PurpleWhiteboardPrplOps *whiteboard_prpl_ops;
81.415 -
81.416 - /** For use in plugins that may understand the underlying protocol */
81.417 - int (*send_raw)(PurpleConnection *gc, const char *buf, int len);
81.418 -
81.419 - /* room list serialize */
81.420 - char *(*roomlist_room_serialize)(PurpleRoomlistRoom *room);
81.421 -
81.422 - /** Remove the user from the server. The account can either be
81.423 - * connected or disconnected. After the removal is finished, the
81.424 - * connection will stay open and has to be closed!
81.425 - */
81.426 - /* This is here rather than next to register_user for API compatibility
81.427 - * reasons.
81.428 - */
81.429 - void (*unregister_user)(PurpleAccount *, PurpleAccountUnregistrationCb cb, void *user_data);
81.430 -
81.431 - /* Attention API for sending & receiving zaps/nudges/buzzes etc. */
81.432 - gboolean (*send_attention)(PurpleConnection *gc, const char *username, guint type);
81.433 - GList *(*get_attention_types)(PurpleAccount *acct);
81.434 -
81.435 - /**
81.436 - * The size of the PurplePluginProtocolInfo. This should always be sizeof(PurplePluginProtocolInfo).
81.437 - * This allows adding more functions to this struct without requiring a major version bump.
81.438 - */
81.439 - unsigned long struct_size;
81.440 -
81.441 - /* NOTE:
81.442 - * If more functions are added, they should accessed using the following syntax:
81.443 - *
81.444 - * if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, new_function))
81.445 - * prpl->new_function(...);
81.446 - *
81.447 - * instead of
81.448 - *
81.449 - * if (prpl->new_function != NULL)
81.450 - * prpl->new_function(...);
81.451 - *
81.452 - * The PURPLE_PROTOCOL_PLUGIN_HAS_FUNC macro can be used for the older member
81.453 - * functions (e.g. login, send_im etc.) too.
81.454 - */
81.455 -
81.456 - /** This allows protocols to specify additional strings to be used for
81.457 - * various purposes. The idea is to stuff a bunch of strings in this hash
81.458 - * table instead of expanding the struct for every addition. This hash
81.459 - * table is allocated every call and MUST be unrefed by the caller.
81.460 - *
81.461 - * @param account The account to specify. This can be NULL.
81.462 - * @return The protocol's string hash table. The hash table should be
81.463 - * destroyed by the caller when it's no longer needed.
81.464 - */
81.465 - GHashTable *(*get_account_text_table)(PurpleAccount *account);
81.466 -
81.467 - /**
81.468 - * Initiate a media session with the given contact.
81.469 - *
81.470 - * @param account The account to initiate the media session on.
81.471 - * @param who The remote user to initiate the session with.
81.472 - * @param type The type of media session to initiate.
81.473 - * @return TRUE if the call succeeded else FALSE. (Doesn't imply the media session or stream will be successfully created)
81.474 - */
81.475 - gboolean (*initiate_media)(PurpleAccount *account, const char *who,
81.476 - PurpleMediaSessionType type);
81.477 -
81.478 - /**
81.479 - * Checks to see if the given contact supports the given type of media session.
81.480 - *
81.481 - * @param account The account the contact is on.
81.482 - * @param who The remote user to check for media capability with.
81.483 - * @return The media caps the contact supports.
81.484 - */
81.485 - PurpleMediaCaps (*get_media_caps)(PurpleAccount *account,
81.486 - const char *who);
81.487 -};
81.488 -
81.489 -#define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \
81.490 - (((G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < G_STRUCT_OFFSET(PurplePluginProtocolInfo, struct_size)) \
81.491 - || (G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < prpl->struct_size)) && \
81.492 - prpl->member != NULL)
81.493 -
81.494 -
81.495 -#define PURPLE_IS_PROTOCOL_PLUGIN(plugin) \
81.496 - ((plugin)->info->type == PURPLE_PLUGIN_PROTOCOL)
81.497 -
81.498 -#define PURPLE_PLUGIN_PROTOCOL_INFO(plugin) \
81.499 - ((PurplePluginProtocolInfo *)(plugin)->info->extra_info)
81.500 -
81.501 -#ifdef __cplusplus
81.502 -extern "C" {
81.503 -#endif
81.504 -
81.505 -/**************************************************************************/
81.506 -/** @name Attention Type API */
81.507 -/**************************************************************************/
81.508 -/*@{*/
81.509 -
81.510 -/**
81.511 - * Creates a new #PurpleAttentionType object and sets its mandatory parameters.
81.512 - *
81.513 - * @param ulname A non-localized string that can be used by UIs in need of such
81.514 - * non-localized strings. This should be the same as @a name,
81.515 - * without localization.
81.516 - * @param name A localized string that the UI may display for the event. This
81.517 - * should be the same string as @a ulname, with localization.
81.518 - * @param inc_desc A localized description shown when the event is received.
81.519 - * @param out_desc A localized description shown when the event is sent.
81.520 - * @return A pointer to the new object.
81.521 - * @since 2.4.0
81.522 - */
81.523 -PurpleAttentionType *purple_attention_type_new(const char *ulname, const char *name,
81.524 - const char *inc_desc, const char *out_desc);
81.525 -
81.526 -/**
81.527 - * Sets the displayed name of the attention-demanding event.
81.528 - *
81.529 - * @param type The attention type.
81.530 - * @param name The localized name that will be displayed by UIs. This should be
81.531 - * the same string given as the unlocalized name, but with
81.532 - * localization.
81.533 - * @since 2.4.0
81.534 - */
81.535 -void purple_attention_type_set_name(PurpleAttentionType *type, const char *name);
81.536 -
81.537 -/**
81.538 - * Sets the description of the attention-demanding event shown in conversations
81.539 - * when the event is received.
81.540 - *
81.541 - * @param type The attention type.
81.542 - * @param desc The localized description for incoming events.
81.543 - * @since 2.4.0
81.544 - */
81.545 -void purple_attention_type_set_incoming_desc(PurpleAttentionType *type, const char *desc);
81.546 -
81.547 -/**
81.548 - * Sets the description of the attention-demanding event shown in conversations
81.549 - * when the event is sent.
81.550 - *
81.551 - * @param type The attention type.
81.552 - * @param desc The localized description for outgoing events.
81.553 - * @since 2.4.0
81.554 - */
81.555 -void purple_attention_type_set_outgoing_desc(PurpleAttentionType *type, const char *desc);
81.556 -
81.557 -/**
81.558 - * Sets the name of the icon to display for the attention event; this is optional.
81.559 - *
81.560 - * @param type The attention type.
81.561 - * @param name The icon's name.
81.562 - * @note Icons are optional for attention events.
81.563 - * @since 2.4.0
81.564 - */
81.565 -void purple_attention_type_set_icon_name(PurpleAttentionType *type, const char *name);
81.566 -
81.567 -/**
81.568 - * Sets the unlocalized name of the attention event; some UIs may need this,
81.569 - * thus it is required.
81.570 - *
81.571 - * @param type The attention type.
81.572 - * @param ulname The unlocalized name. This should be the same string given as
81.573 - * the localized name, but without localization.
81.574 - * @since 2.4.0
81.575 - */
81.576 -void purple_attention_type_set_unlocalized_name(PurpleAttentionType *type, const char *ulname);
81.577 -
81.578 -/**
81.579 - * Get the attention type's name as displayed by the UI.
81.580 - *
81.581 - * @param type The attention type.
81.582 - * @return The name.
81.583 - * @since 2.4.0
81.584 - */
81.585 -const char *purple_attention_type_get_name(const PurpleAttentionType *type);
81.586 -
81.587 -/**
81.588 - * Get the attention type's description shown when the event is received.
81.589 - *
81.590 - * @param type The attention type.
81.591 - * @return The description.
81.592 - * @since 2.4.0
81.593 - */
81.594 -const char *purple_attention_type_get_incoming_desc(const PurpleAttentionType *type);
81.595 -
81.596 -/**
81.597 - * Get the attention type's description shown when the event is sent.
81.598 - *
81.599 - * @param type The attention type.
81.600 - * @return The description.
81.601 - * @since 2.4.0
81.602 - */
81.603 -const char *purple_attention_type_get_outgoing_desc(const PurpleAttentionType *type);
81.604 -
81.605 -/**
81.606 - * Get the attention type's icon name.
81.607 - *
81.608 - * @param type The attention type.
81.609 - * @return The icon name or @c NULL if unset/empty.
81.610 - * @note Icons are optional for attention events.
81.611 - * @since 2.4.0
81.612 - */
81.613 -const char *purple_attention_type_get_icon_name(const PurpleAttentionType *type);
81.614 -
81.615 -/**
81.616 - * Get the attention type's unlocalized name; this is useful for some UIs.
81.617 - *
81.618 - * @param type The attention type
81.619 - * @return The unlocalized name.
81.620 - * @since 2.4.0
81.621 - */
81.622 -const char *purple_attention_type_get_unlocalized_name(const PurpleAttentionType *type);
81.623 -
81.624 -/*@}*/
81.625 -
81.626 -/**************************************************************************/
81.627 -/** @name Protocol Plugin API */
81.628 -/**************************************************************************/
81.629 -/*@{*/
81.630 -
81.631 -/**
81.632 - * Notifies Purple that our account's idle state and time have changed.
81.633 - *
81.634 - * This is meant to be called from protocol plugins.
81.635 - *
81.636 - * @param account The account.
81.637 - * @param idle The user's idle state.
81.638 - * @param idle_time The user's idle time.
81.639 - */
81.640 -void purple_prpl_got_account_idle(PurpleAccount *account, gboolean idle,
81.641 - time_t idle_time);
81.642 -
81.643 -/**
81.644 - * Notifies Purple of our account's log-in time.
81.645 - *
81.646 - * This is meant to be called from protocol plugins.
81.647 - *
81.648 - * @param account The account the user is on.
81.649 - * @param login_time The user's log-in time.
81.650 - */
81.651 -void purple_prpl_got_account_login_time(PurpleAccount *account, time_t login_time);
81.652 -
81.653 -/**
81.654 - * Notifies Purple that our account's status has changed.
81.655 - *
81.656 - * This is meant to be called from protocol plugins.
81.657 - *
81.658 - * @param account The account the user is on.
81.659 - * @param status_id The status ID.
81.660 - * @param ... A NULL-terminated list of attribute IDs and values,
81.661 - * beginning with the value for @a attr_id.
81.662 - */
81.663 -void purple_prpl_got_account_status(PurpleAccount *account,
81.664 - const char *status_id, ...) G_GNUC_NULL_TERMINATED;
81.665 -
81.666 -/**
81.667 - * Notifies Purple that our account's actions have changed. This is only
81.668 - * called after the initial connection. Emits the account-actions-changed
81.669 - * signal.
81.670 - *
81.671 - * This is meant to be called from protocol plugins.
81.672 - *
81.673 - * @param account The account.
81.674 - *
81.675 - * @see account-actions-changed
81.676 - * @since 2.6.0
81.677 - */
81.678 -void purple_prpl_got_account_actions(PurpleAccount *account);
81.679 -
81.680 -/**
81.681 - * Notifies Purple that a buddy's idle state and time have changed.
81.682 - *
81.683 - * This is meant to be called from protocol plugins.
81.684 - *
81.685 - * @param account The account the user is on.
81.686 - * @param name The name of the buddy.
81.687 - * @param idle The user's idle state.
81.688 - * @param idle_time The user's idle time. This is the time at
81.689 - * which the user became idle, in seconds since
81.690 - * the epoch. If the PRPL does not know this value
81.691 - * then it should pass 0.
81.692 - */
81.693 -void purple_prpl_got_user_idle(PurpleAccount *account, const char *name,
81.694 - gboolean idle, time_t idle_time);
81.695 -
81.696 -/**
81.697 - * Notifies Purple of a buddy's log-in time.
81.698 - *
81.699 - * This is meant to be called from protocol plugins.
81.700 - *
81.701 - * @param account The account the user is on.
81.702 - * @param name The name of the buddy.
81.703 - * @param login_time The user's log-in time.
81.704 - */
81.705 -void purple_prpl_got_user_login_time(PurpleAccount *account, const char *name,
81.706 - time_t login_time);
81.707 -
81.708 -/**
81.709 - * Notifies Purple that a buddy's status has been activated.
81.710 - *
81.711 - * This is meant to be called from protocol plugins.
81.712 - *
81.713 - * @param account The account the user is on.
81.714 - * @param name The name of the buddy.
81.715 - * @param status_id The status ID.
81.716 - * @param ... A NULL-terminated list of attribute IDs and values,
81.717 - * beginning with the value for @a attr_id.
81.718 - */
81.719 -void purple_prpl_got_user_status(PurpleAccount *account, const char *name,
81.720 - const char *status_id, ...) G_GNUC_NULL_TERMINATED;
81.721 -
81.722 -/**
81.723 - * Notifies libpurple that a buddy's status has been deactivated
81.724 - *
81.725 - * This is meant to be called from protocol plugins.
81.726 - *
81.727 - * @param account The account the user is on.
81.728 - * @param name The name of the buddy.
81.729 - * @param status_id The status ID.
81.730 - */
81.731 -void purple_prpl_got_user_status_deactive(PurpleAccount *account, const char *name,
81.732 - const char *status_id);
81.733 -
81.734 -/**
81.735 - * Informs the server that our account's status changed.
81.736 - *
81.737 - * @param account The account the user is on.
81.738 - * @param old_status The previous status.
81.739 - * @param new_status The status that was activated, or deactivated
81.740 - * (in the case of independent statuses).
81.741 - */
81.742 -void purple_prpl_change_account_status(PurpleAccount *account,
81.743 - PurpleStatus *old_status,
81.744 - PurpleStatus *new_status);
81.745 -
81.746 -/**
81.747 - * Retrieves the list of stock status types from a prpl.
81.748 - *
81.749 - * @param account The account the user is on.
81.750 - * @param presence The presence for which we're going to get statuses
81.751 - *
81.752 - * @return List of statuses
81.753 - */
81.754 -GList *purple_prpl_get_statuses(PurpleAccount *account, PurplePresence *presence);
81.755 -
81.756 -/**
81.757 - * Send an attention request message.
81.758 - *
81.759 - * @param gc The connection to send the message on.
81.760 - * @param who Whose attention to request.
81.761 - * @param type_code An index into the prpl's attention_types list determining the type
81.762 - * of the attention request command to send. 0 if prpl only defines one
81.763 - * (for example, Yahoo and MSN), but some protocols define more (MySpaceIM).
81.764 - *
81.765 - * Note that you can't send arbitrary PurpleAttentionType's, because there is
81.766 - * only a fixed set of attention commands.
81.767 - *
81.768 - * @since 2.5.0
81.769 - */
81.770 -void purple_prpl_send_attention(PurpleConnection *gc, const char *who, guint type_code);
81.771 -
81.772 -/**
81.773 - * Process an incoming attention message.
81.774 - *
81.775 - * @param gc The connection that received the attention message.
81.776 - * @param who Who requested your attention.
81.777 - * @param type_code An index into the prpl's attention_types list determining the type
81.778 - * of the attention request command to send.
81.779 - *
81.780 - * @since 2.5.0
81.781 - */
81.782 -void purple_prpl_got_attention(PurpleConnection *gc, const char *who, guint type_code);
81.783 -
81.784 -/**
81.785 - * Process an incoming attention message in a chat.
81.786 - *
81.787 - * @param gc The connection that received the attention message.
81.788 - * @param id The chat id.
81.789 - * @param who Who requested your attention.
81.790 - * @param type_code An index into the prpl's attention_types list determining the type
81.791 - * of the attention request command to send.
81.792 - *
81.793 - * @since 2.5.0
81.794 - */
81.795 -void purple_prpl_got_attention_in_chat(PurpleConnection *gc, int id, const char *who, guint type_code);
81.796 -
81.797 -/**
81.798 - * Determines if the contact supports the given media session type.
81.799 - *
81.800 - * @param account The account the user is on.
81.801 - * @param who The name of the contact to check capabilities for.
81.802 - *
81.803 - * @return The media caps the contact supports.
81.804 - */
81.805 -PurpleMediaCaps purple_prpl_get_media_caps(PurpleAccount *account,
81.806 - const char *who);
81.807 -
81.808 -/**
81.809 - * Initiates a media session with the given contact.
81.810 - *
81.811 - * @param account The account the user is on.
81.812 - * @param who The name of the contact to start a session with.
81.813 - * @param type The type of media session to start.
81.814 - *
81.815 - * @return TRUE if the call succeeded else FALSE. (Doesn't imply the media session or stream will be successfully created)
81.816 - */
81.817 -gboolean purple_prpl_initiate_media(PurpleAccount *account,
81.818 - const char *who,
81.819 - PurpleMediaSessionType type);
81.820 -
81.821 -/*@}*/
81.822 -
81.823 -/**************************************************************************/
81.824 -/** @name Protocol Plugin Subsystem API */
81.825 -/**************************************************************************/
81.826 -/*@{*/
81.827 -
81.828 -/**
81.829 - * Finds a protocol plugin structure of the specified type.
81.830 - *
81.831 - * @param id The protocol plugin;
81.832 - */
81.833 -PurplePlugin *purple_find_prpl(const char *id);
81.834 -
81.835 -/*@}*/
81.836 -
81.837 -#ifdef __cplusplus
81.838 -}
81.839 -#endif
81.840 -
81.841 -#endif /* _PRPL_H_ */
82.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/purple.h Fri Aug 21 13:24:36 2009 -0700
82.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
82.3 @@ -1,97 +0,0 @@
82.4 -/**
82.5 - * @file purple.h Header files and defines
82.6 - * This file contains all the necessary preprocessor directives to include
82.7 - * libpurple's headers and other preprocessor directives required for plugins
82.8 - * or UIs to build. Including this file eliminates the need to directly
82.9 - * include any other libpurple files.
82.10 - *
82.11 - * @ingroup core libpurple
82.12 - * @since 2.3.0
82.13 - */
82.14 -
82.15 -/* purple
82.16 - *
82.17 - * Purple is the legal property of its developers, whose names are too numerous
82.18 - * to list here. Please refer to the COPYRIGHT file distributed with this
82.19 - * source distribution.
82.20 - *
82.21 - * This program is free software; you can redistribute it and/or modify
82.22 - * it under the terms of the GNU General Public License as published by
82.23 - * the Free Software Foundation; either version 2 of the License, or
82.24 - * (at your option) any later version.
82.25 - *
82.26 - * This program is distributed in the hope that it will be useful,
82.27 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
82.28 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
82.29 - * GNU General Public License for more details.
82.30 - *
82.31 - * You should have received a copy of the GNU General Public License
82.32 - * along with this program; if not, write to the Free Software
82.33 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
82.34 - */
82.35 -
82.36 -#ifndef _PURPLE_PURPLE_H_
82.37 -#define _PURPLE_PURPLE_H_
82.38 -
82.39 -#include <glib.h>
82.40 -
82.41 -#ifndef G_GNUC_NULL_TERMINATED
82.42 -# if __GNUC__ >= 4
82.43 -# define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
82.44 -# else
82.45 -# define G_GNUC_NULL_TERMINATED
82.46 -# endif
82.47 -#endif
82.48 -
82.49 -#undef PURPLE_PLUGINS
82.50 -
82.51 -#include <account.h>
82.52 -#include <accountopt.h>
82.53 -#include <blist.h>
82.54 -#include <buddyicon.h>
82.55 -#include <certificate.h>
82.56 -#include <cipher.h>
82.57 -#include <circbuffer.h>
82.58 -#include <cmds.h>
82.59 -#include <connection.h>
82.60 -#include <conversation.h>
82.61 -#include <core.h>
82.62 -#include <debug.h>
82.63 -#include <desktopitem.h>
82.64 -#include <dnsquery.h>
82.65 -#include <dnssrv.h>
82.66 -#include <eventloop.h>
82.67 -#include <ft.h>
82.68 -#include <idle.h>
82.69 -#include <imgstore.h>
82.70 -#include <log.h>
82.71 -#include <mime.h>
82.72 -#include <nat-pmp.h>
82.73 -#include <network.h>
82.74 -#include <ntlm.h>
82.75 -#include <notify.h>
82.76 -#include <plugin.h>
82.77 -#include <pluginpref.h>
82.78 -#include <pounce.h>
82.79 -#include <prefs.h>
82.80 -#include <privacy.h>
82.81 -#include <proxy.h>
82.82 -#include <prpl.h>
82.83 -#include <request.h>
82.84 -#include <roomlist.h>
82.85 -#include <savedstatuses.h>
82.86 -#include <server.h>
82.87 -#include <signals.h>
82.88 -#include <status.h>
82.89 -#include <stringref.h>
82.90 -#include <stun.h>
82.91 -#include <sound.h>
82.92 -#include <sslconn.h>
82.93 -#include <upnp.h>
82.94 -#include <util.h>
82.95 -#include <value.h>
82.96 -#include <version.h>
82.97 -#include <xmlnode.h>
82.98 -#include <whiteboard.h>
82.99 -
82.100 -#endif
83.1 --- a/Frameworks/libpurple.framework/Versions/0.6.0/Headers/request.h Fri Aug 21 13:24:36 2009 -0700
83.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
83.3 @@ -1,1538 +0,0 @@
83.4 -/**
83.5 - * @file request.h Request API
83.6 - * @ingroup core
83.7 - */
83.8 -
83.9 -/* purple
83.10 - *
83.11 - * Purple is the legal property of its developers, whose names are too numerous
83.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
83.13 - * source distribution.
83.14 - *
83.15 - * This program is free software; you can redistribute it and/or modify
83.16 - * it under the terms of the GNU General Public License as published by
83.17 - * the Free Software Foundation; either version 2 of the License, or
83.18 - * (at your option) any later version.
83.19 - *
83.20 - * This program is distributed in the hope that it will be useful,
83.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
83.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83.23 - * GNU General Public License for more details.
83.24 - *
83.25 - * You should have received a copy of the GNU General Public License
83.26 - * along with this program; if not, write to the Free Software
83.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
83.28 - */
83.29 -#ifndef _PURPLE_REQUEST_H_
83.30 -#define _PURPLE_REQUEST_H_
83.31 -
83.32 -#include <stdlib.h>
83.33 -#include <glib-object.h>
83.34 -#include <glib.h>
83.35 -
83.36 -/** @copydoc _PurpleRequestField */
83.37 -typedef struct _PurpleRequestField PurpleRequestField;
83.38 -
83.39 -#include "account.h"
83.40 -
83.41 -#define PURPLE_DEFAULT_ACTION_NONE -1
83.42 -
83.43 -/**
83.44 - * Request types.
83.45 - */
83.46 -typedef enum
83.47 -{
83.48 - PURPLE_REQUEST_INPUT = 0, /**< Text input request. */
83.49 - PURPLE_REQUEST_CHOICE, /**< Multiple-choice request. */
83.50 - PURPLE_REQUEST_ACTION, /**< Action request. */
83.51 - PURPLE_REQUEST_FIELDS, /**< Multiple fields request. */
83.52 - PURPLE_REQUEST_FILE, /**< File open or save request. */
83.53 - PURPLE_REQUEST_FOLDER /**< Folder selection request. */
83.54 -
83.55 -} PurpleRequestType;
83.56 -
83.57 -/**
83.58 - * A type of field.
83.59 - */
83.60 -typedef enum
83.61 -{
83.62 - PURPLE_REQUEST_FIELD_NONE,
83.63 - PURPLE_REQUEST_FIELD_STRING,
83.64 - PURPLE_REQUEST_FIELD_INTEGER,
83.65 - PURPLE_REQUEST_FIELD_BOOLEAN,
83.66 - PURPLE_REQUEST_FIELD_CHOICE,
83.67 - PURPLE_REQUEST_FIELD_LIST,
83.68 - PURPLE_REQUEST_FIELD_LABEL,
83.69 - PURPLE_REQUEST_FIELD_IMAGE,
83.70 - PURPLE_REQUEST_FIELD_ACCOUNT
83.71 -
83.72 -} PurpleRequestFieldType;
83.73 -
83.74 -/**
83.75 - * Multiple fields request data.
83.76 - */
83.77 -typedef struct
83.78 -{
83.79 - GList *groups;
83.80 -
83.81 - GHashTable *fields;
83.82 -
83.83 - GList *required_fields;
83.84 -
83.85 - void *ui_data;
83.86 -
83.87 -} PurpleRequestFields;
83.88 -
83.89 -/**
83.90 - * A group of fields with a title.
83.91 - */
83.92 -typedef struct
83.93 -{
83.94 - PurpleRequestFields *fields_list;
83.95 -
83.96 - char *title;
83.97 -
83.98 - GList *fields;
83.99 -
83.100 -} PurpleRequestFieldGroup;
83.101 -
83.102 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_REQUEST_C_)
83.103 -/**
83.104 - * A request field.
83.105 - */
83.106 -struct _PurpleRequestField
83.107 -{
83.108 - PurpleRequestFieldType type;
83.109 - PurpleRequestFieldGroup *group;
83.110 -
83.111 - char *id;
83.112 - char *label;
83.113 - char *type_hint;
83.114 -
83.115 - gboolean visible;
83.116 - gboolean required;
83.117 -
83.118 - union
83.119 - {
83.120 - struct
83.121 - {
83.122 - gboolean multiline;
83.123 - gboolean masked;
83.124 - gboolean editable;
83.125 - char *default_value;
83.126 - char *value;
83.127 -
83.128 - } string;
83.129 -
83.130 - struct
83.131 - {
83.132 - int default_value;
83.133 - int value;
83.134 -
83.135 - } integer;
83.136 -
83.137 - struct
83.138 - {
83.139 - gboolean default_value;
83.140 - gboolean value;
83.141 -
83.142 - } boolean;
83.143 -
83.144 - struct
83.145 - {
83.146 - int default_value;
83.147 - int value;
83.148 -
83.149 - GList *labels;
83.150 -
83.151 - } choice;
83.152 -
83.153 - struct
83.154 - {
83.155 - GList *items;
83.156 - GHashTable *item_data;
83.157 - GList *selected;
83.158 - GHashTable *selected_table;
83.159 -
83.160 - gboolean multiple_selection;
83.161 -
83.162 - } list;
83.163 -
83.164 - struct
83.165 - {
83.166 - PurpleAccount *default_account;
83.167 - PurpleAccount *account;
83.168 - gboolean show_all;
83.169 -
83.170 - PurpleFilterAccountFunc filter_func;
83.171 -
83.172 - } account;
83.173 -
83.174 - struct
83.175 - {
83.176 - unsigned int scale_x;
83.177 - unsigned int scale_y;
83.178 - const char *buffer;
83.179 - gsize size;
83.180 - } image;
83.181 -
83.182 - } u;
83.183 -
83.184 - void *ui_data;
83.185 -
83.186 -};
83.187 -#endif
83.188 -
83.189 -/**
83.190 - * Request UI operations.
83.191 - */
83.192 -typedef struct
83.193 -{
83.194 - /** @see purple_request_input(). */
83.195 - void *(*request_input)(const char *title, const char *primary,
83.196 - const char *secondary, const char *default_value,
83.197 - gboolean multiline, gboolean masked, gchar *hint,
83.198 - const char *ok_text, GCallback ok_cb,
83.199 - const char *cancel_text, GCallback cancel_cb,
83.200 - PurpleAccount *account, const char *who,
83.201 - PurpleConversation *conv, void *user_data);
83.202 -
83.203 - /** @see purple_request_choice_varg(). */
83.204 - void *(*request_choice)(const char *title, const char *primary,
83.205 - const char *secondary, int default_value,
83.206 - const char *ok_text, GCallback ok_cb,
83.207 - const char *cancel_text, GCallback cancel_cb,
83.208 - PurpleAccount *account, const char *who,
83.209 - PurpleConversation *conv, void *user_data,
83.210 - va_list choices);
83.211 -
83.212 - /** @see purple_request_action_varg(). */
83.213 - void *(*request_action)(const char *title, const char *primary,
83.214 - const char *secondary, int default_action,
83.215 - PurpleAccount *account, const char *who,
83.216 - PurpleConversation *conv, void *user_data,
83.217 - size_t action_count, va_list actions);
83.218 -
83.219 - /** @see purple_request_fields(). */
83.220 - void *(*request_fields)(const char *title, const char *primary,
83.221 - const char *secondary, PurpleRequestFields *fields,
83.222 - const char *ok_text, GCallback ok_cb,
83.223 - const char *cancel_text, GCallback cancel_cb,
83.224 - PurpleAccount *account, const char *who,
83.225 - PurpleConversation *conv, void *user_data);
83.226 -
83.227 - /** @see purple_request_file(). */
83.228 - void *(*request_file)(const char *title, const char *filename,
83.229 - gboolean savedialog, GCallback ok_cb,
83.230 - GCallback cancel_cb, PurpleAccount *account,
83.231 - const char *who, PurpleConversation *conv,
83.232 - void *user_data);
83.233 -
83.234 - void (*close_request)(PurpleRequestType type, void *ui_handle);
83.235 -
83.236 - /** @see purple_request_folder(). */
83.237 - void *(*request_folder)(const char *title, const char *dirname,
83.238 - GCallback ok_cb, GCallback cancel_cb,
83.239 - PurpleAccount *account, const char *who,
83.240 - PurpleConversation *conv, void *user_data);
83.241 -
83.242 - void (*_purple_reserved1)(void);
83.243 - void (*_purple_reserved2)(void);
83.244 - void (*_purple_reserved3)(void);
83.245 - void (*_purple_reserved4)(void);
83.246 -} PurpleRequestUiOps;
83.247 -
83.248 -typedef void (*PurpleRequestInputCb)(void *, const char *);
83.249 -
83.250 -/** The type of callbacks passed to purple_request_action(). The first
83.251 - * argument is the @a user_data parameter; the second is the index in the list
83.252 - * of actions of the one chosen.
83.253 - */
83.254 -typedef void (*PurpleRequestActionCb)(void *, int);
83.255 -typedef void (*PurpleRequestChoiceCb)(void *, int);
83.256 -typedef void (*PurpleRequestFieldsCb)(void *, PurpleRequestFields *fields);
83.257 -typedef void (*PurpleRequestFileCb)(void *, const char *filename);
83.258 -
83.259 -#ifdef __cplusplus
83.260 -extern "C" {
83.261 -#endif
83.262 -
83.263 -/**************************************************************************/
83.264 -/** @name Field List API */
83.265 -/**************************************************************************/
83.266 -/*@{*/
83.267 -
83.268 -/**
83.269 - * Creates a list of fields to pass to purple_request_fields().
83.270 - *
83.271 - * @return A PurpleRequestFields structure.
83.272 - */
83.273 -PurpleRequestFields *purple_request_fields_new(void);
83.274 -
83.275 -/**
83.276 - * Destroys a list of fields.
83.277 - *
83.278 - * @param fields The list of fields to destroy.
83.279 - */
83.280 -void purple_request_fields_destroy(PurpleRequestFields *fields);
83.281 -
83.282 -/**
83.283 - * Adds a group of fields to the list.
83.284 - *
83.285 - * @param fields The fields list.
83.286 - * @param group The group to add.
83.287 - */
83.288 -void purple_request_fields_add_group(PurpleRequestFields *fields,
83.289 - PurpleRequestFieldGroup *group);
83.290 -
83.291 -/**
83.292 - * Returns a list of all groups in a field list.
83.293 - *
83.294 - * @param fields The fields list.
83.295 - *
83.296 - * @constreturn A list of groups.
83.297 - */
83.298 -GList *purple_request_fields_get_groups(const PurpleRequestFields *fields);
83.299 -
83.300 -/**
83.301 - * Returns whether or not the field with the specified ID exists.
83.302 - *
83.303 - * @param fields The fields list.
83.304 - * @param id The ID of the field.
83.305 - *
83.306 - * @return TRUE if the field exists, or FALSE.
83.307 - */
83.308 -gboolean purple_request_fields_exists(const PurpleRequestFields *fields,
83.309 - const char *id);
83.310 -
83.311 -/**
83.312 - * Returns a list of all required fields.
83.313 - *
83.314 - * @param fields The fields list.
83.315 - *
83.316 - * @constreturn The list of required fields.
83.317 - */
83.318 -GList *purple_request_fields_get_required(const PurpleRequestFields *fields);
83.319 -
83.320 -/**
83.321 - * Returns whether or not a field with the specified ID is required.
83.322 - *
83.323 - * @param fields The fields list.
83.324 - * @param id The field ID.
83.325 - *
83.326 - * @return TRUE if the specified field is required, or FALSE.
83.327 - */
83.328 -gboolean purple_request_fields_is_field_required(const PurpleRequestFields *fields,
83.329 - const char *id);
83.330 -
83.331 -/**
83.332 - * Returns whether or not all required fields have values.
83.333 - *
83.334 - * @param fields The fields list.
83.335 - *
83.336 - * @return TRUE if all required fields have values, or FALSE.
83.337 - */
83.338 -gboolean purple_request_fields_all_required_filled(
83.339 - const PurpleRequestFields *fields);
83.340 -
83.341 -/**
83.342 - * Return the field with the specified ID.
83.343 - *
83.344 - * @param fields The fields list.
83.345 - * @param id The ID of the field.
83.346 - *
83.347 - * @return The field, if found.
83.348 - */
83.349 -PurpleRequestField *purple_request_fields_get_field(
83.350 - const PurpleRequestFields *fields, const char *id);
83.351 -
83.352 -/**
83.353 - * Returns the string value of a field with the specified ID.
83.354 - *
83.355 - * @param fields The fields list.
83.356 - * @param id The ID of the field.
83.357 - *
83.358 - * @return The string value, if found, or @c NULL otherwise.
83.359 - */
83.360 -const char *purple_request_fields_get_string(const PurpleRequestFields *fields,
83.361 - const char *id);
83.362 -
83.363 -/**
83.364 - * Returns the integer value of a field with the specified ID.
83.365 - *
83.366 - * @param fields The fields list.
83.367 - * @param id The ID of the field.
83.368 - *
83.369 - * @return The integer value, if found, or 0 otherwise.
83.370 - */
83.371 -int purple_request_fields_get_integer(const PurpleRequestFields *fields,
83.372 - const char *id);
83.373 -
83.374 -/**
83.375 - * Returns the boolean value of a field with the specified ID.
83.376 - *
83.377 - * @param fields The fields list.
83.378 - * @param id The ID of the field.
83.379 - *
83.380 - * @return The boolean value, if found, or @c FALSE otherwise.
83.381 - */
83.382 -gboolean purple_request_fields_get_bool(const PurpleRequestFields *fields,
83.383 - const char *id);
83.384 -
83.385 -/**
83.386 - * Returns the choice index of a field with the specified ID.
83.387 - *
83.388 - * @param fields The fields list.
83.389 - * @param id The ID of the field.
83.390 - *
83.391 - * @return The choice index, if found, or -1 otherwise.
83.392 - */
83.393 -int purple_request_fields_get_choice(const PurpleRequestFields *fields,
83.394 - const char *id);
83.395 -
83.396 -/**
83.397 - * Returns the account of a field with the specified ID.
83.398 - *
83.399 - * @param fields The fields list.
83.400 - * @param id The ID of the field.
83.401 - *
83.402 - * @return The account value, if found, or NULL otherwise.
83.403 - */
83.404 -PurpleAccount *purple_request_fields_get_account(const PurpleRequestFields *fields,
83.405 - const char *id);
83.406 -
83.407 -/*@}*/
83.408 -
83.409 -/**************************************************************************/
83.410 -/** @name Fields Group API */
83.411 -/**************************************************************************/
83.412 -/*@{*/
83.413 -
83.414 -/**
83.415 - * Creates a fields group with an optional title.
83.416 - *
83.417 - * @param title The optional title to give the group.
83.418 - *
83.419 - * @return A new fields group
83.420 - */
83.421 -PurpleRequestFieldGroup *purple_request_field_group_new(const char *title);
83.422 -
83.423 -/**
83.424 - * Destroys a fields group.
83.425 - *
83.426 - * @param group The group to destroy.
83.427 - */
83.428 -void purple_request_field_group_destroy(PurpleRequestFieldGroup *group);
83.429 -
83.430 -/**
83.431 - * Adds a field to the group.
83.432 - *
83.433 - * @param group The group to add the field to.
83.434 - * @param field The field to add to the group.
83.435 - */
83.436 -void purple_request_field_group_add_field(PurpleRequestFieldGroup *group,
83.437 - PurpleRequestField *field);
83.438 -
83.439 -/**
83.440 - * Returns the title of a fields group.
83.441 - *
83.442 - * @param group The group.
83.443 - *
83.444 - * @return The title, if set.
83.445 - */
83.446 -const char *purple_request_field_group_get_title(
83.447 - const PurpleRequestFieldGroup *group);
83.448 -
83.449 -/**
83.450 - * Returns a list of all fields in a group.
83.451 - *
83.452 - * @param group The group.
83.453 - *
83.454 - * @constreturn The list of fields in the group.
83.455 - */
83.456 -GList *purple_request_field_group_get_fields(
83.457 - const PurpleRequestFieldGroup *group);
83.458 -
83.459 -/*@}*/
83.460 -
83.461 -/**************************************************************************/
83.462 -/** @name Field API */
83.463 -/**************************************************************************/
83.464 -/*@{*/
83.465 -
83.466 -/**
83.467 - * Creates a field of the specified type.
83.468 - *
83.469 - * @param id The field ID.
83.470 - * @param text The text label of the field.
83.471 - * @param type The type of field.
83.472 - *
83.473 - * @return The new field.
83.474 - */
83.475 -PurpleRequestField *purple_request_field_new(const char *id, const char *text,
83.476 - PurpleRequestFieldType type);
83.477 -
83.478 -/**
83.479 - * Destroys a field.
83.480 - *
83.481 - * @param field The field to destroy.
83.482 - */
83.483 -void purple_request_field_destroy(PurpleRequestField *field);
83.484 -
83.485 -/**
83.486 - * Sets the label text of a field.
83.487 - *
83.488 - * @param field The field.
83.489 - * @param label The text label.
83.490 - */
83.491 -void purple_request_field_set_label(PurpleRequestField *field, const char *label);
83.492 -
83.493 -/**
83.494 - * Sets whether or not a field is visible.
83.495 - *
83.496 - * @param field The field.
83.497 - * @param visible TRUE if visible, or FALSE if not.
83.498 - */
83.499 -void purple_request_field_set_visible(PurpleRequestField *field, gboolean visible);
83.500 -
83.501 -/**
83.502 - * Sets the type hint for the field.
83.503 - *
83.504 - * This is optionally used by the UIs to provide such features as
83.505 - * auto-completion for type hints like "account" and "screenname".
83.506 - *
83.507 - * @param field The field.
83.508 - * @param type_hint The type hint.
83.509 - */
83.510 -void purple_request_field_set_type_hint(PurpleRequestField *field,
83.511 - const char *type_hint);
83.512 -
83.513 -/**
83.514 - * Sets whether or not a field is required.
83.515 - *
83.516 - * @param field The field.
83.517 - * @param required TRUE if required, or FALSE.
83.518 - */
83.519 -void purple_request_field_set_required(PurpleRequestField *field,
83.520 - gboolean required);
83.521 -
83.522 -/**
83.523 - * Returns the type of a field.
83.524 - *
83.525 - * @param field The field.
83.526 - *
83.527 - * @return The field's type.
83.528 - */
83.529 -PurpleRequestFieldType purple_request_field_get_type(const PurpleRequestField *field);
83.530 -
83.531 -/**
83.532 - * Returns the group for the field.
83.533 - *
83.534 - * @param field The field.
83.535 - *
83.536 - * @return The UI data.
83.537 - *
83.538 - * @since 2.6.0
83.539 - */
83.540 -PurpleRequestFieldGroup *purple_request_field_get_group(const PurpleRequestField *field);
83.541 -
83.542 -/**
83.543 - * Returns the ID of a field.
83.544 - *
83.545 - * @param field The field.
83.546 - *
83.547 - * @return The ID
83.548 - */
83.549 -const char *purple_request_field_get_id(const PurpleRequestField *field);
83.550 -
83.551 -/**
83.552 - * Returns the label text of a field.
83.553 - *
83.554 - * @param field The field.
83.555 - *
83.556 - * @return The label text.
83.557 - */
83.558 -const char *purple_request_field_get_label(const PurpleRequestField *field);
83.559 -
83.560 -/**
83.561 - * Returns whether or not a field is visible.
83.562 - *
83.563 - * @param field The field.
83.564 - *
83.565 - * @return TRUE if the field is visible. FALSE otherwise.
83.566 - */
83.567 -gboolean purple_request_field_is_visible(const PurpleRequestField *field);
83.568 -
83.569 -/**
83.570 - * Returns the field's type hint.
83.571 - *
83.572 - * @param field The field.
83.573 - *
83.574 - * @return The field's type hint.
83.575 - */
83.576 -const char *purple_request_field_get_type_hint(const PurpleRequestField *field);
83.577 -
83.578 -/**
83.579 - * Returns whether or not a field is required.
83.580 - *
83.581 - * @param field The field.
83.582 - *
83.583 - * @return TRUE if the field is required, or FALSE.
83.584 - */
83.585 -gboolean purple_request_field_is_required(const PurpleRequestField *field);
83.586 -
83.587 -/**
83.588 - * Returns the ui_data for a field.
83.589 - *
83.590 - * @param field The field.
83.591 - *
83.592 - * @return The UI data.
83.593 - *
83.594 - * @since 2.6.0
83.595 - */
83.596 -gpointer purple_request_field_get_ui_data(const PurpleRequestField *field);
83.597 -
83.598 -/**
83.599 - * Sets the ui_data for a field.
83.600 - *
83.601 - * @param field The field.
83.602 - * @param ui_data The UI data.
83.603 - *
83.604 - * @return The UI data.
83.605 - *
83.606 - * @since 2.6.0
83.607 - */
83.608 -void purple_request_field_set_ui_data(PurpleRequestField *field,
83.609 - gpointer ui_data);
83.610 -
83.611 -/*@}*/
83.612 -
83.613 -/**************************************************************************/
83.614 -/** @name String Field API */
83.615 -/**************************************************************************/
83.616 -/*@{*/
83.617 -
83.618 -/**
83.619 - * Creates a string request field.
83.620 - *
83.621 - * @param id The field ID.
83.622 - * @param text The text label of the field.
83.623 - * @param default_value The optional default value.
83.624 - * @param multiline Whether or not this should be a multiline string.
83.625 - *
83.626 - * @return The new field.
83.627 - */
83.628 -PurpleRequestField *purple_request_field_string_new(const char *id,
83.629 - const char *text,
83.630 - const char *default_value,
83.631 - gboolean multiline);
83.632 -
83.633 -/**
83.634 - * Sets the default value in a string field.
83.635 - *
83.636 - * @param field The field.
83.637 - * @param default_value The default value.
83.638 - */
83.639 -void purple_request_field_string_set_default_value(PurpleRequestField *field,
83.640 - const char *default_value);
83.641 -
83.642 -/**
83.643 - * Sets the value in a string field.
83.644 - *
83.645 - * @param field The field.
83.646 - * @param value The value.
83.647 - */
83.648 -void purple_request_field_string_set_value(PurpleRequestField *field,
83.649 - const char *value);
83.650 -
83.651 -/**
83.652 - * Sets whether or not a string field is masked
83.653 - * (commonly used for password fields).
83.654 - *
83.655 - * @param field The field.
83.656 - * @param masked The masked value.
83.657 - */
83.658 -void purple_request_field_string_set_masked(PurpleRequestField *field,
83.659 - gboolean masked);
83.660 -
83.661 -/**
83.662 - * Sets whether or not a string field is editable.
83.663 - *
83.664 - * @param field The field.
83.665 - * @param editable The editable value.
83.666 - */
83.667 -void purple_request_field_string_set_editable(PurpleRequestField *field,
83.668 - gboolean editable);
83.669 -
83.670 -/**
83.671 - * Returns the default value in a string field.
83.672 - *
83.673 - * @param field The field.
83.674 - *
83.675 - * @return The default value.
83.676 - */
83.677 -const char *purple_request_field_string_get_default_value(
83.678 - const PurpleRequestField *field);
83.679 -
83.680 -/**
83.681 - * Returns the user-entered value in a string field.
83.682 - *
83.683 - * @param field The field.
83.684 - *
83.685 - * @return The value.
83.686 - */
83.687 -const char *purple_request_field_string_get_value(const PurpleRequestField *field);
83.688 -
83.689 -/**
83.690 - * Returns whether or not a string field is multi-line.
83.691 - *
83.692 - * @param field The field.
83.693 - *
83.694 - * @return @c TRUE if the field is mulit-line, or @c FALSE otherwise.
83.695 - */
83.696 -gboolean purple_request_field_string_is_multiline(const PurpleRequestField *field);
83.697 -
83.698 -/**
83.699 - * Returns whether or not a string field is masked.
83.700 - *
83.701 - * @param field The field.
83.702 - *
83.703 - * @return @c TRUE if the field is masked, or @c FALSE otherwise.
83.704 - */
83.705 -gboolean purple_request_field_string_is_masked(const PurpleRequestField *field);
83.706 -
83.707 -/**
83.708 - * Returns whether or not a string field is editable.
83.709 - *
83.710 - * @param field The field.
83.711 - *
83.712 - * @return @c TRUE if the field is editable, or @c FALSE otherwise.
83.713 - */
83.714 -gboolean purple_request_field_string_is_editable(const PurpleRequestField *field);
83.715 -
83.716 -/*@}*/
83.717 -
83.718 -/**************************************************************************/
83.719 -/** @name Integer Field API */
83.720 -/**************************************************************************/
83.721 -/*@{*/
83.722 -
83.723 -/**
83.724 - * Creates an integer field.
83.725 - *
83.726 - * @param id The field ID.
83.727 - * @param text The text label of the field.
83.728 - * @param default_value The default value.
83.729 - *
83.730 - * @return The new field.
83.731 - */
83.732 -PurpleRequestField *purple_request_field_int_new(const char *id,
83.733 - const char *text,
83.734 - int default_value);
83.735 -
83.736 -/**
83.737 - * Sets the default value in an integer field.
83.738 - *
83.739 - * @param field The field.
83.740 - * @param default_value The default value.
83.741 - */
83.742 -void purple_request_field_int_set_default_value(PurpleRequestField *field,
83.743 - int default_value);
83.744 -
83.745 -/**
83.746 - * Sets the value in an integer field.
83.747 - *
83.748 - * @param field The field.
83.749 - * @param value The value.
83.750 - */
83.751 -void purple_request_field_int_set_value(PurpleRequestField *field, int value);
83.752 -
83.753 -/**
83.754 - * Returns the default value in an integer field.
83.755 - *
83.756 - * @param field The field.
83.757 - *
83.758 - * @return The default value.
83.759 - */
83.760 -int purple_request_field_int_get_default_value(const PurpleRequestField *field);
83.761 -
83.762 -/**
83.763 - * Returns the user-entered value in an integer field.
83.764 - *
83.765 - * @param field The field.
83.766 - *
83.767 - * @return The value.
83.768 - */
83.769 -int purple_request_field_int_get_value(const PurpleRequestField *field);
83.770 -
83.771 -/*@}*/
83.772 -
83.773 -/**************************************************************************/
83.774 -/** @name Boolean Field API */
83.775 -/**************************************************************************/
83.776 -/*@{*/
83.777 -
83.778 -/**
83.779 - * Creates a boolean field.
83.780 - *
83.781 - * This is often represented as a checkbox.
83.782 - *
83.783 - * @param id The field ID.
83.784 - * @param text The text label of the field.
83.785 - * @param default_value The default value.
83.786 - *
83.787 - * @return The new field.
83.788 - */
83.789 -PurpleRequestField *purple_request_field_bool_new(const char *id,
83.790 - const char *text,
83.791 - gboolean default_value);
83.792 -
83.793 -/**
83.794 - * Sets the default value in an boolean field.
83.795 - *
83.796 - * @param field The field.
83.797 - * @param default_value The default value.
83.798 - */
83.799 -void purple_request_field_bool_set_default_value(PurpleRequestField *field,
83.800 - gboolean default_value);
83.801 -
83.802 -/**
83.803 - * Sets the value in an boolean field.
83.804 - *
83.805 - * @param field The field.
83.806 - * @param value The value.
83.807 - */
83.808 -void purple_request_field_bool_set_value(PurpleRequestField *field,
83.809 - gboolean value);
83.810 -
83.811 -/**
83.812 - * Returns the default value in an boolean field.
83.813 - *
83.814 - * @param field The field.
83.815 - *
83.816 - * @return The default value.
83.817 - */
83.818 -gboolean purple_request_field_bool_get_default_value(
83.819 - const PurpleRequestField *field);
83.820 -
83.821 -/**
83.822 - * Returns the user-entered value in an boolean field.
83.823 - *
83.824 - * @param field The field.
83.825 - *
83.826 - * @return The value.
83.827 - */
83.828 -gboolean purple_request_field_bool_get_value(const PurpleRequestField *field);
83.829 -
83.830 -/*@}*/
83.831 -
83.832 -/**************************************************************************/
83.833 -/** @name Choice Field API */
83.834 -/**************************************************************************/
83.835 -/*@{*/
83.836 -
83.837 -/**
83.838 - * Creates a multiple choice field.
83.839 - *
83.840 - * This is often represented as a group of radio buttons.
83.841 - *
83.842 - * @param id The field ID.
83.843 - * @param text The optional label of the field.
83.844 - * @param default_value The default choice.
83.845 - *
83.846 - * @return The new field.
83.847 - */
83.848 -PurpleRequestField *purple_request_field_choice_new(const char *id,
83.849 - const char *text,
83.850 - int default_value);
83.851 -
83.852 -/**
83.853 - * Adds a choice to a multiple choice field.
83.854 - *
83.855 - * @param field The choice field.
83.856 - * @param label The choice label.
83.857 - */
83.858 -void purple_request_field_choice_add(PurpleRequestField *field,
83.859 - const char *label);
83.860 -
83.861 -/**
83.862 - * Sets the default value in an choice field.
83.863 - *
83.864 - * @param field The field.
83.865 - * @param default_value The default value.
83.866 - */
83.867 -void purple_request_field_choice_set_default_value(PurpleRequestField *field,
83.868 - int default_value);
83.869 -
83.870 -/**
83.871 - * Sets the value in an choice field.
83.872 - *
83.873 - * @param field The field.
83.874 - * @param value The value.
83.875 - */
83.876 -void purple_request_field_choice_set_value(PurpleRequestField *field, int value);
83.877 -
83.878 -/**
83.879 - * Returns the default value in an choice field.
83.880 - *
83.881 - * @param field The field.
83.882 - *
83.883 - * @return The default value.
83.884 - */
83.885 -int purple_request_field_choice_get_default_value(const PurpleRequestField *field);
83.886 -
83.887 -/**
83.888 - * Returns the user-entered value in an choice field.
83.889 - *
83.890 - * @param field The field.
83.891 - *
83.892 - * @return The value.
83.893 - */
83.894 -int purple_request_field_choice_get_value(const PurpleRequestField *field);
83.895 -
83.896 -/**
83.897 - * Returns a list of labels in a choice field.
83.898 - *
83.899 - * @param field The field.
83.900 - *
83.901 - * @constreturn The list of labels.
83.902 - */
83.903 -GList *purple_request_field_choice_get_labels(const PurpleRequestField *field);
83.904 -
83.905 -/*@}*/
83.906 -
83.907 -/**************************************************************************/
83.908 -/** @name List Field API */
83.909 -/**************************************************************************/
83.910 -/*@{*/
83.911 -
83.912 -/**
83.913 - * Creates a multiple list item field.
83.914 - *
83.915 - * @param id The field ID.
83.916 - * @param text The optional label of the field.
83.917 - *
83.918 - * @return The new field.
83.919 - */
83.920 -PurpleRequestField *purple_request_field_list_new(const char *id, const char *text);
83.921 -
83.922 -/**
83.923 - * Sets whether or not a list field allows multiple selection.
83.924 - *
83.925 - * @param field The list field.
83.926 - * @param multi_select TRUE if multiple selection is enabled,
83.927 - * or FALSE otherwise.
83.928 - */
83.929 -void purple_request_field_list_set_multi_select(PurpleRequestField *field,
83.930 - gboolean multi_select);
83.931 -
83.932 -/**
83.933 - * Returns whether or not a list field allows multiple selection.
83.934 - *
83.935 - * @param field The list field.
83.936 - *
83.937 - * @return TRUE if multiple selection is enabled, or FALSE otherwise.
83.938 - */
83.939 -gboolean purple_request_field_list_get_multi_select(
83.940 - const PurpleRequestField *field);
83.941 -
83.942 -/**
83.943 - * Returns the data for a particular item.
83.944 - *
83.945 - * @param field The list field.
83.946 - * @param text The item text.
83.947 - *
83.948 - * @return The data associated with the item.
83.949 - */
83.950 -void *purple_request_field_list_get_data(const PurpleRequestField *field,
83.951 - const char *text);
83.952 -
83.953 -/**
83.954 - * Adds an item to a list field.
83.955 - *
83.956 - * @param field The list field.
83.957 - * @param item The list item.
83.958 - * @param data The associated data.
83.959 - */
83.960 -void purple_request_field_list_add(PurpleRequestField *field,
83.961 - const char *item, void *data);
83.962 -
83.963 -/**
83.964 - * Adds a selected item to the list field.
83.965 - *
83.966 - * @param field The field.
83.967 - * @param item The item to add.
83.968 - */
83.969 -void purple_request_field_list_add_selected(PurpleRequestField *field,
83.970 - const char *item);
83.971 -
83.972 -/**
83.973 - * Clears the list of selected items in a list field.
83.974 - *
83.975 - * @param field The field.
83.976 - */
83.977 -void purple_request_field_list_clear_selected(PurpleRequestField *field);
83.978 -
83.979 -/**
83.980 - * Sets a list of selected items in a list field.
83.981 - *
83.982 - * @param field The field.
83.983 - * @param items The list of selected items, which is not modified or freed.
83.984 - */
83.985 -void purple_request_field_list_set_selected(PurpleRequestField *field,
83.986 - GList *items);
83.987 -
83.988 -/**
83.989 - * Returns whether or not a particular item is selected in a list field.
83.990 - *
83.991 - * @param field The field.
83.992 - * @param item The item.
83.993 - *
83.994 - * @return TRUE if the item is selected. FALSE otherwise.
83.995 - */
83.996 -gboolean purple_request_field_list_is_selected(const PurpleRequestField *field,
83.997 - const char *item);
83.998 -
83.999 -/**
83.1000 - * Returns a list of selected items in a list field.
83.1001 - *
83.1002 - * To retrieve the data for each item, use
83.1003 - * purple_request_field_list_get_data().
83.1004 - *
83.1005 - * @param field The field.
83.1006 - *
83.1007 - * @constreturn The list of selected items.
83.1008 - */
83.1009 -GList *purple_request_field_list_get_selected(
83.1010 - const PurpleRequestField *field);
83.1011 -
83.1012 -/**
83.1013 - * Returns a list of items in a list field.
83.1014 - *
83.1015 - * @param field The field.
83.1016 - *
83.1017 - * @constreturn The list of items.
83.1018 - */
83.1019 -GList *purple_request_field_list_get_items(const PurpleRequestField *field);
83.1020 -
83.1021 -/*@}*/
83.1022 -
83.1023 -/**************************************************************************/
83.1024 -/** @name Label Field API */
83.1025 -/**************************************************************************/
83.1026 -/*@{*/
83.1027 -
83.1028 -/**
83.1029 - * Creates a label field.
83.1030 - *
83.1031 - * @param id The field ID.
83.1032 - * @param text The label of the field.
83.1033 - *
83.1034 - * @return The new field.
83.1035 - */
83.1036 -PurpleRequestField *purple_request_field_label_new(const char *id,
83.1037 - const char *text);
83.1038 -
83.1039 -/*@}*/
83.1040 -
83.1041 -/**************************************************************************/
83.1042 -/** @name Image Field API */
83.1043 -/**************************************************************************/
83.1044 -/*@{*/
83.1045 -
83.1046 -/**
83.1047 - * Creates an image field.
83.1048 - *
83.1049 - * @param id The field ID.
83.1050 - * @param text The label of the field.
83.1051 - * @param buf The image data.
83.1052 - * @param size The size of the data in @a buffer.
83.1053 - *
83.1054 - * @return The new field.
83.1055 - */
83.1056 -PurpleRequestField *purple_request_field_image_new(const char *id, const char *text,
83.1057 - const char *buf, gsize size);
83.1058 -
83.1059 -/**
83.1060 - * Sets the scale factors of an image field.
83.1061 - *
83.1062 - * @param field The image field.
83.1063 - * @param x The x scale factor.
83.1064 - * @param y The y scale factor.
83.1065 - */
83.1066 -void purple_request_field_image_set_scale(PurpleRequestField *field, unsigned int x, unsigned int y);
83.1067 -
83.1068 -/**
83.1069 - * Returns pointer to the image.
83.1070 - *
83.1071 - * @param field The image field.
83.1072 - *
83.1073 - * @return Pointer to the image.
83.1074 - */
83.1075 -const char *purple_request_field_image_get_buffer(PurpleRequestField *field);
83.1076 -
83.1077 -/**
83.1078 - * Returns size (in bytes) of the image.
83.1079 - *
83.1080 - * @param field The image field.
83.1081 - *
83.1082 - * @return Size of the image.
83.1083 - */
83.1084 -gsize purple_request_field_image_get_size(PurpleRequestField *field);
83.1085 -
83.1086 -/**
83.1087 - * Returns X scale coefficient of the image.
83.1088 - *
83.1089 - * @param field The image field.
83.1090 - *
83.1091 - * @return X scale coefficient of the image.
83.1092 - */
83.1093 -unsigned int purple_request_field_image_get_scale_x(PurpleRequestField *field);
83.1094 -
83.1095 -/**
83.1096 - * Returns Y scale coefficient of the image.
83.1097 - *
83.1098 - * @param field The image field.
83.1099 - *
83.1100 - * @return Y scale coefficient of the image.
83.1101 - */
83.1102 -unsigned int purple_request_field_image_get_scale_y(PurpleRequestField *field);
83.1103 -
83.1104 -/*@}*/
83.1105 -
83.1106 -/**************************************************************************/
83.1107 -/** @name Account Field API */
83.1108 -/**************************************************************************/
83.1109 -/*@{*/
83.1110 -
83.1111 -/**
83.1112 - * Creates an account field.
83.1113 - *
83.1114 - * By default, this field will