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 * @file pvmf_protocolengine_node_events.h 20 * @brief 21 */ 22 23 #ifndef PVMF_PROTOCOL_ENGINE_NODE_EVENTS_H_INCLUDED 24 #define PVMF_PROTOCOL_ENGINE_NODE_EVENTS_H_INCLUDED 25 26 #ifndef PVMF_BASIC_ERRORINFOMESSAGE_H_INCLUDED 27 #include "pvmf_basic_errorinfomessage.h" 28 #endif 29 30 /** 31 UUID for Protocol Engine Node info events. These events use the basic event type 32 and the event codes in PVProtocolEngineNodeInfoEventTypes 33 **/ 34 #define PVMFPROTOCOLENGINENODEInfoEventTypesUUID PVUuid(0xaae693a0,0xac71,0x11d9,0x96,0x69,0x08,0x00,0x20,0x0c,0x9a,0x66) 35 36 /** 37 Event codes for FTDM Node Info events. 38 **/ 39 enum PVMFPROTOCOLENGINENODEInfoEventTypes 40 { 41 PVMFPROTOCOLENGINE_INFO_MovieAtomCompleted = PVMF_NODE_INFO_EVENT_LAST + 1, // 4096+1=4097 42 43 PVMFPROTOCOLENGINENODEInfo_First, //placeholder // 4098 44 45 //This event code is used to report download progress. 46 //It is reported with the PVMFInfoBufferingStatus event type 47 //as a node information event. The percentage complete 48 //will be in the Local Buffer in the first 32 bits 49 PVMFPROTOCOLENGINENODEInfo_BufferingStatus, // 4099 50 51 PVMFPROTOCOLENGINENODEInfo_TruncatedContentByServerDisconnect, // 4100 52 53 54 // redirect status code 55 PVMFPROTOCOLENGINENODEInfo_Redirect, // 4101 56 //"300" ; Multiple Choices 57 PVMFPROTOCOLENGINENODEInfo_HTTPRedirectCode300 = PVMFPROTOCOLENGINENODEInfo_Redirect + 300, // 4401 58 //"301" ; Moved Permanently 59 PVMFPROTOCOLENGINENODEInfo_HTTPRedirectCode301, // 4402 60 //"302" ; Found 61 PVMFPROTOCOLENGINENODEInfo_HTTPRedirectCode302, // 4403 62 //"303" ; See Other 63 PVMFPROTOCOLENGINENODEInfo_HTTPRedirectCode303, // 4404 64 //"304" ; Not Modified 65 PVMFPROTOCOLENGINENODEInfo_HTTPRedirectCode304, // 4405 66 //"305" ; Use Proxy 67 PVMFPROTOCOLENGINENODEInfo_HTTPRedirectCode305, // 4406 68 // "306" ; Uused 69 PVMFPROTOCOLENGINENODEInfo_HTTPRedirectCode306, // 4407 70 // "307" ; Use Temporary Redirect 71 PVMFPROTOCOLENGINENODEInfo_HTTPRedirectCode307, // 4408 72 // unknown re-direct code 73 PVMFPROTOCOLENGINENODEInfo_HTTPRedirectCode3xxUnknown, // 4409 74 75 PVMFPROTOCOLENGINENODEInfo_Last //placeholder 76 77 }; 78 79 /** 80 UUID for FTDM Node error events. These events use the type PVMFPROTOCOLENGINENODEErrorEvent 81 defined below and the event codes in PVMFPROTOCOLENGINENODEErrorEventTypes 82 **/ 83 #define PVProtocolEngineNodeErrorEventTypesUUID PVUuid(0x0a9ad2b0,0xaaed,0x11d9,0x96,0x69,0x08,0x00,0x20,0x0c,0x9a,0x66) 84 85 86 /** 87 Error codes used in Protocol Engine node error event messages 88 **/ 89 enum PVProtocolEngineNodeErrorEventType 90 { 91 PVProtocolEngineNodeErrorEventStart = 1024, 92 93 // some processing errors, especially for pending commands with failure, within the range [200, 299], which is not HTTP status error code range 94 PVProtocolEngineNodeErrorNotHTTPErrorStart = PVProtocolEngineNodeErrorEventStart + 200, 95 PVProtocolEngineNodeErrorProcessingFailure = PVProtocolEngineNodeErrorNotHTTPErrorStart + 90, // 1314 96 PVProtocolEngineNodeErrorProcessingFailure_MaximumSizeLimitation = PVProtocolEngineNodeErrorProcessingFailure - 19, // 1295 97 PVProtocolEngineNodeErrorProcessingFailure_ContentLengthNotMatch = PVProtocolEngineNodeErrorProcessingFailure - 16, // 1298 98 PVProtocolEngineNodeErrorProcessingFailure_TimeoutServerInactivity = PVProtocolEngineNodeErrorProcessingFailure - 15, // 1299 99 PVProtocolEngineNodeErrorProcessingFailure_TimeoutServerNoResponce = PVProtocolEngineNodeErrorProcessingFailure - 14, // 1300 100 PVProtocolEngineNodeErrorProcessingFailure_ChunkedTransferEncodingNotSupport = PVProtocolEngineNodeErrorProcessingFailure - 13, // 1301 101 PVProtocolEngineNodeErrorProcessingFailure_AsfHeaderSizeExceedLimit = PVProtocolEngineNodeErrorProcessingFailure - 12, // 1302 102 PVProtocolEngineNodeErrorProcessingFailure_HttpVersionNotSupported = PVProtocolEngineNodeErrorProcessingFailure - 11, // 1303 103 PVProtocolEngineNodeErrorProcessingFailure_MemoryAllocationFailure = PVProtocolEngineNodeErrorProcessingFailure - 10, // 1304 104 PVProtocolEngineNodeErrorProcessingFailure_OutputToDataStreamFailure = PVProtocolEngineNodeErrorProcessingFailure - 9, // 1305 105 PVProtocolEngineNodeErrorProcessingFailure_DataStreamOpenFailure = PVProtocolEngineNodeErrorProcessingFailure - 8, // 1306 106 PVProtocolEngineNodeErrorProcessingFailure_ParseHttpResponseFailure = PVProtocolEngineNodeErrorProcessingFailure - 7, // 1307 107 PVProtocolEngineNodeErrorProcessingFailure_ComposeHttpRequestFailure = PVProtocolEngineNodeErrorProcessingFailure - 6, // 1308 108 PVProtocolEngineNodeErrorProcessingFailure_ComposeHttpRequestBufferSizeNotMatchRequestSize = PVProtocolEngineNodeErrorProcessingFailure - 5, // 1309 109 PVProtocolEngineNodeErrorProcessingFailure_MediaDataCreateFailure = PVProtocolEngineNodeErrorProcessingFailure - 4, // 1310 110 PVProtocolEngineNodeErrorProcessingFailure_BadUrl = PVProtocolEngineNodeErrorProcessingFailure - 3, // 1311 111 PVProtocolEngineNodeErrorProcessingFailure_InputOutputNotReady = PVProtocolEngineNodeErrorProcessingFailure - 2, // 1312 112 PVProtocolEngineNodeErrorProcessingFailure_GeneralError = PVProtocolEngineNodeErrorProcessingFailure - 1, // 1313 113 114 115 PVProtocolEngineNodeErrorHTTPRedirect_NotValidUrl = PVProtocolEngineNodeErrorProcessingFailure + 1, // 1315 116 PVProtocolEngineNodeErrorHTTPRedirect_TrialsExceedLimit, // 1316 117 PVProtocolEngineNodeErrorHTTPErrorCode401_InvalidRealm, // 1317 118 PVProtocolEngineNodeErrorHTTPErrorCode401_UnsupportedAuthenticationType, // 1318 119 PVProtocolEngineNodeErrorHTTPErrorCode401_NoAuthenticationHeader, // 1319 120 121 122 PVProtocolEngineNodeErrorNotHTTPErrorEnd = PVProtocolEngineNodeErrorEventStart + 299, 123 124 // 1xx code unsupported in Http/1.0 125 PVProtocolEngineNodeErrorHTTPInfoCodeStart = PVProtocolEngineNodeErrorEventStart + 100, // 1124 126 PVProtocolEngineNodeErrorHTTPInfoCode100_UnsupportInHttp10 = PVProtocolEngineNodeErrorHTTPInfoCodeStart, // 1124 127 PVProtocolEngineNodeErrorHTTPInfoCode101_UnsupportInHttp10, // 1125 128 PVProtocolEngineNodeErrorHTTPInfoCodeEnd = PVProtocolEngineNodeErrorEventStart + 199, 129 130 // 2xx code error with zero content length 131 PVProtocolEngineNodeErrorHTTP2xxCodeStart = PVProtocolEngineNodeErrorEventStart + 200, // 1224 132 PVProtocolEngineNodeErrorHTTP200_ZeroContentLength = PVProtocolEngineNodeErrorHTTP2xxCodeStart, // 1224 133 PVProtocolEngineNodeErrorHTTP201_ZeroContentLength, // 1225 134 PVProtocolEngineNodeErrorHTTP202_ZeroContentLength, // 1226 135 PVProtocolEngineNodeErrorHTTP203_ZeroContentLength, // 1227 136 PVProtocolEngineNodeErrorHTTP204_NoContent, // 1228 137 PVProtocolEngineNodeErrorHTTP205_ZeroContentLength, // 1229 138 PVProtocolEngineNodeErrorHTTP206_ZeroContentLength, // 1230 139 PVProtocolEngineNodeErrorHTTP2xxCodeEnd, // 1231 140 141 // redirect errors 142 PVProtocolEngineNodeErrorHTTPRedirectCodeStart = PVProtocolEngineNodeErrorEventStart + 300, 143 PVProtocolEngineNodeErrorHTTPRedirectCode300_InvalidUrl = PVProtocolEngineNodeErrorHTTPRedirectCodeStart, // 1324 144 //"301" ; Moved Permanently 145 PVProtocolEngineNodeErrorHTTPRedirectCode301_InvalidUrl, // 1325 146 //"302" ; Found 147 PVProtocolEngineNodeErrorHTTPRedirectCode302_InvalidUrl, // 1326 148 //"303" ; See Other 149 PVProtocolEngineNodeErrorHTTPRedirectCode303_InvalidUrl, // 1327 150 //"304" ; Not Modified 151 PVProtocolEngineNodeErrorHTTPRedirectCode304_InvalidUrl, // 1328 152 //"305" ; Use Proxy 153 PVProtocolEngineNodeErrorHTTPRedirectCode305_InvalidUrl, // 1329 154 // "306" ; Uused 155 PVProtocolEngineNodeErrorHTTPRedirectCode306_InvalidUrl, // 1330 156 // "307" ; Use Temporary Redirect 157 PVProtocolEngineNodeErrorHTTPRedirectCode307_InvalidUrl, // 1331 158 159 PVProtocolEngineNodeErrorHTTPRedirectCodeEnd = PVProtocolEngineNodeErrorEventStart + 399, 160 161 //"400" ; Bad Request 162 PVProtocolEngineNodeErrorHTTPErrorCode400 = PVProtocolEngineNodeErrorEventStart + 400, // 1424 163 //"401" ; Unauthorized 164 PVProtocolEngineNodeErrorHTTPErrorCode401, // 1425 165 //"402" ; Payment Required 166 PVProtocolEngineNodeErrorHTTPErrorCode402, // 1426 167 //"403" ; Forbidden 168 PVProtocolEngineNodeErrorHTTPErrorCode403, // 1427 169 //"404" ; Not Found 170 PVProtocolEngineNodeErrorHTTPErrorCode404, // 1428 171 //"405" ; Method Not Allowed 172 PVProtocolEngineNodeErrorHTTPErrorCode405, // 1429 173 //"406" ; Not Acceptable 174 PVProtocolEngineNodeErrorHTTPErrorCode406, // 1430 175 //"407" ; Proxy Authentication Required 176 PVProtocolEngineNodeErrorHTTPErrorCode407, // 1431 177 //"408" ; Request Time-out 178 PVProtocolEngineNodeErrorHTTPErrorCode408, // 1432 179 //"409" ; Conflict 180 PVProtocolEngineNodeErrorHTTPErrorCode409, // 1433 181 //"410" ; Gone 182 PVProtocolEngineNodeErrorHTTPErrorCode410, // 1434 183 //"411" ; Length Required 184 PVProtocolEngineNodeErrorHTTPErrorCode411, // 1435 185 //"412" ; Precondition Failed 186 PVProtocolEngineNodeErrorHTTPErrorCode412, // 1436 187 //"413" ; Request Entity Too Large 188 PVProtocolEngineNodeErrorHTTPErrorCode413, // 1437 189 //"414" ; Request-URI Too Large 190 PVProtocolEngineNodeErrorHTTPErrorCode414, // 1438 191 //"415" ; Unsupported Media Type 192 PVProtocolEngineNodeErrorHTTPErrorCode415, // 1439 193 //"416" ; Requested range not satisfiable 194 PVProtocolEngineNodeErrorHTTPErrorCode416, // 1440 195 //"417" ; Expectation Failed 196 PVProtocolEngineNodeErrorHTTPErrorCode417, // 1441 197 198 // Unknown code 199 PVProtocolEngineNodeErrorHTTPCode4xxUnknown = PVProtocolEngineNodeErrorEventStart + 499, 200 201 //"500" ; Internal Server Error 202 PVProtocolEngineNodeErrorHTTPErrorCode500 = PVProtocolEngineNodeErrorEventStart + 500, // 1524 203 //"501" ; Not Implemented 204 PVProtocolEngineNodeErrorHTTPErrorCode501, // 1525 205 //"502" ; Bad Gateway 206 PVProtocolEngineNodeErrorHTTPErrorCode502, // 1526 207 //"503" ; Service Unavailable 208 PVProtocolEngineNodeErrorHTTPErrorCode503, // 1527 209 //"504" ; Gateway Time-out 210 PVProtocolEngineNodeErrorHTTPErrorCode504, // 1528 211 //"505" ; HTTP Version not supported 212 PVProtocolEngineNodeErrorHTTPErrorCode505, // 1529 213 214 PVProtocolEngineNodeErrorHTTPCode5xxUnknownStart, 215 216 // general Unknown code 217 PVProtocolEngineNodeErrorHTTPCodeUnknown, 218 PVProtocolEngineNodeErrorEventEnd 219 }; 220 221 #endif // PVMF_PROTOCOL_ENGINE_NODE_EVENTS_H_INCLUDED 222 223