Browse code

- doxygen, formatting changes and small changes in startup error msg - patch provided from Olle E. Johansson, closes #2024503

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4497 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt authored on 23/07/2008 15:59:12
Showing 18 changed files
... ...
@@ -26,6 +26,11 @@
26 26
  *  2007-04-17  initial version (anca)
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief OpenSER presence module
31
+ * \ingroup presence
32
+ */
33
+
29 34
 #include <stdio.h>
30 35
 #include <stdlib.h>
31 36
 #include "../../dprint.h"
... ...
@@ -46,11 +51,11 @@ int bind_presence(presence_api_t* api)
46 46
 	api->get_event_list= get_event_list;
47 47
 	api->update_watchers_status= update_watchers_status;
48 48
 	api->new_shtable= new_shtable;
49
-    api->destroy_shtable= destroy_shtable;
50
-    api->insert_shtable= insert_shtable;
51
-    api->search_shtable= search_shtable;
52
-    api->delete_shtable= delete_shtable;
53
-    api->update_shtable= update_shtable;
49
+	api->destroy_shtable= destroy_shtable;
50
+	api->insert_shtable= insert_shtable;
51
+	api->search_shtable= search_shtable;
52
+	api->delete_shtable= delete_shtable;
53
+	api->update_shtable= update_shtable;
54 54
 	api->mem_copy_subs= mem_copy_subs;
55 55
 	api->update_db_subs= update_db_subs;
56 56
 	api->extract_sdialog_info= extract_sdialog_info;
... ...
@@ -26,6 +26,12 @@
26 26
  *  2007-04-17  initial version (anca)
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief OpenSER presence module
31
+ * \ingroup presence 
32
+ */
33
+
34
+
29 35
 #ifndef _PRES_BIND_H_
30 36
 #define _PRES_BIND_H_
31 37
 
... ...
@@ -26,6 +26,13 @@
26 26
  *  2007-04-04  initial version (anca)
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief OpenSER presence module
31
+ * \ref event_list.h
32
+ * \ingroup presence 
33
+ */
34
+
35
+
29 36
 #include <stdlib.h>
30 37
 #include<stdio.h>
31 38
 #include <string.h>
... ...
@@ -26,6 +26,12 @@
26 26
  *  2007-04-05  initial version (anca)
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief OpenSER presence module :: Events
31
+ * \ingroup presence 
32
+ */
33
+
34
+
29 35
 #ifndef _PRES_EV_LST_H
30 36
 #define  _PRES_EV_LST_H
31 37
 
... ...
@@ -26,6 +26,11 @@
26 26
  *  2007-08-20  initial version (anca)
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief OpenSER presence module
31
+ * \ingroup presence 
32
+ */
33
+
29 34
 #include <stdio.h>
30 35
 #include <stdlib.h>
31 36
 #include "../../mem/shm_mem.h"
... ...
@@ -26,6 +26,12 @@
26 26
  *  2007-08-20  initial version (anca)
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief OpenSER presence module :: Hash tables
31
+ * \ingroup presence 
32
+ */
33
+
34
+
29 35
 
30 36
 #ifndef PS_HASH_H
31 37
 #define PS_HASH_H
... ...
@@ -26,6 +26,12 @@
26 26
  *  2006-08-15  initial version (anca)
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief OpenSER presence module :: Notification with SIP NOTIFY
31
+ * \ingroup presence 
32
+ */
33
+
34
+
29 35
 #include <stdio.h>
30 36
 #include <stdlib.h>
31 37
 #include <string.h>
... ...
@@ -26,6 +26,12 @@
26 26
  *  2006-08-15  initial version (anca)
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief OpenSER presence module :: NOTIFY support
31
+ * \ingroup presence 
32
+ */
33
+
34
+
29 35
 #include "../../str.h"
30 36
 #include "../tm/dlg.h"
31 37
 #include "subscribe.h"
... ...
@@ -26,6 +26,23 @@
26 26
  *  2006-08-15  initial version (anca)
27 27
  */
28 28
 
29
+/*! \defgroup presence
30
+ *  \brief A generic implementation of the SIP event package (PUBLISH, SUBSCRIBE, NOTIFY)
31
+ *
32
+ *	   The OpenSER presence module is a generic module for SIP event packages, which is much more than presence.
33
+ *	   It is extensible by developing other modules that use the internal developer API.
34
+ *	   Examples:
35
+ *	   - \ref presence_mwi
36
+ *	   - \ref presence_xml
37
+ */
38
+
39
+/*! \file
40
+ * \brief OpenSER presence module
41
+ * 
42
+ * \ingroup presence 
43
+ */
44
+
45
+
29 46
 #include <stdio.h>
30 47
 #include <string.h>
31 48
 #include <stdlib.h>
