Audacity 3.2.0
BreakpadConfigurer.cpp
Go to the documentation of this file.
1/*!********************************************************************
2*
3 Audacity: A Digital Audio Editor
4
5 BreakpadConfigurer.cpp
6
7 Vitaly Sverchinsky
8
9 **********************************************************************/
10
11#include "BreakpadConfigurer.h"
12
13#if defined(WIN32)
15#else
17#endif
18
20{
21 mDatabasePathUTF8 = pathUTF8;
22 return *this;
23}
24
26{
27 mReportURL = reportURL;
28 return *this;
29}
30
31BreakpadConfigurer& BreakpadConfigurer::SetParameters(const std::map<std::string, std::string>& parameters)
32{
33 mParameters = parameters;
34 return *this;
35}
36
38{
39 mSenderPathUTF8 = pathUTF8;
40 return *this;
41}
42
44{
45 static CrashReportContext context{};
46 bool ok = context.SetSenderPathUTF8(mSenderPathUTF8);
47 ok = ok && context.SetReportURL(mReportURL);
48 ok = ok && context.SetParameters(mParameters);
49 if (ok)
50 context.StartHandler(mDatabasePathUTF8);
51}
This class is used to configure Breakpad's handler before start.
std::string mSenderPathUTF8
void Start()
Starts the handler.
std::map< std::string, std::string > mParameters
BreakpadConfigurer & SetSenderPathUTF8(const std::string &pathUTF8)
Sets a path to a directory where crash reporter sending program is located.
BreakpadConfigurer & SetParameters(const std::map< std::string, std::string > &parameters)
Sets an additional parameters that should be sent to a crash reporting server (ASCII encoded)
BreakpadConfigurer & SetDatabasePathUTF8(const std::string &pathUTF8)
Sets the directory where crashreports will be stored (should have rw permission)
BreakpadConfigurer & SetReportURL(const std::string &reportURL)
Sets report URL to the crash reporting server (URL-Encoded, optional)
std::string mDatabasePathUTF8
This object is for internal usage.
bool SetSenderPathUTF8(const std::string &path)