UniMRCP  1.7.0
Data Structures | Macros | Functions
mrcp_message.h File Reference

MRCP Message Definition. More...

#include "mrcp_types.h"
#include "mrcp_start_line.h"
#include "mrcp_header.h"
#include "mrcp_generic_header.h"
Include dependency graph for mrcp_message.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mrcp_message_t
 

Macros

#define MRCP_MESSAGE_SIDRES(message)   (message)->channel_id.session_id.buf, (message)->channel_id.resource_name.buf
 

Functions

mrcp_message_tmrcp_message_create (apr_pool_t *pool)
 
mrcp_message_tmrcp_request_create (const mrcp_resource_t *resource, mrcp_version_e version, mrcp_method_id method_id, apr_pool_t *pool)
 
mrcp_message_tmrcp_response_create (const mrcp_message_t *request_message, apr_pool_t *pool)
 
mrcp_message_tmrcp_event_create (const mrcp_message_t *request_message, mrcp_method_id event_id, apr_pool_t *pool)
 
apt_bool_t mrcp_message_resource_set (mrcp_message_t *message, const mrcp_resource_t *resource)
 
apt_bool_t mrcp_message_validate (mrcp_message_t *message)
 
void mrcp_message_destroy (mrcp_message_t *message)
 
apt_bool_t mrcp_generic_header_property_add (mrcp_message_t *message, apr_size_t id)
 
apt_bool_t mrcp_generic_header_name_property_add (mrcp_message_t *message, apr_size_t id)
 
apt_bool_t mrcp_resource_header_property_add (mrcp_message_t *message, apr_size_t id)
 
apt_bool_t mrcp_resource_header_name_property_add (mrcp_message_t *message, apr_size_t id)
 
apt_header_field_tmrcp_message_next_header_field_get (const mrcp_message_t *message, apt_header_field_t *header_field)
 

Detailed Description

MRCP Message Definition.

Macro Definition Documentation

◆ MRCP_MESSAGE_SIDRES

#define MRCP_MESSAGE_SIDRES (   message)    (message)->channel_id.session_id.buf, (message)->channel_id.resource_name.buf

Macro to log channel identifier of the message

Function Documentation

◆ mrcp_event_create()

mrcp_message_t* mrcp_event_create ( const mrcp_message_t request_message,
mrcp_method_id  event_id,
apr_pool_t *  pool 
)

Create an MRCP event message based on given requuest message.

Parameters
request_messagethe MRCP request message to create an event for
event_idthe MRCP resource specific event identifier
poolthe pool to allocate memory from

◆ mrcp_generic_header_name_property_add()

apt_bool_t mrcp_generic_header_name_property_add ( mrcp_message_t message,
apr_size_t  id 
)

Add only the name of MRCP generic header field specified by property (numeric identifier).

Parameters
messagethe message to add property for
idthe numeric identifier to add
Remarks
Should be used to construct empty header fiedls for GET-PARAMS requests

◆ mrcp_generic_header_property_add()

apt_bool_t mrcp_generic_header_property_add ( mrcp_message_t message,
apr_size_t  id 
)

Add MRCP generic header field by specified property (numeric identifier).

Parameters
messagethe message to add property for
idthe numeric identifier to add

◆ mrcp_message_create()

mrcp_message_t* mrcp_message_create ( apr_pool_t *  pool)

Create an MRCP message.

Parameters
poolthe pool to allocate memory from

◆ mrcp_message_destroy()

void mrcp_message_destroy ( mrcp_message_t message)

Destroy MRCP message.

Parameters
messagethe message to destroy

◆ mrcp_message_next_header_field_get()

apt_header_field_t* mrcp_message_next_header_field_get ( const mrcp_message_t message,
apt_header_field_t header_field 
)

Get the next MRCP header field.

Parameters
messagethe message to use
header_fieldcurrent header field
Remarks
Should be used to iterate on header fields

apt_header_field_t *header_field = NULL; while( (header_field = mrcp_message_next_header_field_get(message,header_field)) != NULL ) { }

◆ mrcp_message_resource_set()

apt_bool_t mrcp_message_resource_set ( mrcp_message_t message,
const mrcp_resource_t resource 
)

Associate MRCP resource with message.

Parameters
messagethe message to associate resource with
resourcethe resource to associate

◆ mrcp_message_validate()

apt_bool_t mrcp_message_validate ( mrcp_message_t message)

Validate MRCP message.

Parameters
messagethe message to validate

◆ mrcp_request_create()

mrcp_message_t* mrcp_request_create ( const mrcp_resource_t resource,
mrcp_version_e  version,
mrcp_method_id  method_id,
apr_pool_t *  pool 
)

Create an MRCP request message.

Parameters
resourcethe MRCP resource to use
versionthe MRCP version to use
method_idthe MRCP resource specific method identifier
poolthe pool to allocate memory from

◆ mrcp_resource_header_name_property_add()

apt_bool_t mrcp_resource_header_name_property_add ( mrcp_message_t message,
apr_size_t  id 
)

Add only the name of MRCP resource header field specified by property (numeric identifier).

Parameters
messagethe message to add property for
idthe numeric identifier to add
Remarks
Should be used to construct empty header fiedls for GET-PARAMS requests

◆ mrcp_resource_header_property_add()

apt_bool_t mrcp_resource_header_property_add ( mrcp_message_t message,
apr_size_t  id 
)

Add MRCP resource header field by specified property (numeric identifier).

Parameters
messagethe message to add property for
idthe numeric identifier to add

◆ mrcp_response_create()

mrcp_message_t* mrcp_response_create ( const mrcp_message_t request_message,
apr_pool_t *  pool 
)

Create an MRCP response message based on given request message.

Parameters
request_messagethe MRCP request message to create a response for
poolthe pool to allocate memory from