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.
 
 
 
 
 
 

315 lines
10 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 {
pEp_status_ok > 0
pEp_init_cannot_load_gpgme > 0x0110
pEp_init_gpgme_init_failed > 0x0111
pEp_init_no_gpg_home > 0x0112
pEp_init_netpgp_init_failed > 0x0113
pEp_init_cannot_determine_gpg_version > 0x0114
pEp_init_unsupported_gpg_version > 0x0115
pEp_init_cannot_config_gpg_agent > 0x0116
pEp_init_sqlite3_without_mutex > 0x0120
pEp_init_cannot_open_db > 0x0121
pEp_init_cannot_open_system_db > 0x0122
pEp_key_not_found > 0x0201
pEp_key_has_ambig_name > 0x0202
pEp_get_key_failed > 0x0203
pEp_cannot_export_key > 0x0204
pEp_cannot_edit_key > 0x0205
pEp_key_unsuitable > 0x0206
pEp_cannot_find_identity > 0x0301
pEp_cannot_set_person > 0x0381
pEp_cannot_set_pgp_keypair > 0x0382
pEp_cannot_set_identity > 0x0383
pEp_cannot_set_trust > 0x0384
pEp_key_blacklisted > 0x0385
pEp_cannot_find_person > 0x0386
pEp_cannot_find_alias > 0x0391
pEp_cannot_set_alias > 0x0392
pEp_unencrypted > 0x0400
pEp_verified > 0x0401
pEp_decrypted > 0x0402
pEp_decrypted_and_verified > 0x0403
pEp_decrypt_wrong_format > 0x0404
pEp_decrypt_no_key > 0x0405
pEp_decrypt_signature_does_not_match > 0x0406
pEp_verify_no_key > 0x0407
pEp_verified_and_trusted > 0x0408
pEp_cannot_decrypt_unknown > 0x04ff
pEp_trustword_not_found > 0x0501
pEp_trustwords_fpr_wrong_length > 0x0502
pEp_trustwords_duplicate_fpr > 0x0503
pEp_cannot_create_key > 0x0601
pEp_cannot_send_key > 0x0602
pEp_phrase_not_found > 0x0701
pEp_send_function_not_registered                > 0x0801
pEp_contraints_violated                         > 0x0802
pEp_cannot_encode                               > 0x0803
pEp_sync_no_notify_callback                  > 0x0901
pEp_sync_illegal_message                        > 0x0902
pEp_sync_no_inject_callback                     > 0x0903
pEp_sequence_violated > 0x0970
pEp_cannot_increase_sequence > 0x0971
pEp_cannot_set_sequence_value > 0x0972
pEp_own_sequence > 0x097f
pEp_sync_statemachine_error > 0x0980
pEp_sync_no_trust > 0x0981
pEp_statemachine_invalid_state > 0x0982
pEp_statemachine_invalid_event > 0x0983
pEp_statemachine_invalid_condition > 0x0984
pEp_statemachine_invalid_action > 0x0985
pEp_statemachine_inhibited_event > 0x0986
pEp_commit_failed > 0xff01
pEp_message_consume > 0xff02
pEp_message_ignore > 0xff03
pEp_record_not_found > -6
pEp_cannot_create_temp_file > -5
pEp_illegal_value > -4
pEp_buffer_too_small > -3
pEp_out_of_memory > -2
pEp_unknown_error > -1
pEp_version_mismatch > -7
};
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
};
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
};
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_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(
in message src,
creates message dst,
creates stringlist keylist,
returns Rating rating,
/* TODO replace with int, this is a OR of multipla DecryptFlags */
returns DecryptFlags 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 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_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
);
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 importKey(string 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 void accept_sync_handshake(identity ident);
basic void reject_sync_handshake(identity ident);
basic void cancel_sync_handshake(identity ident);
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
pieces > 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;
};
};