Browse code

- more flexibil interface for accessing avps

Bogdan-Andrei Iancu authored on 09/10/2004 12:16:14
Showing 2 changed files
... ...
@@ -27,6 +27,7 @@
27 27
  * History:
28 28
  * ---------
29 29
  *  2004-07-21  created (bogdan)
30
+ *  2004-10-09  interface more flexibil - more function available (bogdan)
30 31
  */
31 32
 
32 33
 
... ...
@@ -141,7 +142,9 @@ error:
141 141
 }
142 142
 
143 143
 
144
-inline static str* get_avp_name(struct usr_avp *avp)
144
+/* get value functions */
145
+
146
+inline str* get_avp_name(struct usr_avp *avp)
145 147
 {
146 148
 	switch ( avp->flags&(AVP_NAME_STR|AVP_VAL_STR) )
147 149
 	{
... ...
@@ -164,8 +167,6 @@ inline static str* get_avp_name(struct usr_avp *avp)
164 164
 }
165 165
 
166 166
 
167
-/* get value functions */
168
-
169 167
 inline void get_avp_val(struct usr_avp *avp, int_str *val)
170 168
 {
171 169
 	if (avp==0 || val==0)
... ...
@@ -192,6 +193,13 @@ inline void get_avp_val(struct usr_avp *avp, int_str *val)
192 192
 }
193 193
 
194 194
 
195
+struct usr_avp** get_avp_list( )
196
+{
197
+	assert( crt_avps!=0 );
198
+	return crt_avps;
199
+}
200
+
201
+
195 202
 
196 203
 
197 204
 /* search functions */
... ...
@@ -68,9 +68,11 @@ void destroy_avp( struct usr_avp *avp);
68 68
 void destroy_avp_list( struct usr_avp **list );
69 69
 void destroy_avp_list_unsafe( struct usr_avp **list );
70 70
 
71
-/* get val func */
71
+/* get func */
72 72
 void get_avp_val(struct usr_avp *avp, int_str *val );
73
+str* get_avp_name(struct usr_avp *avp);
73 74
 struct usr_avp** set_avp_list( struct usr_avp **list );
75
+struct usr_avp** get_avp_list( );
74 76
 
75 77
 
76 78
 #endif