diff --git a/src/gen_cpp_Engine.ysl2 b/src/gen_cpp_Engine.ysl2 index a009bf6..0e9a939 100644 --- a/src/gen_cpp_Engine.ysl2 +++ b/src/gen_cpp_Engine.ysl2 @@ -82,7 +82,7 @@ tstylesheet { with "sig", "'(I)V'"; } - when "$rettype = 'message'" apply "parm[returns|creates]", mode=return { + when "$rettype = 'message' or $rettype = 'identity'" apply "parm[returns|creates]", mode=return { with "jtype", "$jtype"; with "jnitype", "'jlong'"; with "sig", "'(J)V'"; @@ -267,7 +267,7 @@ tstylesheet { template "parm", mode=sig { const "name", "name(*[3])"; - > ,\n jobject «$name» + > ,\n `call "jni_type" with "type", "name(*[2])"` «$name» } } diff --git a/src/gen_java_Engine.ysl2 b/src/gen_java_Engine.ysl2 index 2cd5165..deac117 100644 --- a/src/gen_java_Engine.ysl2 +++ b/src/gen_java_Engine.ysl2 @@ -85,7 +85,6 @@ tstylesheet { template "method", mode=plain { const "convert", "count(parm/stringlist|parm/string|parm/identity) > 0"; - const "convertreturn", "count(parm[returns]/stringlist|parm[returns]/string|parm[returns]/identity) > 0"; const "singlereturn", "count(parm/creates|parm/returns) = 1"; const "multireturn", "count(parm/creates|parm/returns) > 1"; @@ -125,8 +124,10 @@ tstylesheet { apply "parm", mode=convertIn; if "$singlereturn" choose { - when "$convertreturn" + when "count(parm[returns]/stringlist|parm[returns]/string) > 0" |> return AbstractEngine.toUTF16(_«@name»(`apply "parm[in]", mode=call;`)); + when "count(parm[returns]/identity) > 0" + |> return new Identity(_«@name»(`apply "parm[in]", mode=call;`)); otherwise |> return _«@name»(`apply "parm[in]", mode=call;`); } diff --git a/src/pEp.yml2 b/src/pEp.yml2 index d87fac0..a821920 100644 --- a/src/pEp.yml2 +++ b/src/pEp.yml2 @@ -101,6 +101,12 @@ namespace pEp { returns Color color ); + method get_identity( + in string address, + in string userid, + returns identity ident + ); + method identity_color( in identity ident, returns Color color