changeset 32433:98520ee78f12

Use G_BEGIN/END_DECLS in public libpurple files. This was previously inconsistent. Sometimes there was even both the GLib macros and an extern "C" line.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Tue, 03 Jan 2012 23:32:59 +0000
parents 79fdae8fa875
children 6ef08ec013d2
files libpurple/account.h libpurple/accountopt.h libpurple/blist.h libpurple/buddyicon.h libpurple/certificate.h libpurple/circbuffer.h libpurple/cmds.h libpurple/connection.h libpurple/conversation.h libpurple/core.h libpurple/dbus-bindings.h libpurple/dbus-useful.h libpurple/debug.h libpurple/dnsquery.h libpurple/dnssrv.h libpurple/eventloop.h libpurple/ft.h libpurple/idle.h libpurple/imgstore.h libpurple/log.h libpurple/media-gst.h libpurple/media.h libpurple/mediamanager.h libpurple/mime.h libpurple/nat-pmp.h libpurple/network.h libpurple/notify.h libpurple/ntlm.h libpurple/plugin.h libpurple/pluginpref.h libpurple/pounce.h libpurple/prefs.h libpurple/privacy.h libpurple/proxy.h libpurple/prpl.h libpurple/request.h libpurple/roomlist.h libpurple/savedstatuses.h libpurple/server.h libpurple/signals.h libpurple/smiley.h libpurple/sound.h libpurple/sslconn.h libpurple/status.h libpurple/stringref.h libpurple/stun.h libpurple/upnp.h libpurple/util.h libpurple/value.h libpurple/whiteboard.h libpurple/xmlnode.h
diffstat 51 files changed, 121 insertions(+), 322 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/account.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/account.h	Tue Jan 03 23:32:59 2012 +0000
@@ -171,9 +171,7 @@
 	PurpleConnectionErrorInfo *current_error;	/**< Errors */
 };
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Account API                                                     */
@@ -1191,8 +1189,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_ACCOUNT_H_ */
--- a/libpurple/accountopt.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/accountopt.h	Tue Jan 03 23:32:59 2012 +0000
@@ -37,10 +37,7 @@
 /** @copydoc _PurpleAccountUserSplit */
 typedef struct _PurpleAccountUserSplit	PurpleAccountUserSplit;
 
-
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Account Option API                                              */
@@ -353,8 +350,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_ACCOUNTOPT_H_ */
--- a/libpurple/blist.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/blist.h	Tue Jan 03 23:32:59 2012 +0000
@@ -244,9 +244,7 @@
 	void (*_purple_reserved1)(void);
 };
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Buddy List API                                                  */
@@ -1202,8 +1200,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_BLIST_H_ */
--- a/libpurple/buddyicon.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/buddyicon.h	Tue Jan 03 23:32:59 2012 +0000
@@ -39,10 +39,7 @@
 #include "prpl.h"
 #include "util.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Buddy Icon API                                                  */
@@ -397,8 +394,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_BUDDYICON_H_ */
--- a/libpurple/certificate.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/certificate.h	Tue Jan 03 23:32:59 2012 +0000
@@ -34,11 +34,6 @@
 
 #include <glib.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
 typedef enum
 {
 	PURPLE_CERTIFICATE_INVALID = 0,
@@ -357,6 +352,8 @@
 	gpointer cb_data;
 };
 
+G_BEGIN_DECLS
+
 /*****************************************************************************/
 /** @name Certificate Verification Functions                                 */
 /*****************************************************************************/
@@ -833,8 +830,6 @@
  */
 void purple_certificate_add_ca_search_path(const char *path);
 
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
 
 #endif /* _PURPLE_CERTIFICATE_H */
--- a/libpurple/circbuffer.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/circbuffer.h	Tue Jan 03 23:32:59 2012 +0000
@@ -26,10 +26,6 @@
 
 #include <glib.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct _PurpleCircBuffer {
 
 	/** A pointer to the starting address of our chunk of memory. */
@@ -55,6 +51,8 @@
 
 } PurpleCircBuffer;
 
+G_BEGIN_DECLS
+
 /**
  * Creates a new circular buffer.  This will not allocate any memory for the
  * actual buffer until data is appended to it.
@@ -111,8 +109,6 @@
  */
 gboolean purple_circ_buffer_mark_read(PurpleCircBuffer *buf, gsize len);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _CIRCBUFFER_H */
