UniMRCP  1.7.0
mrcp_types.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_TYPES_H
18 #define MRCP_TYPES_H
19 
20 /**
21  * @file mrcp_types.h
22  * @brief Basic MRCP Types
23  */
24 
25 #include "mrcp.h"
26 
28 
29 /** Protocol version */
30 typedef enum {
31 
32  MRCP_VERSION_UNKNOWN = 0, /**< Unknown version */
33  MRCP_VERSION_1 = 1, /**< MRCPv1 (RFC4463) */
34  MRCP_VERSION_2 = 2 /**< MRCPv2 (draft-ietf-speechsc-mrcpv2-20) */
36 
37 /** Enumeration of MRCP resource types */
38 typedef enum {
39  MRCP_SYNTHESIZER_RESOURCE, /**< Synthesizer resource */
40  MRCP_RECOGNIZER_RESOURCE, /**< Recognizer resource */
41  MRCP_RECORDER_RESOURCE, /**< Recorder resource */
42  MRCP_VERIFIER_RESOURCE, /**< Verifier resource */
43 
44  MRCP_RESOURCE_TYPE_COUNT /**< Number of resources */
46 
47 /* MRCPv2 specifies request-id as 32bit unsigned integer,
48  * while MRCPv1 doesn't limit this value (1 * DIGIT).
49  * Some MRCPv1 clients use too long request-id.
50  * To support them #define TOO_LONG_MRCP_REQUEST_ID
51  */
52 #ifdef TOO_LONG_MRCP_REQUEST_ID
53 /** MRCP request identifier */
54 typedef apr_uint64_t mrcp_request_id;
55 /** Format to log MRCP request identifier */
56 #define MRCP_REQUEST_ID_FMT APR_UINT64_T_FMT
57 #else
58 /** MRCP request identifier */
59 typedef apr_uint32_t mrcp_request_id;
60 /** Format to log MRCP request identifier */
61 #define MRCP_REQUEST_ID_FMT "d"
62 #endif
63 
64 
65 /** Method identifier associated with method name */
66 typedef apr_size_t mrcp_method_id;
67 /** Resource identifier associated with resource name */
68 typedef apr_size_t mrcp_resource_id;
69 
70 
71 /** Opaque MRCP message declaration */
73 /** Opaque MRCP resource declaration */
75 /** Opaque MRCP resource factory declaration */
77 
78 
80 
81 #endif /* MRCP_TYPES_H */
apr_size_t mrcp_method_id
Definition: mrcp_types.h:66
#define APT_END_EXTERN_C
Definition: apt.h:38
Definition: mrcp_types.h:41
MRCP Core Definitions.
mrcp_version_e
Definition: mrcp_types.h:30
mrcp_resource_type_e
Definition: mrcp_types.h:38
struct mrcp_resource_factory_t mrcp_resource_factory_t
Definition: mrcp_types.h:76
#define APT_BEGIN_EXTERN_C
Definition: apt.h:36
Definition: mrcp_types.h:33
Definition: mrcp_types.h:39
apr_size_t mrcp_resource_id
Definition: mrcp_types.h:68
Definition: mrcp_types.h:32
Definition: mrcp_types.h:42
Definition: mrcp_types.h:44
Definition: mrcp_types.h:34
apr_uint32_t mrcp_request_id
Definition: mrcp_types.h:59
Definition: mrcp_resource.h:32
Definition: mrcp_types.h:40
Definition: mrcp_message.h:37