Mercurial > pidgin.yaz
changeset 5944:158196b2db19
[gaim-migrate @ 6385]
Added #ifdef __cplusplus lines so that things will link right with C++.
Also added some doxygen comment blocks that didn't previously exist.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 23 Jun 2003 06:40:13 +0000 |
parents | a4f2aba0848d |
children | 2a18e7b5917e |
files | src/account.h src/accountopt.h src/blist.h src/connection.h src/conversation.h src/debug.h src/event.h src/ft.h src/log.h src/notify.h src/plugin.h src/pounce.h src/prefs.h src/privacy.h src/proxy.h src/prpl.h src/request.h src/server.h src/sound.h src/util.h |
diffstat | 20 files changed, 252 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/src/account.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/account.h Mon Jun 23 06:40:13 2003 +0000 @@ -63,6 +63,15 @@ int perm_deny; /**< The permit/deny setting. */ }; +#ifdef __cplusplus +extern "C" { +#endif + +/**************************************************************************/ +/** @name Account API */ +/**************************************************************************/ +/*@{*/ + /** * Creates a new account. * @@ -462,6 +471,13 @@ gboolean gaim_account_get_ui_bool(const GaimAccount *account, const char *ui, const char *name, gboolean default_value); +/*@}*/ + +/**************************************************************************/ +/** @name Accounts API */ +/**************************************************************************/ +/*@{*/ + /** * Loads the accounts. */ @@ -529,4 +545,10 @@ GaimAccount *gaim_accounts_find_with_prpl_id(const char *name, const char *protocol_id); +/*@}*/ + +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_ACCOUNTS_H_ */
--- a/src/accountopt.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/accountopt.h Mon Jun 23 06:40:13 2003 +0000 @@ -62,6 +62,10 @@ } GaimAccountUserSplit; +#ifdef __cplusplus +extern "C" { +#endif + /**************************************************************************/ /** @name Account Option API */ /**************************************************************************/ @@ -265,4 +269,8 @@ /*@}*/ +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_ACCOUNT_OPT_H_ */
--- a/src/blist.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/blist.h Mon Jun 23 06:40:13 2003 +0000 @@ -154,6 +154,10 @@ }; +#ifdef __cplusplus +extern "C" { +#endif + /**************************************************************************/ /** @name Buddy List API */ /**************************************************************************/ @@ -564,4 +568,8 @@ /*@}*/ +#ifdef __cplusplus +} +#endif + #endif /* _LIST_H_ */
--- a/src/connection.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/connection.h Mon Jun 23 06:40:13 2003 +0000 @@ -28,9 +28,6 @@ typedef struct _GaimConnection GaimConnection; -#include "account.h" -#include "plugin.h" - #define OPT_CONN_HTML 0x00000001 /* set this flag on a gc if you want serv_got_im to autoreply when away */ #define OPT_CONN_AUTO_RESP 0x00000002 @@ -43,6 +40,9 @@ } GaimConnectionState; +#include "account.h" +#include "plugin.h" + typedef struct { void (*connect_progress)(GaimConnection *gc, const char *text, @@ -86,6 +86,14 @@ gboolean wants_to_die; /**< Wants to Die state. */ }; +#ifdef __cplusplus +extern "C" { +#endif + +/**************************************************************************/ +/** @name Connection API */ +/**************************************************************************/ + /** * Creates a connection to the specified account. * @@ -198,6 +206,13 @@ */ void gaim_connection_error(GaimConnection *gc, const char *reason); +/*@}*/ + +/**************************************************************************/ +/** @name Connections API */ +/**************************************************************************/ +/*@{*/ + /** * Disconnects from all connections. */ @@ -217,6 +232,8 @@ */ GList *gaim_connections_get_connecting(void); +/*@}*/ + /**************************************************************************/ /** @name UI Operations API */ /**************************************************************************/ @@ -238,4 +255,8 @@ /*@}*/ +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_CONNECTION_H_ */
--- a/src/conversation.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/conversation.h Mon Jun 23 06:40:13 2003 +0000 @@ -28,10 +28,6 @@ /** Data Structures */ /**************************************************************************/ -typedef enum _GaimConversationType GaimConversationType; -typedef enum _GaimUnseenState GaimUnseenState; -typedef enum _GaimConvUpdateType GaimConvUpdateType; -typedef enum _GaimTypingState GaimTypingState; typedef struct _GaimWindowUiOps GaimWindowUiOps; typedef struct _GaimWindow GaimWindow; typedef struct _GaimConversationUiOps GaimConversationUiOps; @@ -42,28 +38,30 @@ /** * A type of conversation. */ -enum _GaimConversationType +typedef enum { GAIM_CONV_UNKNOWN = 0, /**< Unknown conversation type. */ GAIM_CONV_IM, /**< Instant Message. */ GAIM_CONV_CHAT, /**< Chat room. */ GAIM_CONV_MISC /**< A misc. conversation. */ -}; + +} GaimConversationType; /** * Unseen text states. */ -enum _GaimUnseenState +typedef enum { GAIM_UNSEEN_NONE = 0, /**< No unseen text in the conversation. */ GAIM_UNSEEN_TEXT, /**< Unseen text in the conversation. */ GAIM_UNSEEN_NICK, /**< Unseen text and the nick was said. */ -}; + +} GaimUnseenState; /** * Conversation update type. */ -enum _GaimConvUpdateType +typedef enum { GAIM_CONV_UPDATE_ADD = 0, /**< The buddy associated with the conversation was added. */ @@ -83,23 +81,23 @@ GAIM_CONV_ACCOUNT_ONLINE, /**< One of the user's accounts went online. */ GAIM_CONV_ACCOUNT_OFFLINE, /**< One of the user's accounts went offline. */ GAIM_CONV_UPDATE_AWAY /**< The other user went away. */ -}; + +} GaimConvUpdateType; /** * The typing state of a user. */ -enum _GaimTypingState +typedef enum { GAIM_NOT_TYPING = 0, /**< Not typing. */ GAIM_TYPING, /**< Currently typing. */ GAIM_TYPED /**< Stopped typing momentarily. */ -}; +} GaimTypingState; #include "account.h" #include "server.h" - /** * Conversation window operations. * @@ -238,6 +236,10 @@ typedef void (*GaimConvPlacementFunc)(GaimConversation *); +#ifdef __cplusplus +extern "C" { +#endif + /**************************************************************************/ /** @name Conversation Window API */ /**************************************************************************/ @@ -1178,4 +1180,8 @@ /*@}*/ +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_CONVERSATION_H_ */
--- a/src/debug.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/debug.h Mon Jun 23 06:40:13 2003 +0000 @@ -49,6 +49,13 @@ } GaimDebugUiOps; +#ifdef __cplusplus +extern "C" { +#endif + +/**************************************************************************/ +/** @name Debug API */ +/**************************************************************************/ /** * Outputs debug information. * @@ -86,6 +93,13 @@ */ void debug_printf(const char *fmt, ...); +/*@}*/ + +/**************************************************************************/ +/** @name UI Registration Functions */ +/**************************************************************************/ +/*@{*/ + /** * Sets the UI operations structure to be used when outputting debug * information. @@ -102,4 +116,10 @@ */ GaimDebugUiOps *gaim_get_debug_ui_ops(void); +/*@}*/ + +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_DEBUG_H_ */
--- a/src/event.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/event.h Mon Jun 23 06:40:13 2003 +0000 @@ -69,6 +69,14 @@ typedef int (*GaimSignalBroadcastFunc)(GaimEvent event, void *data, va_list args); + +#ifdef __cplusplus +extern "C" { +#endif + +/**************************************************************************/ +/** @name Signal API */ +/**************************************************************************/ /** * Connects a signal handler to a gaim event. * @@ -143,4 +151,10 @@ */ const char *gaim_event_get_name(GaimEvent event); +/*@}*/ + +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_EVENT_H_ */
--- a/src/ft.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/ft.h Mon Jun 23 06:40:13 2003 +0000 @@ -112,6 +112,10 @@ void *data; /**< prpl-specific data. */ }; +#ifdef __cplusplus +extern "C" { +#endif + /**************************************************************************/ /** @name File Transfer API */ /**************************************************************************/ @@ -488,4 +492,8 @@ /*@}*/ +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_FT_H_ */
--- a/src/log.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/log.h Mon Jun 23 06:40:13 2003 +0000 @@ -50,6 +50,10 @@ struct log_conversation *next; }; +#ifdef __cplusplus +extern "C" { +#endif + extern GList *log_conversations; FILE *open_log_file (const char *, int); @@ -59,4 +63,8 @@ void update_log_convs(); char *html_logize(const char *p); +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_LOG_H_ */
--- a/src/notify.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/notify.h Mon Jun 23 06:40:13 2003 +0000 @@ -69,6 +69,11 @@ } GaimNotifyUiOps; + +#ifdef __cplusplus +extern "C" { +#endif + /**************************************************************************/ /** @name Notification API */ /**************************************************************************/ @@ -195,6 +200,11 @@ * @param ops The UI operations structure. */ GaimNotifyUiOps *gaim_get_notify_ui_ops(void); + /*@}*/ +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_NOTIFY_H_ */
--- a/src/plugin.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/plugin.h Mon Jun 23 06:40:13 2003 +0000 @@ -22,29 +22,28 @@ */ #ifndef _GAIM_PLUGIN_H_ #define _GAIM_PLUGIN_H_ + #include <gmodule.h> -typedef enum _GaimPluginType GaimPluginType; /**< GaimPluginType */ typedef struct _GaimPlugin GaimPlugin; /**< GaimPlugin */ typedef struct _GaimPluginInfo GaimPluginInfo; /**< GaimPluginInfo */ typedef struct _GaimPluginLoaderInfo GaimPluginLoaderInfo; typedef int GaimPluginPriority; /**< Plugin priority. */ -/* XXX */ -#include "config.h" #include "event.h" /** * Plugin types. */ -enum _GaimPluginType +typedef enum { GAIM_PLUGIN_UNKNOWN = -1, /**< Unknown type. */ GAIM_PLUGIN_STANDARD = 0, /**< Standard plugin. */ GAIM_PLUGIN_LOADER, /**< Loader plugin. */ GAIM_PLUGIN_PROTOCOL /**< Protocol plugin. */ -}; + +} GaimPluginType; #define GAIM_PRIORITY_DEFAULT 0 #define GAIM_PRIORITY_HIGHEST 9999 @@ -134,8 +133,12 @@ } #endif +#ifdef __cplusplus +extern "C" { +#endif + /**************************************************************************/ -/** @name Plugin namespace */ +/** @name Plugin API */ /**************************************************************************/ /*@{*/ @@ -226,7 +229,7 @@ /*@}*/ /**************************************************************************/ -/** @name Plugins namespace */ +/** @name Plugins API */ /**************************************************************************/ /*@{*/ @@ -368,4 +371,8 @@ /*@}*/ +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_PLUGIN_H_ */
--- a/src/pounce.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/pounce.h Mon Jun 23 06:40:13 2003 +0000 @@ -72,6 +72,15 @@ void *data; /**< Pounce-specific data. */ }; +#ifdef __cplusplus +extern "C" { +#endif + +/**************************************************************************/ +/** @name Buddy Pounce API */ +/**************************************************************************/ +/*@{*/ + /** * Creates a new buddy pounce. * @@ -243,6 +252,13 @@ void gaim_pounce_execute(const GaimAccount *pouncer, const char *pouncee, GaimPounceEvent events); +/*@}*/ + +/**************************************************************************/ +/** @name Buddy Pounces API */ +/**************************************************************************/ +/*@{*/ + /** * Finds a pounce with the specified event(s) and buddy. * @@ -263,6 +279,8 @@ /** * Loads the pounces. + * + * @return @c TRUE if the pounces could be loaded. */ gboolean gaim_pounces_load(void); @@ -297,4 +315,10 @@ */ GList *gaim_pounces_get_all(void); +/*@}*/ + +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_POUNCE_H_ */
--- a/src/prefs.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/prefs.h Mon Jun 23 06:40:13 2003 +0000 @@ -36,6 +36,7 @@ GAIM_PREF_INT, GAIM_PREF_STRING, GAIM_PREF_STRING_LIST + } GaimPrefType; /** @@ -45,6 +46,10 @@ typedef void (*GaimPrefCallback) (const char *name, GaimPrefType type, gpointer val, gpointer data); +#ifdef __cplusplus +extern "C" { +#endif + /**************************************************************************/ /** @name Prefs API */ /**************************************************************************/ @@ -206,4 +211,8 @@ /*@}*/ +#ifdef __cplusplus +} +#endif + #endif /* _PREFS_H_ */
--- a/src/privacy.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/privacy.h Mon Jun 23 06:40:13 2003 +0000 @@ -18,8 +18,20 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ +#ifndef _GAIM_PRIVACY_H_ +#define _GAIM_PRIVACY_H_ + +#ifdef __cplusplus +extern "C" { +#endif gboolean gaim_privacy_permit_add(GaimAccount *account, const char *name); gboolean gaim_privacy_deny_add(GaimAccount *account, const char *name); gboolean gaim_privacy_deny_remove(GaimAccount *account, const char *name); gboolean gaim_privacy_permit_remove(GaimAccount *account, const char *name); + +#ifdef __cplusplus +} +#endif + +#endif /* _GAIM_PRIVACY_H_ */
--- a/src/proxy.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/proxy.h Mon Jun 23 06:40:13 2003 +0000 @@ -68,6 +68,10 @@ #include "account.h" +#ifdef __cplusplus +extern "C" { +#endif + /**************************************************************************/ /** @name Proxy structure API */ /**************************************************************************/ @@ -249,4 +253,8 @@ /*@}*/ +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_PROXY_H_ */
--- a/src/prpl.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/prpl.h Mon Jun 23 06:40:13 2003 +0000 @@ -304,6 +304,11 @@ #define GAIM_PLUGIN_PROTOCOL_INFO(plugin) \ ((GaimPluginProtocolInfo *)(plugin)->info->extra_info) + +#ifdef __cplusplus +extern "C" { +#endif + /** * Returns the plugin ID for a protocol number. * @@ -363,4 +368,8 @@ */ void *get_icon_data(GaimConnection *gc, const char *who, int *len); +#ifdef __cplusplus +} +#endif + #endif /* _PRPL_H_ */
--- a/src/request.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/request.h Mon Jun 23 06:40:13 2003 +0000 @@ -160,6 +160,10 @@ typedef void (*GaimRequestActionCb)(void *, int); typedef void (*GaimRequestFieldsCb)(void *, GaimRequestFields *fields); +#ifdef __cplusplus +extern "C" { +#endif + /**************************************************************************/ /** @name Field List API */ /**************************************************************************/ @@ -841,4 +845,8 @@ /*@}*/ +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_REQUEST_H_ */
--- a/src/server.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/server.h Mon Jun 23 06:40:13 2003 +0000 @@ -46,6 +46,10 @@ #include "account.h" #include "conversation.h" +#ifdef __cplusplus +extern "C" { +#endif + void serv_login(GaimAccount *); void serv_close(GaimConnection *); void serv_touch_idle(GaimConnection *); @@ -104,4 +108,8 @@ void serv_got_chat_in(GaimConnection *g, int id, char *who, int whisper, char *message, time_t mtime); +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_SERVER_H_ */
--- a/src/sound.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/sound.h Mon Jun 23 06:40:13 2003 +0000 @@ -46,6 +46,7 @@ GAIM_SOUND_POUNCE_DEFAULT, /**< Default sound for a buddy pounce. */ GAIM_SOUND_CHAT_NICK, /**< Someone says your name in a chat. */ GAIM_NUM_SOUNDS /**< Total number of sounds. */ + } GaimSoundEventID; typedef struct _GaimSoundUiOps @@ -57,6 +58,10 @@ } GaimSoundUiOps; +#ifdef __cplusplus +extern "C" { +#endif + /**************************************************************************/ /** @name Sound API */ /**************************************************************************/ @@ -102,4 +107,8 @@ /*@}*/ +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_SOUND_H_ */
--- a/src/util.h Mon Jun 23 02:00:15 2003 +0000 +++ b/src/util.h Mon Jun 23 06:40:13 2003 +0000 @@ -28,6 +28,10 @@ #include "account.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * Normalizes a string, so that it is suitable for comparison. * @@ -299,10 +303,15 @@ const gchar *replacement); /** - * Returns a string representing a filesize in the appropriate units (MB, KB, GB, etc.) + * Returns a string representing a filesize in the appropriate + * units (MB, KB, GB, etc.) * * @param size The size */ char *gaim_get_size_string(size_t size); +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_UTIL_H_ */