--- a/libpurple/cmds.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/cmds.h	Tue Jan 03 23:32:59 2012 +0000
@@ -99,9 +99,7 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Commands API                                                    */
@@ -240,8 +238,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_CMDS_H_ */
--- a/libpurple/connection.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/connection.h	Tue Jan 03 23:32:59 2012 +0000
@@ -258,9 +258,7 @@
 					  prpl to avoid sending unneeded keepalives */
 };
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Connection API                                                  */
@@ -543,8 +541,6 @@
 /*@}*/
 
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_CONNECTION_H_ */
--- a/libpurple/conversation.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/conversation.h	Tue Jan 03 23:32:59 2012 +0000
@@ -249,9 +249,7 @@
 	void (*_purple_reserved4)(void);
 };
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Conversation API                                                */
@@ -1402,8 +1400,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_CONVERSATION_H_ */
--- a/libpurple/core.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/core.h	Tue Jan 03 23:32:59 2012 +0000
@@ -76,9 +76,7 @@
 	void (*_purple_reserved3)(void);
 } PurpleCoreUiOps;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**
  * Initializes the core of purple.
@@ -197,9 +195,7 @@
  */
 GHashTable* purple_core_get_ui_info(void);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_CORE_H_ */
 
--- a/libpurple/dbus-bindings.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/dbus-bindings.h	Tue Jan 03 23:32:59 2012 +0000
@@ -32,9 +32,7 @@
 #include <dbus/dbus-glib-lowlevel.h>
 #include <glib.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 gint purple_dbus_pointer_to_id(gconstpointer node);
 gpointer purple_dbus_id_to_pointer(gint id, PurpleDBusType *type);
@@ -103,8 +101,6 @@
 
 DBusConnection *purple_dbus_get_connection(void);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif
--- a/libpurple/dbus-useful.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/dbus-useful.h	Tue Jan 03 23:32:59 2012 +0000
@@ -1,5 +1,7 @@
 #include "conversation.h"
 
+G_BEGIN_DECLS
+
 PurpleAccount *purple_accounts_find_ext(const char *name, const char *protocol_id,
 				    gboolean (*account_test)(const PurpleAccount *account));
 
@@ -7,7 +9,5 @@
 
 PurpleAccount *purple_accounts_find_connected(const char *name, const char *protocol);
 
-
+G_END_DECLS
 
-
-
--- a/libpurple/debug.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/debug.h	Tue Jan 03 23:32:59 2012 +0000
@@ -59,9 +59,7 @@
 	void (*_purple_reserved4)(void);
 } PurpleDebugUiOps;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Debug API                                                       */
@@ -228,8 +226,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_DEBUG_H_ */
--- a/libpurple/dnsquery.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/dnsquery.h	Tue Jan 03 23:32:59 2012 +0000
@@ -76,9 +76,7 @@
 	void (*_purple_reserved4)(void);
 } PurpleDnsQueryUiOps;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name DNS query API                                                   */
@@ -154,8 +152,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_DNSQUERY_H_ */
--- a/libpurple/dnssrv.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/dnssrv.h	Tue Jan 03 23:32:59 2012 +0000
@@ -24,10 +24,6 @@
 #ifndef _PURPLE_DNSSRV_H
 #define _PURPLE_DNSSRV_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct _PurpleSrvTxtQueryData PurpleSrvTxtQueryData;
 typedef struct _PurpleSrvResponse PurpleSrvResponse;
 typedef struct _PurpleTxtResponse PurpleTxtResponse;
@@ -96,6 +92,8 @@
  */
 typedef void (*PurpleTxtCallback)(GList *responses, gpointer data);
 
+G_BEGIN_DECLS
+
 /**
  * Queries an SRV record.
  *
@@ -184,9 +182,7 @@
  */
 int purple_srv_txt_query_get_type(PurpleSrvTxtQueryData *query_data);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_DNSSRV_H */
 
--- a/libpurple/eventloop.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/eventloop.h	Tue Jan 03 23:32:59 2012 +0000
@@ -28,10 +28,6 @@
 
 #include <glib.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * An input condition.
  */
