diff --git a/api/message_api.yml2 b/api/message_api.yml2 index e13971ba..14127f12 100644 --- a/api/message_api.yml2 +++ b/api/message_api.yml2 @@ -8,42 +8,35 @@ enum text_format { - hex text_format_plain 0x0; - hex text_format_html 0x01; + hex text_format_plain 0; + hex text_format_html 1; hex text_format_other 0xff; } enum msg_direction { - hex dir_incoming 0x0; - hex dir_outgoing 0x01; + item dir_incoming 0; + item dir_outgoing 1; } enum enc_format { - hex enc_none 0x0 doc='message is not encrypted'; - hex enc_pieces 0x01 doc='inline PGP + PGP extensions'; - hex enc_S_MIME 0x02 doc='RFC5751'; - hex enc_PGP_MIME 0x04 doc='RFC3156'; - hex enc_PEP 0x08 doc='pEp encryption format'; - hex enc_PGP_MIME_Outlook1 0x10 doc='Message B0rken by Outlook type 1'; -} - - -enum message_wrap_type { - message_default doc='typical inner/outer message 2.0'; - message_transport doc='e.g. for onion layers'; - message_key_reset doc='for wrapped key reset information'; + item enc_none 0 doc='message is not encrypted'; + item enc_pieces 1 doc='inline PGP + PGP extensions'; + item enc_S_MIME 2 doc='RFC5751'; + item enc_PGP_MIME 3 doc='RFC3156'; + item enc_PEP 4 doc='pEp encryption format'; + item enc_PGP_MIME_Outlook1 5 doc='Message B0rken by Outlook type 1'; } struct message { field msg_direction dir; - field string id doc='UTF-8 string of message ID'; - field string shortmsg doc='UTF-8 string of short message'; - field string longmsg doc='UTF-8 string of long message'(plain)'; - field string longmsg_formatted doc='UTF-8 string of long message (formatted)'; - field bloblist_t attachments doc='blobs with attachements'; + field string id doc='string of message ID'; + field string shortmsg doc='string of short message'; + field string longmsg doc='string of long message'(plain)'; + field string longmsg_formatted doc='string of long message (formatted)'; + field bloblist attachments doc='blobs with attachements'; field char rawmsg_ref doc='reference to raw message data'; field size_t rawmsg_size doc='size of raw message data'; field timestamp sent doc='when the message is sent'; @@ -54,12 +47,12 @@ field msg_direction dir; field identity_list cc doc='whom a CC is being sent'; field identity_list bcc doc='whom a BCC is being sent'; field identity_list reply_to doc='where a reply should go to'; - field string in_reply_to doc='list of UTF-8 strings with MessageIDs of refering messages'; + field string in_reply_to doc='list of strings with MessageIDs of refering messages'; field struct _message refering_msg_ref doc='reference to refering message'; - field string references doc='list of UTF-8 strings with references'; + field string references doc='list of strings with references'; field struct _message_ref_list refered_by doc='list of references to messages being refered'; - field string keywords doc='list of UTF-8 strings with keywords'; - field string char comments doc='UTF-8 string with comments'; + field string keywords doc='list of strings with keywords'; + field string char comments doc='string with comments'; field stringpair_list_t opt_fields doc='optional fields'; field enc_format enc_format doc='format of encrypted data'; } @@ -474,48 +467,6 @@ protocol session { } - func color_from_rating - doc="calculate color from rating" - { - // parms - - provide color_from_rating rating doc="color representing that rating" - - // return value - return color rating_color doc="color representing that rating" -} - - - func get_binary_path - doc="retrieve path of cryptotech binary if available" - { - //parms - - use cryptotech tech - doc="cryptotech to get the binary for"; - - use string path - doc=""" - path to cryptotech binary or NULL if not available. **path is owned by - the library, do not change it!; - """ -} - - - - - - - - - - - - - - - - // ratings ratings { @@ -534,6 +485,7 @@ protocol session { item rating_under_attack -3; } + // colors colors { @@ -544,6 +496,34 @@ protocol session { } + func color_from_rating + doc="calculate color from rating" + { + // parms + + use color_from_rating rating doc="color representing that rating" + + // return value + return color rating_color doc="color representing that rating" +} + + + func get_binary_path + doc="retrieve path of cryptotech binary if available" + { + //parms + + use cryptotech tech + doc="cryptotech to get the binary for"; + + use string path + doc=""" + path to cryptotech binary or NULL if not available. **path is owned by + the library, do not change it!; + """ +} + +