summaryrefslogtreecommitdiff
path: root/include/asterisk/sdp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asterisk/sdp.h')
-rw-r--r--include/asterisk/sdp.h70
1 files changed, 67 insertions, 3 deletions
diff --git a/include/asterisk/sdp.h b/include/asterisk/sdp.h
index 8aa9e3b7f..224a0e5a3 100644
--- a/include/asterisk/sdp.h
+++ b/include/asterisk/sdp.h
@@ -561,7 +561,40 @@ struct ast_sdp *ast_sdp_alloc(struct ast_sdp_o_line *o_line,
struct ast_sdp_t_line *t_line);
/*!
- * \brief Find an attribute on the top-level SDP
+ * \brief Find the first attribute match index in the top-level SDP
+ *
+ * \note This will not search within streams for the given attribute.
+ *
+ * \param sdp The SDP in which to search
+ * \param attr_name The name of the attribute to search for
+ * \param payload Optional payload number to search for. If irrelevant, set to -1
+ *
+ * \retval index of attribute line on success.
+ * \retval -1 on failure or not found.
+ *
+ * \since 15.0.0
+ */
+int ast_sdp_find_a_first(const struct ast_sdp *sdp, const char *attr_name, int payload);
+
+/*!
+ * \brief Find the next attribute match index in the top-level SDP
+ *
+ * \note This will not search within streams for the given attribute.
+ *
+ * \param sdp The SDP in which to search
+ * \param last The last matching index found
+ * \param attr_name The name of the attribute to search for
+ * \param payload Optional payload number to search for. If irrelevant, set to -1
+ *
+ * \retval index of attribute line on success.
+ * \retval -1 on failure or not found.
+ *
+ * \since 15.0.0
+ */
+int ast_sdp_find_a_next(const struct ast_sdp *sdp, int last, const char *attr_name, int payload);
+
+/*!
+ * \brief Find an attribute in the top-level SDP
*
* \note This will not search within streams for the given attribute.
*
@@ -578,9 +611,40 @@ struct ast_sdp_a_line *ast_sdp_find_attribute(const struct ast_sdp *sdp,
const char *attr_name, int payload);
/*!
- * \brief Find an attribute on an SDP stream (m-line)
+ * \brief Find the first attribute match index in an SDP stream (m-line)
*
- * \param sdp The SDP in which to search
+ * \param m_line The SDP m-line in which to search
+ * \param attr_name The name of the attribute to search for
+ * \param payload Optional payload number to search for. If irrelevant, set to -1
+ *
+ * \retval index of attribute line on success.
+ * \retval -1 on failure or not found.
+ *
+ * \since 15.0.0
+ */
+int ast_sdp_m_find_a_first(const struct ast_sdp_m_line *m_line, const char *attr_name,
+ int payload);
+
+/*!
+ * \brief Find the next attribute match index in an SDP stream (m-line)
+ *
+ * \param m_line The SDP m-line in which to search
+ * \param last The last matching index found
+ * \param attr_name The name of the attribute to search for
+ * \param payload Optional payload number to search for. If irrelevant, set to -1
+ *
+ * \retval index of attribute line on success.
+ * \retval -1 on failure or not found.
+ *
+ * \since 15.0.0
+ */
+int ast_sdp_m_find_a_next(const struct ast_sdp_m_line *m_line, int last,
+ const char *attr_name, int payload);
+
+/*!
+ * \brief Find an attribute in an SDP stream (m-line)
+ *
+ * \param m_line The SDP m-line in which to search
* \param attr_name The name of the attribute to search for
* \param payload Optional payload number to search for. If irrelevant, set to -1
*