@@ -154,6 +150,8 @@
 	void (*_purple_reserved4)(void);
 };
 
+G_BEGIN_DECLS
+
 /**************************************************************************/
 /** @name Event Loop API                                                  */
 /**************************************************************************/
@@ -266,8 +264,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_EVENTLOOP_H_ */
--- a/libpurple/ft.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/ft.h	Tue Jan 03 23:32:59 2012 +0000
@@ -184,9 +184,7 @@
 	void *proto_data;                 /**< prpl-specific data.     */
 };
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name File Transfer API                                               */
@@ -843,9 +841,7 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_FT_H_ */
 
--- a/libpurple/idle.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/idle.h	Tue Jan 03 23:32:59 2012 +0000
@@ -41,9 +41,7 @@
 	void (*_purple_reserved4)(void);
 } PurpleIdleUiOps;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Idle API                                                        */
@@ -97,8 +95,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_IDLE_H_ */
--- a/libpurple/imgstore.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/imgstore.h	Tue Jan 03 23:32:59 2012 +0000
@@ -34,9 +34,7 @@
  */
 typedef struct _PurpleStoredImage PurpleStoredImage;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**
  * Add an image to the store.
@@ -206,8 +204,6 @@
  */
 void purple_imgstore_uninit(void);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_IMGSTORE_H_ */
--- a/libpurple/log.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/log.h	Tue Jan 03 23:32:59 2012 +0000
@@ -181,9 +181,7 @@
 	 * IMPORTANT: Update that code if you add members here. */
 };
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /***************************************/
 /** @name Log Functions                */
@@ -574,8 +572,6 @@
 /*@}*/
 
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_LOG_H_ */
--- a/libpurple/media-gst.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/media-gst.h	Tue Jan 03 23:32:59 2012 +0000
@@ -32,8 +32,6 @@
 
 #include <gst/gst.h>
 
-G_BEGIN_DECLS
-
 #define PURPLE_TYPE_MEDIA_ELEMENT_TYPE           (purple_media_element_type_get_type())
 #define PURPLE_TYPE_MEDIA_ELEMENT_INFO           (purple_media_element_info_get_type())
 #define PURPLE_MEDIA_ELEMENT_INFO(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_ELEMENT_INFO, PurpleMediaElementInfo))
@@ -73,9 +71,7 @@
 	PURPLE_MEDIA_ELEMENT_SINK = 1 << 10,		/** can be set as an active sink */
 } PurpleMediaElementType;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**
  * Gets the element type's GType.
@@ -176,10 +172,6 @@
 		PurpleMediaElementInfo *info, PurpleMedia *media,
 		const gchar *session_id, const gchar *participant);
 
-#ifdef __cplusplus
-}
-#endif
-
 G_END_DECLS
 
 #endif  /* _PURPLE_MEDIA_GST_H_ */
--- a/libpurple/media.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/media.h	Tue Jan 03 23:32:59 2012 +0000
@@ -27,15 +27,13 @@
 #ifndef _PURPLE_MEDIA_H_
 #define _PURPLE_MEDIA_H_
 
+#include <glib.h>
+#include <glib-object.h>
+
 #include "media/candidate.h"
 #include "media/codec.h"
 #include "media/enum-types.h"
 
-#include <glib.h>
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
 #define PURPLE_TYPE_MEDIA            (purple_media_get_type())
 #define PURPLE_MEDIA(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA, PurpleMedia))
 #define PURPLE_MEDIA_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA, PurpleMediaClass))
@@ -49,9 +47,7 @@
 #include "signals.h"
 #include "util.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**
  * Gets the media class's GType
@@ -379,10 +375,6 @@
  */
 void purple_media_remove_output_windows(PurpleMedia *media);
 
-#ifdef __cplusplus
-}
-#endif
-
 G_END_DECLS
 
 #endif  /* _PURPLE_MEDIA_H_ */
--- a/libpurple/mediamanager.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/mediamanager.h	Tue Jan 03 23:32:59 2012 +0000
@@ -38,8 +38,6 @@
 #include "account.h"
 #include "media.h"
 
-G_BEGIN_DECLS
-
 #define PURPLE_TYPE_MEDIA_MANAGER            (purple_media_manager_get_type())
 #define PURPLE_MEDIA_MANAGER(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManager))
 #define PURPLE_MEDIA_MANAGER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManagerClass))
