Browse code

Doxygen updates (not done with this directory)

oej authored on 20/10/2009 20:20:22
Showing 11 changed files
... ...
@@ -3,19 +3,14 @@
3 3
  *
4 4
  * Copyright (C) 2007 iptelorg GmbH
5 5
  *
6
- * This file is part of ser, a free SIP server.
6
+ * This file is part of SIP-router, a free SIP server.
7 7
  *
8
- * ser is free software; you can redistribute it and/or modify
8
+ * SIP-router is free software; you can redistribute it and/or modify
9 9
  * it under the terms of the GNU General Public License as published by
10 10
  * the Free Software Foundation; either version 2 of the License, or
11 11
  * (at your option) any later version
12 12
  *
13
- * For a license to use the ser software under conditions
14
- * other than those described here, or to purchase support for this
15
- * software, please contact iptel.org by e-mail at the following addresses:
16
- *    info@iptel.org
17
- *
18
- * ser is distributed in the hope that it will be useful,
13
+ * SIP-router is distributed in the hope that it will be useful,
19 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 16
  * GNU General Public License for more details.
... ...
@@ -38,9 +33,10 @@
38 38
 #include "cfg_script.h"
39 39
 #include "cfg.h"
40 40
 
41
-/* declares a new cfg group
41
+/*! \brief declares a new cfg group
42
+ *
42 43
  * handler is set to the memory area where the variables are stored
43
- * return value is -1 on error
44
+ * \return value is -1 on error
44 45
  */
45 46
 int cfg_declare(char *group_name, cfg_def_t *def, void *values, int def_size,
46 47
 			void **handle)
... ...
@@ -3,19 +3,14 @@
3 3
  *
4 4
  * Copyright (C) 2007 iptelorg GmbH
5 5
  *
6
- * This file is part of ser, a free SIP server.
6
+ * This file is part of SIP-router, a free SIP server.
7 7
  *
8
- * ser is free software; you can redistribute it and/or modify
8
+ * SIP-router is free software; you can redistribute it and/or modify
9 9
  * it under the terms of the GNU General Public License as published by
10 10
  * the Free Software Foundation; either version 2 of the License, or
11 11
  * (at your option) any later version
12 12
  *
13
- * For a license to use the ser software under conditions
14
- * other than those described here, or to purchase support for this
15
- * software, please contact iptel.org by e-mail at the following addresses:
16
- *    info@iptel.org
17
- *
18
- * ser is distributed in the hope that it will be useful,
13
+ * SIP-router is distributed in the hope that it will be useful,
19 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 16
  * GNU General Public License for more details.
... ...
@@ -3,19 +3,14 @@
3 3
  *
4 4
  * Copyright (C) 2007 iptelorg GmbH
5 5
  *
6
- * This file is part of ser, a free SIP server.
6
+ * This file is part of SIP-router, a free SIP server.
7 7
  *
8
- * ser is free software; you can redistribute it and/or modify
8
+ * SIP-router is free software; you can redistribute it and/or modify
9 9
  * it under the terms of the GNU General Public License as published by
10 10
  * the Free Software Foundation; either version 2 of the License, or
11 11
  * (at your option) any later version
12 12
  *
13
- * For a license to use the ser software under conditions
14
- * other than those described here, or to purchase support for this
15
- * software, please contact iptel.org by e-mail at the following addresses:
16
- *    info@iptel.org
17
- *
18
- * ser is distributed in the hope that it will be useful,
13
+ * SIP-router is distributed in the hope that it will be useful,
19 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 16
  * GNU General Public License for more details.
... ...
@@ -3,19 +3,14 @@
3 3
  *
4 4
  * Copyright (C) 2007 iptelorg GmbH
5 5
  *
6
- * This file is part of ser, a free SIP server.
6
+ * This file is part of SIP-router, a free SIP server.
7 7
  *
8
- * ser is free software; you can redistribute it and/or modify
8
+ * SIP-router is free software; you can redistribute it and/or modify
9 9
  * it under the terms of the GNU General Public License as published by
10 10
  * the Free Software Foundation; either version 2 of the License, or
11 11
  * (at your option) any later version
12 12
  *
13
- * For a license to use the ser software under conditions
14
- * other than those described here, or to purchase support for this
15
- * software, please contact iptel.org by e-mail at the following addresses:
16
- *    info@iptel.org
17
- *
18
- * ser is distributed in the hope that it will be useful,
13
+ * SIP-router is distributed in the hope that it will be useful,
19 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 16
  * GNU General Public License for more details.
