You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
1.3 KiB

function "toC" {
param "type";
choose {
when "$type='stringlist'" > stringlist_t
when "$type='string' or $type='sstring'" > char
when "$type='identity'" > pEp_identity
when "$type='identitylist'" > identity_list
when "$type='timestamp'" > timestamp
when "$type='EncFormat'" > PEP_enc_format
when "$type='bloblist'" > bloblist_t
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
when "$type='Rating'" > PEP_rating
when "$type='SyncHandshakeResult'" > sync_handshake_result
when "$type='CipherSuite'" > PEP_CIPHER_SUITE
when "$type='uint'" > uint
otherwise value "$type";
}
}
function "jni_type" {
param "type";
param "dir";
choose {
when "../enum[@name=$type]" > jint
when "$type = 'string' or $type = 'sstring'" > jbyteArray
when "$type='bool'" > jboolean
when "$type='int'" > jint
when "$type='uint'" > jint
otherwise > jobject
}
}
define operator "√([$@]?[a-zA-Z0-9_]+)" as call "toC" with "type", "%1";