Audacity 3.2.0
win32/CrashReportContext.h
Go to the documentation of this file.
1/*!********************************************************************
2*
3 Audacity: A Digital Audio Editor
4
5 CrashReportContext.h
6
7 Vitaly Sverchinsky
8
9 **********************************************************************/
10
11#pragma once
12
13#include <string>
14#include <map>
15
17
24class CrashReportContext final
25{
26 static constexpr size_t MaxBufferLength{ 2048 };
27 static constexpr size_t MaxCommandLength{ 8192 };
28
32
33 //this is a buffer where the command will be built at runtime
35
36public:
37 bool SetSenderPathUTF8(const std::string& path);
38 bool SetReportURL(const std::string& path);
39 bool SetParameters(const std::map<std::string, std::string>& p);
40
41 void StartHandler(const std::string& databasePath);
42
43private:
44 //helper functions which need access to a private data, but should not be exposed to a public class interface
45 friend bool MakeCommand(CrashReportContext* ctx, const wchar_t* path, const wchar_t* id);
46 friend bool SendReport(CrashReportContext* ctx, const wchar_t* path, const wchar_t* id);
47};
This object is for internal usage.
char mParameters[MaxBufferLength]
bool SetReportURL(const std::string &path)
bool SetParameters(const std::map< std::string, std::string > &p)
friend bool SendReport(CrashReportContext *ctx, const char *minidumpPath)
friend bool MakeCommand(CrashReportContext *ctx, const wchar_t *path, const wchar_t *id)
char mSenderPath[MaxBufferLength]
bool SetSenderPathUTF8(const std::string &path)
char mReportURL[MaxBufferLength]
static constexpr size_t MaxCommandLength
static constexpr size_t MaxBufferLength
void StartHandler(const std::string &databasePath)
wchar_t mCommand[MaxCommandLength]