... ...
@@ -37,7 +32,7 @@
37 37
 #include "cfg.h"
38 38
 #include "cfg_struct.h"
39 39
 
40
-/* linked list of variables with their new values */
40
+/*! \brief linked list of variables with their new values */
41 41
 typedef struct _cfg_changed_var {
42 42
 	cfg_group_t	*group;
43 43
 	cfg_mapping_t	*var;
... ...
@@ -47,10 +42,10 @@ typedef struct _cfg_changed_var {
47 47
 	unsigned char	new_val[1];
48 48
 } cfg_changed_var_t;
49 49
 
50
-/* callback that is called when a new group is declared */
50
+/*! \brief callback that is called when a new group is declared */
51 51
 typedef void (*cfg_on_declare)(str *, cfg_def_t *);
52 52
 
53
-/* linked list of registered contexts */
53
+/*! \brief linked list of registered contexts */
54 54
 typedef struct _cfg_ctx {
55 55
 	/* variables that are already changed
56 56
 	but have not been committed yet */
... ...
@@ -70,14 +65,14 @@ typedef struct _cfg_ctx {
70 70
 #define CFG_CTX_LOCK(ctx)	lock_get(&(ctx)->lock)
71 71
 #define CFG_CTX_UNLOCK(ctx)	lock_release(&(ctx)->lock)
72 72
 
73
-/* creates a new config context that is an interface to the
73
+/*! \brief creates a new config context that is an interface to the
74 74
  * cfg variables with write permission */
75 75
 int cfg_register_ctx(cfg_ctx_t **handle, cfg_on_declare on_declare_cb);
76 76
 
77
-/* free the memory allocated for the contexts */
77
+/*! \brief free the memory allocated for the contexts */
78 78
 void cfg_ctx_destroy(void);
79 79
 
80
-/* set the value of a variable without the need of explicit commit */
80
+/*! \brief set the value of a variable without the need of explicit commit */
81 81
 int cfg_set_now(cfg_ctx_t *ctx, str *group_name, str *var_name,
82 82
 			void *val, unsigned int val_type);
83 83
 int cfg_set_now_int(cfg_ctx_t *ctx, str *group_name, str *var_name, int val);
... ...
@@ -91,33 +86,34 @@ int cfg_set_delayed_int(cfg_ctx_t *ctx, str *group_name, str *var_name, int val)
91 91
 int cfg_set_delayed_string(cfg_ctx_t *ctx, str *group_name, str *var_name, char *val);
92 92
 int cfg_set_delayed_str(cfg_ctx_t *ctx, str *group_name, str *var_name, str *val);
93 93
 
94
-/* commits the previously prepared changes within the context */
94
+/*! \brief commits the previously prepared changes within the context */
95 95
 int cfg_commit(cfg_ctx_t *ctx);
96 96
 
97
-/* drops the not yet committed changes within the context */
97
+/*! \brief drops the not yet committed changes within the context */
98 98
 int cfg_rollback(cfg_ctx_t *ctx);
99 99
 
100
-/* returns the value of a variable */
100
+/*! \brief returns the value of a variable */
101 101
 int cfg_get_by_name(cfg_ctx_t *ctx, str *group_name, str *var_name,
102 102
 			void **val, unsigned int *val_type);
103 103
 
104
-/* returns the description of a variable */
104
+/*! \brief returns the description of a variable */
105 105
 int cfg_help(cfg_ctx_t *ctx, str *group_name, str *var_name,
106 106
 			char **ch, unsigned int *input_type);
107 107
 
108
-/* notify the drivers about the new config definition */
108
+/*! \brief notify the drivers about the new config definition */
109 109
 void cfg_notify_drivers(char *group_name, int group_name_len, cfg_def_t *def);
110 110
 
111
-/* convert the value to the requested type */
111
+/*! \brief convert the value to the requested type */
112 112
 int convert_val(unsigned int val_type, void *val,
113 113
 			unsigned int var_type, void **new_val);
114 114
 
115
-/* initialize the handle for cfg_get_group_next() */
115
+/*! \brief initialize the handle for cfg_get_group_next() */
116 116
 #define cfg_get_group_init(handle) \
117 117
 	(*(handle)) = (void *)cfg_group
118 118
 
119
-/* returns the group name and the cfg structure definition,
119
+/*! \brief returns the group name and the cfg structure definition,
120 120
  * and moves the handle to the next group
121
+ *
121 122
  * Return value:
122 123
  *	0: no more group
123 124
  *	1: group exists
... ...
@@ -133,15 +129,16 @@ int convert_val(unsigned int val_type, void *val,
133 133
 int cfg_get_group_next(void **h,
134 134
 			str *gname, cfg_def_t **def);
135 135
 
136
-/* Initialize the handle for cfg_diff_next()
136
+/*! \brief Initialize the handle for cfg_diff_next()
137 137
  * WARNING: keeps the context lock held, do not forget
138 138
  * to release it with cfg_diff_release()
139 139
  */
140 140
 int cfg_diff_init(cfg_ctx_t *ctx,
141 141
 		void **h);
142 142
 
143
-/* return the pending changes that have not been
143
+/*! \brief return the pending changes that have not been
144 144
  * committed yet
145
+ *
145 146
  * can be used as follows:
146 147
  *
147 148
  * void *handle;
... ...
@@ -160,7 +157,7 @@ int cfg_diff_next(void **h,
160 160
 			void **old_val, void **new_val,
161 161
 			unsigned int *val_type);
162 162
 
163
-/* destroy the handle of cfg_diff_next() */
163
+/*! \brief destroy the handle of cfg_diff_next() */
164 164
 void cfg_diff_release(cfg_ctx_t *ctx);
165 165
 
166 166
 #endif /* _CFG_CTX_H */
... ...
@@ -3,19 +3,14 @@
3 3
  *
4 4
  * Copyright (C) 2008 iptelorg GmbH
5 5
  *
6
- * This file is part of ser, a free SIP server.
6
+ * This file is part of SIP-router, a free SIP server.
7 7
  *
8
- * ser is free software; you can redistribute it and/or modify
8
+ * SIP-router is free software; you can redistribute it and/or modify
9 9
  * it under the terms of the GNU General Public License as published by
10 10
  * the Free Software Foundation; either version 2 of the License, or
11 11
  * (at your option) any later version
12 12
  *
13
- * For a license to use the ser software under conditions
14
- * other than those described here, or to purchase support for this
15
- * software, please contact iptel.org by e-mail at the following addresses:
16
- *    info@iptel.org
17
- *
18
- * ser is distributed in the hope that it will be useful,
13
+ * SIP-router is distributed in the hope that it will be useful,
19 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 16
  * GNU General Public License for more details.
... ...
@@ -3,19 +3,14 @@
3 3
  *
4 4
  * Copyright (C) 2008 iptelorg GmbH
5 5
  *
6
- * This file is part of ser, a free SIP server.
6
+ * This file is part of SIP-router, a free SIP server.
7 7
  *
8
- * ser is free software; you can redistribute it and/or modify
8
+ * SIP-router is free software; you can redistribute it and/or modify
9 9
  * it under the terms of the GNU General Public License as published by
10 10
  * the Free Software Foundation; either version 2 of the License, or
11 11
  * (at your option) any later version
12 12
  *
13
- * For a license to use the ser software under conditions
14
- * other than those described here, or to purchase support for this
15
- * software, please contact iptel.org by e-mail at the following addresses:
16
- *    info@iptel.org
17
- *
18
- * ser is distributed in the hope that it will be useful,
13
+ * SIP-router is distributed in the hope that it will be useful,
19 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 16
  * GNU General Public License for more details.
... ...
@@ -3,19 +3,14 @@
3 3
  *
4 4
  * Copyright (C) 2008 iptelorg GmbH
5 5
  *
6
- * This file is part of ser, a free SIP server.
6
+ * This file is part of SIP-router, a free SIP server.
7 7
  *
8
- * ser is free software; you can redistribute it and/or modify
8
+ * SIP-router is free software; you can redistribute it and/or modify
9 9
  * it under the terms of the GNU General Public License as published by
10 10
  * the Free Software Foundation; either version 2 of the License, or
11 11
  * (at your option) any later version
12 12
  *
13
- * For a license to use the ser software under conditions
14
- * other than those described here, or to purchase support for this
15
- * software, please contact iptel.org by e-mail at the following addresses:
16
- *    info@iptel.org
17
- *
18
- * ser is distributed in the hope that it will be useful,
13
+ * SIP-router is distributed in the hope that it will be useful,
19 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 16
  * GNU General Public License for more details.
... ...
@@ -3,19 +3,14 @@
3 3
  *
4 4
  * Copyright (C) 2008 iptelorg GmbH
5 5
  *
6
- * This file is part of ser, a free SIP server.
6
+ * This file is part of SIP-router, a free SIP server.
7 7
  *
8
- * ser is free software; you can redistribute it and/or modify
8
+ * SIP-router is free software; you can redistribute it and/or modify
9 9
  * it under the terms of the GNU General Public License as published by
10 10
  * the Free Software Foundation; either version 2 of the License, or
11 11
  * (at your option) any later version
12 12
  *
13
- * For a license to use the ser software under conditions
14
- * other than those described here, or to purchase support for this
15
- * software, please contact iptel.org by e-mail at the following addresses:
16
- *    info@iptel.org
17
- *
18
- * ser is distributed in the hope that it will be useful,
13
+ * SIP-router is distributed in the hope that it will be useful,
19 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 16
  * GNU General Public License for more details.
... ...
@@ -3,19 +3,14 @@
3 3
  *
4 4
  * Copyright (C) 2007 iptelorg GmbH
5 5
  *
6
- * This file is part of ser, a free SIP server.
6
+ * This file is part of SIP-router, a free SIP server.
7 7
  *
8
- * ser is free software; you can redistribute it and/or modify
8
+ * SIP-router is free software; you can redistribute it and/or modify
9 9
  * it under the terms of the GNU General Public License as published by
10 10
  * the Free Software Foundation; either version 2 of the License, or
11 11
  * (at your option) any later version
12 12
  *
13
- * For a license to use the ser software under conditions
14
- * other than those described here, or to purchase support for this
15
- * software, please contact iptel.org by e-mail at the following addresses:
16
- *    info@iptel.org
17
- *
18
- * ser is distributed in the hope that it will be useful,
13
+ * SIP-router is distributed in the hope that it will be useful,
19 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 16
  * GNU General Public License for more details.
... ...
@@ -3,19 +3,14 @@
3 3
  *
4 4
  * Copyright (C) 2007 iptelorg GmbH
5 5
  *
6
- * This file is part of ser, a free SIP server.
6
+ * This file is part of SIP-router, a free SIP server.
7 7
  *
8
- * ser is free software; you can redistribute it and/or modify
8
+ * SIP-router is free software; you can redistribute it and/or modify
9 9
  * it under the terms of the GNU General Public License as published by
10 10
  * the Free Software Foundation; either version 2 of the License, or
11 11
  * (at your option) any later version
12 12
  *
13
- * For a license to use the ser software under conditions
14
- * other than those described here, or to purchase support for this
15
- * software, please contact iptel.org by e-mail at the following addresses:
16
- *    info@iptel.org
17
- *
18
- * ser is distributed in the hope that it will be useful,
13
+ * SIP-router is distributed in the hope that it will be useful,
19 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 16
  * GNU General Public License for more details.
... ...
@@ -41,71 +36,71 @@
41 41
 #include "../compiler_opt.h"
42 42
 #include "cfg.h"
43 43
 
44
-/* indicates that the variable has been already shmized */
44
+/*! \brief indicates that the variable has been already shmized */
45 45
 #define cfg_var_shmized	1U
46 46
 
47
-/* structure used for variable - pointer mapping */
47
+/*! \brief structure used for variable - pointer mapping */
48 48
 typedef struct _cfg_mapping {
49
-	cfg_def_t	*def;		/* one item of the cfg structure definition */
50
-	int		name_len;	/* length of def->name */
49
+	cfg_def_t	*def;		/*!< one item of the cfg structure definition */
50
+	int		name_len;	/*!< length of def->name */
51 51
 
52 52
 	/* additional information about the cfg variable */
53
-	int		offset; /* offest within the memory block */
54
-	unsigned int	flag;	/* flag indicating the state of the variable */
53
+	int		offset; /*!< offest within the memory block */
54
+	unsigned int	flag;	/*!< flag indicating the state of the variable */
55 55
 } cfg_mapping_t;
56 56
 
57
-/* linked list of registered groups */
57
+/*! \brief linked list of registered groups */
58 58
 typedef struct _cfg_group {
59
-	int		num;		/* number of variables within the group */
60
-	cfg_mapping_t	*mapping;	/* describes the mapping betweeen
59
+	int		num;		/*!< number of variables within the group */
60
+	cfg_mapping_t	*mapping;	/*!< describes the mapping betweeen
61 61
 					the cfg variable definition and the memory block */
62
-	char		*vars;		/* pointer to the memory block where the values
62
+	char		*vars;		/*!< pointer to the memory block where the values
63 63
 					are stored -- used only before the config is
64 64
 					shmized. */
65
-	int		size;		/* size of the memory block that has to be
65
+	int		size;		/*!< size of the memory block that has to be
66 66
 					allocated to store the values */
67
-	int		offset;		/* offset of the group within the
67
+	int		offset;		/*!< offset of the group within the
68 68
 					shmized memory block */
69
-	void		**handle;	/* per-process handle that can be used
69
+	void		**handle;	/*!< per-process handle that can be used
70 70
 					by the modules to access the variables.
71 71
 					It is registered when the group is created,
72 72
 					and updated every time the block is replaced */
73 73
 
74
-	unsigned char	dynamic;	/* indicates whether the variables within the group
74
+	unsigned char	dynamic;	/*!< indicates whether the variables within the group
75 75
 					are dynamically	allocated or not */
76 76
 	struct _cfg_group	*next;
77 77
 	int		name_len;	
78 78
 	char		name[1];
79 79
 } cfg_group_t;
80 80
 
81
-/* single memoy block that contains all the cfg values */
81
+/*! \brief single memoy block that contains all the cfg values */
82 82
 typedef struct _cfg_block {
83
-	atomic_t	refcnt;		/* reference counter,
83
+	atomic_t	refcnt;		/*!< reference counter,
84 84
 					the block is automatically deleted
85 85
 					when it reaches 0 */
86
-	char		**replaced;	/* set of the strings that must be freed
86
+	char		**replaced;	/*!< set of the strings that must be freed
87 87
 					together with the block. The content depends
88 88
 					on the block that replaces this one */
89
-	unsigned char	vars[1];	/* blob that contains the values */
89
+	unsigned char	vars[1];	/*!< blob that contains the values */
90 90
 } cfg_block_t;
91 91
 
92
-/* Linked list of per-child process callbacks.
92
+/*! \brief Linked list of per-child process callbacks.
93 93
  * Each child process has a local pointer, and executes the callbacks
94 94
  * when the pointer is not pointing to the end of the list.
95 95
  * Items from the begginning of the list are deleted when the starter
96 96
  * pointer is moved, and no more child process uses them.
97 97
  */
98 98
 typedef struct _cfg_child_cb {
99
-	atomic_t		refcnt; /* number of child processes
99
+	atomic_t		refcnt; /*!< number of child processes
100 100
 					referring to the element */
101
-	atomic_t		cb_count;	/* This counter is used to track
101
+	atomic_t		cb_count;	/*!< This counter is used to track
102 102
 						 * how many times the callback needs
103 103
 						 * to be executed.
104 104
 						 * >0 the cb needs to be executed
105 105
 						 * <=0 the cb no longer needs to be executed
106 106
 						 */
107
-	str			gname, name;	/* name of the variable that has changed */
108
-	cfg_on_set_child	cb;	/* callback function that has to be called */
107
+	str			gname, name;	/*!< name of the variable that has changed */
108
+	cfg_on_set_child	cb;	/*!< callback function that has to be called */
109 109
 
110 110
 	struct _cfg_child_cb	*next;
111 111
 } cfg_child_cb_t;
... ...
@@ -6,19 +6,14 @@
6 6
  *
7 7
  * Copyright (C) 2004 FhG Fokus
8 8
  *
9
- * This file is part of ser, a free SIP server.
9
+ * This file is part of SIP-router, a free SIP server.
10 10
  *
11
- * ser is free software; you can redistribute it and/or modify
11
+ * SIP-router is free software; you can redistribute it and/or modify
12 12
  * it under the terms of the GNU General Public License as published by
13 13
  * the Free Software Foundation; either version 2 of the License, or
14 14
  * (at your option) any later version
15 15
  *
16
- * For a license to use the ser software under conditions
17
- * other than those described here, or to purchase support for this
18
- * software, please contact iptel.org by e-mail at the following addresses:
19
- *    info@iptel.org
20
- *
21
- * ser is distributed in the hope that it will be useful,
16
+ * SIP-router is distributed in the hope that it will be useful,
22 17
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 18
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24 19
  * GNU General Public License for more details.