UniMRCP  1.7.0
mrcp_stream.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2015 Arsen Chaloyan
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef MRCP_STREAM_H
18 #define MRCP_STREAM_H
19 
20 /**
21  * @file mrcp_stream.h
22  * @brief MRCP Stream Parser and Generator
23  */
24 
25 #include "apt_text_message.h"
26 #include "mrcp_types.h"
27 
29 
30 
31 /** Opaque MRCP parser declaration */
33 /** Opaque MRCP generator declaration */
35 
36 
37 /** Create MRCP stream parser */
38 MRCP_DECLARE(mrcp_parser_t*) mrcp_parser_create(const mrcp_resource_factory_t *resource_factory, apr_pool_t *pool);
39 
40 /** Set resource by name to be used for parsing of MRCPv1 messages */
41 MRCP_DECLARE(void) mrcp_parser_resource_set(mrcp_parser_t *parser, const apt_str_t *resource_name);
42 
43 /** Set verbose mode for the parser */
45 
46 /** Parse MRCP stream */
48 
49 
50 
51 /** Create MRCP stream generator */
52 MRCP_DECLARE(mrcp_generator_t*) mrcp_generator_create(const mrcp_resource_factory_t *resource_factory, apr_pool_t *pool);
53 
54 /** Set verbose mode for the generator */
56 
57 /** Generate MRCP stream */
59 
60 
61 /** Generate MRCP message (excluding message body) */
63 
64 
66 
67 #endif /* MRCP_STREAM_H */
#define MRCP_DECLARE(type)
Definition: mrcp.h:40
void mrcp_parser_verbose_set(mrcp_parser_t *parser, apt_bool_t verbose)
Definition: apt_text_stream.h:43
mrcp_generator_t * mrcp_generator_create(const mrcp_resource_factory_t *resource_factory, apr_pool_t *pool)
Text Message Interface (RFC5322)
#define APT_END_EXTERN_C
Definition: apt.h:38
int apt_bool_t
Definition: apt.h:57
void mrcp_generator_verbose_set(mrcp_generator_t *generator, apt_bool_t verbose)
struct mrcp_resource_factory_t mrcp_resource_factory_t
Definition: mrcp_types.h:76
apt_message_status_e mrcp_generator_run(mrcp_generator_t *generator, mrcp_message_t *message, apt_text_stream_t *stream)
struct mrcp_generator_t mrcp_generator_t
Definition: mrcp_stream.h:34
#define APT_BEGIN_EXTERN_C
Definition: apt.h:36
Basic MRCP Types.
apt_message_status_e
Definition: apt_text_message.h:31
void mrcp_parser_resource_set(mrcp_parser_t *parser, const apt_str_t *resource_name)
mrcp_parser_t * mrcp_parser_create(const mrcp_resource_factory_t *resource_factory, apr_pool_t *pool)
Definition: apt_string.h:36
typedefAPT_BEGIN_EXTERN_C struct mrcp_parser_t mrcp_parser_t
Definition: mrcp_stream.h:32
apt_message_status_e mrcp_parser_run(mrcp_parser_t *parser, apt_text_stream_t *stream, mrcp_message_t **message)
apt_bool_t mrcp_message_generate(const mrcp_resource_factory_t *resource_factory, mrcp_message_t *message, apt_text_stream_t *stream)
Definition: mrcp_message.h:37