|
1 year ago | |
---|---|---|
src | 1 year ago | |
.gitignore | 1 year ago | |
LICENSE | 1 year ago | |
Makefile | 1 year ago | |
Makefile.conf | 1 year ago | |
README.md | 1 year ago |
License: GPL3
C++ standard: C++11
supported compilers: at least gcc and clang (both have to work)
Build sytem: GNU Make – Platforms: Linux, macOS ** Target: static library libpEpDatatypes.a
Windows and Android builds will be done separatly
namespace pEp::DT
PREFIX/include/pEp/
and are used via #include <pEp/filename.hh>
– (Also shared with libpEpAdapter!)std::forward_list
The following API is the target we're heading to:
#include <pEp/Types.hh>
#include <pEp/Adapter.hh>
int main()
{
pEp::Message msg = "From: Alice Cooper <alice@mail.com>\n"
"To: Bob Smith <bob@mail.com>\n"
"Subject: Meeting\n"
"\n"
"Dear Bob,\n"
"\n"
"I will come.\n"
"\n"
"Alice.\n"_CRLF;
try {
auto enc = msg.encrypt();
enc.send();
}
catch (pEp::err& e)
{
}
return 0;
}
As an intermediate step the p≡p API in the engine must be fully supported:
#include <pEp/message_api.h> // from pEpEngine
#include <pEp/Types.hh> // from libpEpDatatypes
#include <pEp/Adapter.hh> // from libpEpDatatypes
int main()
{
pEp::Message msg_plain =
"From: Alice Cooper <alice@mail.com>\nTo: Bob "
"Smith <bob@mail.com>\nSubject: Meeting\n\n"
"Dear Bob,\n\nI will come.\n\nAlice."_CRLF;
::message* msg_enc = nullptr;
PEP_STATUS status = encrypt_message(msg_plain, enc_enc, ...);
pEp::Message msg{std::move(msg_enc)}; // ownership of the pointee goes to 'msg'
return 0;
}
LIBPEPDATATYPES_FILENAME_HH