mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-23 17:25:54 +01:00
Adds lib-sentry-report
This commit is contained in:
committed by
Dmitry Vedenko
parent
185d1d5ecc
commit
cb1f8b6c34
55
libraries/lib-sentry-reporting/AnonymizedMessage.h
Normal file
55
libraries/lib-sentry-reporting/AnonymizedMessage.h
Normal file
@@ -0,0 +1,55 @@
|
||||
/*!********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
@file AnonymizedMessage.h
|
||||
@brief Declare a class to store anonymized messages.
|
||||
|
||||
Dmitry Vedenko
|
||||
**********************************************************************/
|
||||
|
||||
#include <string>
|
||||
#include <wx/string.h>
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace audacity
|
||||
{
|
||||
namespace sentry
|
||||
{
|
||||
|
||||
class SENTRY_REPORTING_API AnonymizedMessage final
|
||||
{
|
||||
public:
|
||||
AnonymizedMessage() = default;
|
||||
|
||||
AnonymizedMessage(const AnonymizedMessage&) = default;
|
||||
AnonymizedMessage(AnonymizedMessage&&) = default;
|
||||
|
||||
AnonymizedMessage& operator=(const AnonymizedMessage&) = default;
|
||||
AnonymizedMessage& operator=(AnonymizedMessage&&) = default;
|
||||
|
||||
AnonymizedMessage(std::string message);
|
||||
AnonymizedMessage(const std::wstring& message);
|
||||
AnonymizedMessage(const wxString& message);
|
||||
|
||||
AnonymizedMessage(const char* message);
|
||||
AnonymizedMessage(const wchar_t* message);
|
||||
|
||||
bool Empty() const noexcept;
|
||||
size_t Length() const noexcept;
|
||||
|
||||
const std::string& GetString() const noexcept;
|
||||
wxString ToWXString() const noexcept;
|
||||
|
||||
// Immitate std::string interface
|
||||
const char* c_str() const noexcept;
|
||||
size_t length() const noexcept;
|
||||
private:
|
||||
void CleanupPaths();
|
||||
|
||||
std::string mMessage;
|
||||
};
|
||||
|
||||
} // namespace sentry
|
||||
} // namespace audacity
|
||||
Reference in New Issue
Block a user