UniMRCP  1.7.0
mrcp_generic_header.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_GENERIC_HEADER_H
18 #define MRCP_GENERIC_HEADER_H
19 
20 /**
21  * @file mrcp_generic_header.h
22  * @brief MRCP Generic Header
23  */
24 
25 #include "mrcp_types.h"
26 #include "mrcp_header_accessor.h"
27 
29 
30 /** Enumeration of MRCP generic header fields */
31 typedef enum {
32  GENERIC_HEADER_ACTIVE_REQUEST_ID_LIST,
33  GENERIC_HEADER_PROXY_SYNC_ID,
34  GENERIC_HEADER_ACCEPT_CHARSET,
35  GENERIC_HEADER_CONTENT_TYPE,
36  GENERIC_HEADER_CONTENT_ID,
37  GENERIC_HEADER_CONTENT_BASE,
38  GENERIC_HEADER_CONTENT_ENCODING,
39  GENERIC_HEADER_CONTENT_LOCATION,
40  GENERIC_HEADER_CONTENT_LENGTH,
41  GENERIC_HEADER_CACHE_CONTROL,
42  GENERIC_HEADER_LOGGING_TAG,
43  GENERIC_HEADER_VENDOR_SPECIFIC_PARAMS,
44 
45  /** Additional header fields for MRCP v2 */
47  GENERIC_HEADER_FETCH_TIMEOUT,
48  GENERIC_HEADER_SET_COOKIE,
49  GENERIC_HEADER_SET_COOKIE2,
50 
51  GENERIC_HEADER_COUNT
53 
54 /** MRCP request identifiers list declaration */
56 /** MRCP vendor specific parameter list of pairs */
58 /** MRCP generic header declaration */
60 
61 /** Max number of request ids in active request id list */
62 #define MAX_ACTIVE_REQUEST_ID_COUNT 5
63 /** List (array) of MRCP request identifiers */
65  /** Array of request identifiers */
67  /** Number of request identifiers */
68  apr_size_t count;
69 };
70 
71 
72 /** MRCP generic header */
74  /** Indicates the list of request-ids to which it should apply */
76  /** Helps the resource receiving the event, proxied by the client,
77  to decide if this event has been processed through a direct interaction of the resources */
79  /** Specifies the acceptable character set for entities returned in the response or events associated with this request */
81  /** Restricted to speech markup, grammar, recognition results, etc. */
83  /** Contains an ID or name for the content, by which it can be referred to */
85  /** May be used to specify the base URI for resolving relative URLs within the entity */
87  /** Indicates what additional content coding has been applied to the entity-body */
89  /** Statement of the location of the resource corresponding to this particular entity at the time of the request */
91  /** Contains the length of the content of the message body */
92  apr_size_t content_length;
93  /** Defines the default caching algorithms on the media server for the session or request */
95  /** Sets the logging tag for logs generated by the media server */
97  /** Specifies the vendor specific parameters used by the media server */
99 
100  /** Additional header fields for MRCP v2 */
101  /** Specifies the acceptable media types set for entities returned in the response or events associated with this request */
103  /** Defines the timeout for content that the server may need to fetch over the network */
104  apr_size_t fetch_timeout;
105  /** Enables to synchronize the cookie store of MRCP v2 client and server */
107  /** Enables to synchronize the cookie store of MRCP v2 client and server */
109 };
110 
111 /** Get generic header vtable */
113 
114 
115 /** Append active request id list */
117 /** Find request id in active request id list */
119 
120 
122 
123 #endif /* MRCP_GENERIC_HEADER_H */
#define MRCP_DECLARE(type)
Definition: mrcp.h:40
apr_array_header_t apt_pair_arr_t
Definition: apt_pair.h:42
struct mrcp_vendor_specific_params_list_t mrcp_vendor_specific_params_list_t
Definition: mrcp_generic_header.h:57
apt_str_t content_location
Definition: mrcp_generic_header.h:90
apt_str_t cache_control
Definition: mrcp_generic_header.h:94
mrcp_request_id_list_t active_request_id_list
Definition: mrcp_generic_header.h:75
apt_str_t proxy_sync_id
Definition: mrcp_generic_header.h:78
apt_str_t content_base
Definition: mrcp_generic_header.h:86
mrcp_generic_header_id
Definition: mrcp_generic_header.h:31
#define APT_END_EXTERN_C
Definition: apt.h:38
apt_str_t content_encoding
Definition: mrcp_generic_header.h:88
Definition: mrcp_generic_header.h:46
int apt_bool_t
Definition: apt.h:57
apt_str_t logging_tag
Definition: mrcp_generic_header.h:96
Definition: mrcp_header_accessor.h:37
mrcp_version_e
Definition: mrcp_types.h:30
apt_str_t set_cookie
Definition: mrcp_generic_header.h:106
Definition: mrcp_generic_header.h:73
#define MAX_ACTIVE_REQUEST_ID_COUNT
Definition: mrcp_generic_header.h:62
apt_str_t content_id
Definition: mrcp_generic_header.h:84
#define APT_BEGIN_EXTERN_C
Definition: apt.h:36
Basic MRCP Types.
apr_size_t count
Definition: mrcp_generic_header.h:68
Definition: mrcp_generic_header.h:64
const mrcp_header_vtable_t * mrcp_generic_header_vtable_get(mrcp_version_e version)
apt_bool_t active_request_id_list_find(const mrcp_generic_header_t *generic_header, mrcp_request_id request_id)
apt_str_t content_type
Definition: mrcp_generic_header.h:82
apt_str_t set_cookie2
Definition: mrcp_generic_header.h:108
apr_size_t fetch_timeout
Definition: mrcp_generic_header.h:104
apt_bool_t active_request_id_list_append(mrcp_generic_header_t *generic_header, mrcp_request_id request_id)
mrcp_request_id ids[MAX_ACTIVE_REQUEST_ID_COUNT]
Definition: mrcp_generic_header.h:66
apt_pair_arr_t * vendor_specific_params
Definition: mrcp_generic_header.h:98
apr_size_t content_length
Definition: mrcp_generic_header.h:92
Definition: apt_string.h:36
Abstract MRCP Header Accessor.
apr_uint32_t mrcp_request_id
Definition: mrcp_types.h:59
apt_str_t accept
Definition: mrcp_generic_header.h:102
apt_str_t accept_charset
Definition: mrcp_generic_header.h:80