@@ -47,9 +45,7 @@
 #define PURPLE_IS_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_MANAGER))
 #define PURPLE_MEDIA_MANAGER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManagerClass))
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Media Manager API                                              */
@@ -209,10 +205,6 @@
 
 /*}@*/
 
-#ifdef __cplusplus
-}
-#endif
-
 G_END_DECLS
 
 #endif  /* _PURPLE_MEDIA_MANAGER_H_ */
--- a/libpurple/mime.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/mime.h	Tue Jan 03 23:32:59 2012 +0000
@@ -26,10 +26,6 @@
 
 #include <glib.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * @file mime.h
  * @ingroup core
@@ -48,6 +44,8 @@
  */
 typedef struct _PurpleMimePart PurpleMimePart;
 
+G_BEGIN_DECLS
+
 /**
  * Allocate an empty MIME document.
  */
@@ -211,8 +209,6 @@
 
 void purple_mime_part_set_data(PurpleMimePart *part, const char *data);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif
--- a/libpurple/nat-pmp.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/nat-pmp.h	Tue Jan 03 23:32:59 2012 +0000
@@ -41,6 +41,8 @@
 	PURPLE_PMP_TYPE_TCP
 } PurplePmpType;
 
+G_BEGIN_DECLS
+
 /**
  * Initialize nat-pmp
  */
@@ -73,5 +75,7 @@
  */
 gboolean purple_pmp_destroy_map(PurplePmpType type, unsigned short privateport);
 
+G_END_DECLS
+
 #endif
 
--- a/libpurple/network.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/network.h	Tue Jan 03 23:32:59 2012 +0000
@@ -26,9 +26,9 @@
 #ifndef _PURPLE_NETWORK_H_
 #define _PURPLE_NETWORK_H_
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <glib.h>
+
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Network API                                                     */
@@ -316,8 +316,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_NETWORK_H_ */
--- a/libpurple/notify.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/notify.h	Tue Jan 03 23:32:59 2012 +0000
@@ -175,9 +175,7 @@
 } PurpleNotifyUiOps;
 
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 
 /**************************************************************************/
@@ -734,8 +732,6 @@
 /*@}*/
 
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_NOTIFY_H_ */
--- a/libpurple/ntlm.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/ntlm.h	Tue Jan 03 23:32:59 2012 +0000
@@ -27,9 +27,7 @@
 #ifndef _PURPLE_NTLM_H
 #define _PURPLE_NTLM_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**
  * Generates the base64 encoded type 1 message needed for NTLM authentication
@@ -66,8 +64,6 @@
  */
 gchar *purple_ntlm_gen_type3(const gchar *username, const gchar *passw, const gchar *hostname, const gchar *domain, const guint8 *nonce, guint32 *flags);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_NTLM_H */
--- a/libpurple/plugin.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/plugin.h	Tue Jan 03 23:32:59 2012 +0000
@@ -239,9 +239,7 @@
 #endif
 
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Plugin API                                                      */
@@ -663,8 +661,6 @@
  */
 void purple_plugin_action_free(PurplePluginAction *action);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_PLUGIN_H_ */
--- a/libpurple/pluginpref.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/pluginpref.h	Tue Jan 03 23:32:59 2012 +0000
@@ -50,9 +50,7 @@
 #include <glib.h>
 #include "prefs.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Plugin Preference API                                           */
@@ -262,8 +260,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_PLUGINPREF_H_ */
--- a/libpurple/pounce.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/pounce.h	Tue Jan 03 23:32:59 2012 +0000
@@ -59,9 +59,7 @@
 /** A pounce callback. */
 typedef void (*PurplePounceCb)(PurplePounce *, PurplePounceEvent, void *);
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Buddy Pounce API                                                */
@@ -354,8 +352,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_POUNCE_H_ */
--- a/libpurple/prefs.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/prefs.h	Tue Jan 03 23:32:59 2012 +0000
@@ -62,9 +62,7 @@
 typedef void (*PurplePrefCallback) (const char *name, PurplePrefType type,
 		gconstpointer val, gpointer data);
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Prefs API
@@ -362,8 +360,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_PREFS_H_ */
--- a/libpurple/privacy.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/privacy.h	Tue Jan 03 23:32:59 2012 +0000
@@ -40,10 +40,6 @@
 
 #include "account.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Privacy core/UI operations.
  */
