Audacity
3.2.0
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
Enumerations
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
w
z
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
h
i
k
l
m
o
p
r
s
t
x
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
y
Related Functions
a
b
c
d
e
f
g
l
m
n
o
p
r
s
t
v
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
c
d
e
f
k
l
m
n
o
p
r
s
t
u
v
z
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
z
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
libraries
lib-sentry-reporting
SentryRequestBuilder.cpp
Go to the documentation of this file.
1
/*!********************************************************************
2
3
Audacity: A Digital Audio Editor
4
5
@file SentryRequestBuilder.h
6
@brief Define a class to generate the requests to Sentry.
7
8
Dmitry Vedenko
9
**********************************************************************/
10
11
#include "
SentryRequestBuilder.h
"
12
13
#include <chrono>
14
15
namespace
audacity
16
{
17
namespace
sentry
18
{
19
20
const
SentryRequestBuilder
&
audacity::sentry::SentryRequestBuilder::Get
()
21
{
22
static
SentryRequestBuilder
builder;
23
24
return
builder;
25
}
26
27
network_manager::Request
SentryRequestBuilder::CreateRequest
()
const
28
{
29
using namespace
std::chrono;
30
31
const
std::string sentryAuth =
32
std::string(
"Sentry sentry_version=7,sentry_timestamp="
) +
33
std::to_string(
34
duration_cast<seconds>(system_clock::now().time_since_epoch())
35
.count()) +
36
",sentry_client=sentry-audacity/1.0,sentry_key="
+ SENTRY_DSN_KEY;
37
38
network_manager::Request
request(
mUrl
);
39
40
request.
setHeader
(
"Content-Type"
,
"application/json"
);
41
request.
setHeader
(
"X-Sentry-Auth"
, sentryAuth);
42
43
return
request;
44
}
45
46
SentryRequestBuilder::SentryRequestBuilder
()
47
{
48
mUrl
= std::string(
"https://"
) + SENTRY_DSN_KEY +
"@"
+ SENTRY_HOST +
49
"/api/"
+ SENTRY_PROJECT +
"/store/"
;
50
}
51
52
}
// namespace sentry
53
}
// namespace audacity
SentryRequestBuilder.h
Define a class to generate the requests to Sentry.
audacity::network_manager::Request
Definition:
Request.h:28
audacity::network_manager::Request::setHeader
Request & setHeader(const std::string &name, std::string value)
Definition:
Request.cpp:46
audacity::sentry::SentryRequestBuilder
A helper, that creates a correct Request to Sentry.
Definition:
SentryRequestBuilder.h:24
audacity::sentry::SentryRequestBuilder::Get
static const SentryRequestBuilder & Get()
Definition:
SentryRequestBuilder.cpp:20
audacity::sentry::SentryRequestBuilder::mUrl
std::string mUrl
Definition:
SentryRequestBuilder.h:33
audacity::sentry::SentryRequestBuilder::SentryRequestBuilder
SentryRequestBuilder()
Definition:
SentryRequestBuilder.cpp:46
audacity::sentry::SentryRequestBuilder::CreateRequest
network_manager::Request CreateRequest() const
Definition:
SentryRequestBuilder.cpp:27
audacity
Definition:
FileHistory.h:23
Generated by
1.9.3