Sun May 20 06:38:14 2012

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_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_res representing the result of comparing fattr1 and fattr2.

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:
0 if joint attributes exist
-1 if no joint attributes are present

Referenced by format_joint_helper().

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

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:
0 if all attributes exist
-1 if any of the attributes not present

Referenced by format_isset_helper().

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.

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:

Generated on Sun May 20 06:38:14 2012 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6