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.
 
 
 
 
 
 

276 lines
7.5 KiB

decl namespace @name;
decl enum @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 Color {
PEP_color_no_color > 0
PEP_color_yellow > 1
PEP_color_green > 2
PEP_color_red > -1
};
enum Rating {
pEp_rating_undefined > 0
pEp_rating_cannot_decrypt > 1
pEp_rating_have_no_key > 2
pEp_rating_unencrypted > 3
pEp_rating_unencrypted_for_some > 4
pEp_rating_unreliable > 5
pEp_rating_reliable > 6
pEp_rating_trusted > 7
pEp_rating_trusted_and_anonymized > 8
pEp_rating_fully_anonymous > 9
pEp_rating_mistrust > -1
pEp_rating_b0rken > -2
pEp_rating_under_attack > -3
};
enum DecryptFlags {
pEp_decrypt_flag_own_private_key > 1
pEp_decrypt_flag_consumed > 2
pEp_decrypt_flag_ignored > 4
pEp_decrypt_flag_src_modified > 8
pEp_decrypt_flag_untrusted_server > 0x100
};
enum IdentityFlags {
pEp_idf_not_for_sync > 1
pEp_idf_list > 2
pEp_idf_devicegroup > 256
};
enum SyncHandshakeResult {
sync_handshake_cancel > -1
sync_handshake_accepted > 0
sync_handshake_rejected > 1
};
enum SyncHandshakeSignal {
sync_notify_undefined > 0
sync_notify_init_add_our_device > 1
sync_notify_init_add_other_device > 2
sync_notify_init_form_group > 3
// sync_notify_init_move_our_device > 4
sync_notify_timeout > 5
sync_notify_accepted_device_added > 6
sync_notify_accepted_group_created > 7
// sync_notify_accepted_device_moved > 8
sync_notify_sole > 254
sync_notify_in_group > 255
};
enum CipherSuite {
pEp_cipher_suite_default > 0
pEp_cipher_suite_cv25519 > 1
pEp_cipher_suite_p256 > 2
pEp_cipher_suite_p384 > 3
pEp_cipher_suite_p521 > 4
pEp_cipher_suite_rsa2k > 5
pEp_cipher_suite_rsa3k > 6
pEp_cipher_suite_rsa4k > 7
pEp_cipher_suite_rsa8k > 8
};
interface Engine {
method encrypt_message(
in message src,
in stringlist extra,
creates message dst,
in EncFormat format,
Cconst PEP_encrypt_flags flags "0"
);
method 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 "0"
);
method 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 "0"
);
method decrypt_message(
inout message src,
creates message dst,
inout stringlist keylist,
returns Rating rating,
inout int flags
);
method re_evaluate_message_rating(
in message src,
Cconst stringlist x_keylist "NULL",
Cconst Rating x_enc_status "PEP_rating_undefined",
returns Rating rating
);
method outgoing_message_rating(
in message msg,
returns Rating rating
);
method outgoing_message_rating_preview(
in message msg,
returns Rating rating
);
method get_identity(
in string address,
in string userid,
returns identity ident
);
method identity_rating(
in identity ident,
returns Rating rating
);
method blacklist_retrieve(
returns stringlist blacklist
);
method own_message_private_key_details(
in message msg,
returns identity ident
);
method OpenPGP_list_keyinfo(
in string pattern,
returns stringpairlist keyinfoList
);
method set_identity_flags(
in identity ident,
in int flags
);
method unset_identity_flags(
in identity ident,
in int flags
);
method own_identities_retrieve(
returns identitylist identities
);
method get_trustwords(
in identity id1,
in identity id2,
in string lang,
returns sstring words,
in bool full
);
method get_trustwords_for_fprs(
in string fpr1,
in string fpr2,
in string lang,
returns sstring words,
in bool full
);
method get_message_trustwords(
in message msg,
in stringlist keylist,
in identity receivedby,
in string lang,
returns string words,
in bool full
);
method get_languagelist(
returns string languagelist
);
method key_reset(
in string fpr,
in identity ident
);
method deliverHandshakeResult(
in SyncHandshakeResult shr,
in identitylist identities
);
method config_cipher_suite(
in CipherSuite suite
);
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 void importKey(bytearray key);
basic void blacklist_add(string fpr);
basic void blacklist_delete(string fpr);
basic bool blacklist_is_listed(string fpr);
basic void config_passive_mode(bool enable);
basic void config_unencrypted_subject(bool enable);
basic string getCrashdumpLog(int maxlines);
};
struct message {
enum TextFormat {
plain > 0
html > 1
other > 255
}
enum direction {
incoming > 0
outgoing > 1
}
enum EncFormat {
none > 0
inline > 1
SMIME > 2
PGPMIME > 3
PEP > 4
}
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;
};
};