diff options
author | Mark Michelson <mmichelson@digium.com> | 2014-03-07 21:23:39 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2014-03-07 21:23:39 +0000 |
commit | c162101d6937babbccc6ec49f8d6ff85d51af9f9 (patch) | |
tree | 741dc5dda8a8c39af456c905d8c2679fab316310 /include/asterisk | |
parent | feae552139d2617117d1c5c5a80d36b60e6e86fc (diff) |
Make res_sorcery_realtime filter unknown retrieved results.
When retrieving data from a database or other realtime backend, it's quite
possible to retrieve variables that Asterisk does not care about but that
are legitimate to exist. Asterisk does not need to throw a hissy fit when
these variables are encountered but rather just filter them out.
Review: https://reviewboard.asterisk.org/r/3305
........
Merged revisions 410187 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/sorcery.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/asterisk/sorcery.h b/include/asterisk/sorcery.h index 873d32251..a1103366a 100644 --- a/include/asterisk/sorcery.h +++ b/include/asterisk/sorcery.h @@ -928,6 +928,26 @@ int ast_sorcery_object_set_extended(const void *object, const char *name, const */ int ast_sorcery_object_id_compare(const void *obj_left, const void *obj_right, int flags); +/*! + * \brief Get the sorcery object type given a type name. + * + * \param sorcery The sorcery from which to retrieve the object type + * \param type The type name + */ +struct ast_sorcery_object_type *ast_sorcery_get_object_type(const struct ast_sorcery *sorcery, + const char *type); + +/*! + * \brief Determine if a particular object field has been registered with sorcery + * + * \param object_type The object type to check against + * \param field_name The name of the field to check + * + * \retval 0 The field is not registered for this sorcery type + * \retval 1 The field is registered for this sorcery type + */ +int ast_sorcery_is_object_field_registered(const struct ast_sorcery_object_type *object_type, + const char *field_name); #if defined(__cplusplus) || defined(c_plusplus) } |