GpgData.h
#ifndef _GPGDATA_H
#define _GPGDATA_H
#include "core/GpgConstants.h"
namespace GpgFrontend {
class GpgData {
public:
GpgData();
GpgData(void* buffer, size_t size, bool copy = true);
operator gpgme_data_t();
ByteArrayPtr Read2Buffer();
private:
struct _data_ref_deleter {
void operator()(gpgme_data_t _data) {
if (_data != nullptr) gpgme_data_release(_data);
}
};
std::unique_ptr<struct gpgme_data, _data_ref_deleter> data_ref_ =
nullptr;
};
} // namespace GpgFrontend
#endif // _GPGDATA_H
GpgFrontend
Definition: CoreCommonUtil.cpp:29
GpgFrontend::GpgData
Definition: GpgData.h:39
GpgFrontend::GpgData::_data_ref_deleter
Definition: GpgData.h:75
GpgFrontend::GpgData::GpgData
GpgData()
Construct a new Gpg Data object.
Definition: GpgData.cpp:31
GpgFrontend::GpgData::Read2Buffer
ByteArrayPtr Read2Buffer()
Definition: GpgData.cpp:55