summaryrefslogtreecommitdiff
path: root/include/asterisk/stringfields.h
diff options
context:
space:
mode:
authorSteve Murphy <murf@digium.com>2006-11-07 21:47:49 +0000
committerSteve Murphy <murf@digium.com>2006-11-07 21:47:49 +0000
commit908f176cf38eb1f81a3372a2ebf24ed17c75e8a6 (patch)
treec85e2036ae8d28edebee2af6cc055a51e39ba1da /include/asterisk/stringfields.h
parent7659f6d5240b03068adf9746b3dd2938d1ebb0fd (diff)
A fair number of changes for the sake of bug 7506
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/stringfields.h')
-rw-r--r--include/asterisk/stringfields.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/asterisk/stringfields.h b/include/asterisk/stringfields.h
index bf4c0a055..d35ef7d8e 100644
--- a/include/asterisk/stringfields.h
+++ b/include/asterisk/stringfields.h
@@ -168,6 +168,22 @@ void __ast_string_field_index_build(struct ast_string_field_mgr *mgr,
int index, const char *format, ...);
/*!
+ \internal
+ \brief Set a field to a complex (built) value
+ \param mgr Pointer to the pool manager structure
+ \param fields Pointer to the first entry of the field array
+ \param num_fields Number of fields in the array
+ \param index Index position of the field within the structure
+ \param format printf-style format string
+ \param args va_list of the args for the format_string
+ \param args_again a copy of the first va_list for the sake of bsd not having a copy routine
+ \return nothing
+*/
+void __ast_string_field_index_build_va(struct ast_string_field_mgr *mgr,
+ ast_string_field *fields, int num_fields,
+ int index, const char *format, va_list a1, va_list a2);
+
+/*!
\brief Declare a string field
\param name The field name
*/
@@ -276,6 +292,18 @@ void __ast_string_field_index_build(struct ast_string_field_mgr *mgr,
__ast_string_field_index_build(&(x)->__field_mgr, &(x)->__begin_field[0], ast_string_field_count(x), index, fmt, args)
/*!
+ \brief Set a field to a complex (built) value with prebuilt va_lists.
+ \param x Pointer to a structure containing fields
+ \param index Index position of the field within the structure
+ \param fmt printf-style format string
+ \param args1 Arguments for format string in va_list format
+ \param args2 a second copy of the va_list for the sake of bsd, with no va_list copy operation
+ \return nothing
+*/
+#define ast_string_field_index_build_va(x, index, fmt, args1, args2) \
+ __ast_string_field_index_build_va(&(x)->__field_mgr, &(x)->__begin_field[0], ast_string_field_count(x), index, fmt, args1, args2)
+
+/*!
\brief Set a field to a complex (built) value
\param x Pointer to a structure containing fields
\param field Name of the field to set
@@ -287,6 +315,17 @@ void __ast_string_field_index_build(struct ast_string_field_mgr *mgr,
ast_string_field_index_build(x, ast_string_field_index(x, field), fmt, args)
/*!
+ \brief Set a field to a complex (built) value
+ \param x Pointer to a structure containing fields
+ \param field Name of the field to set
+ \param fmt printf-style format string
+ \param argslist a va_list of the args
+ \return nothing
+*/
+#define ast_string_field_build_va(x, field, fmt, args1, args2) \
+ ast_string_field_index_build_va(x, ast_string_field_index(x, field), fmt, args1, args2)
+
+/*!
\brief Free a field's value.
\param x Pointer to a structure containing fields
\param index Index position of the field within the structure