Browse Source

Fixing generation

JNI-44
Edouard Tisserant 9 years ago
parent
commit
a873524f8c
  1. 2
      src/gen_java_Engine.ysl2
  2. 19
      src/pEp.yml2
  3. 4
      src/types_java.ysl2

2
src/gen_java_Engine.ysl2

@ -40,6 +40,8 @@ tstylesheet {
choose {
when "$ptype = 'string'"
|> «$pitype» _«$pname» = «$pname».getBytes();
when "$ptype = 'bool'"
|> «$pitype» _«$pname» = «$pname».booleanValue();
otherwise
|> «$pitype» _«$pname» = new «$pitype»(«$pname»);
}

19
src/pEp.yml2

@ -100,23 +100,22 @@ namespace pEp {
returns Color color
);
// method blacklist_retrive(
// creates stringlist blacklist
// );
// method blacklist_retrive(
// creates stringlist blacklist
// );
basic string trustwords(identity ident);
basic string trustwords(identity ident);
basic identity myself(identity ident);
basic identity updateIdentity(identity ident);
basic void keyCompromized(identity ident);
basic void keyResetTrust(identity ident);
basic void trustPersonalKey(identity ident);
basic void importKey(string key);
basic void blacklist_add(string fpr);
basic void blacklist_delete(string fpr);
basic void config_passive_mode(bool enable);
basic bool blacklist_is_listed(string fpr);
basic void blacklist_add(string fpr);
basic void blacklist_delete(string fpr);
basic void config_passive_mode(bool enable);
basic bool blacklist_is_listed(string fpr);
};
struct message {

4
src/types_java.ysl2

@ -34,7 +34,7 @@ function "toJavaDeclare" {
when "$type='stringpairlist'" | # cannot declare "stringpairlist"
when "$type='message'" > Message
when "$type='Color'" > Color
when "$type='bool'" > Boolean
//when "$type='bool'" > boolean
otherwise error | # cannot declare "«$type»"
}
@ -45,6 +45,7 @@ function "toSig" {
choose {
when "$type='string'" error | # cannot declare "string"
when "$type='bool'" > Z
otherwise {
> L
choose {
@ -75,6 +76,7 @@ function "toIntermediate" {
when "$type='identity'" > _Identity
when "$type='identitylist'" > Vector<_Identity>
when "$type='bloblist'" > Vector<_Blob>
when "$type='bool'" > boolean
otherwise call "toJava" with "type", "$type";
}

Loading…
Cancel
Save