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 33
 #include "cfg_script.h"
39 34
 #include "cfg.h"
40 35
 
41
-/* declares a new cfg group
36
+/*! \brief declares a new cfg group
37
+ *
42 38
  * handler is set to the memory area where the variables are stored
43
- * return value is -1 on error
39
+ * \return value is -1 on error
44 40
  */
45 41
 int cfg_declare(char *group_name, cfg_def_t *def, void *values, int def_size,
46 42
 			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 32
 #include "cfg.h"
38 33
 #include "cfg_struct.h"
39 34
 
40
-/* linked list of variables with their new values */
35
+/*! \brief linked list of variables with their new values */
41 36
 typedef struct _cfg_changed_var {
42 37
 	cfg_group_t	*group;
43 38
 	cfg_mapping_t	*var;
... ...
@@ -47,10 +42,10 @@ typedef struct _cfg_changed_var {
47 42
 	unsigned char	new_val[1];
48 43
 } cfg_changed_var_t;
49 44
 
50
-/* callback that is called when a new group is declared */
45
+/*! \brief callback that is called when a new group is declared */
51 46
 typedef void (*cfg_on_declare)(str *, cfg_def_t *);
52 47
 
53
-/* linked list of registered contexts */
48
+/*! \brief linked list of registered contexts */
54 49
 typedef struct _cfg_ctx {
55 50
 	/* variables that are already changed
56 51
 	but have not been committed yet */
... ...
@@ -70,14 +65,14 @@ typedef struct _cfg_ctx {
70 65
 #define CFG_CTX_LOCK(ctx)	lock_get(&(ctx)->lock)
71 66
 #define CFG_CTX_UNLOCK(ctx)	lock_release(&(ctx)->lock)
72 67
 
73
-/* creates a new config context that is an interface to the
68
+/*! \brief creates a new config context that is an interface to the
74 69
  * cfg variables with write permission */
75 70
 int cfg_register_ctx(cfg_ctx_t **handle, cfg_on_declare on_declare_cb);
76 71
 
77
-/* free the memory allocated for the contexts */
72
+/*! \brief free the memory allocated for the contexts */
78 73
 void cfg_ctx_destroy(void);
79 74
 
80
-/* set the value of a variable without the need of explicit commit */
75
+/*! \brief set the value of a variable without the need of explicit commit */
81 76
 int cfg_set_now(cfg_ctx_t *ctx, str *group_name, str *var_name,
82 77
 			void *val, unsigned int val_type);
83 78
 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 86
 int cfg_set_delayed_string(cfg_ctx_t *ctx, str *group_name, str *var_name, char *val);
92 87
 int cfg_set_delayed_str(cfg_ctx_t *ctx, str *group_name, str *var_name, str *val);
93 88
 
94
-/* commits the previously prepared changes within the context */
89
+/*! \brief commits the previously prepared changes within the context */
95 90
 int cfg_commit(cfg_ctx_t *ctx);
96 91
 
97
-/* drops the not yet committed changes within the context */
92
+/*! \brief drops the not yet committed changes within the context */
98 93
 int cfg_rollback(cfg_ctx_t *ctx);
99 94
 
100
-/* returns the value of a variable */
95
+/*! \brief returns the value of a variable */
101 96
 int cfg_get_by_name(cfg_ctx_t *ctx, str *group_name, str *var_name,
102 97
 			void **val, unsigned int *val_type);
103 98
 
104
-/* returns the description of a variable */
99
+/*! \brief returns the description of a variable */
105 100
 int cfg_help(cfg_ctx_t *ctx, str *group_name, str *var_name,
106 101
 			char **ch, unsigned int *input_type);
107 102
 
108
-/* notify the drivers about the new config definition */
103
+/*! \brief notify the drivers about the new config definition */
109 104
 void cfg_notify_drivers(char *group_name, int group_name_len, cfg_def_t *def);
110 105
 
111
-/* convert the value to the requested type */
106
+/*! \brief convert the value to the requested type */
112 107
 int convert_val(unsigned int val_type, void *val,
113 108
 			unsigned int var_type, void **new_val);
114 109
 
115
-/* initialize the handle for cfg_get_group_next() */
110
+/*! \brief initialize the handle for cfg_get_group_next() */
116 111
 #define cfg_get_group_init(handle) \
117 112
 	(*(handle)) = (void *)cfg_group
118 113
 
119
-/* returns the group name and the cfg structure definition,
114
+/*! \brief returns the group name and the cfg structure definition,
120 115
  * and moves the handle to the next group
116
+ *
121 117
  * Return value:
122 118
  *	0: no more group
123 119
  *	1: group exists
... ...
@@ -133,15 +129,16 @@ int convert_val(unsigned int val_type, void *val,
133 129
 int cfg_get_group_next(void **h,
134 130
 			str *gname, cfg_def_t **def);
135 131
 
136
-/* Initialize the handle for cfg_diff_next()
132
+/*! \brief Initialize the handle for cfg_diff_next()
137 133
  * WARNING: keeps the context lock held, do not forget
138 134
  * to release it with cfg_diff_release()
139 135
  */
140 136
 int cfg_diff_init(cfg_ctx_t *ctx,
141 137
 		void **h);
142 138
 
143
-/* return the pending changes that have not been
139
+/*! \brief return the pending changes that have not been
144 140
  * committed yet
141
+ *
145 142
  * can be used as follows:
146 143
  *
147 144
  * void *handle;
... ...
@@ -160,7 +157,7 @@ int cfg_diff_next(void **h,
160 157
 			void **old_val, void **new_val,
161 158
 			unsigned int *val_type);
162 159
 
163
-/* destroy the handle of cfg_diff_next() */
160
+/*! \brief destroy the handle of cfg_diff_next() */
164 161
 void cfg_diff_release(cfg_ctx_t *ctx);
165 162
 
166 163
 #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 36
 #include "../compiler_opt.h"
42 37
 #include "cfg.h"
43 38
 
44
-/* indicates that the variable has been already shmized */
39
+/*! \brief indicates that the variable has been already shmized */
45 40
 #define cfg_var_shmized	1U
46 41
 
47
-/* structure used for variable - pointer mapping */
42
+/*! \brief structure used for variable - pointer mapping */
48 43
 typedef struct _cfg_mapping {
49
-	cfg_def_t	*def;		/* one item of the cfg structure definition */
50
-	int		name_len;	/* length of def->name */
44
+	cfg_def_t	*def;		/*!< one item of the cfg structure definition */
45
+	int		name_len;	/*!< length of def->name */
51 46
 
52 47
 	/* 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 */
48
+	int		offset; /*!< offest within the memory block */
49
+	unsigned int	flag;	/*!< flag indicating the state of the variable */
55 50
 } cfg_mapping_t;
56 51
 
57
-/* linked list of registered groups */
52
+/*! \brief linked list of registered groups */
58 53
 typedef struct _cfg_group {
59
-	int		num;		/* number of variables within the group */
60
-	cfg_mapping_t	*mapping;	/* describes the mapping betweeen
54
+	int		num;		/*!< number of variables within the group */
55
+	cfg_mapping_t	*mapping;	/*!< describes the mapping betweeen
61 56
 					the cfg variable definition and the memory block */
62
-	char		*vars;		/* pointer to the memory block where the values
57
+	char		*vars;		/*!< pointer to the memory block where the values
63 58
 					are stored -- used only before the config is
64 59
 					shmized. */
65
-	int		size;		/* size of the memory block that has to be
60
+	int		size;		/*!< size of the memory block that has to be
66 61
 					allocated to store the values */
67
-	int		offset;		/* offset of the group within the
62
+	int		offset;		/*!< offset of the group within the
68 63
 					shmized memory block */
69
-	void		**handle;	/* per-process handle that can be used
64
+	void		**handle;	/*!< per-process handle that can be used
70 65
 					by the modules to access the variables.
71 66
 					It is registered when the group is created,
72 67
 					and updated every time the block is replaced */
73 68
 
74
-	unsigned char	dynamic;	/* indicates whether the variables within the group
69
+	unsigned char	dynamic;	/*!< indicates whether the variables within the group
75 70
 					are dynamically	allocated or not */
76 71
 	struct _cfg_group	*next;
77 72
 	int		name_len;	
78 73
 	char		name[1];
79 74
 } cfg_group_t;
80 75
 
81
-/* single memoy block that contains all the cfg values */
76
+/*! \brief single memoy block that contains all the cfg values */
82 77
 typedef struct _cfg_block {
83
-	atomic_t	refcnt;		/* reference counter,
78
+	atomic_t	refcnt;		/*!< reference counter,
84 79
 					the block is automatically deleted
85 80
 					when it reaches 0 */
86
-	char		**replaced;	/* set of the strings that must be freed
81
+	char		**replaced;	/*!< set of the strings that must be freed
87 82
 					together with the block. The content depends
88 83
 					on the block that replaces this one */
89
-	unsigned char	vars[1];	/* blob that contains the values */
84
+	unsigned char	vars[1];	/*!< blob that contains the values */
90 85
 } cfg_block_t;
91 86
 
92
-/* Linked list of per-child process callbacks.
87
+/*! \brief Linked list of per-child process callbacks.
93 88
  * Each child process has a local pointer, and executes the callbacks
94 89
  * when the pointer is not pointing to the end of the list.
95 90
  * Items from the begginning of the list are deleted when the starter
96 91
  * pointer is moved, and no more child process uses them.
97 92
  */
98 93
 typedef struct _cfg_child_cb {
99
-	atomic_t		refcnt; /* number of child processes
94
+	atomic_t		refcnt; /*!< number of child processes
100 95
 					referring to the element */
101
-	atomic_t		cb_count;	/* This counter is used to track
96
+	atomic_t		cb_count;	/*!< This counter is used to track
102 97
 						 * how many times the callback needs
103 98
 						 * to be executed.
104 99
 						 * >0 the cb needs to be executed
105 100
 						 * <=0 the cb no longer needs to be executed
106 101
 						 */
107
-	str			gname, name;	/* name of the variable that has changed */
108
-	cfg_on_set_child	cb;	/* callback function that has to be called */
102
+	str			gname, name;	/*!< name of the variable that has changed */
103
+	cfg_on_set_child	cb;	/*!< callback function that has to be called */
109 104
 
110 105
 	struct _cfg_child_cb	*next;
111 106
 } 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.