Sat Apr 26 2014 22:03:23

Asterisk developer's documentation


ast_format_attr_interface Struct Reference

A format must register an attribute interface if it requires the use of the format attributes void pointer. More...

#include <format.h>

Data Fields

enum ast_format_cmp_res(*const format_attr_cmp )(const struct ast_format_attr *fattr1, const struct ast_format_attr *fattr2)
 Determine if format_attr 1 is a subset of format_attr 2.
int(*const format_attr_get_joint )(const struct ast_format_attr *fattr1, const struct ast_format_attr *fattr2, struct ast_format_attr *result)
 Get joint attributes of same format type if they exist.
int(*const format_attr_get_val )(const struct ast_format_attr *format_attr, int key, void *val)
int(*const format_attr_isset )(const struct ast_format_attr *format_attr, va_list ap)
 Find out if format capabilities in va_list are in format.
void(*const format_attr_sdp_generate )(const struct ast_format_attr *format_attr, unsigned int payload, struct ast_str **str)
 Generate SDP attribute information from an ast_format_attr structure.
int(*const format_attr_sdp_parse )(struct ast_format_attr *format_attr, const char *attributes)
void(*const format_attr_set )(struct ast_format_attr *format_attr, va_list ap)
 Set format capabilities from a list of key value pairs ending with AST_FORMAT_ATTR_END.
enum ast_format_id id

Detailed Description

A format must register an attribute interface if it requires the use of the format attributes void pointer.

Definition at line 174 of file format.h.


Field Documentation

enum ast_format_cmp_res(* const format_attr_cmp)(const struct ast_format_attr *fattr1, const struct ast_format_attr *fattr2)

Determine if format_attr 1 is a subset of format_attr 2.

Return values:
ast_format_cmp_resrepresenting the result of comparing fattr1 and fattr2.

Definition at line 182 of file format.h.

Referenced by format_cmp_helper(), and format_isset_helper().

int(* const format_attr_get_joint)(const struct ast_format_attr *fattr1, const struct ast_format_attr *fattr2, struct ast_format_attr *result)

Get joint attributes of same format type if they exist.

Return values:
0if joint attributes exist
-1if no joint attributes are present

Definition at line 189 of file format.h.

Referenced by format_joint_helper().

int(* const format_attr_get_val)(const struct ast_format_attr *format_attr, int key, void *val)

Definition at line 221 of file format.h.

Referenced by ast_format_get_value().

int(* const format_attr_isset)(const struct ast_format_attr *format_attr, va_list ap)

Find out if format capabilities in va_list are in format.

Note:
This function does not need to call va_end of the va_list.
This function is optional. In many cases the format_attr_cmp function can be used to derive these results. If it is possible that some format attributes have no bearing on the equality of two formats, this function must exist.
Return values:
0if all attributes exist
-1if any of the attributes not present

Definition at line 207 of file format.h.

Referenced by format_isset_helper().

void(* const format_attr_sdp_generate)(const struct ast_format_attr *format_attr, unsigned int payload, struct ast_str **str)

Generate SDP attribute information from an ast_format_attr structure.

Note:
This callback should generate a full fmtp line using the provided payload number.

Definition at line 236 of file format.h.

Referenced by ast_format_sdp_generate().

int(* const format_attr_sdp_parse)(struct ast_format_attr *format_attr, const char *attributes)

Definition at line 229 of file format.h.

Referenced by ast_format_sdp_parse().

void(* const format_attr_set)(struct ast_format_attr *format_attr, va_list ap)

Set format capabilities from a list of key value pairs ending with AST_FORMAT_ATTR_END.

Note:
This function does not need to call va_end of the va_list.

Definition at line 193 of file format.h.

Referenced by format_isset_helper(), and format_set_helper().

format type

Definition at line 176 of file format.h.

Referenced by ast_format_attr_reg_interface(), and ast_format_attr_unreg_interface().


The documentation for this struct was generated from the following file: