/soc/2013/ankitkv/gobjectification: 8ebf4cfff9e4: Added the boil...

Ankit Vani a at nevitus.org
Fri Jul 19 18:43:00 EDT 2013


Changeset: 8ebf4cfff9e4b20cf97684fcab4fd90e519fb7d6
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-07-20 04:11 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/8ebf4cfff9e4

Description:

Added the boilerplate GObject header code for presences

diffstat:

 libpurple/presences.h |  36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diffs (77 lines):

diff --git a/libpurple/presences.h b/libpurple/presences.h
--- a/libpurple/presences.h
+++ b/libpurple/presences.h
@@ -28,16 +28,37 @@
 
 #include "status.h"
 
+#define PURPLE_TYPE_PRESENCE             (purple_presence_get_type())
+#define PURPLE_PRESENCE(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_PRESENCE, PurplePresence))
+#define PURPLE_PRESENCE_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_PRESENCE, PurplePresenceClass))
+#define PURPLE_IS_PRESENCE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_PRESENCE))
+#define PURPLE_IS_PRESENCE_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_PRESENCE))
+#define PURPLE_PRESENCE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_PRESENCE, PurplePresenceClass))
+
 /** @copydoc _PurplePresence */
 typedef struct _PurplePresence  PurplePresence;
 /** @copydoc _PurplePresenceClass */
 typedef struct _PurplePresenceClass  PurplePresenceClass;
 
+#define PURPLE_TYPE_ACCOUNT_PRESENCE             (purple_account_presence_get_type())
+#define PURPLE_ACCOUNT_PRESENCE(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_ACCOUNT_PRESENCE, PurpleAccountPresence))
+#define PURPLE_ACCOUNT_PRESENCE_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_ACCOUNT_PRESENCE, PurpleAccountPresenceClass))
+#define PURPLE_IS_ACCOUNT_PRESENCE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_ACCOUNT_PRESENCE))
+#define PURPLE_IS_ACCOUNT_PRESENCE_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_ACCOUNT_PRESENCE))
+#define PURPLE_ACCOUNT_PRESENCE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_ACCOUNT_PRESENCE, PurpleAccountPresenceClass))
+
 /** @copydoc _PurpleAccountPresence */
 typedef struct _PurpleAccountPresence  PurpleAccountPresence;
 /** @copydoc _PurpleAccountPresenceClass */
 typedef struct _PurpleAccountPresenceClass  PurpleAccountPresenceClass;
 
+#define PURPLE_TYPE_BUDDY_PRESENCE             (purple_buddy_presence_get_type())
+#define PURPLE_BUDDY_PRESENCE(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_BUDDY_PRESENCE, PurpleBuddyPresence))
+#define PURPLE_BUDDY_PRESENCE_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_BUDDY_PRESENCE, PurpleBuddyPresenceClass))
+#define PURPLE_IS_BUDDY_PRESENCE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_BUDDY_PRESENCE))
+#define PURPLE_IS_BUDDY_PRESENCE_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_BUDDY_PRESENCE))
+#define PURPLE_BUDDY_PRESENCE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_BUDDY_PRESENCE, PurpleBuddyPresenceClass))
+
 /** @copydoc _PurpleBuddyPresence */
 typedef struct _PurpleBuddyPresence  PurpleBuddyPresence;
 /** @copydoc _PurpleBuddyPresenceClass */
@@ -122,6 +143,11 @@ G_BEGIN_DECLS
 /*@{*/
 
 /**
+ * Returns the GType for the PurpleAccountPresence object.
+ */
+GType purple_account_presence_get_type(void);
+
+/**
  * Creates a presence for an account.
  *
  * @param account The account to associate with the presence.
@@ -147,6 +173,11 @@ PurpleAccount *purple_account_presence_g
 /*@{*/
 
 /**
+ * Returns the GType for the PurpleBuddyPresence object.
+ */
+GType purple_buddy_presence_get_type(void);
+
+/**
  * Creates a presence for a buddy.
  *
  * @param buddy The buddy to associate with the presence.
@@ -172,6 +203,11 @@ PurpleBuddy *purple_buddy_presence_get_b
 /*@{*/
 
 /**
+ * Returns the GType for the PurplePresence object.
+ */
+GType purple_presence_get_type(void);
+
+/**
  * Sets the active state of a status in a presence.
  *
  * Only independent statuses can be set unactive. Normal statuses can only



More information about the Commits mailing list