aboutsummaryrefslogtreecommitdiff
path: root/src/client/windows/sender/crash_report_sender.h
diff options
context:
space:
mode:
authorincrementalist <incrementalist@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-01-03 23:14:46 +0000
committerincrementalist <incrementalist@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-01-03 23:14:46 +0000
commitd4e527b7eea7628e305e6ca93cdcb9796060d65a (patch)
treef6b126d057b022b9a597ba4eaeabd49b5a4a3736 /src/client/windows/sender/crash_report_sender.h
parentAdd Mac exception handler and generator. Fixes issue #69. Reviewed by mment... (diff)
downloadbreakpad-d4e527b7eea7628e305e6ca93cdcb9796060d65a.tar.xz
Allows the caller of CrashReportSender::SendCrashReport() to determine that
the server rejected a crash report, by changing the return value from a boolean to a tri-state enum. Fixes issue #101. Reviewed by mmentovai. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@99 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/windows/sender/crash_report_sender.h')
-rw-r--r--src/client/windows/sender/crash_report_sender.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/client/windows/sender/crash_report_sender.h b/src/client/windows/sender/crash_report_sender.h
index c44c5e74..3fd0bc06 100644
--- a/src/client/windows/sender/crash_report_sender.h
+++ b/src/client/windows/sender/crash_report_sender.h
@@ -50,22 +50,29 @@ namespace google_airbag {
using std::wstring;
using std::map;
+typedef enum {
+ RESULT_FAILED = 0, // Failed to communicate with the server; try later.
+ RESULT_REJECTED, // Successfully sent the crash report, but the
+ // server rejected it; don't resend this report.
+ RESULT_SUCCEEDED // The server accepted the crash report.
+} ReportResult;
+
class CrashReportSender {
public:
// Sends the specified minidump file, along with the map of
// name value pairs, as a multipart POST request to the given URL.
// Parameter names must contain only printable ASCII characters,
// and may not contain a quote (") character.
- // If the report is sent successfully (the return value is true), a
- // code uniquely identifying the report will be returned in report_code.
- // Only HTTP(S) URLs are currently supported. Returns true on success.
+ // Only HTTP(S) URLs are currently supported. The return value indicates
+ // the result of the operation (see above for possible results).
// If report_code is non-NULL and the report is sent successfully (that is,
- // the return value is true), a code uniquely identifying the report will be
- // returned in report_code. (Otherwise, report_code will be unchanged.)
- static bool SendCrashReport(const wstring &url,
- const map<wstring, wstring> &parameters,
- const wstring &dump_file_name,
- wstring *report_code);
+ // the return value is RESULT_SUCCEEDED), a code uniquely identifying the
+ // report will be returned in report_code.
+ // (Otherwise, report_code will be unchanged.)
+ static ReportResult SendCrashReport(const wstring &url,
+ const map<wstring, wstring> &parameters,
+ const wstring &dump_file_name,
+ wstring *report_code);
private:
// No instances of this class should be created.