X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=libmoonshot%2Flibmoonshot.h;h=24293141f4b244e210f69c5254e592175f8ca255;hb=81d5fdbb22f5d346bd4cbf9eb82317e1dad913f5;hp=65924b7e3f78f52e6ec5a0d9b1eb844f285e48e2;hpb=127e7f36d3dfe7a166d3ee0dc7031ef02fe11073;p=moonshot-ui.git diff --git a/libmoonshot/libmoonshot.h b/libmoonshot/libmoonshot.h index 65924b7..2429314 100644 --- a/libmoonshot/libmoonshot.h +++ b/libmoonshot/libmoonshot.h @@ -55,10 +55,10 @@ void moonshot_error_free (MoonshotError *error); * @password: Password for the identity, or %NULL. * @service: Service constraint for the required identity, or %NULL. * @nai_out: A pointer to a string which receives the name and issuer of the - * selected identity. + * selected identity. * @password_out: A pointer to a string which receives the password. * @server_certificate_hash_out: Receives a hash of the identity server's - * certificate, or %NULL. + * certificate, or %NULL. * @ca_certificate_out: The CA certificate, if @server_certificate_hash was * %NULL. * @subject_name_constraint_out: Set if @ca_certificate is set, otherwise %NULL. @@ -94,4 +94,32 @@ int moonshot_get_identity (const char *nai, char **subject_alt_name_constraint_out, MoonshotError **error); +/** + * moonshot_get_default_identity: + * @nai_out: A pointer to a string which receives the name and issuer of the + * identity. + * @password_out: A pointer to a string which receives the password. + * @server_certificate_hash_out: Receives a hash of the identity server's + * certificate, or %NULL. + * @ca_certificate_out: The CA certificate, if @server_certificate_hash was + * %NULL. + * @subject_name_constraint_out: Set if @ca_certificate is set, otherwise %NULL. + * @subject_alt_name_constraint_out: Set if @ca_certificate is set, otherwise + * %NULL. + * @error: Return location for a #MoonshotError, or %NULL. + * + * This function calls the Moonshot server to request the default identity + * (the one most recently used). Its semantics are otherwise the same as + * moonshot_get_identity(). + * + * Return value: %TRUE if an identity was available, otherwise %FALSE. + */ +int moonshot_default_get_identity (char **nai_out, + char **password_out, + char **server_certificate_hash_out, + char **ca_certificate_out, + char **subject_name_constraint_out, + char **subject_alt_name_constraint_out, + MoonshotError **error); + #endif