|
|
@ -2,6 +2,8 @@ |
|
|
|
#include <pEp/sync_codec.h> |
|
|
|
#include <pEp/distribution_codec.h> |
|
|
|
#include <iostream> |
|
|
|
#include <cstring> |
|
|
|
#include <cassert> |
|
|
|
|
|
|
|
#include "jniutils.hh" |
|
|
|
#include "throw_pEp_exception.hh" |
|
|
@ -27,6 +29,7 @@ namespace pEp { |
|
|
|
|
|
|
|
extern "C" { |
|
|
|
|
|
|
|
|
|
|
|
using namespace std; |
|
|
|
using namespace pEp::JNIAdapter; |
|
|
|
JNIEXPORT jbyteArray JNICALL Java_foundation_pEp_jniadapter__1Blob__1dataToXER |
|
|
@ -35,6 +38,7 @@ JNIEXPORT jbyteArray JNICALL Java_foundation_pEp_jniadapter__1Blob__1dataToXER |
|
|
|
bloblist_t *b = to_blob(env, obj); |
|
|
|
char *out = nullptr; |
|
|
|
|
|
|
|
// RFC 1049 / RFC 2045 : The type, subtype, and parameter names are not case sensitive.
|
|
|
|
if(strcasecmp(b->mime_type, "application/pEp.sync") == 0) { |
|
|
|
PEP_STATUS status = ::PER_to_XER_Sync_msg(b->value, (size_t) b->size, &out); |
|
|
|
if (status) |
|
|
@ -45,6 +49,7 @@ JNIEXPORT jbyteArray JNICALL Java_foundation_pEp_jniadapter__1Blob__1dataToXER |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
// RFC 1049 / RFC 2045 : The type, subtype, and parameter names are not case sensitive.
|
|
|
|
if(strcasecmp(b->mime_type, "application/pEp.keyreset") == 0) { |
|
|
|
PEP_STATUS status = ::PER_to_XER_Distribution_msg(b->value, (size_t) b->size, &out); |
|
|
|
if (status) |
|
|
|