Audacity
3.2.0
libraries
lib-breakpad-configurer
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)
14
#include "
internal/win32/CrashReportContext.h
"
15
#else
16
#include "
internal/unix/CrashReportContext.h
"
17
#endif
18
19
BreakpadConfigurer
&
BreakpadConfigurer::SetDatabasePathUTF8
(
const
std::string& pathUTF8)
20
{
21
mDatabasePathUTF8
= pathUTF8;
22
return
*
this
;
23
}
24
25
BreakpadConfigurer
&
BreakpadConfigurer::SetReportURL
(
const
std::string& reportURL)
26
{
27
mReportURL
= reportURL;
28
return
*
this
;
29
}
30
31
BreakpadConfigurer
&
BreakpadConfigurer::SetParameters
(
const
std::map<std::string, std::string>& parameters)
32
{
33
mParameters
= parameters;
34
return
*
this
;
35
}
36
37
BreakpadConfigurer
&
BreakpadConfigurer::SetSenderPathUTF8
(
const
std::string& pathUTF8)
38
{
39
mSenderPathUTF8
= pathUTF8;
40
return
*
this
;
41
}
42
43
void
BreakpadConfigurer::Start
()
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
}
BreakpadConfigurer.h
BreakpadConfigurer
This class is used to configure Breakpad's handler before start.
Definition:
BreakpadConfigurer.h:28
BreakpadConfigurer::mSenderPathUTF8
std::string mSenderPathUTF8
Definition:
BreakpadConfigurer.h:30
BreakpadConfigurer::Start
void Start()
Starts the handler.
Definition:
BreakpadConfigurer.cpp:43
BreakpadConfigurer::mParameters
std::map< std::string, std::string > mParameters
Definition:
BreakpadConfigurer.h:32
BreakpadConfigurer::SetSenderPathUTF8
BreakpadConfigurer & SetSenderPathUTF8(const std::string &pathUTF8)
Sets a path to a directory where crash reporter sending program is located.
Definition:
BreakpadConfigurer.cpp:37
BreakpadConfigurer::SetParameters
BreakpadConfigurer & SetParameters(const std::map< std::string, std::string > ¶meters)
Sets an additional parameters that should be sent to a crash reporting server (ASCII encoded)
Definition:
BreakpadConfigurer.cpp:31
BreakpadConfigurer::SetDatabasePathUTF8
BreakpadConfigurer & SetDatabasePathUTF8(const std::string &pathUTF8)
Sets the directory where crashreports will be stored (should have rw permission)
Definition:
BreakpadConfigurer.cpp:19
BreakpadConfigurer::SetReportURL
BreakpadConfigurer & SetReportURL(const std::string &reportURL)
Sets report URL to the crash reporting server (URL-Encoded, optional)
Definition:
BreakpadConfigurer.cpp:25
BreakpadConfigurer::mDatabasePathUTF8
std::string mDatabasePathUTF8
Definition:
BreakpadConfigurer.h:29
BreakpadConfigurer::mReportURL
std::string mReportURL
Definition:
BreakpadConfigurer.h:31
CrashReportContext
This object is for internal usage.
Definition:
unix/CrashReportContext.h:25
CrashReportContext::SetSenderPathUTF8
bool SetSenderPathUTF8(const std::string &path)
Definition:
unix/CrashReportContext.cpp:115
CrashReportContext.h
CrashReportContext.h
Generated by
1.9.3