libpurple/protocol.h

branch
soc.2013.gobjectification.plugins
changeset 36620
c76013b145f4
parent 36618
16939dc3c9db
child 36621
3edd164b6a1a
--- a/libpurple/protocol.h	Sat Aug 31 04:39:16 2013 +0530
+++ b/libpurple/protocol.h	Sat Aug 31 22:26:34 2013 +0530
@@ -524,8 +524,12 @@
 };
 
 /**
- * PURPLE_PROTOCOL_DEFINE:
- *
+ * Returns TRUE if a protocol implements a function, FALSE otherwise.
+ */
+#define PURPLE_PROTOCOL_IMPLEMENTS(protocol,func) \
+	(PURPLE_PROTOCOL_GET_INTERFACE(protocol)->func != NULL)
+
+/**
  * Defines a protocol type in a plugin (given as a PurplePlugin *) by using the
  * CamelCase type name of the protocol and the function prefix for the
  * *_get_type(), *_base_init(), *_base_finalize() and *_interface_init()
@@ -554,8 +558,6 @@
 #endif
 
 /**
- * PURPLE_PROTOCOL_DEFINE_STATIC:
- *
  * Defines a protocol type statically using the type name, function prefix,
  * base type and type flags.
  */
@@ -583,8 +585,6 @@
 	}
 
 /**
- * PURPLE_PROTOCOL_DEFINE_DYNAMIC:
- *
  * Defines a protocol type dynamically using the plugin, type name,
  * function prefix, base type and type flags.
  */

mercurial