@@ -60,6 +56,8 @@
 	void (*_purple_reserved4)(void);
 } PurplePrivacyUiOps;
 
+G_BEGIN_DECLS
+
 /**
  * Adds a user to the account's permit list.
  *
@@ -187,8 +185,6 @@
  */
 void purple_privacy_init(void);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_PRIVACY_H_ */
--- a/libpurple/proxy.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/proxy.h	Tue Jan 03 23:32:59 2012 +0000
@@ -56,9 +56,7 @@
 
 #include "account.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Proxy structure API                                             */
@@ -326,8 +324,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_PROXY_H_ */
--- a/libpurple/prpl.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/prpl.h	Tue Jan 03 23:32:59 2012 +0000
@@ -621,9 +621,7 @@
 #define PURPLE_PLUGIN_PROTOCOL_INFO(plugin) \
 	((PurplePluginProtocolInfo *)(plugin)->info->extra_info)
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Attention Type API                                              */
@@ -951,8 +949,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PRPL_H_ */
--- a/libpurple/request.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/request.h	Tue Jan 03 23:32:59 2012 +0000
@@ -158,9 +158,7 @@
 typedef void (*PurpleRequestFieldsCb)(void *, PurpleRequestFields *fields);
 typedef void (*PurpleRequestFileCb)(void *, const char *filename);
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Field List API                                                  */
@@ -1527,8 +1525,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_REQUEST_H_ */
--- a/libpurple/roomlist.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/roomlist.h	Tue Jan 03 23:32:59 2012 +0000
@@ -81,9 +81,7 @@
 };
 
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Room List API                                                   */
@@ -412,8 +410,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_ROOMLIST_H_ */
--- a/libpurple/savedstatuses.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/savedstatuses.h	Tue Jan 03 23:32:59 2012 +0000
@@ -60,9 +60,7 @@
 
 #include "status.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Saved status subsystem                                          */
@@ -418,8 +416,7 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_SAVEDSTATUSES_H_ */
+
--- a/libpurple/server.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/server.h	Tue Jan 03 23:32:59 2012 +0000
@@ -30,9 +30,7 @@
 #include "conversation.h"
 #include "prpl.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**
  * Send a typing message to a given user over a given connection.
@@ -185,8 +183,7 @@
 					  PurpleMessageFlags flags, const char *message, time_t mtime);
 void serv_send_file(PurpleConnection *gc, const char *who, const char *file);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_SERVER_H_ */
+
--- a/libpurple/signals.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/signals.h	Tue Jan 03 23:32:59 2012 +0000
@@ -35,9 +35,7 @@
 typedef void (*PurpleSignalMarshalFunc)(PurpleCallback cb, va_list args,
 									  void *data, void **return_val);
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Signal API                                                      */
@@ -373,8 +371,7 @@
 		PurpleCallback cb, va_list args, void *data, void **return_val);
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_SIGNALS_H_ */
+
--- a/libpurple/smiley.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/smiley.h	Tue Jan 03 23:32:59 2012 +0000
@@ -50,9 +50,7 @@
 #define PURPLE_IS_SMILEY_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), PURPLE_TYPE_SMILEY))
 #define PURPLE_SMILEY_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), PURPLE_TYPE_SMILEY, PurpleSmileyClass))
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Custom Smiley API                                               */
@@ -253,9 +251,7 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_SMILEY_H_ */
 
--- a/libpurple/sound.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/sound.h	Tue Jan 03 23:32:59 2012 +0000
@@ -72,9 +72,7 @@
 	void (*_purple_reserved4)(void);
 } PurpleSoundUiOps;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name Sound API                                                       */
@@ -136,8 +134,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_SOUND_H_ */
--- a/libpurple/sslconn.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/sslconn.h	Tue Jan 03 23:32:59 2012 +0000
@@ -140,9 +140,7 @@
 	void (*_purple_reserved4)(void);
 } PurpleSslOps;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name SSL API                                                         */
