Browse Source

Added DecryptFlags, ignored new import_key private keys identity list

JNI-44
Edouard Tisserant 6 years ago
parent
commit
5889fe1217
6 changed files with 15 additions and 6 deletions
  1. +1
    -1
      androidTests/build.gradle
  2. +1
    -1
      src/basic_api.cc
  3. +2
    -2
      src/gen_cpp_Engine.ysl2
  4. +7
    -2
      src/pEp.yml2
  5. +2
    -0
      src/types_c.ysl2
  6. +2
    -0
      src/types_java.ysl2

+ 1
- 1
androidTests/build.gradle View File

@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.android.tools.build:gradle:2.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files


+ 1
- 1
src/basic_api.cc View File

@ -160,7 +160,7 @@ JNIEXPORT void JNICALL Java_org_pEp_jniadapter_Engine_importKey(
}
PEP_STATUS status = ::import_key(session, _key, strlen(_key));
PEP_STATUS status = ::import_key(session, _key, strlen(_key), NULL);
if (status != PEP_STATUS_OK) {
throw_pEp_Exception(env, status);
return;


+ 2
- 2
src/gen_cpp_Engine.ysl2 View File

@ -222,8 +222,8 @@ tstylesheet {
const "name", "name(*[3])";
choose {
when "$type = 'Color'"
| PEP_color _«$name»;
when "ancestor::namespace/child::enum[@name=$type]"
| √$type _«$name»;
otherwise
| √$type *_«$name»;
}


+ 7
- 2
src/pEp.yml2 View File

@ -56,7 +56,7 @@ namespace pEp {
pEp_unknown_error > -1
};
enum color {
enum Color {
pEp_rating_undefined > 0
pEp_rating_cannot_decrypt > 1
pEp_rating_have_no_key > 2
@ -76,6 +76,10 @@ namespace pEp {
pEp_rating_under_attack > -3
};
enum DecryptFlags {
pEp_decrypt_flag_own_private_key > 1
};
interface Engine {
method encrypt_message(
in message src,
@ -87,7 +91,8 @@ namespace pEp {
in message src,
creates message dst,
creates stringlist keylist,
returns Color color
returns Color color,
returns DecryptFlags flags
);
method outgoing_message_color(


+ 2
- 0
src/types_c.ysl2 View File

@ -12,6 +12,8 @@ function "toC" {
when "$type='stringpairlist'" > stringpair_list_t
when "$type='direction'" > PEP_msg_direction
when "$type='bool'" > bool
when "$type='DecryptFlags'" > PEP_decrypt_flags_t
when "$type='Color'" > PEP_color
otherwise value "$type";
}


+ 2
- 0
src/types_java.ysl2 View File

@ -60,6 +60,7 @@ function "toSig" {
when "$type='stringpairlist'" > java/util/ArrayList
when "$type='message'" > org/pEp/jniadapter/Message
when "$type='Color'" > org/pEp/jniadapter/Color
when "$type='DecryptFlags'" > org/pEp/jniadapter/DecryptFlags
}
> ;
}
@ -77,6 +78,7 @@ function "toIntermediate" {
when "$type='identitylist'" > Vector<_Identity>
when "$type='bloblist'" > Vector<_Blob>
when "$type='bool'" > boolean
when "$type='DecryptFlags'" > DecryptFlags
otherwise call "toJava" with "type", "$type";
}


Loading…
Cancel
Save