UniMRCP  1.3.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mrcp_types.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2014 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  * $Id: mrcp_types.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
17  */
18 
19 #ifndef MRCP_TYPES_H
20 #define MRCP_TYPES_H
21 
22 /**
23  * @file mrcp_types.h
24  * @brief Basic MRCP Types
25  */
26 
27 #include "mrcp.h"
28 
30 
31 /** Protocol version */
32 typedef enum {
33 
34  MRCP_VERSION_UNKNOWN = 0, /**< Unknown version */
35  MRCP_VERSION_1 = 1, /**< MRCPv1 (RFC4463) */
36  MRCP_VERSION_2 = 2 /**< MRCPv2 (draft-ietf-speechsc-mrcpv2-20) */
38 
39 /** Enumeration of MRCP resource types */
40 typedef enum {
41  MRCP_SYNTHESIZER_RESOURCE, /**< Synthesizer resource */
42  MRCP_RECOGNIZER_RESOURCE, /**< Recognizer resource */
43  MRCP_RECORDER_RESOURCE, /**< Recorder resource */
44  MRCP_VERIFIER_RESOURCE, /**< Verifier resource */
45 
46  MRCP_RESOURCE_TYPE_COUNT /**< Number of resources */
48 
49 /* MRCPv2 specifies request-id as 32bit unsigned integer,
50  * while MRCPv1 doesn't limit this value (1 * DIGIT).
51  * Some MRCPv1 clients use too long request-id.
52  * To support them #define TOO_LONG_MRCP_REQUEST_ID
53  */
54 #ifdef TOO_LONG_MRCP_REQUEST_ID
55 /** MRCP request identifier */
56 typedef apr_uint64_t mrcp_request_id;
57 /** Format to log MRCP request identifier */
58 #define MRCP_REQUEST_ID_FMT APR_UINT64_T_FMT
59 #else
60 /** MRCP request identifier */
61 typedef apr_uint32_t mrcp_request_id;
62 /** Format to log MRCP request identifier */
63 #define MRCP_REQUEST_ID_FMT "d"
64 #endif
65 
66 
67 /** Method identifier associated with method name */
68 typedef apr_size_t mrcp_method_id;
69 /** Resource identifier associated with resource name */
70 typedef apr_size_t mrcp_resource_id;
71 
72 
73 /** Opaque MRCP message declaration */
75 /** Opaque MRCP resource declaration */
77 /** Opaque MRCP resource factory declaration */
79 
80 
82 
83 #endif /* MRCP_TYPES_H */