forked from pEp.foundation/pEpJNIAdapter
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
322 lines
11 KiB
Plaintext
322 lines
11 KiB
Plaintext
decl namespace @name;
|
|
decl enum @name;
|
|
decl enumitem @name;
|
|
decl interface @name;
|
|
decl exception @name;
|
|
decl method @name;
|
|
decl struct @name;
|
|
decl basic @type @name;
|
|
|
|
namespace pEp {
|
|
exception Status {
|
|
include ./status_list.yml2
|
|
};
|
|
|
|
enum PassphraseType {
|
|
include ./passphrase_status_list.yml2
|
|
};
|
|
|
|
enum Color {
|
|
enumitem PEP_color_no_color toString="None" > 0
|
|
enumitem PEP_color_yellow toString="Yellow" > 1
|
|
enumitem PEP_color_green toString="Green" > 2
|
|
enumitem PEP_color_red toString="Red" > -1
|
|
};
|
|
|
|
|
|
enum has_int_str_val=true Rating {
|
|
enumitem pEp_rating_undefined int_str_val=undefined > 0
|
|
enumitem pEp_rating_cannot_decrypt int_str_val=cannot_decrypt > 1
|
|
enumitem pEp_rating_have_no_key int_str_val=have_no_key > 2
|
|
enumitem pEp_rating_unencrypted int_str_val=unencrypted > 3
|
|
enumitem pEp_rating_unreliable int_str_val=unreliable > 4
|
|
enumitem pEp_rating_media_key_protected int_str_val=media_key_protected > 5
|
|
enumitem pEp_rating_reliable int_str_val=reliable > 6
|
|
enumitem pEp_rating_trusted int_str_val=trusted > 7
|
|
enumitem pEp_rating_trusted_and_anonymized int_str_val=trusted_and_anonymized > 8
|
|
enumitem pEp_rating_fully_anonymous int_str_val=fully_anonymous > 9
|
|
enumitem pEp_rating_mistrust int_str_val=mistrust > -1
|
|
enumitem pEp_rating_b0rken int_str_val=b0rken > -2
|
|
enumitem pEp_rating_under_attack int_str_val=under_attack > -3
|
|
};
|
|
|
|
enum DecryptFlags {
|
|
enumitem pEp_decrypt_flag_own_private_key > 1
|
|
enumitem pEp_decrypt_flag_consumed > 2
|
|
enumitem pEp_decrypt_flag_ignored > 4
|
|
enumitem pEp_decrypt_flag_src_modified > 8
|
|
enumitem pEp_decrypt_flag_untrusted_server > 0x100
|
|
enumitem pEp_decrypt_flag_dont_trigger_sync > 0x200
|
|
};
|
|
|
|
enum IdentityFlags {
|
|
enumitem pEp_idf_not_for_sync > 1
|
|
enumitem pEp_idf_list > 2
|
|
enumitem pEp_idf_devicegroup > 256
|
|
};
|
|
|
|
enum SyncHandshakeResult {
|
|
enumitem sync_handshake_cancel > -1
|
|
enumitem sync_handshake_accepted > 0
|
|
enumitem sync_handshake_rejected > 1
|
|
};
|
|
|
|
enum SyncHandshakeSignal {
|
|
enumitem sync_notify_undefined > 0
|
|
enumitem sync_notify_init_add_our_device > 1
|
|
enumitem sync_notify_init_add_other_device > 2
|
|
enumitem sync_notify_init_form_group > 3
|
|
enumitem sync_notify_timeout > 5
|
|
enumitem sync_notify_accepted_device_added > 6
|
|
enumitem sync_notify_accepted_group_created > 7
|
|
enumitem sync_notify_accepted_device_accepted > 8
|
|
enumitem sync_notify_outgoing_rating_change > 64
|
|
enumitem sync_passphrase_required > 128
|
|
enumitem sync_notify_sole > 254
|
|
enumitem sync_notify_in_group > 255
|
|
};
|
|
|
|
enum CipherSuite {
|
|
enumitem pEp_cipher_suite_default > 0
|
|
enumitem pEp_cipher_suite_cv25519 > 1
|
|
enumitem pEp_cipher_suite_p256 > 2
|
|
enumitem pEp_cipher_suite_p384 > 3
|
|
enumitem pEp_cipher_suite_p521 > 4
|
|
enumitem pEp_cipher_suite_rsa2k > 5
|
|
enumitem pEp_cipher_suite_rsa3k > 6
|
|
enumitem pEp_cipher_suite_rsa4k > 7
|
|
enumitem pEp_cipher_suite_rsa8k > 8
|
|
};
|
|
|
|
interface Engine {
|
|
method cached=true encrypt_message(
|
|
in message src,
|
|
in stringlist extra,
|
|
creates message dst,
|
|
in EncFormat format,
|
|
Cconst PEP_encrypt_flags flags "(PEP_encrypt_flags_t)0"
|
|
);
|
|
|
|
method cached=true encrypt_message_and_add_priv_key(
|
|
in message src,
|
|
creates message dst,
|
|
in string fpr,
|
|
Cconst PEP_enc_format encformat "PEP_enc_PEP",
|
|
Cconst PEP_encrypt_flags flags "(PEP_encrypt_flags_t)0"
|
|
);
|
|
|
|
method cached=true encrypt_message_for_self(
|
|
in identity target,
|
|
in message src,
|
|
in stringlist extra,
|
|
creates message dst,
|
|
Cconst PEP_enc_format encformat "PEP_enc_PEP",
|
|
Cconst PEP_encrypt_flags flags "(PEP_encrypt_flags_t)0"
|
|
);
|
|
|
|
method cached=true decrypt_message(
|
|
inout message src,
|
|
creates message dst,
|
|
inout stringlist keylist,
|
|
returns Rating rating,
|
|
inout int flags
|
|
);
|
|
|
|
method cached=true re_evaluate_message_rating(
|
|
in message src,
|
|
Cconst stringlist x_keylist "static_cast<stringlist_t*>(nullptr)",
|
|
Cconst Rating x_enc_status "PEP_rating_undefined",
|
|
returns Rating rating
|
|
);
|
|
|
|
method cached=true outgoing_message_rating(
|
|
in message msg,
|
|
returns Rating rating
|
|
);
|
|
|
|
method outgoing_message_rating_preview(
|
|
in message msg,
|
|
returns Rating rating
|
|
);
|
|
|
|
method cached=true get_identity(
|
|
in string address,
|
|
in string userid,
|
|
returns identity ident
|
|
);
|
|
|
|
method cached=true identity_rating(
|
|
in identity ident,
|
|
returns Rating rating
|
|
);
|
|
|
|
// TODO: WTF is...
|
|
method cached=true own_message_private_key_details(
|
|
in message msg,
|
|
returns identity ident
|
|
);
|
|
|
|
method cached=true OpenPGP_list_keyinfo(
|
|
in string pattern,
|
|
returns stringpairlist keyinfoList
|
|
);
|
|
|
|
//TODO Move to use IdentityFlag instead of ints
|
|
method cached=true set_identity_flags(
|
|
in identity ident,
|
|
in uint flags
|
|
);
|
|
|
|
method cached=true unset_identity_flags(
|
|
in identity ident,
|
|
in uint flags
|
|
);
|
|
|
|
method cached=true own_identities_retrieve(
|
|
returns identitylist identities
|
|
);
|
|
|
|
|
|
method cached=true get_trustwords(
|
|
in identity id1 const,
|
|
in identity id2 const,
|
|
in string lang,
|
|
returns sstring words,
|
|
in bool full
|
|
);
|
|
|
|
method cached=true get_message_trustwords(
|
|
in message msg,
|
|
in stringlist keylist,
|
|
in identity receivedby,
|
|
in string lang,
|
|
returns string words,
|
|
in bool full
|
|
);
|
|
|
|
method cached=true get_languagelist(
|
|
returns string languagelist
|
|
);
|
|
|
|
// this function is not related to key reset
|
|
|
|
method cached=true key_reset_trust(
|
|
in identity ident
|
|
);
|
|
|
|
method cached=true key_reset_identity(
|
|
in identity ident,
|
|
in string fpr
|
|
);
|
|
|
|
method cached=true key_reset_user(
|
|
in string userid,
|
|
in string fpr
|
|
);
|
|
|
|
method cached=true key_reset_all_own_keys();
|
|
|
|
method cached=true deliverHandshakeResult(
|
|
in SyncHandshakeResult shr,
|
|
in identitylist identities const
|
|
);
|
|
|
|
method cached=true leave_device_group();
|
|
|
|
method cached=true enable_identity_for_sync(
|
|
in identity ident
|
|
);
|
|
|
|
method cached=true disable_identity_for_sync(
|
|
in identity ident
|
|
);
|
|
|
|
method cached=true disable_all_sync_channels();
|
|
|
|
method config_cipher_suite(
|
|
in CipherSuite suite
|
|
);
|
|
|
|
method enter_device_group(
|
|
in identitylist identities const
|
|
);
|
|
|
|
method cached=true set_comm_partner_key(
|
|
in identity ident,
|
|
in string fpr
|
|
);
|
|
|
|
method cached=true sync_reinit();
|
|
|
|
// "basic" methods are generated on the java side, but
|
|
// on the C++ side, manually implemented in basic_api.cc
|
|
|
|
basic string trustwords(identity ident);
|
|
basic identity myself(identity ident);
|
|
basic identity updateIdentity(identity ident);
|
|
basic identity setOwnKey(identity ident, string fpr);
|
|
basic void keyMistrusted(identity ident);
|
|
basic void keyResetTrust(identity ident);
|
|
basic void trustPersonalKey(identity ident);
|
|
basic void trustOwnKey(identity ident);
|
|
basic identitylist importKey(bytearray key);
|
|
basic void config_passive_mode(bool enable);
|
|
basic void config_unencrypted_subject(bool enable);
|
|
basic string getCrashdumpLog(int maxlines);
|
|
basic string getUserDirectory();
|
|
basic string getMachineDirectory();
|
|
basic void config_passphrase(string passphrase);
|
|
basic void config_passphrase_for_new_keys(bool enable, string passphrase);
|
|
basic bytearray export_key(string fpr);
|
|
basic void config_enable_echo_protocol(bool enable);
|
|
basic void config_enable_echo_in_outgoing_message_rating_preview(bool enable);
|
|
};
|
|
|
|
struct message {
|
|
enum TextFormat {
|
|
enumitem plain > 0
|
|
enumitem html > 1
|
|
enumitem other > 255
|
|
}
|
|
|
|
enum direction {
|
|
enumitem incoming > 0
|
|
enumitem outgoing > 1
|
|
}
|
|
|
|
enum EncFormat {
|
|
enumitem none > 0
|
|
enumitem pieces > 1
|
|
enumitem inline > 1
|
|
enumitem SMIME > 2
|
|
enumitem PGPMIME > 3
|
|
enumitem PEP > 4
|
|
enumitem PGP_MIME_Outlook1 > 5
|
|
enumitem PEP_enc_inline_EA > 6
|
|
enumitem PEP_enc_auto > 255
|
|
}
|
|
|
|
direction dir;
|
|
string id;
|
|
string shortmsg;
|
|
string longmsg;
|
|
string longmsg_formatted;
|
|
bloblist attachments;
|
|
timestamp sent;
|
|
timestamp recv;
|
|
identity from;
|
|
identitylist to;
|
|
identity recv_by;
|
|
identitylist cc;
|
|
identitylist bcc;
|
|
identitylist reply_to;
|
|
stringlist in_reply_to;
|
|
stringlist references;
|
|
stringlist keywords;
|
|
string comments;
|
|
stringpairlist opt_fields;
|
|
EncFormat enc_format;
|
|
};
|
|
};
|
|
|