• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
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
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 
19 #ifndef RTSP_PAR_COM_CONSTANTS_H_
20 #define RTSP_PAR_COM_CONSTANTS_H_
21 
22 
23 
24 #include "oscl_str_ptr_len.h"
25 #include "rtsp_par_com_basic_ds.h"
26 
27 
28 //An array of strings corresponding to RTSPMethod enum
29 static const char* const RtspMethodStringPLSS[] =
30 {
31     ""  //METHOD_UNRECOGNIZED
32     , "DESCRIBE" //METHOD_DESCRIBE
33     , "GET_PARAMETER" //METHOD_GET_PARAMETER
34     , "OPTIONS" //METHOD_OPTIONS
35     , "PAUSE" //METHOD_PAUSE
36     , "PLAY" //METHOD_PLAY
37     , "SETUP" //METHOD_SETUP
38     , "RECORD" //METHOD_RECORD
39     , "TEARDOWN" //METHOD_TEARDOWN
40     , "END_OF_STREAM" //METHOD_END_OF_STREAM
41     , "$" //METHOD_BINARY_DATA
42     , "REDIRECT" // METHOD_REDIRECT
43     , "SET_PARAMETER" //METHOD_SET_PARAMETER
44 #ifdef SIMPLE_HTTP_SUPPORT
45     , "GET" //METHOD_GET
46     , "POST" //METHOD_POST
47 #endif
48 #ifdef RTSP_PLAYLIST_SUPPORT
49     , "PLAYLIST_PLAY" //METHOD_PLAYLIST_PLAY
50 #endif
51 };
52 
53 #define RtspReasonStringContinue "Continue"
54 #define RtspReasonStringOK "OK"
55 #define RtspReasonStringCreated "Created"
56 #define RtspReasonStringLowOnStorageSpace "Low on Storage Space"
57 #define RtspReasonStringMultipleChoices "Multiple Choices"
58 #define RtspReasonStringMovedPermanently "Moved Permanently"
59 #define RtspReasonStringMovedTemporarily "Moved Temporarily"
60 #define RtspReasonStringSeeOther "See Other"
61 #define RtspReasonStringNotModified "Not Modified"
62 #define RtspReasonStringUseProxy "Use Proxy"
63 #define RtspReasonStringBadRequest "Bad Request"
64 #define RtspReasonStringUnauthorized "Unauthorized"
65 #define RtspReasonStringPaymentRequired "Payment Required"
66 #define RtspReasonStringForbidden "Forbidden"
67 #define RtspReasonStringNotFound "Not Found"
68 #define RtspReasonStringMethodNotAllowed "Method Not Allowed"
69 #define RtspReasonStringNotAcceptable "Not Acceptable"
70 #define RtspReasonStringProxyAuthenticationRequired "Proxy Authentication Required"
71 #define RtspReasonStringRequestTimeOut "Request Time-out"
72 #define RtspReasonStringGone "Gone"
73 #define RtspReasonStringLengthRequired "Length Required"
74 #define RtspReasonStringPreconditionFailed "Precondition Failed"
75 #define RtspReasonStringRequestEntityTooLarge "Request Entity Too Large"
76 #define RtspReasonStringRequestURITooLarge "Request-URI Too Large"
77 #define RtspReasonStringUnsupportedMediaType "Unsupported Media Type"
78 #define RtspReasonStringParameterNotUnderstood "Parameter Not Understood"
79 #define RtspReasonStringConferenceNotFound "Conference Not Found"
80 #define RtspReasonStringNotEnoughBandwidth "Not Enough Bandwidth"
81 #define RtspReasonStringSessionNotFound "Session Not Found"
82 #define RtspReasonStringMethodNotValidInThisState "Method Not Valid In This State"
83 #define RtspReasonStringHeaderFieldNotValidForResource "Header Field Not Valid For Resource"
84 #define RtspReasonStringInvalidRange "Invalid Range"
85 #define RtspReasonStringParameterIsReadOnly "Parameter Is Read-Only"
86 #define RtspReasonStringAggregateOperationNotAllowed "Aggregate Operation Not Allowed"
87 #define RtspReasonStringOnlyAggregateOperationAllowed "Only Aggregate Operation Allowed"
88 #define RtspReasonStringUnsupportedTransport "Unsupported Transport"
89 #define RtspReasonStringDestinationUnreachable "Destination Unreachable"
90 #define RtspReasonStringUnsupportedClient "Unsupported Client"
91 #define RtspReasonStringInternalServerError "Internal Server Error"
92 #define RtspReasonStringNotImplemented "Not Implemented"
93 #define RtspReasonStringBadGateway "Bad Gateway"
94 #define RtspReasonStringServiceUnavailable "Service Unavailable"
95 #define RtspReasonStringGatewayTimeout "Gateway Timeout"
96 #define RtspReasonStringRTSPVersionNotSupported "RTSP Version Not Supported"
97 #define RtspReasonStringOptionNotSupported "Option Not Supported"
98 
99 #define RtspRequestMethodStringDescribe "DESCRIBE"
100 #define RtspRequestMethodStringGetParameter "GET_PARAMETER"
101 #define RtspRequestMethodStringSetParameter "SET_PARAMETER"
102 #define RtspRequestMethodStringRedirect "REDIRECT"
103 #define RtspRequestMethodStringOptions "OPTIONS"
104 #define RtspRequestMethodStringPause "PAUSE"
105 #define RtspRequestMethodStringPlay "PLAY"
106 #define RtspRequestMethodStringSetup "SETUP"
107 #define RtspRequestMethodStringRecord "RECORD"
108 #define RtspRequestMethodStringTeardown "TEARDOWN"
109 #define RtspRequestMethodStringEndOfStream "END_OF_STREAM"
110 #define RtspRequestMethodStringBinaryData "$"
111 
112 #ifdef RTSP_PLAYLIST_SUPPORT
113 #define RtspRequestMethodStringPlaylistPlay "PLAYLIST_PLAY"
114 #endif
115 
116 #define RTSPVersionString  "RTSP/1.0"
117 #define RTSPVersionString_len  8
118 
119 #define HTTPVersion_1_0_String  "HTTP/1.0"
120 #define HTTPVersion_1_1_String  "HTTP/1.1"
121 #define HTTPVersionString_len  8
122 
123 const char CHAR_CR        = 13;
124 const char CHAR_LF        = 10;
125 const char CHAR_NULL      = 0;
126 const char CHAR_COLON     = ':';
127 const char CHAR_DOLLAR  = '$';
128 const char CHAR_SPACE   = ' ';
129 const char CHAR_SLASH   = '/';
130 const char CHAR_SEMICOLON = ';';
131 const char CHAR_STAR    = '*';
132 const char CHAR_PLUS    = '+';
133 const char CHAR_MINUS   = '-';
134 const char CHAR_DOT     = '.';
135 const char CHAR_TAB     = '\t';
136 const char CHAR_COMMA   = ',';
137 const char CHAR_EQUAL   = '=';
138 const char CHAR_LT   = '<';
139 const char CHAR_GT   = '>';
140 
141 #define RtspRecognizedFieldSessionId "Session"
142 #define RtspRecognizedFieldCSeq "CSeq"
143 #define RtspRecognizedFieldContentBase "Content-Base"
144 #define RtspRecognizedFieldContentType "Content-Type"
145 #define RtspRecognizedFieldContentLength "Content-Length"
146 #define RtspRecognizedFieldUserAgent "User-Agent"
147 #define RtspRecognizedFieldAccept "Accept"
148 #define RtspRecognizedFieldRequire "Require"
149 #define RtspRecognizedFieldRange "Range"
150 #define RtspRecognizedFieldTransport "Transport"
151 #define RtspRecognizedFieldRTPInfo "RTP-Info"
152 #define RtspRecognizedFieldBufferSize "Buffersize"
153 #define RtspRecognizedFieldSupported "Supported"
154 
155 #ifdef RTSP_PLAYLIST_SUPPORT
156 #define RtspRecognizedFieldPlaylistRange "playlist_range"
157 #define RtspRecognizedFieldPlaylistError "playlist_error"
158 //#define RtspPlaylistPlayTimeStr "playlist_play_time"
159 #endif
160 
161 
162 #endif // RTSP_PAR_COM_CONSTANTS_H_
163 
164