| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_BASE_HTTPCOMMON_H__ | 11 #ifndef WEBRTC_BASE_HTTPCOMMON_H__ |
| 12 #define WEBRTC_BASE_HTTPCOMMON_H__ | 12 #define WEBRTC_BASE_HTTPCOMMON_H__ |
| 13 | 13 |
| 14 #include <map> | 14 #include <map> |
| 15 #include <memory> |
| 15 #include <string> | 16 #include <string> |
| 16 #include <vector> | 17 #include <vector> |
| 17 #include "webrtc/base/basictypes.h" | 18 #include "webrtc/base/basictypes.h" |
| 18 #include "webrtc/base/common.h" | 19 #include "webrtc/base/common.h" |
| 19 #include "webrtc/base/scoped_ptr.h" | |
| 20 #include "webrtc/base/stringutils.h" | 20 #include "webrtc/base/stringutils.h" |
| 21 #include "webrtc/base/stream.h" | 21 #include "webrtc/base/stream.h" |
| 22 | 22 |
| 23 namespace rtc { | 23 namespace rtc { |
| 24 | 24 |
| 25 class CryptString; | 25 class CryptString; |
| 26 class SocketAddress; | 26 class SocketAddress; |
| 27 | 27 |
| 28 ////////////////////////////////////////////////////////////////////// | 28 ////////////////////////////////////////////////////////////////////// |
| 29 // Constants | 29 // Constants |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 ////////////////////////////////////////////////////////////////////// | 285 ////////////////////////////////////////////////////////////////////// |
| 286 // HttpData | 286 // HttpData |
| 287 ////////////////////////////////////////////////////////////////////// | 287 ////////////////////////////////////////////////////////////////////// |
| 288 | 288 |
| 289 struct HttpData { | 289 struct HttpData { |
| 290 typedef std::multimap<std::string, std::string, iless> HeaderMap; | 290 typedef std::multimap<std::string, std::string, iless> HeaderMap; |
| 291 typedef HeaderMap::const_iterator const_iterator; | 291 typedef HeaderMap::const_iterator const_iterator; |
| 292 typedef HeaderMap::iterator iterator; | 292 typedef HeaderMap::iterator iterator; |
| 293 | 293 |
| 294 HttpVersion version; | 294 HttpVersion version; |
| 295 scoped_ptr<StreamInterface> document; | 295 std::unique_ptr<StreamInterface> document; |
| 296 | 296 |
| 297 HttpData(); | 297 HttpData(); |
| 298 | 298 |
| 299 enum HeaderCombine { HC_YES, HC_NO, HC_AUTO, HC_REPLACE, HC_NEW }; | 299 enum HeaderCombine { HC_YES, HC_NO, HC_AUTO, HC_REPLACE, HC_NEW }; |
| 300 void changeHeader(const std::string& name, const std::string& value, | 300 void changeHeader(const std::string& name, const std::string& value, |
| 301 HeaderCombine combine); | 301 HeaderCombine combine); |
| 302 inline void addHeader(const std::string& name, const std::string& value, | 302 inline void addHeader(const std::string& name, const std::string& value, |
| 303 bool append = true) { | 303 bool append = true) { |
| 304 changeHeader(name, value, append ? HC_AUTO : HC_NO); | 304 changeHeader(name, value, append ? HC_AUTO : HC_NO); |
| 305 } | 305 } |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 const SocketAddress& server, | 449 const SocketAddress& server, |
| 450 const std::string& method, const std::string& uri, | 450 const std::string& method, const std::string& uri, |
| 451 const std::string& username, const CryptString& password, | 451 const std::string& username, const CryptString& password, |
| 452 HttpAuthContext *& context, std::string& response, std::string& auth_method); | 452 HttpAuthContext *& context, std::string& response, std::string& auth_method); |
| 453 | 453 |
| 454 ////////////////////////////////////////////////////////////////////// | 454 ////////////////////////////////////////////////////////////////////// |
| 455 | 455 |
| 456 } // namespace rtc | 456 } // namespace rtc |
| 457 | 457 |
| 458 #endif // WEBRTC_BASE_HTTPCOMMON_H__ | 458 #endif // WEBRTC_BASE_HTTPCOMMON_H__ |
| OLD | NEW |