@@ -311,8 +309,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_SSLCONN_H_ */
--- a/libpurple/status.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/status.h	Tue Jan 03 23:32:59 2012 +0000
@@ -148,9 +148,7 @@
 #define PURPLE_MOOD_NAME	"mood"
 #define PURPLE_MOOD_COMMENT	"moodtext"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name PurpleStatusPrimitive API                                       */
@@ -945,8 +943,7 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_STATUS_H_ */
+
--- a/libpurple/stringref.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/stringref.h	Tue Jan 03 23:32:59 2012 +0000
@@ -29,11 +29,9 @@
 #ifndef _PURPLE_STRINGREF_H_
 #define _PURPLE_STRINGREF_H_
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+typedef struct _PurpleStringref PurpleStringref;
 
-typedef struct _PurpleStringref PurpleStringref;
+G_BEGIN_DECLS
 
 /**
  * Creates an immutable reference-counted string object.  The newly
@@ -131,8 +129,6 @@
  */
 size_t purple_stringref_len(const PurpleStringref *stringref);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_STRINGREF_H_ */
--- a/libpurple/stun.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/stun.h	Tue Jan 03 23:32:59 2012 +0000
@@ -26,10 +26,6 @@
 #ifndef _PURPLE_STUN_H_
 #define _PURPLE_STUN_H_
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**************************************************************************/
 /** @name STUN API                                                        */
 /**************************************************************************/
@@ -63,6 +59,8 @@
 
 typedef void (*StunCallback) (PurpleStunNatDiscovery *);
 
+G_BEGIN_DECLS
+
 /**
  * Starts a NAT discovery. It returns a PurpleStunNatDiscovery if the discovery
  * is already done. Otherwise the callback is called when the discovery is over
@@ -81,8 +79,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_STUN_H_ */
--- a/libpurple/upnp.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/upnp.h	Tue Jan 03 23:32:59 2012 +0000
@@ -29,9 +29,7 @@
 
 typedef struct _UPnPMappingAddRemove UPnPMappingAddRemove;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**************************************************************************/
 /** @name UPnP API                                                        */
@@ -125,8 +123,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_UPNP_H_ */
--- a/libpurple/util.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/util.h	Tue Jan 03 23:32:59 2012 +0000
@@ -58,10 +58,6 @@
 #include "notify.h"
 
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef char *(*PurpleInfoFieldFormatCallback)(const char *field, size_t len);
 
 struct _PurpleKeyValuePair
@@ -71,6 +67,8 @@
 
 };
 
+G_BEGIN_DECLS
+
 /**
  * Creates a new PurpleMenuAction.
  *
@@ -1459,8 +1457,6 @@
  */
 gchar *purple_uuid_random(void);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_UTIL_H_ */
--- a/libpurple/value.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/value.h	Tue Jan 03 23:32:59 2012 +0000
@@ -88,9 +88,7 @@
  */
 typedef struct _PurpleValue PurpleValue;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+G_BEGIN_DECLS
 
 /**
  * Creates a new PurpleValue.
@@ -464,8 +462,6 @@
  */
 void *purple_value_get_boxed(const PurpleValue *value);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_VALUE_H_ */
--- a/libpurple/whiteboard.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/whiteboard.h	Tue Jan 03 23:32:59 2012 +0000
@@ -79,9 +79,7 @@
 	void (*_purple_reserved4)(void);
 };
 
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+G_BEGIN_DECLS
 
 /******************************************************************************/
 /** @name PurpleWhiteboard API                                                  */
@@ -330,8 +328,6 @@
 
 /*@}*/
 
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
 
 #endif /* _PURPLE_WHITEBOARD_H_ */
--- a/libpurple/xmlnode.h	Tue Jan 03 19:29:43 2012 +0000
+++ b/libpurple/xmlnode.h	Tue Jan 03 23:32:59 2012 +0000
@@ -28,10 +28,6 @@
 
 #include <glib.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * The valid types for an xmlnode
  */
@@ -61,6 +57,8 @@
 	GHashTable *namespace_map;  /**< The namespace map. */
 };
 
+G_BEGIN_DECLS
+
 /**
  * Creates a new xmlnode.
  *
@@ -360,9 +358,7 @@
 xmlnode *xmlnode_from_file(const char *dir, const char *filename,
 			   const char *description, const char *process);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _PURPLE_XMLNODE_H_ */