00001 /* 00002 * Copyright 2008-2010 Arsen Chaloyan 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 * 00016 * $Id: mrcp_types.h 1753 2010-08-16 20:46:45Z achaloyan $ 00017 */ 00018 00019 #ifndef MRCP_TYPES_H 00020 #define MRCP_TYPES_H 00021 00022 /** 00023 * @file mrcp_types.h 00024 * @brief Basic MRCP Types 00025 */ 00026 00027 #include "mrcp.h" 00028 00029 APT_BEGIN_EXTERN_C 00030 00031 /** Protocol version */ 00032 typedef enum { 00033 00034 MRCP_VERSION_UNKNOWN = 0, /**< Unknown version */ 00035 MRCP_VERSION_1 = 1, /**< MRCPv1 (RFC4463) */ 00036 MRCP_VERSION_2 = 2 /**< MRCPv2 (draft-ietf-speechsc-mrcpv2-20) */ 00037 } mrcp_version_e; 00038 00039 /** Enumeration of MRCP resource types */ 00040 typedef enum { 00041 MRCP_SYNTHESIZER_RESOURCE, /**< Synthesizer resource */ 00042 MRCP_RECOGNIZER_RESOURCE, /**< Recognizer resource */ 00043 MRCP_RECORDER_RESOURCE, /**< Recorder resource */ 00044 MRCP_VERIFIER_RESOURCE, /**< Verifier resource */ 00045 00046 MRCP_RESOURCE_TYPE_COUNT /**< Number of resources */ 00047 } mrcp_resource_type_e; 00048 00049 /* MRCPv2 specifies request-id as 32bit unsigned integer, 00050 * while MRCPv1 doesn't limit this value (1 * DIGIT). 00051 * Some MRCPv1 clients use too long request-id. 00052 * To support them #define TOO_LONG_MRCP_REQUEST_ID 00053 */ 00054 #ifdef TOO_LONG_MRCP_REQUEST_ID 00055 /** MRCP request identifier */ 00056 typedef apr_uint64_t mrcp_request_id; 00057 /** Format to log MRCP request identifier */ 00058 #define MRCP_REQUEST_ID_FMT APR_UINT64_T_FMT 00059 #else 00060 /** MRCP request identifier */ 00061 typedef apr_uint32_t mrcp_request_id; 00062 /** Format to log MRCP request identifier */ 00063 #define MRCP_REQUEST_ID_FMT "d" 00064 #endif 00065 00066 00067 /** Method identifier associated with method name */ 00068 typedef apr_size_t mrcp_method_id; 00069 /** Resource identifier associated with resource name */ 00070 typedef apr_size_t mrcp_resource_id; 00071 00072 00073 /** Opaque MRCP message declaration */ 00074 typedef struct mrcp_message_t mrcp_message_t; 00075 /** Opaque MRCP resource declaration */ 00076 typedef struct mrcp_resource_t mrcp_resource_t; 00077 /** Opaque MRCP resource factory declaration */ 00078 typedef struct mrcp_resource_factory_t mrcp_resource_factory_t; 00079 00080 00081 APT_END_EXTERN_C 00082 00083 #endif /* MRCP_TYPES_H */