diff options
author | Joshua Colp <jcolp@digium.com> | 2016-01-12 13:25:39 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-01-12 13:25:40 -0600 |
commit | 56d1162dc244983ad275dacdedbac518c0d75bd3 (patch) | |
tree | 91d96edc1e1fd82392145a8db1c492a5674df596 /include/asterisk/taskprocessor.h | |
parent | 25c0ed2f64c633b13cfcf3d3564613919724b58d (diff) | |
parent | 4276f185f0718b2d0de2d021c3629cc719c78745 (diff) |
Merge topic 'update_taskprocessor_commands' into 13
* changes:
Sorcery: Create human friendly serializer names.
Stasis: Create human friendly taskprocessor/serializer names.
taskprocessor.c: New API for human friendly taskprocessor names.
taskprocessor.c: Sort CLI "core show taskprocessors" output.
Diffstat (limited to 'include/asterisk/taskprocessor.h')
-rw-r--r-- | include/asterisk/taskprocessor.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/asterisk/taskprocessor.h b/include/asterisk/taskprocessor.h index 6ebf0729c..af3ce747f 100644 --- a/include/asterisk/taskprocessor.h +++ b/include/asterisk/taskprocessor.h @@ -56,6 +56,9 @@ struct ast_taskprocessor; +/*! \brief Suggested maximum taskprocessor name length (less null terminator). */ +#define AST_TASKPROCESSOR_MAX_NAME 45 + #define AST_TASKPROCESSOR_HIGH_WATER_LEVEL 500 /*! @@ -259,6 +262,30 @@ int ast_taskprocessor_execute(struct ast_taskprocessor *tps); int ast_taskprocessor_is_task(struct ast_taskprocessor *tps); /*! + * \brief Get the next sequence number to create a human friendly taskprocessor name. + * \since 13.8.0 + * + * \return Sequence number for use in creating human friendly taskprocessor names. + */ +unsigned int ast_taskprocessor_seq_num(void); + +/*! + * \brief Build a taskprocessor name with a sequence number on the end. + * \since 13.8.0 + * + * \param buf Where to put the built taskprocessor name. + * \param size How large is buf including null terminator. + * \param format printf format to create the non-sequenced part of the name. + * + * \note The user supplied part of the taskprocessor name is truncated + * to allow the full sequence number to be appended within the supplied + * buffer size. + * + * \return Nothing + */ +void __attribute__((format(printf, 3, 4))) ast_taskprocessor_build_name(char *buf, unsigned int size, const char *format, ...); + +/*! * \brief Return the name of the taskprocessor singleton * \since 1.6.1 */ |