OLD | NEW |
1 // Copyright (c) 2009, Google Inc. | 1 // Copyright (c) 2009, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include <string> | 36 #include <string> |
37 #include <map> | 37 #include <map> |
38 | 38 |
39 #include "common/using_std_string.h" | 39 #include "common/using_std_string.h" |
40 #include "third_party/curl/curl.h" | 40 #include "third_party/curl/curl.h" |
41 | 41 |
42 namespace google_breakpad { | 42 namespace google_breakpad { |
43 class LibcurlWrapper { | 43 class LibcurlWrapper { |
44 public: | 44 public: |
45 LibcurlWrapper(); | 45 LibcurlWrapper(); |
46 ~LibcurlWrapper(); | 46 virtual ~LibcurlWrapper(); |
47 virtual bool Init(); | 47 virtual bool Init(); |
48 virtual bool SetProxy(const string& proxy_host, | 48 virtual bool SetProxy(const string& proxy_host, |
49 const string& proxy_userpwd); | 49 const string& proxy_userpwd); |
50 virtual bool AddFile(const string& upload_file_path, | 50 virtual bool AddFile(const string& upload_file_path, |
51 const string& basename); | 51 const string& basename); |
52 virtual bool SendRequest(const string& url, | 52 virtual bool SendRequest(const string& url, |
53 const std::map<string, string>& parameters, | 53 const std::map<string, string>& parameters, |
54 int* http_status_code, | 54 int* http_status_code, |
55 string* http_header_data, | 55 string* http_header_data, |
56 string* http_response_data); | 56 string* http_response_data); |
(...skipping 27 matching lines...) Expand all Loading... |
84 CURLcode (*easy_perform_)(CURL *); | 84 CURLcode (*easy_perform_)(CURL *); |
85 const char* (*easy_strerror_)(CURLcode); | 85 const char* (*easy_strerror_)(CURLcode); |
86 void (*easy_cleanup_)(CURL *); | 86 void (*easy_cleanup_)(CURL *); |
87 CURLcode (*easy_getinfo_)(CURL *, CURLINFO info, ...); | 87 CURLcode (*easy_getinfo_)(CURL *, CURLINFO info, ...); |
88 void (*formfree_)(struct curl_httppost *); | 88 void (*formfree_)(struct curl_httppost *); |
89 | 89 |
90 }; | 90 }; |
91 } | 91 } |
92 | 92 |
93 #endif // COMMON_LINUX_LIBCURL_WRAPPER_H_ | 93 #endif // COMMON_LINUX_LIBCURL_WRAPPER_H_ |
OLD | NEW |