... ...
@@ -146,18 +163,18 @@ static mi_export_t mi_cmds[] = {
146 146
 
147 147
 /** module exports */
148 148
 struct module_exports exports= {
149
-	"presence",					/* module name */
150
-	DEFAULT_DLFLAGS,			/* dlopen flags */
151
-	cmds,						/* exported functions */
152
-	params,						/* exported parameters */
153
-	0,							/* exported statistics */
154
-	mi_cmds,   					/* exported MI functions */
155
-	0,							/* exported pseudo-variables */
156
-	0,							/* extra processes */
157
-	mod_init,					/* module initialization function */
158
-	(response_function) 0,      /* response handling function */
159
-	(destroy_function) destroy, /* destroy function */
160
-	child_init                  /* per-child init function */
149
+	"presence",			/* module name */
150
+	DEFAULT_DLFLAGS,		/* dlopen flags */
151
+	cmds,				/* exported functions */
152
+	params,				/* exported parameters */
153
+	0,				/* exported statistics */
154
+	mi_cmds,   			/* exported MI functions */
155
+	0,				/* exported pseudo-variables */
156
+	0,				/* extra processes */
157
+	mod_init,			/* module initialization function */
158
+	(response_function) 0,      	/* response handling function */
159
+	(destroy_function) destroy, 	/* destroy function */
160
+	child_init                  	/* per-child init function */
161 161
 };
162 162
 
163 163
 /**
... ...
@@ -176,7 +193,7 @@ static int mod_init(void)
176 176
 	if(db_url.s== NULL)
177 177
 	{
178 178
 		use_db= 0;
179
-		LM_DBG("presence module used for library purpose only\n");
179
+		LM_DBG("Presence module used for API library purpose only\n");
180 180
 		EvList= init_evlist();
181 181
 		if(!EvList)
182 182
 		{
... ...
@@ -207,14 +224,14 @@ static int mod_init(void)
207 207
 	/* load SL API */
208 208
 	if(load_sl_api(&slb)==-1)
209 209
 	{
210
-		LM_ERR("can't load sl functions\n");
210
+		LM_ERR("Can't load sl functions. Module SL not loaded?\n");
211 211
 		return -1;
212 212
 	}
213 213
 
214 214
 	/* load all TM stuff */
215 215
 	if(load_tm_api(&tmb)==-1)
216 216
 	{
217
-		LM_ERR("can't load tm functions\n");
217
+		LM_ERR("Can't load tm functions. Module TM not loaded?\n");
218 218
 		return -1;
219 219
 	}
220 220
 	
... ...
@@ -236,7 +253,7 @@ static int mod_init(void)
236 236
 	pa_db = pa_dbf.init(&db_url);
237 237
 	if (!pa_db)
238 238
 	{
239
-		LM_ERR("connecting to database failed\n");
239
+		LM_ERR("Connection to database failed\n");
240 240
 		return -1;
241 241
 	}
242 242
 	
... ...
@@ -443,7 +460,7 @@ static int fixup_presence(void** param, int param_no)
443 443
  	return E_UNSPEC;
444 444
 }
445 445
 
446
-/* 
446
+/*! \brief
447 447
  *  mi cmd: refreshWatchers
448 448
  *			<presentity_uri> 
449 449
  *			<event>
... ...
@@ -27,6 +27,12 @@
27 27
  *  2006-10-09  first version (anca)
28 28
  */
29 29
 
30
+/*! \file
31
+ * \brief OpenSER presence module :: Core
32
+ * \ingroup presence 
33
+ */
34
+
35
+
30 36
 #ifndef PA_MOD_H
31 37
 #define PA_MOD_H
32 38
 
... ...
@@ -26,6 +26,12 @@
26 26
  *  2006-08-15  initial version (anca)
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief OpenSER presence module :: Presentity handling
31
+ * \ingroup presence 
32
+ */
33
+
34
+
29 35
 #include <stdio.h>
30 36
 #include <stdlib.h>
31 37
 #include <string.h>
... ...
@@ -26,6 +26,13 @@
26 26
  *  2006-08-15  initial version (anca)
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief OpenSER presence module :: Presentity handling
31
+ * \ref presentity.c
32
+ * \ingroup presence 
33
+ */
34
+
35
+
29 36
 #ifndef PRESENTITY_H
30 37
 #define PRESENTITY_H
31 38
 
... ...
@@ -26,6 +26,12 @@
26 26
  *  2006-08-15  initial version (anca)
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief OpenSER presence module :: Support for PUBLISH handling
31
+ * \ingroup presence 
32
+ */
33
+
34
+
29 35
 #include <time.h>
30 36
 
31 37
 #include "../../ut.h"
... ...
@@ -26,6 +26,13 @@
26 26
  *  2006-08-15  initial version (anca)
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief OpenSER presence module :: PUBLISH support
31
+ * \ref publish.c
32
+ * \ingroup presence 
33
+ */
34
+
35
+
29 36
 #ifndef PUBLISH_H
30 37
 #define PUBLISH_H
31 38
 
... ...
@@ -26,6 +26,12 @@
26 26
  *  2006-08-15  initial version (anca)
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief OpenSER presence module :: Support for SUBSCRIBE handling
31
+ * \ingroup presence 
32
+ */
33
+
34
+
29 35
 #include "../../ut.h"
30 36
 #include "../../usr_avp.h"
31 37
 #include "../../data_lump_rpl.h"
... ...
@@ -26,6 +26,13 @@
26 26
  *  2006-08-15  initial version (anca)
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief OpenSER presence module :: SUBSCRIBE support
31
+ * \ref subscribe.c
32
+ * \ingroup presence 
33
+ */
34
+
35
+
29 36
 #ifndef SUBSCRIBE_H
30 37
 #define SUBSCRIBE_H
31 38
 
... ...
@@ -26,6 +26,12 @@
26 26
  *  2006-08-15  initial version (anca)
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief OpenSER presence module :: Utilities
31
+ * \ingroup presence 
32
+ */
33
+
34
+
29 35
 #include <stdio.h>
30 36
 #include <stdlib.h>
31 37
 #include <string.h>
... ...
@@ -26,6 +26,13 @@
26 26
  *  2006-08-15  initial version (anca)
27 27
  */
28 28
 
29
+/*! \file
30
+ * \brief OpenSER presence module :: Utility functions
31
+ * \ref utils_func.c
32
+ * \ingroup presence 
33
+ */
34
+
35
+
29 36
 
30 37
 #ifndef UTILS_FUNC_H
31 38
 #define UTILS_FUNC_H