summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-08-14 01:25:48 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-08-14 01:25:48 +0200
commita6d8f4bb835dc01344861e26b78867273322cb52 (patch)
tree36c4cea88536c8015563abf2991d8313966af229 /include
parentb5fc727db22139bb3f28367d1f31f241ccc1e236 (diff)
downloadconnman-a6d8f4bb835dc01344861e26b78867273322cb52.tar.gz
connman-a6d8f4bb835dc01344861e26b78867273322cb52.tar.bz2
connman-a6d8f4bb835dc01344861e26b78867273322cb52.zip
First steps into providing API documentation
Diffstat (limited to 'include')
-rw-r--r--include/log.h14
-rw-r--r--include/plugin.h18
2 files changed, 31 insertions, 1 deletions
diff --git a/include/log.h b/include/log.h
index 8a0b5a52..81a5bc4f 100644
--- a/include/log.h
+++ b/include/log.h
@@ -26,10 +26,24 @@
extern "C" {
#endif
+/**
+ * SECTION:log
+ * @title: Logging premitives
+ * @short_description: Functions for logging error and debug information
+ */
+
extern void connman_info(const char *format, ...);
extern void connman_error(const char *format, ...);
extern void connman_debug(const char *format, ...);
+/**
+ * DBG:
+ * @fmt: format string
+ * @arg...: list of arguments
+ *
+ * Simple macro around connman_debug() which also include the function
+ * name it is called in.
+ */
#define DBG(fmt, arg...) connman_debug("%s:%s() " fmt, __FILE__, __FUNCTION__ , ## arg)
#ifdef __cplusplus
diff --git a/include/plugin.h b/include/plugin.h
index 387a48c0..427ceede 100644
--- a/include/plugin.h
+++ b/include/plugin.h
@@ -26,6 +26,12 @@
extern "C" {
#endif
+/**
+ * SECTION:plugin
+ * @title: Plugin premitives
+ * @short_description: Functions for declaring plugins
+ */
+
struct connman_plugin_desc {
const char *name;
const char *description;
@@ -34,7 +40,17 @@ struct connman_plugin_desc {
void (*exit) (void);
};
-#define CONNMAN_PLUGIN_DEFINE(name,description,version,init,exit) \
+/**
+ * CONNMAN_PLUGIN_DEFINE:
+ * @name: plugin name
+ * @description: plugin description
+ * @version: plugin version string
+ * @init: init function called on plugin loading
+ * @exit: exit function called on plugin removal
+ *
+ * Macro for defining a plugin descriptor
+ */
+#define CONNMAN_PLUGIN_DEFINE(name, description, version, init, exit) \
struct connman_plugin_desc connman_plugin_desc = { \
name, description, version, init, exit \
};