parent
01707a39c2
commit
576be0e7c2
@ -0,0 +1,15 @@
|
||||
#include "pep-dbus-adapter.h"
|
||||
|
||||
pEp::pEpDBusAdapter::pEpDBusAdapter() {}
|
||||
|
||||
pEp::pEpDBusAdapter::~pEpDBusAdapter() {}
|
||||
|
||||
void pEp::pEpDBusAdapter::decrypt_message(const std::string& src, int32_t& status, std::string& dst, std::vector< std::string >& keylist, int32_t& flags)
|
||||
{
|
||||
bool has_possible_pEp_msg;
|
||||
std::cout << "Trying to decrypt the data" << std::endl;
|
||||
message **srcm;
|
||||
::mime_decode_message(src.c_str(), src.size(), srcm, &has_possible_pEp_msg );
|
||||
//status = ::decrypt_message( mSession, srcm, dstm, keylist, rating, flags );
|
||||
}
|
||||
|
@ -0,0 +1,39 @@
|
||||
#ifndef PEP_DBUS_ADAPTER_H
|
||||
#define PEP_DBUS_ADAPTER_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
#include <pEp/pEpEngine.h>
|
||||
#include <pEp/message_cache.hh>
|
||||
#include <pEp/mime.h>
|
||||
|
||||
#include "pep-server-glue.h"
|
||||
|
||||
namespace pEp {
|
||||
class pEpDBusAdapter
|
||||
: public security::pep_adaptor
|
||||
{
|
||||
public:
|
||||
pEpDBusAdapter();
|
||||
~pEpDBusAdapter();
|
||||
|
||||
// Message API
|
||||
void decrypt_message(const std::string& src, int32_t& status, std::string& dst, std::vector< std::string >& keylist, int32_t& flags);
|
||||
|
||||
private:
|
||||
PEP_SESSION mSession;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -1,13 +1,12 @@
|
||||
<?xml version="1.0" ?>
|
||||
<node name="/security/pep/">
|
||||
<node>
|
||||
<interface name="security.pep">
|
||||
<method name="decrypt_message">
|
||||
<arg direction="out" name="status" type="i" />
|
||||
<arg direction="out" name="dst" type="s" />
|
||||
<arg direction="in" name="src" type="s" />
|
||||
<arg direction="in" name="keylist" type="as" />
|
||||
<arg direction="in" name="rating" type="i" />
|
||||
<arg direction="in" name="flags" type="i"/>
|
||||
<arg direction="out" name="keylist" type="as" />
|
||||
<arg direction="out" name="flags" type="i"/>
|
||||
</method>
|
||||
</interface>
|
||||
</node>
|
||||
|
Loading…
Reference in new issue