changes generate_api
authornk
Fri, 22 Feb 2019 12:49:13 +0100
branchgenerate_api
changeset 3310ee149b1aaa8e
parent 3309 f6ce35d3e977
child 3311 cdfdb6831046
changes
api/message_api.yml2
     1.1 --- a/api/message_api.yml2	Fri Feb 22 11:32:06 2019 +0100
     1.2 +++ b/api/message_api.yml2	Fri Feb 22 12:49:13 2019 +0100
     1.3 @@ -8,49 +8,49 @@
     1.4  
     1.5  
     1.6  enum text_format {
     1.7 -	hex text_format_plain 0;
     1.8 -	hex text_format_html 1;
     1.9 -	hex text_format_other 0xff;
    1.10 +    hex text_format_plain 0;
    1.11 +    hex text_format_html 1;
    1.12 +    hex text_format_other 0xff;
    1.13  }
    1.14  
    1.15  
    1.16  enum msg_direction {
    1.17 -	item dir_incoming 0;
    1.18 -	item dir_outgoing 1;
    1.19 +    item dir_incoming 0;
    1.20 +    item dir_outgoing 1;
    1.21  }
    1.22  
    1.23  
    1.24  enum enc_format {
    1.25 -	item enc_none 0 doc='message is not encrypted';
    1.26 -	item enc_pieces 1 doc='inline PGP + PGP extensions';
    1.27 -	item enc_S_MIME 2 doc='RFC5751';
    1.28 -	item enc_PGP_MIME 3 doc='RFC3156';
    1.29 -	item enc_PEP 4 doc='pEp encryption format';
    1.30 -	item enc_PGP_MIME_Outlook1 5 doc='Message B0rken by Outlook type 1';
    1.31 +    item enc_none 0 doc='message is not encrypted';
    1.32 +    item enc_pieces 1 doc='inline PGP + PGP extensions';
    1.33 +    item enc_S_MIME 2 doc='RFC5751';
    1.34 +    item enc_PGP_MIME 3 doc='RFC3156';
    1.35 +    item enc_PEP 4 doc='pEp encryption format';
    1.36 +    item enc_PGP_MIME_Outlook1 5 doc='Message B0rken by Outlook type 1';
    1.37  }
    1.38  
    1.39  
    1.40  struct message {
    1.41  field msg_direction dir;
    1.42 -	field string id doc='string of message ID';
    1.43 -	field string shortmsg doc='string of short message';
    1.44 -	field string longmsg doc='string of long message'(plain)';
    1.45 -	field string longmsg_formatted doc='string of long message (formatted)';
    1.46 -   	field bloblist attachments doc='blobs with attachements';
    1.47 -	field char rawmsg_ref doc='reference to raw message data';
    1.48 -	field size rawmsg_size doc='size of raw message data';
    1.49 -	field timestamp sent doc='when the message is sent';
    1.50 -	field timestamp recv doc='when the message is received';
    1.51 -	field identity from doc='whom the message is from';
    1.52 -	field identity_list to doc='whom the message is to';
    1.53 -	field identity recv_by doc='via which identity the message is received';
    1.54 -	field identity_list cc doc='whom a CC is being sent';
    1.55 -	field identity_list bcc doc='whom a BCC is being sent';
    1.56 -	field identity_list reply_to doc='where a reply should go to';
    1.57 -	field string in_reply_to doc='list of strings with MessageIDs of refering messages';
    1.58 -	field struct _message refering_msg_ref doc='reference to refering message';
    1.59 -	field string references doc='list of strings with references';
    1.60 -	field struct _message_ref_list refered_by doc='list of references to messages being refered';
    1.61 +    field string id doc='string of message ID';
    1.62 +    field string shortmsg doc='string of short message';
    1.63 +    field string longmsg doc='string of long message'(plain)';
    1.64 +    field string longmsg_formatted doc='string of long message (formatted)';
    1.65 +       field bloblist attachments doc='blobs with attachements';
    1.66 +    field char rawmsg_ref doc='reference to raw message data';
    1.67 +    field size rawmsg_size doc='size of raw message data';
    1.68 +    field timestamp sent doc='when the message is sent';
    1.69 +    field timestamp recv doc='when the message is received';
    1.70 +    field identity from doc='whom the message is from';
    1.71 +    field identity_list to doc='whom the message is to';
    1.72 +    field identity recv_by doc='via which identity the message is received';
    1.73 +    field identity_list cc doc='whom a CC is being sent';
    1.74 +    field identity_list bcc doc='whom a BCC is being sent';
    1.75 +    field identity_list reply_to doc='where a reply should go to';
    1.76 +    field string in_reply_to doc='list of strings with MessageIDs of refering messages';
    1.77 +    field struct _message refering_msg_ref doc='reference to refering message';
    1.78 +    field string references doc='list of strings with references';
    1.79 +    field struct _message_ref_list refered_by doc='list of references to messages being refered';
    1.80      field string keywords doc='list of strings with keywords';
    1.81      field string char comments doc='string with comments';
    1.82      field stringpair_list opt_fields doc='optional fields';
    1.83 @@ -92,11 +92,11 @@
    1.84          flags {
    1.85              flag default 0x0 doc='"default" means whatever the default behaviour for the function is.';
    1.86              flag force_encryption 0x1;
    1.87 -			flag force_unsigned 0x2 doc='This flag is for special use cases and should not be used by normal pEp clients!';
    1.88 -			flag force_no_attached_key 0x4;
    1.89 -			flag inner_message 0x8 doc='This is mainly used by pEp clients to send private keys to their own PGP-only device.';
    1.90 -			flag force_version_1 0x10 doc='This is mainly used by pEp clients to send private keys to their own PGP-only device';
    1.91 -			flag key_reset_only 0x20;
    1.92 +            flag force_unsigned 0x2 doc='This flag is for special use cases and should not be used by normal pEp clients!';
    1.93 +            flag force_no_attached_key 0x4;
    1.94 +            flag inner_message 0x8 doc='This is mainly used by pEp clients to send private keys to their own PGP-only device.';
    1.95 +            flag force_version_1 0x10 doc='This is mainly used by pEp clients to send private keys to their own PGP-only device';
    1.96 +            flag key_reset_only 0x20;
    1.97          }
    1.98  
    1.99          // exceptions
   1.100 @@ -111,423 +111,423 @@
   1.101      }
   1.102  
   1.103  
   1.104 -	method encrypt_message_and_add_priv_key
   1.105 -		doc="encrypt message in memory, adding an encrypted private key (encrypted separately and sent within the inner message)"
   1.106 -	{
   1.107 -		// parms
   1.108 +    method encrypt_message_and_add_priv_key
   1.109 +        doc="encrypt message in memory, adding an encrypted private key (encrypted separately and sent within the inner message)"
   1.110 +    {
   1.111 +        // parms
   1.112  
   1.113 -		use message src doc="message to encrypt";
   1.114 +        use message src doc="message to encrypt";
   1.115  
   1.116 -		create message dst
   1.117 -			doc="pointer to new encrypted message or NULL if no encryption could take place";
   1.118 +        create message dst
   1.119 +            doc="pointer to new encrypted message or NULL if no encryption could take place";
   1.120  
   1.121 -		use const char to_fpr
   1.122 -			doc="fingerprint of the recipient key to which the private key should be encrypted";
   1.123 +        use const char to_fpr
   1.124 +            doc="fingerprint of the recipient key to which the private key should be encrypted";
   1.125  
   1.126 -		use enc_format format doc="encrypted format";
   1.127 +        use enc_format format doc="encrypted format";
   1.128  
   1.129 -		// flags
   1.130 +        // flags
   1.131  
   1.132 -		flags {
   1.133 -			flag default 0x0 doc='"default" means whatever the default behaviour for the function is.';
   1.134 -			flag force_encryption 0x1;
   1.135 -			flag force_unsigned 0x2 doc='This flag is for special use cases and should not be used by normal pEp clients!';
   1.136 -			flag force_no_attached_key 0x4;
   1.137 -			flag inner_message 0x8 doc='This is mainly used by pEp clients to send private keys to their own PGP-only device.';
   1.138 -			flag force_version_1 0x10 doc='This is mainly used by pEp clients to send private keys to their own PGP-only device';
   1.139 -			flag key_reset_only 0x20;
   1.140 -		}
   1.141 +        flags {
   1.142 +            flag default 0x0 doc='"default" means whatever the default behaviour for the function is.';
   1.143 +            flag force_encryption 0x1;
   1.144 +            flag force_unsigned 0x2 doc='This flag is for special use cases and should not be used by normal pEp clients!';
   1.145 +            flag force_no_attached_key 0x4;
   1.146 +            flag inner_message 0x8 doc='This is mainly used by pEp clients to send private keys to their own PGP-only device.';
   1.147 +            flag force_version_1 0x10 doc='This is mainly used by pEp clients to send private keys to their own PGP-only device';
   1.148 +            flag key_reset_only 0x20;
   1.149 +        }
   1.150  
   1.151 -		// exceptions
   1.152 +        // exceptions
   1.153  
   1.154 -		throws key_has_ambig_name doc="at least one of the receipient keys has an ambiguous name";
   1.155 +        throws key_has_ambig_name doc="at least one of the receipient keys has an ambiguous name";
   1.156  
   1.157 -		throws unencrypted
   1.158 -			doc="""
   1.159 -				on demand or no recipients with usable key, is left unencrypted, 
   1.160 -				and key is attached to it
   1.161 -				""";
   1.162 -	}
   1.163 +        throws unencrypted
   1.164 +            doc="""
   1.165 +                on demand or no recipients with usable key, is left unencrypted, 
   1.166 +                and key is attached to it
   1.167 +                """;
   1.168 +    }
   1.169  
   1.170  
   1.171 -	method encrypt_message_for_self
   1.172 -		doc="""
   1.173 -			encrypt message in memory for user's identity only,
   1.174 -			ignoring recipients and other identities from the message
   1.175 -			"""
   1.176 -	{
   1.177 -		// parms
   1.178 +    method encrypt_message_for_self
   1.179 +        doc="""
   1.180 +            encrypt message in memory for user's identity only,
   1.181 +            ignoring recipients and other identities from the message
   1.182 +            """
   1.183 +    {
   1.184 +        // parms
   1.185  
   1.186 -		use identity target_id
   1.187 -		doc="""
   1.188 -			self identity this message should be encrypted for. Message is NOT encrypted for 
   1.189 -			identities other than the target_id (and then, only if the target_id refers to self!).
   1.190 -			""";
   1.191 +        use identity target_id
   1.192 +        doc="""
   1.193 +            self identity this message should be encrypted for. Message is NOT encrypted for 
   1.194 +            identities other than the target_id (and then, only if the target_id refers to self!).
   1.195 +            """;
   1.196  
   1.197 -		use message src doc="message to encrypt";
   1.198 +        use message src doc="message to encrypt";
   1.199  
   1.200 -		use hash_list extra doc="extra keys for encryption";
   1.201 +        use hash_list extra doc="extra keys for encryption";
   1.202  
   1.203 -		create message dst doc="pointer to new encrypted message or NULL on failure";
   1.204 +        create message dst doc="pointer to new encrypted message or NULL on failure";
   1.205  
   1.206 -		use enc_format format doc="encrypted format";
   1.207 +        use enc_format format doc="encrypted format";
   1.208  
   1.209 -		// flags
   1.210 +        // flags
   1.211  
   1.212 -		flags {
   1.213 -			flag default 0x0 doc='"default" means whatever the default behaviour for the function is.';
   1.214 -			flag force_encryption 0x1;
   1.215 -			flag force_unsigned 0x2 doc='This flag is for special use cases and should not be used by normal pEp clients!';
   1.216 -			flag force_no_attached_key 0x4;
   1.217 -			flag inner_message 0x8 doc='This is mainly used by pEp clients to send private keys to their own PGP-only device.';
   1.218 -			flag force_version_1 0x10 doc='This is mainly used by pEp clients to send private keys to their own PGP-only device';
   1.219 -			flag key_reset_only 0x20;
   1.220 -		}
   1.221 +        flags {
   1.222 +            flag default 0x0 doc='"default" means whatever the default behaviour for the function is.';
   1.223 +            flag force_encryption 0x1;
   1.224 +            flag force_unsigned 0x2 doc='This flag is for special use cases and should not be used by normal pEp clients!';
   1.225 +            flag force_no_attached_key 0x4;
   1.226 +            flag inner_message 0x8 doc='This is mainly used by pEp clients to send private keys to their own PGP-only device.';
   1.227 +            flag force_version_1 0x10 doc='This is mainly used by pEp clients to send private keys to their own PGP-only device';
   1.228 +            flag key_reset_only 0x20;
   1.229 +        }
   1.230  
   1.231 -		// exceptions doc="(FIXME: This may not be correct or complete)"
   1.232 +        // exceptions doc="(FIXME: This may not be correct or complete)"
   1.233  
   1.234 -		throws key_not_found doc="at least one of the receipient keys could not be found";
   1.235 +        throws key_not_found doc="at least one of the receipient keys could not be found";
   1.236  
   1.237 -		throws key_has_ambig_name doc="at least one of the receipient keys has an ambiguous name";
   1.238 +        throws key_has_ambig_name doc="at least one of the receipient keys has an ambiguous name";
   1.239  
   1.240 -		throws get_key_failed doc="cannot retrieve key";
   1.241 -	}
   1.242 +        throws get_key_failed doc="cannot retrieve key";
   1.243 +    }
   1.244  
   1.245  
   1.246 -	method decrypt_message
   1.247 -		doc="decrypt message in memory"
   1.248 -	{
   1.249 -	// parms
   1.250 +    method decrypt_message
   1.251 +        doc="decrypt message in memory"
   1.252 +    {
   1.253 +    // parms
   1.254  
   1.255 -	supply message src
   1.256 -	doc="""
   1.257 -		message to decrypt. 
   1.258 -		The ownership of src remains with the caller - however, the contents 
   1.259 -		might be modified (strings freed and allocated anew or set to NULL,
   1.260 -		etc) intentionally; when this happens, decrypt_flag_src_modified is set.
   1.261 -		""";
   1.262 +    supply message src
   1.263 +    doc="""
   1.264 +        message to decrypt. 
   1.265 +        The ownership of src remains with the caller - however, the contents 
   1.266 +        might be modified (strings freed and allocated anew or set to NULL,
   1.267 +        etc) intentionally; when this happens, decrypt_flag_src_modified is set.
   1.268 +        """;
   1.269  
   1.270 -	create message dst doc="pointer to new decrypted message or NULL on failure";
   1.271 +    create message dst doc="pointer to new decrypted message or NULL on failure";
   1.272  
   1.273 -	supply hash_list keylist
   1.274 -	doc="""
   1.275 -		in: stringlist with additional keyids for reencryption if needed
   1.276 -			(will be freed and replaced with output keylist)
   1.277 -		out: stringlist with keyids used for signing and encryption. first
   1.278 -			first key is signer, additional keys are the ones it was encrypted
   1.279 -			to. Only signer and whichever of the user's keys was used are reliable.
   1.280 -		The ownership of keylist goes to the caller.
   1.281 -		If src is unencrypted this function returns unencrypted and sets dst to NULL.
   1.282 -		""";
   1.283 +    supply hash_list keylist
   1.284 +    doc="""
   1.285 +        in: stringlist with additional keyids for reencryption if needed
   1.286 +            (will be freed and replaced with output keylist)
   1.287 +        out: stringlist with keyids used for signing and encryption. first
   1.288 +            first key is signer, additional keys are the ones it was encrypted
   1.289 +            to. Only signer and whichever of the user's keys was used are reliable.
   1.290 +        The ownership of keylist goes to the caller.
   1.291 +        If src is unencrypted this function returns unencrypted and sets dst to NULL.
   1.292 +        """;
   1.293  
   1.294 -	return rating msg_rating doc="rating for the message";
   1.295 +    return rating msg_rating doc="rating for the message";
   1.296  
   1.297 -	// flags
   1.298 -	
   1.299 -	decrypt_flags {
   1.300 -		decrypt_flag_own_private_key 0x1 
   1.301 -		doc="""
   1.302 -			private key was imported for one of our addresses (NOT trusted
   1.303 -			or set to be used - handshake/trust is required for that)
   1.304 -			""";
   1.305 -		decrypt_flag_consume 0x2 doc=’used by sync';
   1.306 -		decrypt_flag_ignore 0x4 doc=’used by sync';
   1.307 -		decrypt_flag_src_modified 0x8 
   1.308 -		doc="""
   1.309 -			indicates that the src object has been modified. At the moment,
   1.310 -			this is always as a direct result of the behaviour driven
   1.311 -			by the input flags. This flag is the ONLY value that should be
   1.312 -			relied upon to see if such changes have taken place.
   1.313 -			""";
   1.314 -		decrypt_flag_untrusted_server 0x100 
   1.315 -		doc="""
   1.316 -			input flags. Used to signal that decrypt function should engage in behaviour
   1.317 -			specified for when the server storing the source is untrusted.
   1.318 -			""";
   1.319 -	}
   1.320 +    // flags
   1.321 +    
   1.322 +    decrypt_flags {
   1.323 +        decrypt_flag_own_private_key 0x1 
   1.324 +        doc="""
   1.325 +            private key was imported for one of our addresses (NOT trusted
   1.326 +            or set to be used - handshake/trust is required for that)
   1.327 +            """;
   1.328 +        decrypt_flag_consume 0x2 doc=’used by sync';
   1.329 +        decrypt_flag_ignore 0x4 doc=’used by sync';
   1.330 +        decrypt_flag_src_modified 0x8 
   1.331 +        doc="""
   1.332 +            indicates that the src object has been modified. At the moment,
   1.333 +            this is always as a direct result of the behaviour driven
   1.334 +            by the input flags. This flag is the ONLY value that should be
   1.335 +            relied upon to see if such changes have taken place.
   1.336 +            """;
   1.337 +        decrypt_flag_untrusted_server 0x100 
   1.338 +        doc="""
   1.339 +            input flags. Used to signal that decrypt function should engage in behaviour
   1.340 +            specified for when the server storing the source is untrusted.
   1.341 +            """;
   1.342 +    }
   1.343  
   1.344 -	// exceptions
   1.345 -	
   1.346 -	throws decrypted doc="if message decrypted but not verified";
   1.347 +    // exceptions
   1.348 +    
   1.349 +    throws decrypted doc="if message decrypted but not verified";
   1.350  
   1.351 -	throws cannot_reencrypt
   1.352 -		doc="""
   1.353 -			if message was decrypted (and possibly verified) but a reencryption 
   1.354 -			operation is expected by the caller and failed.
   1.355 -			""";
   1.356 +    throws cannot_reencrypt
   1.357 +        doc="""
   1.358 +            if message was decrypted (and possibly verified) but a reencryption 
   1.359 +            operation is expected by the caller and failed.
   1.360 +            """;
   1.361  
   1.362 -	throws unencrypted
   1.363 -		doc="""
   1.364 -			if src is unencrypted this function returns unencrypted and sets
   1.365 -			dst to NULL.
   1.366 -			""";
   1.367 +    throws unencrypted
   1.368 +        doc="""
   1.369 +            if src is unencrypted this function returns unencrypted and sets
   1.370 +            dst to NULL.
   1.371 +            """;
   1.372  
   1.373 -	throws any doc="error status";
   1.374 -	}
   1.375 +    throws any doc="error status";
   1.376 +    }
   1.377  
   1.378  
   1.379 -	method own_message_private_key_details
   1.380 -		doc="""
   1.381 -			details on own key in own message. Note: In order to obtain details about key 
   1.382 -			to be possibly imported as a replacement of key currently used as own identity, 
   1.383 -			application passes message that have been previously flagged by decrypt_message() 
   1.384 -			as own message containing own key to this function.
   1.385 -			"""
   1.386 -	{
   1.387 -	//parms
   1.388 +    method own_message_private_key_details
   1.389 +        doc="""
   1.390 +            details on own key in own message. Note: In order to obtain details about key 
   1.391 +            to be possibly imported as a replacement of key currently used as own identity, 
   1.392 +            application passes message that have been previously flagged by decrypt_message() 
   1.393 +            as own message containing own key to this function.
   1.394 +            """
   1.395 +    {
   1.396 +    //parms
   1.397  
   1.398 -	use message msg
   1.399 -	doc="""
   1.400 -		message to decrypt. msg MUST be encrypted so that this function 
   1.401 -		can check own signature.
   1.402 -		""";
   1.403 +    use message msg
   1.404 +    doc="""
   1.405 +        message to decrypt. msg MUST be encrypted so that this function 
   1.406 +        can check own signature.
   1.407 +        """;
   1.408  
   1.409 -	create identity ident doc="identity containing uid, address and fpr of key";
   1.410 +    create identity ident doc="identity containing uid, address and fpr of key";
   1.411  
   1.412 -	// exceptions
   1.413 +    // exceptions
   1.414  
   1.415 -	throws any doc="error status"
   1.416 -	}
   1.417 +    throws any doc="error status"
   1.418 +    }
   1.419  
   1.420  
   1.421 -	method outgoing_message_rating
   1.422 -		doc="get rating for an outgoing message"
   1.423 -	{
   1.424 -	//parms
   1.425 +    method outgoing_message_rating
   1.426 +        doc="get rating for an outgoing message"
   1.427 +    {
   1.428 +    //parms
   1.429  
   1.430 -	use message msg
   1.431 -	doc="""
   1.432 -		message to get the rating for. From must point to a valid pEp_identity.
   1.433 -		Dir must be dir_outgoing.
   1.434 -		""";
   1.435 +    use message msg
   1.436 +    doc="""
   1.437 +        message to get the rating for. From must point to a valid pEp_identity.
   1.438 +        Dir must be dir_outgoing.
   1.439 +        """;
   1.440  
   1.441 -	return rating msg_rating doc="rating for the message";
   1.442 +    return rating msg_rating doc="rating for the message";
   1.443  
   1.444 -	// exceptions
   1.445 +    // exceptions
   1.446  
   1.447 -	throws any doc="error status"
   1.448 -	}
   1.449 +    throws any doc="error status"
   1.450 +    }
   1.451  
   1.452  
   1.453 -	method outgoing_message_rating_preview
   1.454 -		doc="get rating preview"
   1.455 -	{
   1.456 -	//parms
   1.457 +    method outgoing_message_rating_preview
   1.458 +        doc="get rating preview"
   1.459 +    {
   1.460 +    //parms
   1.461  
   1.462 -	use message msg
   1.463 -	doc="""
   1.464 -		message to get the rating for. From must point to a valid pEp_identity.
   1.465 -		Dir must be dir_outgoing.
   1.466 -		""";
   1.467 +    use message msg
   1.468 +    doc="""
   1.469 +        message to get the rating for. From must point to a valid pEp_identity.
   1.470 +        Dir must be dir_outgoing.
   1.471 +        """;
   1.472  
   1.473 -	return rating msg_rating doc="rating preview for the message";
   1.474 +    return rating msg_rating doc="rating preview for the message";
   1.475  
   1.476 -	// exceptions
   1.477 +    // exceptions
   1.478  
   1.479 -	throws any doc="error status"
   1.480 -	}
   1.481 +    throws any doc="error status"
   1.482 +    }
   1.483  
   1.484  
   1.485 -	method identity_rating
   1.486 -		doc="get rating for a single identity"
   1.487 -	{
   1.488 -	//parms
   1.489 +    method identity_rating
   1.490 +        doc="get rating for a single identity"
   1.491 +    {
   1.492 +    //parms
   1.493  
   1.494 -	use identity ident doc="identity to get the rating for";
   1.495 +    use identity ident doc="identity to get the rating for";
   1.496  
   1.497 -	return rating identity_rating doc="rating for the identity";
   1.498 +    return rating identity_rating doc="rating for the identity";
   1.499  
   1.500 -	// exceptions
   1.501 +    // exceptions
   1.502  
   1.503 -	throws any doc="error status"
   1.504 -	}
   1.505 +    throws any doc="error status"
   1.506 +    }
   1.507  
   1.508  
   1.509 -	method get_trustwords
   1.510 -		doc="get full trustwords string for a *pair* of identities"
   1.511 -	{
   1.512 -	//parms
   1.513 +    method get_trustwords
   1.514 +        doc="get full trustwords string for a *pair* of identities"
   1.515 +    {
   1.516 +    //parms
   1.517  
   1.518 -	use const identity id1 doc="identity of first party in communication - fpr can't be NULL";
   1.519 +    use const identity id1 doc="identity of first party in communication - fpr can't be NULL";
   1.520  
   1.521 -	use const identity id2 doc="identity of second party in communication - fpr can't be NULL";
   1.522 +    use const identity id2 doc="identity of second party in communication - fpr can't be NULL";
   1.523  
   1.524 -	use const char lang doc="C string with ISO 639-1 language code";
   1.525 +    use const char lang doc="C string with ISO 639-1 language code";
   1.526  
   1.527 -	create char words
   1.528 -		doc="""
   1.529 -			pointer to C string with all trustwords UTF-8 encoded, separated 
   1.530 -			by a blank each NULL if language is not supported or trustword 
   1.531 -			wordlist is damaged or unavailable. 
   1.532 -			The word pointer goes to the ownership of the caller. 
   1.533 -			The caller is responsible to free() it (on Windoze use pEp_free())
   1.534 -			""";
   1.535 +    create char words
   1.536 +        doc="""
   1.537 +            pointer to C string with all trustwords UTF-8 encoded, separated 
   1.538 +            by a blank each NULL if language is not supported or trustword 
   1.539 +            wordlist is damaged or unavailable. 
   1.540 +            The word pointer goes to the ownership of the caller. 
   1.541 +            The caller is responsible to free() it (on Windoze use pEp_free())
   1.542 +            """;
   1.543  
   1.544 -	create size_t wsize doc="length of full trustwords string";
   1.545 +    create size_t wsize doc="length of full trustwords string";
   1.546  
   1.547 -	use bool full
   1.548 -		doc="""
   1.549 -			if true, generate ALL trustwords for these identities.
   1.550 -			else, generate a fixed-size subset. (TODO: fixed-minimum-entropy
   1.551 -			subset in next version)
   1.552 -			""";
   1.553 +    use bool full
   1.554 +        doc="""
   1.555 +            if true, generate ALL trustwords for these identities.
   1.556 +            else, generate a fixed-size subset. (TODO: fixed-minimum-entropy
   1.557 +            subset in next version)
   1.558 +            """;
   1.559  
   1.560 -	// exceptions
   1.561 +    // exceptions
   1.562  
   1.563 -	throws out_of_memory
   1.564 -		doc="out of memory";
   1.565 +    throws out_of_memory
   1.566 +        doc="out of memory";
   1.567  
   1.568 -	throws trustword_not_found
   1.569 -		doc="at least one trustword not found";
   1.570 -	}
   1.571 +    throws trustword_not_found
   1.572 +        doc="at least one trustword not found";
   1.573 +    }
   1.574  
   1.575  
   1.576 -	method get_message_trustwords
   1.577 -		doc="get full trustwords string for message sender and reciever identities"
   1.578 -	{
   1.579 -	//parms
   1.580 +    method get_message_trustwords
   1.581 +        doc="get full trustwords string for message sender and reciever identities"
   1.582 +    {
   1.583 +    //parms
   1.584  
   1.585 -	use message msg doc="message to get sender identity from";
   1.586 +    use message msg doc="message to get sender identity from";
   1.587  
   1.588 -	use hash_list keylist
   1.589 -		doc="NULL if message to be decrypted, keylist returned by decrypt_message() otherwise.";
   1.590 +    use hash_list keylist
   1.591 +        doc="NULL if message to be decrypted, keylist returned by decrypt_message() otherwise.";
   1.592  
   1.593 -	use identity received_by doc="identity for account receiving message can't be NULL";
   1.594 +    use identity received_by doc="identity for account receiving message can't be NULL";
   1.595  
   1.596 -	use string lang doc="C string with ISO 639-1 language code";
   1.597 +    use string lang doc="C string with ISO 639-1 language code";
   1.598  
   1.599 -	create char words
   1.600 -		doc="""
   1.601 -			pointer to C string with all trustwords UTF-8 encoded, separated by a blank each.
   1.602 -			NULL if language is not supported or trustword  wordlist is damaged or unavailable.
   1.603 -			The word pointer goes to the ownership of the caller. 
   1.604 -			The caller is responsible to free() it (on Windoze use pEp_free())
   1.605 -			""";
   1.606 +    create char words
   1.607 +        doc="""
   1.608 +            pointer to C string with all trustwords UTF-8 encoded, separated by a blank each.
   1.609 +            NULL if language is not supported or trustword  wordlist is damaged or unavailable.
   1.610 +            The word pointer goes to the ownership of the caller. 
   1.611 +            The caller is responsible to free() it (on Windoze use pEp_free())
   1.612 +            """;
   1.613  
   1.614 -	use bool full
   1.615 -		doc="""
   1.616 -			if true, generate ALL trustwords for these identities.
   1.617 -			else, generate a fixed-size subset. (TODO: fixed-minimum-entropy
   1.618 -			subset in next version)
   1.619 -			""";
   1.620 +    use bool full
   1.621 +        doc="""
   1.622 +            if true, generate ALL trustwords for these identities.
   1.623 +            else, generate a fixed-size subset. (TODO: fixed-minimum-entropy
   1.624 +            subset in next version)
   1.625 +            """;
   1.626  
   1.627 -	// exceptions
   1.628 +    // exceptions
   1.629  
   1.630 -	throws out_of_memory doc="out of memory";
   1.631 +    throws out_of_memory doc="out of memory";
   1.632  
   1.633 -	throws trustword_not_found doc="at least one trustword not found";
   1.634 +    throws trustword_not_found doc="at least one trustword not found";
   1.635  
   1.636 -	throws like decrypt_message doc="error status of decrypt_message() if decryption fails"
   1.637 -	}
   1.638 +    throws like decrypt_message doc="error status of decrypt_message() if decryption fails"
   1.639 +    }
   1.640  
   1.641  
   1.642 -	method re_evaluate_message_rating
   1.643 -		doc="re-evaluate already decrypted message rating"
   1.644 -	{
   1.645 -	//parms
   1.646 +    method re_evaluate_message_rating
   1.647 +        doc="re-evaluate already decrypted message rating"
   1.648 +    {
   1.649 +    //parms
   1.650  
   1.651 -	use message msg
   1.652 -		doc="message to get the rating for. msg->from must point to a valid pEp_identity";
   1.653 +    use message msg
   1.654 +        doc="message to get the rating for. msg->from must point to a valid pEp_identity";
   1.655  
   1.656 -	use hash_list x_keylist doc="decrypted message recipients keys fpr";
   1.657 +    use hash_list x_keylist doc="decrypted message recipients keys fpr";
   1.658  
   1.659 -	use rating x_enc_status doc="original rating for the decrypted message";
   1.660 +    use rating x_enc_status doc="original rating for the decrypted message";
   1.661  
   1.662 -	return rating msg_rating doc="rating for the message";
   1.663 +    return rating msg_rating doc="rating for the message";
   1.664  
   1.665 -	// exceptions
   1.666 +    // exceptions
   1.667  
   1.668 -	throws illegal_value
   1.669 -		doc="""
   1.670 -			if decrypted message doesn't contain X-EncStatus optional field and 
   1.671 -			x_enc_status is pEp_rating_udefined or if decrypted message doesn't 
   1.672 -			contain X-Keylist optional field and x_keylist is NULL.
   1.673 -			""";
   1.674 +    throws illegal_value
   1.675 +        doc="""
   1.676 +            if decrypted message doesn't contain X-EncStatus optional field and 
   1.677 +            x_enc_status is pEp_rating_udefined or if decrypted message doesn't 
   1.678 +            contain X-Keylist optional field and x_keylist is NULL.
   1.679 +            """;
   1.680  
   1.681 -	throws out_of_memory doc="if not enough memory could be allocated";
   1.682 -	}
   1.683 +    throws out_of_memory doc="if not enough memory could be allocated";
   1.684 +    }
   1.685  
   1.686  
   1.687 -	method get_key_rating_for_user
   1.688 -		doc="get the rating of a certain key for a certain user"
   1.689 -	{
   1.690 -	//parms
   1.691 +    method get_key_rating_for_user
   1.692 +        doc="get the rating of a certain key for a certain user"
   1.693 +    {
   1.694 +    //parms
   1.695  
   1.696 -	use string user_id doc="string with user ID";
   1.697 +    use string user_id doc="string with user ID";
   1.698  
   1.699 -	use string fpr doc="string with fingerprint";
   1.700 +    use string fpr doc="string with fingerprint";
   1.701  
   1.702 -	return rating key_rating doc="rating of key for this user";
   1.703 -		
   1.704 -	// exceptions
   1.705 +    return rating key_rating doc="rating of key for this user";
   1.706 +        
   1.707 +    // exceptions
   1.708  
   1.709 -	throws record_not_found
   1.710 -		doc="if no trust record for user_id and fpr can be found"
   1.711 -	}
   1.712 -}	
   1.713 +    throws record_not_found
   1.714 +        doc="if no trust record for user_id and fpr can be found"
   1.715 +    }
   1.716 +}    
   1.717  
   1.718  
   1.719 -	// ratings
   1.720 +    // ratings
   1.721  
   1.722 -	ratings {
   1.723 -		item rating_undefined 0;
   1.724 -		item rating_cannot_decrypt 1;
   1.725 -		item rating_have_no_key 2;
   1.726 -		item rating_unencrypted 3;
   1.727 -		item rating_unencrypted_for_some doc="don't use this any more",
   1.728 -		item rating_unreliable 4;
   1.729 -		item rating_reliable 5;
   1.730 -		item rating_trusted 6;
   1.731 -		item rating_trusted_and_anonymized 7;
   1.732 -		item rating_fully_anonymous 8;
   1.733 -		item rating_mistrust -1;
   1.734 -		item rating_b0rken -2;
   1.735 -		item rating_under_attack -3;
   1.736 -	}
   1.737 +    ratings {
   1.738 +        item rating_undefined 0;
   1.739 +        item rating_cannot_decrypt 1;
   1.740 +        item rating_have_no_key 2;
   1.741 +        item rating_unencrypted 3;
   1.742 +        item rating_unencrypted_for_some doc="don't use this any more",
   1.743 +        item rating_unreliable 4;
   1.744 +        item rating_reliable 5;
   1.745 +        item rating_trusted 6;
   1.746 +        item rating_trusted_and_anonymized 7;
   1.747 +        item rating_fully_anonymous 8;
   1.748 +        item rating_mistrust -1;
   1.749 +        item rating_b0rken -2;
   1.750 +        item rating_under_attack -3;
   1.751 +    }
   1.752  
   1.753  
   1.754 -	// colors
   1.755 +    // colors
   1.756  
   1.757 -	colors {
   1.758 -		item color_no_color 0;
   1.759 -		item color_yellow 1;
   1.760 -		item color_green 2;
   1.761 -		item color_red -1;
   1.762 -	}
   1.763 +    colors {
   1.764 +        item color_no_color 0;
   1.765 +        item color_yellow 1;
   1.766 +        item color_green 2;
   1.767 +        item color_red -1;
   1.768 +    }
   1.769  
   1.770  
   1.771 -	func color_from_rating
   1.772 -		doc="calculate color from rating"
   1.773 -	{
   1.774 -		// parms
   1.775 +    func color_from_rating
   1.776 +        doc="calculate color from rating"
   1.777 +    {
   1.778 +        // parms
   1.779  
   1.780 -		use color_from_rating rating doc="color representing that rating"
   1.781 +        use color_from_rating rating doc="color representing that rating"
   1.782  
   1.783 -		// return value
   1.784 -		return color rating_color doc="color representing that rating"
   1.785 +        // return value
   1.786 +        return color rating_color doc="color representing that rating"
   1.787  }
   1.788  
   1.789 -			
   1.790 -	func get_binary_path
   1.791 -		doc="retrieve path of cryptotech binary if available"
   1.792 -	{
   1.793 -	//parms
   1.794 +            
   1.795 +    func get_binary_path
   1.796 +        doc="retrieve path of cryptotech binary if available"
   1.797 +    {
   1.798 +    //parms
   1.799  
   1.800 -	use cryptotech tech
   1.801 -	doc="cryptotech to get the binary for";
   1.802 +    use cryptotech tech
   1.803 +    doc="cryptotech to get the binary for";
   1.804  
   1.805 -	use string path
   1.806 -	doc="""
   1.807 -		path to cryptotech binary or NULL if not available. **path is owned by 
   1.808 -		the library, do not change it!;
   1.809 -		"""
   1.810 +    use string path
   1.811 +    doc="""
   1.812 +        path to cryptotech binary or NULL if not available. **path is owned by 
   1.813 +        the library, do not change it!;
   1.814 +        """
   1.815  }
   1.816  
   1.817  
   1.818  
   1.819  
   1.820  
   1.821 -	
   1.822 +    
   1.823  
   1.824  
   1.825