Volker Birk 10 years ago
parent
commit
5605e04d89
  1. 2
      src/gen_throw_pEp_exception.ysl2
  2. 2
      src/pEp.yml2
  3. 16
      src/types_java.ysl2

2
src/gen_throw_pEp_exception.ysl2

@ -35,7 +35,7 @@ tstylesheet {
const char *ex_name; const char *ex_name;
switch (status) { switch (status) {
`` apply "enum/*[text()!=0]", 4, mode=case `` apply "exception/*[text()!=0]", 4, mode=case
default: default:
assert(0); assert(0);
ex_name = "Exception"; ex_name = "Exception";

2
src/pEp.yml2

@ -4,7 +4,7 @@ decl interface @name;
decl method @name; decl method @name;
namespace pEp { namespace pEp {
enum pEp_status { exception pEp_status {
pEp_status_ok > 0 pEp_status_ok > 0
pEp_init_cannot_load_gpgme > 0x0110 pEp_init_cannot_load_gpgme > 0x0110

16
src/types_java.ysl2

@ -4,14 +4,16 @@ function "toJava" {
param "type"; param "type";
choose { choose {
when "string" > String when "$type='stringlist'" > String[]
when "stringlist" > String[] when "$type='string'" > String
when "message" > MimeMessage when "$type='message'" > MimeMessage
when "pEp-identity" > Identity when "$type='pEp-identity'" > Identity
when "identity_list" > Identity[] when "$type='identity-list'" > Identity[]
when "timestamp" > Date when "$type='timestamp'" > Date
when "pEp_enc_format" > MimeMessage.EncFormat when "$type='pEp-enc-format'" > MimeMessage.EncFormat
otherwise call "CamelCase" with "text", "$type"; otherwise call "CamelCase" with "text", "$type";
} }
} }
define operator "†([$@]?[a-zA-Z0-9_]+)" as call "toJava" with "type", "%1";

Loading…
Cancel
Save