From: Alexandra Ellwood Date: Thu, 17 Jul 2008 17:00:58 +0000 (+0000) Subject: Removed _t suffix from all type names X-Git-Tag: krb5-1.7-alpha1~590 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0162771a913bcba4764e72b9cf3a1ca42c44b096;p=krb5.git Removed _t suffix from all type names git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20533 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kim/lib/kim_ccache.c b/src/kim/lib/kim_ccache.c index e01671b5d..b3aac0119 100644 --- a/src/kim/lib/kim_ccache.c +++ b/src/kim/lib/kim_ccache.c @@ -35,10 +35,10 @@ struct kim_ccache_iterator_opaque kim_ccache_iterator_initializer = { NULL, NULL /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_iterator_create (kim_ccache_iterator_t *out_ccache_iterator) +kim_error kim_ccache_iterator_create (kim_ccache_iterator *out_ccache_iterator) { - kim_error_t err = KIM_NO_ERROR; - kim_ccache_iterator_t ccache_iterator = NULL; + kim_error err = KIM_NO_ERROR; + kim_ccache_iterator ccache_iterator = NULL; if (!err && !out_ccache_iterator) { err = param_error (1, "out_ccache_iterator", "NULL"); } @@ -72,10 +72,10 @@ kim_error_t kim_ccache_iterator_create (kim_ccache_iterator_t *out_ccache_iterat /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_iterator_next (kim_ccache_iterator_t in_ccache_iterator, - kim_ccache_t *out_ccache) +kim_error kim_ccache_iterator_next (kim_ccache_iterator in_ccache_iterator, + kim_ccache *out_ccache) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; krb5_ccache ccache = NULL; if (!err && !in_ccache_iterator) { err = param_error (1, "in_ccache_iterator", "NULL"); } @@ -105,7 +105,7 @@ kim_error_t kim_ccache_iterator_next (kim_ccache_iterator_t in_ccache_iterator, /* ------------------------------------------------------------------------ */ -void kim_ccache_iterator_free (kim_ccache_iterator_t *io_ccache_iterator) +void kim_ccache_iterator_free (kim_ccache_iterator *io_ccache_iterator) { if (io_ccache_iterator && *io_ccache_iterator) { if ((*io_ccache_iterator)->context) { @@ -133,11 +133,11 @@ struct kim_ccache_opaque kim_ccache_initializer = { NULL, NULL }; /* ------------------------------------------------------------------------ */ -static kim_error_t kim_ccache_create_resolve_name (kim_string_t *out_resolve_name, - kim_string_t in_name, - kim_string_t in_type) +static kim_error kim_ccache_create_resolve_name (kim_string *out_resolve_name, + kim_string in_name, + kim_string in_type) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !out_resolve_name) { err = param_error (1, "out_resolve_name", "NULL"); } if (!err && !in_name ) { err = param_error (2, "in_name", "NULL"); } @@ -153,12 +153,12 @@ static kim_error_t kim_ccache_create_resolve_name (kim_string_t *out_resolve_nam /* ------------------------------------------------------------------------ */ -static kim_boolean_t kim_ccache_k5ccaches_are_equal (krb5_context in_context, +static kim_boolean kim_ccache_k5ccaches_are_equal (krb5_context in_context, krb5_ccache in_ccache, krb5_context in_compare_to_context, krb5_ccache io_compare_to_ccache) { - kim_boolean_t equal = FALSE; + kim_boolean equal = FALSE; if (in_context && in_ccache && in_compare_to_context && io_compare_to_ccache) { const char *type = krb5_cc_get_type (in_context, in_ccache); @@ -179,10 +179,10 @@ static kim_boolean_t kim_ccache_k5ccaches_are_equal (krb5_context in_context, /* ------------------------------------------------------------------------ */ -static inline kim_error_t kim_ccache_allocate (kim_ccache_t *out_ccache) +static inline kim_error kim_ccache_allocate (kim_ccache *out_ccache) { - kim_error_t err = KIM_NO_ERROR; - kim_ccache_t ccache = NULL; + kim_error err = KIM_NO_ERROR; + kim_ccache ccache = NULL; if (!err && !out_ccache) { err = param_error (1, "out_ccache", "NULL"); } @@ -204,13 +204,13 @@ static inline kim_error_t kim_ccache_allocate (kim_ccache_t *out_ccache) /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_create_new (kim_ccache_t *out_ccache, - kim_identity_t in_client_identity, - kim_options_t in_options) +kim_error kim_ccache_create_new (kim_ccache *out_ccache, + kim_identity in_client_identity, + kim_options in_options) { - kim_error_t err = KIM_NO_ERROR; - kim_credential_t credential = NULL; - kim_identity_t client_identity = NULL; + kim_error err = KIM_NO_ERROR; + kim_credential credential = NULL; + kim_identity client_identity = NULL; if (!err && !out_ccache) { err = param_error (1, "out_ccache", "NULL"); } @@ -234,11 +234,11 @@ kim_error_t kim_ccache_create_new (kim_ccache_t *out_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_create_new_if_needed (kim_ccache_t *out_ccache, - kim_identity_t in_client_identity, - kim_options_t in_options) +kim_error kim_ccache_create_new_if_needed (kim_ccache *out_ccache, + kim_identity in_client_identity, + kim_options in_options) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !out_ccache ) { err = param_error (1, "out_ccache", "NULL"); } if (!err && !in_client_identity) { err = param_error (2, "in_client_identity", "NULL"); } @@ -257,12 +257,12 @@ kim_error_t kim_ccache_create_new_if_needed (kim_ccache_t *out_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_create_from_client_identity (kim_ccache_t *out_ccache, - kim_identity_t in_client_identity) +kim_error kim_ccache_create_from_client_identity (kim_ccache *out_ccache, + kim_identity in_client_identity) { - kim_error_t err = KIM_NO_ERROR; - kim_ccache_iterator_t iterator = NULL; - kim_boolean_t found = FALSE; + kim_error err = KIM_NO_ERROR; + kim_ccache_iterator iterator = NULL; + kim_boolean found = FALSE; if (!err && !out_ccache ) { err = param_error (1, "out_ccache", "NULL"); } if (!err && !in_client_identity) { err = param_error (2, "in_client_identity", "NULL"); } @@ -272,13 +272,13 @@ kim_error_t kim_ccache_create_from_client_identity (kim_ccache_t *out_ccache, } while (!err && !found) { - kim_ccache_t ccache = NULL; - kim_identity_t identity = NULL; + kim_ccache ccache = NULL; + kim_identity identity = NULL; err = kim_ccache_iterator_next (iterator, &ccache); if (!err && !ccache) { - kim_string_t string = NULL; + kim_string string = NULL; err = kim_identity_get_display_string (in_client_identity, &string); @@ -314,14 +314,14 @@ kim_error_t kim_ccache_create_from_client_identity (kim_ccache_t *out_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_create_from_keytab (kim_ccache_t *out_ccache, - kim_identity_t in_identity, - kim_options_t in_options, - kim_string_t in_keytab) +kim_error kim_ccache_create_from_keytab (kim_ccache *out_ccache, + kim_identity in_identity, + kim_options in_options, + kim_string in_keytab) { - kim_error_t err = KIM_NO_ERROR; - kim_credential_t credential = NULL; - kim_identity_t client_identity = NULL; + kim_error err = KIM_NO_ERROR; + kim_credential credential = NULL; + kim_identity client_identity = NULL; if (!err && !out_ccache) { err = param_error (1, "out_ccache", "NULL"); } @@ -346,10 +346,10 @@ kim_error_t kim_ccache_create_from_keytab (kim_ccache_t *out_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_create_from_default (kim_ccache_t *out_ccache) +kim_error kim_ccache_create_from_default (kim_ccache *out_ccache) { - kim_error_t err = KIM_NO_ERROR; - kim_ccache_t ccache = NULL; + kim_error err = KIM_NO_ERROR; + kim_ccache ccache = NULL; if (!err && !out_ccache) { err = param_error (1, "out_ccache", "NULL"); } @@ -377,11 +377,11 @@ kim_error_t kim_ccache_create_from_default (kim_ccache_t *out_ccache) /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_create_from_display_name (kim_ccache_t *out_ccache, - kim_string_t in_display_name) +kim_error kim_ccache_create_from_display_name (kim_ccache *out_ccache, + kim_string in_display_name) { - kim_error_t err = KIM_NO_ERROR; - kim_ccache_t ccache = NULL; + kim_error err = KIM_NO_ERROR; + kim_ccache ccache = NULL; if (!err && !out_ccache ) { err = param_error (1, "out_ccache", "NULL"); } if (!err && !in_display_name) { err = param_error (2, "in_display_name", "NULL"); } @@ -411,12 +411,12 @@ kim_error_t kim_ccache_create_from_display_name (kim_ccache_t *out_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_create_from_type_and_name (kim_ccache_t *out_ccache, - kim_string_t in_type, - kim_string_t in_name) +kim_error kim_ccache_create_from_type_and_name (kim_ccache *out_ccache, + kim_string in_type, + kim_string in_name) { - kim_error_t err = KIM_NO_ERROR; - kim_string_t resolve_name = NULL; + kim_error err = KIM_NO_ERROR; + kim_string resolve_name = NULL; if (!err && !out_ccache) { err = param_error (1, "out_ccache", "NULL"); } if (!err && !in_name ) { err = param_error (2, "in_name", "NULL"); } @@ -437,19 +437,19 @@ kim_error_t kim_ccache_create_from_type_and_name (kim_ccache_t *out_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_create_from_krb5_ccache (kim_ccache_t *out_ccache, +kim_error kim_ccache_create_from_krb5_ccache (kim_ccache *out_ccache, krb5_context in_krb5_context, krb5_ccache in_krb5_ccache) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !out_ccache ) { err = param_error (1, "out_ccache", "NULL"); } if (!err && !in_krb5_ccache ) { err = param_error (2, "in_krb5_ccache", "NULL"); } if (!err && !in_krb5_context) { err = param_error (3, "in_krb5_context", "NULL"); } if (!err) { - kim_string_t type = krb5_cc_get_type (in_krb5_context, in_krb5_ccache); - kim_string_t name = krb5_cc_get_name (in_krb5_context, in_krb5_ccache); + kim_string type = krb5_cc_get_type (in_krb5_context, in_krb5_ccache); + kim_string name = krb5_cc_get_name (in_krb5_context, in_krb5_ccache); err = kim_ccache_create_from_type_and_name (out_ccache, type, name); } @@ -459,12 +459,12 @@ kim_error_t kim_ccache_create_from_krb5_ccache (kim_ccache_t *out_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_copy (kim_ccache_t *out_ccache, - kim_ccache_t in_ccache) +kim_error kim_ccache_copy (kim_ccache *out_ccache, + kim_ccache in_ccache) { - kim_error_t err = KIM_NO_ERROR; - kim_string_t name = NULL; - kim_string_t type = NULL; + kim_error err = KIM_NO_ERROR; + kim_string name = NULL; + kim_string type = NULL; if (!err && !out_ccache) { err = param_error (1, "out_ccache", "NULL"); } if (!err && !in_ccache ) { err = param_error (2, "in_ccache", "NULL"); } @@ -491,11 +491,11 @@ kim_error_t kim_ccache_copy (kim_ccache_t *out_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_compare (kim_ccache_t in_ccache, - kim_ccache_t in_compare_to_ccache, - kim_boolean_t *out_equal) +kim_error kim_ccache_compare (kim_ccache in_ccache, + kim_ccache in_compare_to_ccache, + kim_boolean *out_equal) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_ccache ) { err = param_error (1, "in_ccache", "NULL"); } if (!err && !in_compare_to_ccache) { err = param_error (2, "in_compare_to_ccache", "NULL"); } @@ -513,12 +513,12 @@ kim_error_t kim_ccache_compare (kim_ccache_t in_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_get_krb5_ccache (kim_ccache_t in_ccache, +kim_error kim_ccache_get_krb5_ccache (kim_ccache in_ccache, krb5_context in_krb5_context, krb5_ccache *out_krb5_ccache) { - kim_error_t err = KIM_NO_ERROR; - kim_string_t resolve_name = NULL; + kim_error err = KIM_NO_ERROR; + kim_string resolve_name = NULL; if (!err && !in_ccache ) { err = param_error (1, "in_ccache", "NULL"); } if (!err && !in_krb5_context) { err = param_error (2, "in_krb5_context", "NULL"); } @@ -540,10 +540,10 @@ kim_error_t kim_ccache_get_krb5_ccache (kim_ccache_t in_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_get_type (kim_ccache_t in_ccache, - kim_string_t *out_type) +kim_error kim_ccache_get_type (kim_ccache in_ccache, + kim_string *out_type) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_ccache) { err = param_error (1, "in_ccache", "NULL"); } if (!err && !out_type ) { err = param_error (2, "out_type", "NULL"); } @@ -558,10 +558,10 @@ kim_error_t kim_ccache_get_type (kim_ccache_t in_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_get_name (kim_ccache_t in_ccache, - kim_string_t *out_name) +kim_error kim_ccache_get_name (kim_ccache in_ccache, + kim_string *out_name) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_ccache) { err = param_error (1, "in_ccache", "NULL"); } if (!err && !out_name ) { err = param_error (2, "out_name", "NULL"); } @@ -576,18 +576,18 @@ kim_error_t kim_ccache_get_name (kim_ccache_t in_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_get_display_name (kim_ccache_t in_ccache, - kim_string_t *out_display_name) +kim_error kim_ccache_get_display_name (kim_ccache in_ccache, + kim_string *out_display_name) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_ccache ) { err = param_error (1, "in_ccache", "NULL"); } if (!err && !out_display_name) { err = param_error (2, "out_display_name", "NULL"); } if (!err) { - kim_string_t type = krb5_cc_get_type (in_ccache->context, + kim_string type = krb5_cc_get_type (in_ccache->context, in_ccache->ccache); - kim_string_t name = krb5_cc_get_name (in_ccache->context, + kim_string name = krb5_cc_get_name (in_ccache->context, in_ccache->ccache); err = kim_ccache_create_resolve_name (out_display_name, type, name); @@ -598,10 +598,10 @@ kim_error_t kim_ccache_get_display_name (kim_ccache_t in_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_get_client_identity (kim_ccache_t in_ccache, - kim_identity_t *out_client_identity) +kim_error kim_ccache_get_client_identity (kim_ccache in_ccache, + kim_identity *out_client_identity) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; krb5_principal principal = NULL; if (!err && !in_ccache ) { err = param_error (1, "in_ccache", "NULL"); } @@ -626,16 +626,16 @@ kim_error_t kim_ccache_get_client_identity (kim_ccache_t in_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_get_valid_credential (kim_ccache_t in_ccache, - kim_credential_t *out_credential) +kim_error kim_ccache_get_valid_credential (kim_ccache in_ccache, + kim_credential *out_credential) { - kim_error_t err = KIM_NO_ERROR; - kim_credential_iterator_t iterator = NULL; - kim_boolean_t out_of_credentials = FALSE; - kim_boolean_t found_valid_tgt = FALSE; - kim_boolean_t found_invalid_tgt = FALSE; - kim_credential_state_t invalid_tgt_state = kim_credentials_state_valid; - kim_credential_t valid_credential = NULL; + kim_error err = KIM_NO_ERROR; + kim_credential_iterator iterator = NULL; + kim_boolean out_of_credentials = FALSE; + kim_boolean found_valid_tgt = FALSE; + kim_boolean found_invalid_tgt = FALSE; + kim_credential_state invalid_tgt_state = kim_credentials_state_valid; + kim_credential valid_credential = NULL; if (!err && !in_ccache ) { err = param_error (1, "in_ccache", "NULL"); } if (!err && !out_credential) { err = param_error (2, "out_credential", "NULL"); } @@ -645,7 +645,7 @@ kim_error_t kim_ccache_get_valid_credential (kim_ccache_t in_ccache, } while (!err && !found_valid_tgt && !out_of_credentials) { - kim_credential_t credential = NULL; + kim_credential credential = NULL; err = kim_credential_iterator_next (iterator, &credential); @@ -653,9 +653,9 @@ kim_error_t kim_ccache_get_valid_credential (kim_ccache_t in_ccache, out_of_credentials = TRUE; } else if (!err) { - kim_identity_t service_identity = NULL; - kim_credential_state_t state = kim_credentials_state_valid; - kim_boolean_t is_tgt = FALSE; + kim_identity service_identity = NULL; + kim_credential_state state = kim_credentials_state_valid; + kim_boolean is_tgt = FALSE; err = kim_credential_get_service_identity (credential, &service_identity); @@ -693,8 +693,8 @@ kim_error_t kim_ccache_get_valid_credential (kim_ccache_t in_ccache, } if (!err && (!valid_credential || found_invalid_tgt)) { - kim_identity_t identity = NULL; - kim_string_t identity_string = NULL; + kim_identity identity = NULL; + kim_string identity_string = NULL; err = kim_ccache_get_client_identity (in_ccache, &identity); @@ -743,11 +743,11 @@ kim_error_t kim_ccache_get_valid_credential (kim_ccache_t in_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_get_start_time (kim_ccache_t in_ccache, - kim_time_t *out_start_time) +kim_error kim_ccache_get_start_time (kim_ccache in_ccache, + kim_time *out_start_time) { - kim_error_t err = KIM_NO_ERROR; - kim_credential_t credential = NULL; + kim_error err = KIM_NO_ERROR; + kim_credential credential = NULL; if (!err && !in_ccache ) { err = param_error (1, "in_ccache", "NULL"); } if (!err && !out_start_time) { err = param_error (2, "out_start_time", "NULL"); } @@ -767,11 +767,11 @@ kim_error_t kim_ccache_get_start_time (kim_ccache_t in_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_get_expiration_time (kim_ccache_t in_ccache, - kim_time_t *out_expiration_time) +kim_error kim_ccache_get_expiration_time (kim_ccache in_ccache, + kim_time *out_expiration_time) { - kim_error_t err = KIM_NO_ERROR; - kim_credential_t credential = NULL; + kim_error err = KIM_NO_ERROR; + kim_credential credential = NULL; if (!err && !in_ccache ) { err = param_error (1, "in_ccache", "NULL"); } if (!err && !out_expiration_time) { err = param_error (2, "out_expiration_time", "NULL"); } @@ -792,11 +792,11 @@ kim_error_t kim_ccache_get_expiration_time (kim_ccache_t in_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_get_renewal_expiration_time (kim_ccache_t in_ccache, - kim_time_t *out_renewal_expiration_time) +kim_error kim_ccache_get_renewal_expiration_time (kim_ccache in_ccache, + kim_time *out_renewal_expiration_time) { - kim_error_t err = KIM_NO_ERROR; - kim_credential_t credential = NULL; + kim_error err = KIM_NO_ERROR; + kim_credential credential = NULL; if (!err && !in_ccache ) { err = param_error (1, "in_ccache", "NULL"); } if (!err && !out_renewal_expiration_time) { err = param_error (2, "out_renewal_expiration_time", "NULL"); } @@ -819,9 +819,9 @@ kim_error_t kim_ccache_get_renewal_expiration_time (kim_ccache_t in_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_set_default (kim_ccache_t io_ccache) +kim_error kim_ccache_set_default (kim_ccache io_ccache) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_ccache) { err = param_error (1, "io_ccache", "NULL"); } @@ -870,15 +870,15 @@ kim_error_t kim_ccache_set_default (kim_ccache_t io_ccache) environment_ccache); } } else { - kim_string_t type = NULL; - kim_string_t name = NULL; + kim_string type = NULL; + kim_string name = NULL; cc_context_t cc_context = NULL; cc_ccache_t cc_ccache = NULL; err = kim_ccache_get_type (io_ccache, &type); if (!err && strcmp (type, "API")) { - kim_string_t display_name = NULL; + kim_string display_name = NULL; /* Not a CCAPI ccache; can't set to default */ err = kim_ccache_get_display_name (io_ccache, &display_name); @@ -922,13 +922,13 @@ kim_error_t kim_ccache_set_default (kim_ccache_t io_ccache) /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_verify (kim_ccache_t in_ccache, - kim_identity_t in_service_identity, - kim_string_t in_keytab, - kim_boolean_t in_fail_if_no_service_key) +kim_error kim_ccache_verify (kim_ccache in_ccache, + kim_identity in_service_identity, + kim_string in_keytab, + kim_boolean in_fail_if_no_service_key) { - kim_error_t err = KIM_NO_ERROR; - kim_credential_t credential = NULL; + kim_error err = KIM_NO_ERROR; + kim_credential credential = NULL; if (!err && !in_ccache) { err = param_error (1, "in_ccache", "NULL"); } @@ -948,12 +948,12 @@ kim_error_t kim_ccache_verify (kim_ccache_t in_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_renew (kim_ccache_t in_ccache, - kim_options_t in_options) +kim_error kim_ccache_renew (kim_ccache in_ccache, + kim_options in_options) { - kim_error_t err = KIM_NO_ERROR; - kim_credential_t credential = NULL; - kim_identity_t client_identity = NULL; + kim_error err = KIM_NO_ERROR; + kim_credential credential = NULL; + kim_identity client_identity = NULL; if (!err && !in_ccache) { err = param_error (1, "in_ccache", "NULL"); } @@ -981,12 +981,12 @@ kim_error_t kim_ccache_renew (kim_ccache_t in_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_validate (kim_ccache_t in_ccache, - kim_options_t in_options) +kim_error kim_ccache_validate (kim_ccache in_ccache, + kim_options in_options) { - kim_error_t err = KIM_NO_ERROR; - kim_credential_t credential = NULL; - kim_identity_t client_identity = NULL; + kim_error err = KIM_NO_ERROR; + kim_credential credential = NULL; + kim_identity client_identity = NULL; if (!err && !in_ccache) { err = param_error (1, "in_ccache", "NULL"); } @@ -1016,9 +1016,9 @@ kim_error_t kim_ccache_validate (kim_ccache_t in_ccache, /* ------------------------------------------------------------------------ */ -kim_error_t kim_ccache_destroy (kim_ccache_t *io_ccache) +kim_error kim_ccache_destroy (kim_ccache *io_ccache) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (io_ccache && *io_ccache) { err = krb5_error (krb5_cc_destroy ((*io_ccache)->context, @@ -1035,7 +1035,7 @@ kim_error_t kim_ccache_destroy (kim_ccache_t *io_ccache) /* ------------------------------------------------------------------------ */ -void kim_ccache_free (kim_ccache_t *io_ccache) +void kim_ccache_free (kim_ccache *io_ccache) { if (io_ccache && *io_ccache) { if ((*io_ccache)->context) { diff --git a/src/kim/lib/kim_ccache_private.h b/src/kim/lib/kim_ccache_private.h index 23af8b2f1..f769622a9 100644 --- a/src/kim/lib/kim_ccache_private.h +++ b/src/kim/lib/kim_ccache_private.h @@ -29,11 +29,11 @@ #include -kim_error_t kim_ccache_create_from_display_name (kim_ccache_t *out_ccache, - kim_string_t in_display_name); +kim_error kim_ccache_create_from_display_name (kim_ccache *out_ccache, + kim_string in_display_name); -kim_error_t kim_ccache_compare (kim_ccache_t in_ccache, - kim_ccache_t in_compare_to_ccache, - kim_boolean_t *out_equal); +kim_error kim_ccache_compare (kim_ccache in_ccache, + kim_ccache in_compare_to_ccache, + kim_boolean *out_equal); #endif /* KIM_CCACHE_PRIVATE_H */ diff --git a/src/kim/lib/kim_credential.c b/src/kim/lib/kim_credential.c index 2ef618c0f..c985eb2a8 100644 --- a/src/kim/lib/kim_credential.c +++ b/src/kim/lib/kim_credential.c @@ -37,11 +37,11 @@ struct kim_credential_iterator_opaque kim_credential_iterator_initializer = { NU /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_iterator_create (kim_credential_iterator_t *out_credential_iterator, - kim_ccache_t in_ccache) +kim_error kim_credential_iterator_create (kim_credential_iterator *out_credential_iterator, + kim_ccache in_ccache) { - kim_error_t err = KIM_NO_ERROR; - kim_credential_iterator_t credential_iterator = NULL; + kim_error err = KIM_NO_ERROR; + kim_credential_iterator credential_iterator = NULL; if (!err && !out_credential_iterator) { err = param_error (1, "out_credential_iterator", "NULL"); } if (!err && !in_ccache ) { err = param_error (2, "in_ccache", "NULL"); } @@ -83,10 +83,10 @@ kim_error_t kim_credential_iterator_create (kim_credential_iterator_t *out_crede /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_iterator_next (kim_credential_iterator_t in_credential_iterator, - kim_credential_t *out_credential) +kim_error kim_credential_iterator_next (kim_credential_iterator in_credential_iterator, + kim_credential *out_credential) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_credential_iterator) { err = param_error (1, "in_credential_iterator", "NULL"); } if (!err && !out_credential ) { err = param_error (2, "out_credential", "NULL"); } @@ -113,13 +113,13 @@ kim_error_t kim_credential_iterator_next (kim_credential_iterator_t in_credenti err = krb5_error (terr); } } - + return check_error (err); } /* ------------------------------------------------------------------------ */ -void kim_credential_iterator_free (kim_credential_iterator_t *io_credential_iterator) +void kim_credential_iterator_free (kim_credential_iterator *io_credential_iterator) { if (io_credential_iterator && *io_credential_iterator) { if ((*io_credential_iterator)->context) { @@ -152,10 +152,10 @@ struct kim_credential_opaque kim_credential_initializer = { NULL, NULL }; /* ------------------------------------------------------------------------ */ -static inline kim_error_t kim_credential_allocate (kim_credential_t *out_credential) +static inline kim_error kim_credential_allocate (kim_credential *out_credential) { - kim_error_t err = KIM_NO_ERROR; - kim_credential_t credential = NULL; + kim_error err = KIM_NO_ERROR; + kim_credential credential = NULL; if (!err && !out_credential) { err = param_error (1, "out_credential", "NULL"); } @@ -177,12 +177,12 @@ static inline kim_error_t kim_credential_allocate (kim_credential_t *out_credent /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_create_new (kim_credential_t *out_credential, - kim_identity_t in_client_identity, - kim_options_t in_options) +kim_error kim_credential_create_new (kim_credential *out_credential, + kim_identity in_client_identity, + kim_options in_options) { - kim_error_t err = KIM_NO_ERROR; - kim_credential_t credential = NULL; + kim_error err = KIM_NO_ERROR; + kim_credential credential = NULL; if (!err && !out_credential) { err = param_error (1, "out_credential", "NULL"); } @@ -208,19 +208,19 @@ kim_error_t kim_credential_create_new (kim_credential_t *out_credential, /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_create_from_keytab (kim_credential_t *out_credential, - kim_identity_t in_identity, - kim_options_t in_options, - kim_string_t in_keytab) +kim_error kim_credential_create_from_keytab (kim_credential *out_credential, + kim_identity in_identity, + kim_options in_options, + kim_string in_keytab) { - kim_error_t err = KIM_NO_ERROR; - kim_credential_t credential = NULL; + kim_error err = KIM_NO_ERROR; + kim_credential credential = NULL; krb5_keytab keytab = NULL; krb5_creds creds; - kim_boolean_t free_creds = FALSE; + kim_boolean free_creds = FALSE; krb5_principal principal = NULL; - kim_time_t start_time = 0; - kim_string_t service_name = NULL; + kim_time start_time = 0; + kim_string service_name = NULL; krb5_get_init_creds_opt *init_cred_options = NULL; if (!err && !out_credential) { err = param_error (1, "out_credential", "NULL"); } @@ -234,8 +234,8 @@ kim_error_t kim_credential_create_from_keytab (kim_credential_t *out_credential, } if (!err) { - kim_options_t options = in_options; - + kim_options options = in_options; + if (!options) { err = kim_options_create (&options); } @@ -270,7 +270,7 @@ kim_error_t kim_credential_create_from_keytab (kim_credential_t *out_credential, } else { krb5_kt_cursor cursor = NULL; krb5_keytab_entry entry; - kim_boolean_t entry_allocated = FALSE; + kim_boolean entry_allocated = FALSE; err = krb5_error (krb5_kt_start_seq_get (credential->context, keytab, &cursor)); @@ -287,7 +287,7 @@ kim_error_t kim_credential_create_from_keytab (kim_credential_t *out_credential, if (cursor ) { krb5_kt_end_seq_get (credential->context, keytab, &cursor); } } } - + if (!err) { err = krb5_error (krb5_get_init_creds_keytab (credential->context, &creds, principal, keytab, start_time, (char *) service_name, init_cred_options)); @@ -314,12 +314,12 @@ kim_error_t kim_credential_create_from_keytab (kim_credential_t *out_credential, /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_create_from_krb5_creds (kim_credential_t *out_credential, - krb5_context in_krb5_context, - krb5_creds *in_krb5_creds) +kim_error kim_credential_create_from_krb5_creds (kim_credential *out_credential, + krb5_context in_krb5_context, + krb5_creds *in_krb5_creds) { - kim_error_t err = KIM_NO_ERROR; - kim_credential_t credential = NULL; + kim_error err = KIM_NO_ERROR; + kim_credential credential = NULL; if (!err && !out_credential ) { err = param_error (1, "out_credential", "NULL"); } if (!err && !in_krb5_creds ) { err = param_error (2, "in_krb5_creds", "NULL"); } @@ -347,11 +347,11 @@ kim_error_t kim_credential_create_from_krb5_creds (kim_credential_t *out_credent /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_copy (kim_credential_t *out_credential, - kim_credential_t in_credential) +kim_error kim_credential_copy (kim_credential *out_credential, + kim_credential in_credential) { - kim_error_t err = KIM_NO_ERROR; - kim_credential_t credential = NULL; + kim_error err = KIM_NO_ERROR; + kim_credential credential = NULL; if (!err && !out_credential) { err = param_error (1, "out_credential", "NULL"); } if (!err && !in_credential ) { err = param_error (2, "in_credential", "NULL"); } @@ -378,11 +378,11 @@ kim_error_t kim_credential_copy (kim_credential_t *out_credential, /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_get_krb5_creds (kim_credential_t in_credential, - krb5_context in_krb5_context, - krb5_creds **out_krb5_creds) +kim_error kim_credential_get_krb5_creds (kim_credential in_credential, + krb5_context in_krb5_context, + krb5_creds **out_krb5_creds) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_credential ) { err = param_error (1, "in_credential", "NULL"); } if (!err && !in_krb5_context) { err = param_error (2, "in_krb5_context", "NULL"); } @@ -397,10 +397,10 @@ kim_error_t kim_credential_get_krb5_creds (kim_credential_t in_credential, /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_get_client_identity (kim_credential_t in_credential, - kim_identity_t *out_client_identity) +kim_error kim_credential_get_client_identity (kim_credential in_credential, + kim_identity *out_client_identity) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_credential ) { err = param_error (1, "in_credential", "NULL"); } if (!err && !out_client_identity) { err = param_error (2, "out_client_identity", "NULL"); } @@ -416,10 +416,10 @@ kim_error_t kim_credential_get_client_identity (kim_credential_t in_credential, /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_get_service_identity (kim_credential_t in_credential, - kim_identity_t *out_service_identity) +kim_error kim_credential_get_service_identity (kim_credential in_credential, + kim_identity *out_service_identity) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_credential ) { err = param_error (1, "in_credential", "NULL"); } if (!err && !out_service_identity) { err = param_error (2, "out_service_identity", "NULL"); } @@ -435,11 +435,11 @@ kim_error_t kim_credential_get_service_identity (kim_credential_t in_credential /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_is_tgt (kim_credential_t in_credential, - kim_boolean_t *out_is_tgt) +kim_error kim_credential_is_tgt (kim_credential in_credential, + kim_boolean *out_is_tgt) { - kim_error_t err = KIM_NO_ERROR; - kim_identity_t service = NULL; + kim_error err = KIM_NO_ERROR; + kim_identity service = NULL; if (!err && !in_credential) { err = param_error (1, "in_credential", "NULL"); } if (!err && !out_is_tgt ) { err = param_error (2, "out_is_tgt", "NULL"); } @@ -459,12 +459,12 @@ kim_error_t kim_credential_is_tgt (kim_credential_t in_credential, /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_get_state (kim_credential_t in_credential, - kim_credential_state_t *out_state) +kim_error kim_credential_get_state (kim_credential in_credential, + kim_credential_state *out_state) { - kim_error_t err = KIM_NO_ERROR; - kim_time_t expiration_time = 0; - kim_time_t start_time = 0; + kim_error err = KIM_NO_ERROR; + kim_time expiration_time = 0; + kim_time start_time = 0; krb5_timestamp now = 0; if (!err && !in_credential) { err = param_error (1, "in_credential", "NULL"); } @@ -489,7 +489,7 @@ kim_error_t kim_credential_get_state (kim_credential_t in_credential, if (expiration_time <= now) { *out_state = kim_credentials_state_expired; - + } else if ((in_credential->creds->ticket_flags & TKT_FLG_POSTDATED) && (in_credential->creds->ticket_flags & TKT_FLG_INVALID)) { if (start_time > now) { @@ -505,8 +505,8 @@ kim_error_t kim_credential_get_state (kim_credential_t in_credential, if (!code) { laddresses = NULL; } if (laddresses) { /* assume valid if the local host has no addresses */ - kim_boolean_t found_match = FALSE; - kim_count_t i = 0; + kim_boolean found_match = FALSE; + kim_count i = 0; for (i = 0; in_credential->creds->addresses[0]; i++) { if (krb5_address_search (in_credential->context, @@ -530,10 +530,10 @@ kim_error_t kim_credential_get_state (kim_credential_t in_credential, /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_get_start_time (kim_credential_t in_credential, - kim_time_t *out_start_time) +kim_error kim_credential_get_start_time (kim_credential in_credential, + kim_time *out_start_time) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_credential) { err = param_error (1, "in_credential", "NULL"); } @@ -548,10 +548,10 @@ kim_error_t kim_credential_get_start_time (kim_credential_t in_credential, /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_get_expiration_time (kim_credential_t in_credential, - kim_time_t *out_expiration_time) +kim_error kim_credential_get_expiration_time (kim_credential in_credential, + kim_time *out_expiration_time) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_credential) { err = param_error (1, "in_credential", "NULL"); } @@ -564,10 +564,10 @@ kim_error_t kim_credential_get_expiration_time (kim_credential_t in_credential, /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_get_renewal_expiration_time (kim_credential_t in_credential, - kim_time_t *out_renewal_expiration_time) +kim_error kim_credential_get_renewal_expiration_time (kim_credential in_credential, + kim_time *out_renewal_expiration_time) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_credential) { err = param_error (1, "in_credential", "NULL"); } @@ -580,16 +580,16 @@ kim_error_t kim_credential_get_renewal_expiration_time (kim_credential_t in_cre /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_store (kim_credential_t in_credential, - kim_identity_t in_client_identity, - kim_ccache_t *out_ccache) +kim_error kim_credential_store (kim_credential in_credential, + kim_identity in_client_identity, + kim_ccache *out_ccache) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; krb5_context context = NULL; krb5_ccache k5ccache = NULL; - kim_string_t type = NULL; + kim_string type = NULL; krb5_principal client_principal = NULL; - kim_boolean_t destroy_ccache_on_error = FALSE; + kim_boolean destroy_ccache_on_error = FALSE; if (!err && !in_credential ) { err = param_error (1, "in_credential", "NULL"); } if (!err && !in_client_identity) { err = param_error (2, "in_client_identity", "NULL"); } @@ -605,12 +605,12 @@ kim_error_t kim_credential_store (kim_credential_t in_credential, if (!err) { char *environment_ccache = getenv ("KRB5CCNAME"); - + if (environment_ccache) { err = krb5_error (krb5_cc_resolve (context, environment_ccache, &k5ccache)); } else { - kim_ccache_t ccache = NULL; + kim_ccache ccache = NULL; err = kim_ccache_create_from_client_identity (&ccache, in_client_identity); @@ -637,9 +637,9 @@ kim_error_t kim_credential_store (kim_credential_t in_credential, err = krb5_error (krb5_cc_store_cred (in_credential->context, k5ccache, in_credential->creds)); } - + #warning Call plugins here - + if (!err && out_ccache) { err = kim_ccache_create_from_krb5_ccache (out_ccache, context, k5ccache); } @@ -654,18 +654,18 @@ kim_error_t kim_credential_store (kim_credential_t in_credential, if (client_principal) { krb5_free_principal (context, client_principal); } if (context ) { krb5_free_context (context); } kim_string_free (&type); - + return check_error (err); } /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_verify (kim_credential_t in_credential, - kim_identity_t in_service_identity, - kim_string_t in_keytab, - kim_boolean_t in_fail_if_no_service_key) +kim_error kim_credential_verify (kim_credential in_credential, + kim_identity in_service_identity, + kim_string in_keytab, + kim_boolean in_fail_if_no_service_key) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; krb5_context scontext = NULL; krb5_principal service_principal = NULL; krb5_keytab keytab = NULL; @@ -686,11 +686,11 @@ kim_error_t kim_credential_verify (kim_credential_t in_credential, if (!err) { krb5_verify_init_creds_opt options; - + /* That's "no key == fail" not "no fail" >.< */ krb5_verify_init_creds_opt_init (&options); krb5_verify_init_creds_opt_set_ap_req_nofail (&options, in_fail_if_no_service_key); - + err = krb5_error (krb5_verify_init_creds (scontext, in_credential->creds, service_principal, keytab, @@ -699,15 +699,15 @@ kim_error_t kim_credential_verify (kim_credential_t in_credential, if (err && !service_principal && in_fail_if_no_service_key) { /* If the service principal wasn't specified but we are supposed to fail without a key - we should walk the keytab trying to find one that succeeds. */ + we should walk the keytab trying to find one that succeeds. */ krb5_error_code code = 0; - kim_boolean_t verified = 0; + kim_boolean verified = 0; krb5_kt_cursor cursor = NULL; krb5_keytab_entry entry; - + if (!keytab) { - code = krb5_kt_default (scontext, &keytab); + code = krb5_kt_default (scontext, &keytab); } if (!err) { @@ -715,8 +715,8 @@ kim_error_t kim_credential_verify (kim_credential_t in_credential, } while (!code && !verified) { - kim_boolean_t free_entry = 0; - + kim_boolean free_entry = 0; + code = krb5_kt_next_entry (scontext, keytab, &entry, &cursor); free_entry = !code; /* remember to free */ @@ -731,7 +731,7 @@ kim_error_t kim_credential_verify (kim_credential_t in_credential, if (!code) { verified = 1; } - + if (free_entry) { krb5_free_keytab_entry_contents (scontext, &entry); } } @@ -753,22 +753,22 @@ kim_error_t kim_credential_verify (kim_credential_t in_credential, /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_renew (kim_credential_t *io_credential, - kim_options_t in_options) +kim_error kim_credential_renew (kim_credential *io_credential, + kim_options in_options) { - kim_error_t err = KIM_NO_ERROR; - kim_string_t service_name = NULL; + kim_error err = KIM_NO_ERROR; + kim_string service_name = NULL; krb5_ccache ccache = NULL; if (!err && !io_credential) { err = param_error (1, "io_credential", "NULL"); } if (!err) { - kim_options_t options = in_options; + kim_options options = in_options; if (!options) { err = kim_options_create (&options); } - + if (!err) { err = kim_options_get_service_name (options, &service_name); } @@ -786,7 +786,7 @@ kim_error_t kim_credential_renew (kim_credential_t *io_credential, err = krb5_error (krb5_cc_initialize ((*io_credential)->context, ccache, (*io_credential)->creds->client)); } - + if (!err) { err = krb5_error (krb5_cc_store_cred ((*io_credential)->context, ccache, (*io_credential)->creds)); @@ -795,7 +795,7 @@ kim_error_t kim_credential_renew (kim_credential_t *io_credential, if (!err) { krb5_creds creds; krb5_creds *renewed_creds = NULL; - kim_boolean_t free_creds = 0; + kim_boolean free_creds = 0; err = krb5_error (krb5_get_renewed_creds ((*io_credential)->context, &creds, (*io_credential)->creds->client, @@ -814,7 +814,7 @@ kim_error_t kim_credential_renew (kim_credential_t *io_credential, if (free_creds) { krb5_free_cred_contents ((*io_credential)->context, &creds); } } - + if (ccache) { krb5_cc_destroy ((*io_credential)->context, ccache); } kim_string_free (&service_name); @@ -823,17 +823,17 @@ kim_error_t kim_credential_renew (kim_credential_t *io_credential, /* ------------------------------------------------------------------------ */ -kim_error_t kim_credential_validate (kim_credential_t *io_credential, - kim_options_t in_options) +kim_error kim_credential_validate (kim_credential *io_credential, + kim_options in_options) { - kim_error_t err = KIM_NO_ERROR; - kim_string_t service_name = NULL; + kim_error err = KIM_NO_ERROR; + kim_string service_name = NULL; krb5_ccache ccache = NULL; if (!err && !io_credential) { err = param_error (1, "io_credential", "NULL"); } if (!err) { - kim_options_t options = in_options; + kim_options options = in_options; if (!options) { err = kim_options_create (&options); @@ -865,7 +865,7 @@ kim_error_t kim_credential_validate (kim_credential_t *io_credential, if (!err) { krb5_creds creds; krb5_creds *validated_creds = NULL; - kim_boolean_t free_creds = 0; + kim_boolean free_creds = 0; err = krb5_error (krb5_get_validated_creds ((*io_credential)->context, &creds, (*io_credential)->creds->client, @@ -887,13 +887,13 @@ kim_error_t kim_credential_validate (kim_credential_t *io_credential, if (ccache) { krb5_cc_destroy ((*io_credential)->context, ccache); } kim_string_free (&service_name); - + return check_error (err); } /* ------------------------------------------------------------------------ */ -void kim_credential_free (kim_credential_t *io_credential) +void kim_credential_free (kim_credential *io_credential) { if (io_credential && *io_credential) { if ((*io_credential)->context) { diff --git a/src/kim/lib/kim_error.c b/src/kim/lib/kim_error.c index 090204f3a..6698139d2 100644 --- a/src/kim/lib/kim_error.c +++ b/src/kim/lib/kim_error.c @@ -29,21 +29,21 @@ #include struct kim_error_opaque { - kim_error_code_t code; - kim_string_t message; + kim_error_code code; + kim_string message; }; struct kim_error_opaque kim_no_memory_error_struct = { KIM_OUT_OF_MEMORY_ECODE, NULL, }; -kim_error_t kim_no_memory_error = &kim_no_memory_error_struct; +kim_error kim_no_memory_error = &kim_no_memory_error_struct; struct kim_error_opaque kim_error_initializer = { KIM_NO_ERROR_ECODE, NULL }; /* ------------------------------------------------------------------------ */ -static inline kim_error_t kim_error_allocate (kim_error_t *out_error) +static inline kim_error kim_error_allocate (kim_error *out_error) { - kim_error_t err = KIM_NO_ERROR; - kim_error_t error = NULL; + kim_error err = KIM_NO_ERROR; + kim_error error = NULL; if (!err) { error = malloc (sizeof (*error)); @@ -70,10 +70,10 @@ static inline kim_error_t kim_error_allocate (kim_error_t *out_error) /* ------------------------------------------------------------------------ */ -kim_error_t _kim_error_create_for_param (kim_string_t in_function, +kim_error _kim_error_create_for_param (kim_string in_function, unsigned int in_argument_position, - kim_string_t in_argument_name, - kim_string_t in_invalid_value) + kim_string in_argument_name, + kim_string in_invalid_value) { return kim_error_create_from_code (KIM_PARAMETER_ECODE, in_function, @@ -86,10 +86,10 @@ kim_error_t _kim_error_create_for_param (kim_string_t in_function, /* ------------------------------------------------------------------------ */ -kim_error_t kim_error_create_from_code (kim_error_code_t in_code, +kim_error kim_error_create_from_code (kim_error_code in_code, ...) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; va_list args; va_start (args, in_code); @@ -101,12 +101,12 @@ kim_error_t kim_error_create_from_code (kim_error_code_t in_code, /* ------------------------------------------------------------------------ */ -kim_error_t kim_error_create_from_code_va (kim_error_code_t in_code, +kim_error kim_error_create_from_code_va (kim_error_code in_code, va_list in_args) { - kim_error_t err = KIM_NO_ERROR; - kim_error_t error = KIM_NO_ERROR; - kim_string_t message = NULL; + kim_error err = KIM_NO_ERROR; + kim_error error = KIM_NO_ERROR; + kim_string message = NULL; /* short circuit out of memory errors so we don't loop */ switch (in_code) { @@ -148,11 +148,11 @@ kim_error_t kim_error_create_from_code_va (kim_error_code_t in_code, /* ------------------------------------------------------------------------ */ -kim_error_t kim_error_copy (kim_error_t *out_error, - kim_error_t in_error) +kim_error kim_error_copy (kim_error *out_error, + kim_error in_error) { - kim_error_t err = KIM_NO_ERROR; - kim_error_t error = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; + kim_error error = KIM_NO_ERROR; if (!err && !out_error) { err = param_error (1, "out_error", "NULL"); } if (!err && !in_error ) { err = param_error (2, "in_error", "NULL"); } @@ -185,7 +185,7 @@ kim_error_t kim_error_copy (kim_error_t *out_error, /* ------------------------------------------------------------------------ */ -kim_error_code_t kim_error_get_code (kim_error_t in_error) +kim_error_code kim_error_get_code (kim_error in_error) { if (!in_error) { /* KIM_NO_ERROR */ return KIM_NO_ERROR_ECODE; @@ -196,7 +196,7 @@ kim_error_code_t kim_error_get_code (kim_error_t in_error) /* ------------------------------------------------------------------------ */ -kim_string_t kim_error_get_display_string (kim_error_t in_error) +kim_string kim_error_get_display_string (kim_error in_error) { if (!in_error) { /* KIM_NO_ERROR */ return error_message (KIM_NO_ERROR_ECODE); @@ -212,7 +212,7 @@ kim_string_t kim_error_get_display_string (kim_error_t in_error) /* ------------------------------------------------------------------------ */ -void kim_error_free (kim_error_t *io_error) +void kim_error_free (kim_error *io_error) { if (io_error && *io_error) { if (*io_error != kim_no_memory_error) { @@ -227,14 +227,14 @@ void kim_error_free (kim_error_t *io_error) /* ------------------------------------------------------------------------ */ -kim_error_t _check_error (kim_error_t in_err, - kim_string_t in_function, - kim_string_t in_file, +kim_error _check_error (kim_error in_err, + kim_string in_function, + kim_string in_file, int in_line) { if (in_err) { - kim_error_code_t code = kim_error_get_code (in_err); - kim_string_t message = kim_error_get_display_string (in_err); + kim_error_code code = kim_error_get_code (in_err); + kim_string message = kim_error_get_display_string (in_err); kim_debug_printf ("%s(): got %d ('%s') at %s: %d", in_function, code, message, in_file, in_line); diff --git a/src/kim/lib/kim_error_private.h b/src/kim/lib/kim_error_private.h index 73a67fcc7..0f574759d 100644 --- a/src/kim/lib/kim_error_private.h +++ b/src/kim/lib/kim_error_private.h @@ -29,16 +29,16 @@ #include -kim_error_t _kim_error_create_for_param (kim_string_t in_function, +kim_error _kim_error_create_for_param (kim_string in_function, unsigned int in_argument_position, - kim_string_t in_argument_name, - kim_string_t in_invalid_value); + kim_string in_argument_name, + kim_string in_invalid_value); #define param_error(pos, name, value) _kim_error_create_for_param(__FUNCTION__, \ pos, name, value) -kim_error_t kim_error_create_from_code (kim_error_code_t in_code, +kim_error kim_error_create_from_code (kim_error_code in_code, ...); -kim_error_t kim_error_create_from_code_va (kim_error_code_t in_code, +kim_error kim_error_create_from_code_va (kim_error_code in_code, va_list args); #define ccapi_error(code) kim_error_create_from_code(code) @@ -46,9 +46,9 @@ kim_error_t kim_error_create_from_code_va (kim_error_code_t in_code, #define gss_error(code) kim_error_create_from_code(code) #define os_error(code) kim_error_create_from_code(code) -kim_error_t _check_error (kim_error_t in_err, - kim_string_t in_function, - kim_string_t in_file, +kim_error _check_error (kim_error in_err, + kim_string in_function, + kim_string in_file, int in_line); #define check_error(err) _check_error(err, __FUNCTION__, __FILE__, __LINE__) diff --git a/src/kim/lib/kim_identity.c b/src/kim/lib/kim_identity.c index abb1b64e0..2181191e6 100644 --- a/src/kim/lib/kim_identity.c +++ b/src/kim/lib/kim_identity.c @@ -39,10 +39,10 @@ struct kim_identity_opaque kim_identity_initializer = { NULL, NULL }; /* ------------------------------------------------------------------------ */ -static inline kim_error_t kim_identity_allocate (kim_identity_t *out_identity) +static inline kim_error kim_identity_allocate (kim_identity *out_identity) { - kim_error_t err = KIM_NO_ERROR; - kim_identity_t identity = NULL; + kim_error err = KIM_NO_ERROR; + kim_identity identity = NULL; if (!err && !out_identity) { err = param_error (1, "out_identity", "NULL"); } @@ -64,11 +64,11 @@ static inline kim_error_t kim_identity_allocate (kim_identity_t *out_identity) /* ------------------------------------------------------------------------ */ -kim_error_t kim_identity_create_from_string (kim_identity_t *out_identity, - kim_string_t in_string) +kim_error kim_identity_create_from_string (kim_identity *out_identity, + kim_string in_string) { - kim_error_t err = KIM_NO_ERROR; - kim_identity_t identity = NULL; + kim_error err = KIM_NO_ERROR; + kim_identity identity = NULL; if (!err && !out_identity) { err = param_error (1, "out_identity", "NULL"); } if (!err && !in_string ) { err = param_error (2, "in_string", "NULL"); } @@ -106,13 +106,13 @@ kim_error_t kim_identity_create_from_string (kim_identity_t *out_identity, /* ------------------------------------------------------------------------ */ -kim_error_t kim_identity_create_from_components (kim_identity_t *out_identity, - kim_string_t in_realm, - kim_string_t in_1st_component, +kim_error kim_identity_create_from_components (kim_identity *out_identity, + kim_string in_realm, + kim_string in_1st_component, ...) { - kim_error_t err = KIM_NO_ERROR; - kim_identity_t identity = NULL; + kim_error err = KIM_NO_ERROR; + kim_identity identity = NULL; krb5_principal_data principal_data; /* allocated by KIM so can't be returned */ if (!err && !out_identity ) { err = param_error (1, "out_identity", "NULL"); } @@ -129,10 +129,10 @@ kim_error_t kim_identity_create_from_components (kim_identity_t *out_identity, if (!err) { va_list args; - kim_count_t component_count = 1; + kim_count component_count = 1; va_start (args, in_1st_component); - while (va_arg (args, kim_string_t)) { component_count++; } + while (va_arg (args, kim_string)) { component_count++; } va_end (args); principal_data.length = component_count; @@ -149,11 +149,11 @@ kim_error_t kim_identity_create_from_components (kim_identity_t *out_identity, va_start (args, in_1st_component); for (i = 0; !err && (i < principal_data.length); i++) { - kim_string_t component = NULL; + kim_string component = NULL; if (i == 0) { err = kim_string_copy (&component, in_1st_component); } else { - err = kim_string_copy (&component, va_arg (args, kim_string_t)); + err = kim_string_copy (&component, va_arg (args, kim_string)); } if (!err) { @@ -183,7 +183,7 @@ kim_error_t kim_identity_create_from_components (kim_identity_t *out_identity, krb5_int32 i; for (i = 0; i < principal_data.length; i++) { - kim_string_t component = principal_data.data[i].data; + kim_string component = principal_data.data[i].data; kim_string_free (&component); } free (principal_data.data); @@ -195,12 +195,12 @@ kim_error_t kim_identity_create_from_components (kim_identity_t *out_identity, /* ------------------------------------------------------------------------ */ -kim_error_t kim_identity_create_from_krb5_principal (kim_identity_t *out_identity, +kim_error kim_identity_create_from_krb5_principal (kim_identity *out_identity, krb5_context in_krb5_context, krb5_principal in_krb5_principal) { - kim_error_t err = KIM_NO_ERROR; - kim_identity_t identity = NULL; + kim_error err = KIM_NO_ERROR; + kim_identity identity = NULL; if (!err && !out_identity ) { err = param_error (1, "out_identity", "NULL"); } if (!err && !in_krb5_principal) { err = param_error (2, "in_krb5_principal", "NULL"); } @@ -235,11 +235,11 @@ kim_error_t kim_identity_create_from_krb5_principal (kim_identity_t *out_identit /* ------------------------------------------------------------------------ */ -kim_error_t kim_identity_copy (kim_identity_t *out_identity, - kim_identity_t in_identity) +kim_error kim_identity_copy (kim_identity *out_identity, + kim_identity in_identity) { - kim_error_t err = KIM_NO_ERROR; - kim_identity_t identity = KIM_IDENTITY_ANY; + kim_error err = KIM_NO_ERROR; + kim_identity identity = KIM_IDENTITY_ANY; if (!err && !out_identity) { err = param_error (1, "out_identity", "NULL"); } @@ -268,11 +268,11 @@ kim_error_t kim_identity_copy (kim_identity_t *out_identity, /* ------------------------------------------------------------------------ */ -kim_error_t kim_identity_compare (kim_identity_t in_identity, - kim_identity_t in_compare_to_identity, - kim_comparison_t *out_comparison) +kim_error kim_identity_compare (kim_identity in_identity, + kim_identity in_compare_to_identity, + kim_comparison *out_comparison) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); } if (!err && !in_compare_to_identity) { err = param_error (2, "in_compare_to_identity", "NULL"); } @@ -284,8 +284,8 @@ kim_error_t kim_identity_compare (kim_identity_t in_identity, in_compare_to_identity->principal)) { *out_comparison = 0; } else { - kim_string_t string = NULL; - kim_string_t compare_to_string = NULL; + kim_string string = NULL; + kim_string compare_to_string = NULL; err = kim_identity_get_string (in_identity, &string); @@ -307,10 +307,10 @@ kim_error_t kim_identity_compare (kim_identity_t in_identity, /* ------------------------------------------------------------------------ */ -kim_error_t kim_identity_get_string (kim_identity_t in_identity, - kim_string_t *out_string) +kim_error kim_identity_get_string (kim_identity in_identity, + kim_string *out_string) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; char *unparsed_name = NULL; if (!err && !in_identity) { err = param_error (1, "in_identity", "NULL"); } @@ -333,11 +333,11 @@ kim_error_t kim_identity_get_string (kim_identity_t in_identity, /* ------------------------------------------------------------------------ */ -kim_error_t kim_identity_get_display_string (kim_identity_t in_identity, - kim_string_t *out_display_string) +kim_error kim_identity_get_display_string (kim_identity in_identity, + kim_string *out_display_string) { - kim_error_t err = KIM_NO_ERROR; - kim_string_t string = NULL; + kim_error err = KIM_NO_ERROR; + kim_string string = NULL; if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); } if (!err && !out_display_string) { err = param_error (2, "out_display_string", "NULL"); } @@ -347,8 +347,8 @@ kim_error_t kim_identity_get_display_string (kim_identity_t in_identity, } if (!err) { - kim_count_t i, j; - kim_count_t length = strlen (string) + 1; /* Copy the '\0' */ + kim_count i, j; + kim_count length = strlen (string) + 1; /* Copy the '\0' */ char *display_string = (char *) string; /* so we can modify it */ /* In place copy, skipping escaped separators. @@ -378,10 +378,10 @@ kim_error_t kim_identity_get_display_string (kim_identity_t in_identity, /* ------------------------------------------------------------------------ */ -kim_error_t kim_identity_get_realm (kim_identity_t in_identity, - kim_string_t *out_realm_string) +kim_error kim_identity_get_realm (kim_identity in_identity, + kim_string *out_realm_string) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); } if (!err && !out_realm_string) { err = param_error (2, "out_realm_string", "NULL"); } @@ -397,10 +397,10 @@ kim_error_t kim_identity_get_realm (kim_identity_t in_identity, /* ------------------------------------------------------------------------ */ -kim_error_t kim_identity_get_number_of_components (kim_identity_t in_identity, - kim_count_t *out_number_of_components) +kim_error kim_identity_get_number_of_components (kim_identity in_identity, + kim_count *out_number_of_components) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); } if (!err && !out_number_of_components) { err = param_error (2, "out_number_of_components", "NULL"); } @@ -414,11 +414,11 @@ kim_error_t kim_identity_get_number_of_components (kim_identity_t in_identity, /* ------------------------------------------------------------------------ */ -kim_error_t kim_identity_get_component_at_index (kim_identity_t in_identity, - kim_count_t in_index, - kim_string_t *out_component_string) +kim_error kim_identity_get_component_at_index (kim_identity in_identity, + kim_count in_index, + kim_string *out_component_string) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; krb5_data *component = NULL; if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); } @@ -439,11 +439,11 @@ kim_error_t kim_identity_get_component_at_index (kim_identity_t in_identity, /* ------------------------------------------------------------------------ */ -kim_error_t kim_identity_get_krb5_principal (kim_identity_t in_identity, +kim_error kim_identity_get_krb5_principal (kim_identity in_identity, krb5_context in_krb5_context, krb5_principal *out_krb5_principal) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); } if (!err && !in_krb5_context ) { err = param_error (2, "in_krb5_context", "NULL"); } @@ -460,10 +460,10 @@ kim_error_t kim_identity_get_krb5_principal (kim_identity_t in_identity, /* ------------------------------------------------------------------------ */ -kim_error_t kim_identity_get_gss_name (kim_identity_t in_identity, +kim_error kim_identity_get_gss_name (kim_identity in_identity, gss_name_t *out_gss_name) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); } if (!err && !out_gss_name) { err = param_error (2, "out_gss_name", "NULL"); } @@ -477,16 +477,16 @@ kim_error_t kim_identity_get_gss_name (kim_identity_t in_identity, /* ------------------------------------------------------------------------ */ -kim_error_t kim_identity_is_tgt_service (kim_identity_t in_identity, - kim_boolean_t *out_is_tgt_service) +kim_error kim_identity_is_tgt_service (kim_identity in_identity, + kim_boolean *out_is_tgt_service) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); } if (!err && !out_is_tgt_service) { err = param_error (2, "out_is_tgt_service", "NULL"); } if (!err) { - kim_count_t count = krb5_princ_size (in_identity->context, in_identity->principal); + kim_count count = krb5_princ_size (in_identity->context, in_identity->principal); krb5_data *name = krb5_princ_name (in_identity->context, in_identity->principal); /* krbtgt/@ (usually REALM1 == REALM2, but not always) */ @@ -500,10 +500,10 @@ kim_error_t kim_identity_is_tgt_service (kim_identity_t in_identity, /* ------------------------------------------------------------------------ */ -kim_error_t kim_identity_change_password (kim_identity_t in_identity, - kim_options_t in_options) +kim_error kim_identity_change_password (kim_identity in_identity, + kim_options in_options) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_identity) { err = param_error (1, "in_identity", "NULL"); } @@ -512,11 +512,11 @@ kim_error_t kim_identity_change_password (kim_identity_t in_identity, /* ------------------------------------------------------------------------ */ -kim_error_t kim_identity_change_password_to_password (kim_identity_t in_identity, - kim_options_t in_options, - kim_string_t in_new_password) +kim_error kim_identity_change_password_to_password (kim_identity in_identity, + kim_options in_options, + kim_string in_new_password) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_identity ) { err = param_error (1, "in_identity", "NULL"); } if (!err && !in_new_password) { err = param_error (3, "in_new_password", "NULL"); } @@ -526,10 +526,10 @@ kim_error_t kim_identity_change_password_to_password (kim_identity_t in_identity /* ------------------------------------------------------------------------ */ -void kim_identity_free (kim_identity_t *io_identity) +void kim_identity_free (kim_identity *io_identity) { if (io_identity && *io_identity) { - kim_identity_t identity = *io_identity; + kim_identity identity = *io_identity; if (identity->context) { if (identity->principal) { diff --git a/src/kim/lib/kim_identity_private.h b/src/kim/lib/kim_identity_private.h index f638707f0..2de9b8d13 100644 --- a/src/kim/lib/kim_identity_private.h +++ b/src/kim/lib/kim_identity_private.h @@ -30,9 +30,9 @@ #include #include "kim_library_private.h" -kim_error_t kim_os_identity_create_for_username (kim_identity_t *out_identity); +kim_error kim_os_identity_create_for_username (kim_identity *out_identity); -kim_error_t kim_identity_is_tgt_service (kim_identity_t in_identity, - kim_boolean_t *out_is_tgt_service); +kim_error kim_identity_is_tgt_service (kim_identity in_identity, + kim_boolean *out_is_tgt_service); #endif /* KIM_IDENTITY_PRIVATE_H */ diff --git a/src/kim/lib/kim_library.c b/src/kim/lib/kim_library.c index 702486130..858ab7d03 100644 --- a/src/kim/lib/kim_library.c +++ b/src/kim/lib/kim_library.c @@ -36,13 +36,13 @@ /* ------------------------------------------------------------------------ */ -void __kim_library_debug_printf (kim_string_t in_function, - kim_string_t in_format, +void __kim_library_debug_printf (kim_string in_function, + kim_string in_format, ...) { - kim_error_t err = KIM_NO_ERROR; - kim_string_t format = NULL; - kim_string_t string = NULL; + kim_error err = KIM_NO_ERROR; + kim_string format = NULL; + kim_string string = NULL; if (!err && !in_function) { err = param_error (1, "in_function", "NULL"); } if (!err && !in_format ) { err = param_error (2, "in_format", "NULL"); } @@ -70,13 +70,13 @@ void __kim_library_debug_printf (kim_string_t in_function, #pragma mark -- Allow Home Directory Access -- static pthread_mutex_t g_allow_home_directory_access_mutex = PTHREAD_MUTEX_INITIALIZER; -kim_boolean_t g_allow_home_directory_access = TRUE; +kim_boolean g_allow_home_directory_access = TRUE; /* ------------------------------------------------------------------------ */ -kim_error_t kim_library_set_allow_home_directory_access (kim_boolean_t in_allow_access) +kim_error kim_library_set_allow_home_directory_access (kim_boolean in_allow_access) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; int mutex_err = pthread_mutex_lock (&g_allow_home_directory_access_mutex); if (mutex_err) { err = os_error (mutex_err); } @@ -91,9 +91,9 @@ kim_error_t kim_library_set_allow_home_directory_access (kim_boolean_t in_allow_ /* ------------------------------------------------------------------------ */ -kim_error_t kim_library_get_allow_home_directory_access (kim_boolean_t *out_allow_access) +kim_error kim_library_get_allow_home_directory_access (kim_boolean *out_allow_access) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; int mutex_err = 0; if (!err && !out_allow_access) { err = param_error (3, "out_allow_access", "NULL"); } @@ -113,10 +113,10 @@ kim_error_t kim_library_get_allow_home_directory_access (kim_boolean_t *out_allo /* ------------------------------------------------------------------------ */ -kim_boolean_t kim_library_allow_home_directory_access (void) +kim_boolean kim_library_allow_home_directory_access (void) { - kim_boolean_t allow_access = FALSE; - kim_error_t err = kim_library_get_allow_home_directory_access (&allow_access); + kim_boolean allow_access = FALSE; + kim_error err = kim_library_get_allow_home_directory_access (&allow_access); kim_error_free (&err); @@ -127,13 +127,13 @@ kim_boolean_t kim_library_allow_home_directory_access (void) #pragma mark -- Allow Automatic Prompting -- static pthread_mutex_t g_allow_automatic_prompting_mutex = PTHREAD_MUTEX_INITIALIZER; -kim_boolean_t g_allow_automatic_prompting = TRUE; +kim_boolean g_allow_automatic_prompting = TRUE; /* ------------------------------------------------------------------------ */ -kim_error_t kim_library_set_allow_automatic_prompting (kim_boolean_t in_allow_automatic_prompting) +kim_error kim_library_set_allow_automatic_prompting (kim_boolean in_allow_automatic_prompting) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; int mutex_err = pthread_mutex_lock (&g_allow_automatic_prompting_mutex); if (mutex_err) { err = os_error (mutex_err); } @@ -148,9 +148,9 @@ kim_error_t kim_library_set_allow_automatic_prompting (kim_boolean_t in_allow_au /* ------------------------------------------------------------------------ */ -kim_error_t kim_library_get_allow_automatic_prompting (kim_boolean_t *out_allow_automatic_prompting) +kim_error kim_library_get_allow_automatic_prompting (kim_boolean *out_allow_automatic_prompting) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; int mutex_err = 0; if (!err && !out_allow_automatic_prompting) { err = param_error (3, "out_allow_automatic_prompting", "NULL"); } @@ -170,10 +170,10 @@ kim_error_t kim_library_get_allow_automatic_prompting (kim_boolean_t *out_allow_ /* ------------------------------------------------------------------------ */ -kim_boolean_t kim_library_allow_automatic_prompting (void) +kim_boolean kim_library_allow_automatic_prompting (void) { - kim_boolean_t allow_automatic_prompting = TRUE; - kim_error_t err = kim_library_get_allow_automatic_prompting (&allow_automatic_prompting); + kim_boolean allow_automatic_prompting = TRUE; + kim_error err = kim_library_get_allow_automatic_prompting (&allow_automatic_prompting); if (allow_automatic_prompting && getenv ("KERBEROSLOGIN_NEVER_PROMPT")) { kim_debug_printf ("KERBEROSLOGIN_NEVER_PROMPT is set."); @@ -189,7 +189,7 @@ kim_boolean_t kim_library_allow_automatic_prompting (void) /* Make sure there is at least 1 config file. We don't support DNS * domain-realm lookup, so if there is no config, Kerberos won't work. */ - kim_boolean_t kerberos_config_exists = FALSE; + kim_boolean kerberos_config_exists = FALSE; char **files = NULL; profile_t profile = NULL; diff --git a/src/kim/lib/kim_library_private.h b/src/kim/lib/kim_library_private.h index afe24bcf4..af8d489a2 100644 --- a/src/kim/lib/kim_library_private.h +++ b/src/kim/lib/kim_library_private.h @@ -31,24 +31,24 @@ #define kim_debug_printf(format, ...) __kim_library_debug_printf(__FUNCTION__, format, ## __VA_ARGS__) -void __kim_library_debug_printf (kim_string_t in_function, - kim_string_t in_format, +void __kim_library_debug_printf (kim_string in_function, + kim_string in_format, ...); -kim_error_t kim_library_set_allow_home_directory_access (kim_boolean_t in_allow_access); +kim_error kim_library_set_allow_home_directory_access (kim_boolean in_allow_access); -kim_error_t kim_library_get_allow_home_directory_access (kim_boolean_t *out_allow_access); +kim_error kim_library_get_allow_home_directory_access (kim_boolean *out_allow_access); -kim_boolean_t kim_library_allow_home_directory_access (void); +kim_boolean kim_library_allow_home_directory_access (void); -kim_error_t kim_library_set_allow_automatic_prompting (kim_boolean_t in_allow_automatic_prompting); +kim_error kim_library_set_allow_automatic_prompting (kim_boolean in_allow_automatic_prompting); -kim_error_t kim_library_get_allow_automatic_prompting (kim_boolean_t *out_allow_automatic_prompting); +kim_error kim_library_get_allow_automatic_prompting (kim_boolean *out_allow_automatic_prompting); -kim_boolean_t kim_library_allow_automatic_prompting (void); +kim_boolean kim_library_allow_automatic_prompting (void); -void kim_os_library_debug_print (kim_string_t in_string); +void kim_os_library_debug_print (kim_string in_string); -kim_boolean_t kim_os_library_caller_is_server (void); +kim_boolean kim_os_library_caller_is_server (void); #endif /* KIM_LIBRARY_PRIVATE_H */ diff --git a/src/kim/lib/kim_options.c b/src/kim/lib/kim_options.c index c68d4a57b..96e49ca57 100644 --- a/src/kim/lib/kim_options.c +++ b/src/kim/lib/kim_options.c @@ -32,14 +32,14 @@ struct kim_options_opaque { kim_prompt_callback_t prompt_callback; const void *prompt_callback_data; #warning add prompt responses here - kim_time_t start_time; - kim_lifetime_t lifetime; - kim_boolean_t renewable; - kim_lifetime_t renewal_lifetime; - kim_boolean_t forwardable; - kim_boolean_t proxiable; - kim_boolean_t addressless; - kim_string_t service_name; + kim_time start_time; + kim_lifetime lifetime; + kim_boolean renewable; + kim_lifetime renewal_lifetime; + kim_boolean forwardable; + kim_boolean proxiable; + kim_boolean addressless; + kim_string service_name; }; struct kim_options_opaque kim_options_initializer = { @@ -55,10 +55,10 @@ struct kim_options_opaque kim_options_initializer = { /* ------------------------------------------------------------------------ */ -static inline kim_error_t kim_options_allocate (kim_options_t *out_options) +static inline kim_error kim_options_allocate (kim_options *out_options) { - kim_error_t err = KIM_NO_ERROR; - kim_options_t options = NULL; + kim_error err = KIM_NO_ERROR; + kim_options options = NULL; if (!err && !out_options) { err = param_error (1, "out_options", "NULL"); } @@ -80,10 +80,10 @@ static inline kim_error_t kim_options_allocate (kim_options_t *out_options) /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_create_from_defaults (kim_options_t *out_options) +kim_error kim_options_create_from_defaults (kim_options *out_options) { - kim_error_t err = KIM_NO_ERROR; - kim_options_t options = NULL; + kim_error err = KIM_NO_ERROR; + kim_options options = NULL; if (!err && !out_options) { err = param_error (1, "out_options", "NULL"); } @@ -103,10 +103,10 @@ kim_error_t kim_options_create_from_defaults (kim_options_t *out_options) /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_create (kim_options_t *out_options) +kim_error kim_options_create (kim_options *out_options) { - kim_error_t err = KIM_NO_ERROR; - kim_preferences_t preferences = NULL; + kim_error err = KIM_NO_ERROR; + kim_preferences preferences = NULL; if (!err && !out_options) { err = param_error (1, "out_options", "NULL"); } @@ -125,11 +125,11 @@ kim_error_t kim_options_create (kim_options_t *out_options) /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_copy (kim_options_t *out_options, - kim_options_t in_options) +kim_error kim_options_copy (kim_options *out_options, + kim_options in_options) { - kim_error_t err = KIM_NO_ERROR; - kim_options_t options = NULL; + kim_error err = KIM_NO_ERROR; + kim_options options = NULL; if (!err && !out_options) { err = param_error (1, "out_options", "NULL"); } if (!err && !in_options ) { err = param_error (2, "in_options", "NULL"); } @@ -170,10 +170,10 @@ kim_error_t kim_options_copy (kim_options_t *out_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_set_prompt_callback (kim_options_t io_options, +kim_error kim_options_set_prompt_callback (kim_options io_options, kim_prompt_callback_t in_prompt_callback) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); } @@ -186,10 +186,10 @@ kim_error_t kim_options_set_prompt_callback (kim_options_t io_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_get_prompt_callback (kim_options_t in_options, +kim_error kim_options_get_prompt_callback (kim_options in_options, kim_prompt_callback_t *out_prompt_callback) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); } if (!err && !out_prompt_callback) { err = param_error (2, "out_prompt_callback", "NULL"); } @@ -203,11 +203,11 @@ kim_error_t kim_options_get_prompt_callback (kim_options_t in_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_set_data (kim_options_t io_options, +kim_error kim_options_set_data (kim_options io_options, const void *in_data) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); } @@ -220,10 +220,10 @@ kim_error_t kim_options_set_data (kim_options_t io_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_get_data (kim_options_t in_options, +kim_error kim_options_get_data (kim_options in_options, const void **out_data) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_options) { err = param_error (1, "in_options", "NULL"); } if (!err && !out_data ) { err = param_error (2, "out_data", "NULL"); } @@ -237,11 +237,11 @@ kim_error_t kim_options_get_data (kim_options_t in_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_set_prompt_response (kim_options_t io_options, +kim_error kim_options_set_prompt_response (kim_options io_options, kim_prompt_type_t in_prompt_type, void *in_response) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_options ) { err = param_error (1, "io_options", "NULL"); } if (!err && !in_response) { err = param_error (2, "in_response", "NULL"); } @@ -255,11 +255,11 @@ kim_error_t kim_options_set_prompt_response (kim_options_t io_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_get_prompt_response (kim_options_t in_options, +kim_error kim_options_get_prompt_response (kim_options in_options, kim_prompt_type_t in_prompt_type, void **out_response) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); } if (!err && !out_response) { err = param_error (2, "out_response", "NULL"); } @@ -273,10 +273,10 @@ kim_error_t kim_options_get_prompt_response (kim_options_t in_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_set_start_time (kim_options_t io_options, - kim_time_t in_start_time) +kim_error kim_options_set_start_time (kim_options io_options, + kim_time in_start_time) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); } @@ -289,10 +289,10 @@ kim_error_t kim_options_set_start_time (kim_options_t io_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_get_start_time (kim_options_t in_options, - kim_time_t *out_start_time) +kim_error kim_options_get_start_time (kim_options in_options, + kim_time *out_start_time) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); } if (!err && !out_start_time) { err = param_error (2, "out_start_time", "NULL"); } @@ -306,10 +306,10 @@ kim_error_t kim_options_get_start_time (kim_options_t in_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_set_lifetime (kim_options_t io_options, - kim_lifetime_t in_lifetime) +kim_error kim_options_set_lifetime (kim_options io_options, + kim_lifetime in_lifetime) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); } @@ -322,10 +322,10 @@ kim_error_t kim_options_set_lifetime (kim_options_t io_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_get_lifetime (kim_options_t in_options, - kim_lifetime_t *out_lifetime) +kim_error kim_options_get_lifetime (kim_options in_options, + kim_lifetime *out_lifetime) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); } if (!err && !out_lifetime) { err = param_error (2, "out_lifetime", "NULL"); } @@ -339,10 +339,10 @@ kim_error_t kim_options_get_lifetime (kim_options_t in_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_set_renewable (kim_options_t io_options, - kim_boolean_t in_renewable) +kim_error kim_options_set_renewable (kim_options io_options, + kim_boolean in_renewable) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); } @@ -355,10 +355,10 @@ kim_error_t kim_options_set_renewable (kim_options_t io_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_get_renewable (kim_options_t in_options, - kim_boolean_t *out_renewable) +kim_error kim_options_get_renewable (kim_options in_options, + kim_boolean *out_renewable) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); } if (!err && !out_renewable) { err = param_error (2, "out_renewable", "NULL"); } @@ -372,10 +372,10 @@ kim_error_t kim_options_get_renewable (kim_options_t in_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_set_renewal_lifetime (kim_options_t io_options, - kim_lifetime_t in_renewal_lifetime) +kim_error kim_options_set_renewal_lifetime (kim_options io_options, + kim_lifetime in_renewal_lifetime) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); } @@ -388,10 +388,10 @@ kim_error_t kim_options_set_renewal_lifetime (kim_options_t io_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_get_renewal_lifetime (kim_options_t in_options, - kim_lifetime_t *out_renewal_lifetime) +kim_error kim_options_get_renewal_lifetime (kim_options in_options, + kim_lifetime *out_renewal_lifetime) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); } if (!err && !out_renewal_lifetime) { err = param_error (2, "out_renewal_lifetime", "NULL"); } @@ -405,10 +405,10 @@ kim_error_t kim_options_get_renewal_lifetime (kim_options_t in_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_set_forwardable (kim_options_t io_options, - kim_boolean_t in_forwardable) +kim_error kim_options_set_forwardable (kim_options io_options, + kim_boolean in_forwardable) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); } @@ -421,10 +421,10 @@ kim_error_t kim_options_set_forwardable (kim_options_t io_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_get_forwardable (kim_options_t in_options, - kim_boolean_t *out_forwardable) +kim_error kim_options_get_forwardable (kim_options in_options, + kim_boolean *out_forwardable) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); } if (!err && !out_forwardable) { err = param_error (2, "out_forwardable", "NULL"); } @@ -438,10 +438,10 @@ kim_error_t kim_options_get_forwardable (kim_options_t in_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_set_proxiable (kim_options_t io_options, - kim_boolean_t in_proxiable) +kim_error kim_options_set_proxiable (kim_options io_options, + kim_boolean in_proxiable) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); } @@ -454,10 +454,10 @@ kim_error_t kim_options_set_proxiable (kim_options_t io_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_get_proxiable (kim_options_t in_options, - kim_boolean_t *out_proxiable) +kim_error kim_options_get_proxiable (kim_options in_options, + kim_boolean *out_proxiable) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); } if (!err && !out_proxiable) { err = param_error (2, "out_proxiable", "NULL"); } @@ -471,10 +471,10 @@ kim_error_t kim_options_get_proxiable (kim_options_t in_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_set_addressless (kim_options_t io_options, - kim_boolean_t in_addressless) +kim_error kim_options_set_addressless (kim_options io_options, + kim_boolean in_addressless) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); } @@ -487,10 +487,10 @@ kim_error_t kim_options_set_addressless (kim_options_t io_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_get_addressless (kim_options_t in_options, - kim_boolean_t *out_addressless) +kim_error kim_options_get_addressless (kim_options in_options, + kim_boolean *out_addressless) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); } if (!err && !out_addressless) { err = param_error (2, "out_addressless", "NULL"); } @@ -504,11 +504,11 @@ kim_error_t kim_options_get_addressless (kim_options_t in_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_set_service_name (kim_options_t io_options, - kim_string_t in_service_name) +kim_error kim_options_set_service_name (kim_options io_options, + kim_string in_service_name) { - kim_error_t err = KIM_NO_ERROR; - kim_string_t service_name = NULL; + kim_error err = KIM_NO_ERROR; + kim_string service_name = NULL; if (!err && !io_options ) { err = param_error (1, "io_options", "NULL"); } if (!err && !in_service_name) { err = param_error (2, "in_service_name", "NULL"); } @@ -527,10 +527,10 @@ kim_error_t kim_options_set_service_name (kim_options_t io_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_get_service_name (kim_options_t in_options, - kim_string_t *out_service_name) +kim_error kim_options_get_service_name (kim_options in_options, + kim_string *out_service_name) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_options ) { err = param_error (1, "in_options", "NULL"); } if (!err && !out_service_name) { err = param_error (2, "out_service_name", "NULL"); } @@ -544,11 +544,11 @@ kim_error_t kim_options_get_service_name (kim_options_t in_options, /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_get_init_cred_options (kim_options_t in_options, +kim_error kim_options_get_init_cred_options (kim_options in_options, krb5_context in_context, krb5_get_init_creds_opt **out_init_cred_options) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; krb5_get_init_creds_opt *init_cred_options; krb5_address **addresses = NULL; @@ -581,10 +581,10 @@ kim_error_t kim_options_get_init_cred_options (kim_options_t in_opt /* ------------------------------------------------------------------------ */ -kim_error_t kim_options_free_init_cred_options (krb5_context in_context, +kim_error kim_options_free_init_cred_options (krb5_context in_context, krb5_get_init_creds_opt **io_init_cred_options) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_context) { err = param_error (1, "in_context", "NULL"); } @@ -601,7 +601,7 @@ kim_error_t kim_options_free_init_cred_options (krb5_context in_co /* ------------------------------------------------------------------------ */ -void kim_options_free (kim_options_t *io_options) +void kim_options_free (kim_options *io_options) { if (io_options && *io_options) { kim_string_free (&(*io_options)->service_name); @@ -614,15 +614,15 @@ void kim_options_free (kim_options_t *io_options) /* ------------------------------------------------------------------------ */ -kim_error_code_t kim_prompt_callback_default (kim_options_t *io_options, +kim_error_code kim_prompt_callback_default (kim_options *io_options, kim_prompt_type_t in_type, - kim_string_t in_title, - kim_string_t in_message, - kim_string_t in_description, + kim_string in_title, + kim_string in_message, + kim_string in_description, void **out_reply) { - kim_error_t err = KIM_NO_ERROR; - kim_error_code_t code = KIM_NO_ERROR_ECODE; + kim_error err = KIM_NO_ERROR; + kim_error_code code = KIM_NO_ERROR_ECODE; if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); } if (!err && !out_reply ) { err = param_error (6, "out_reply", "NULL"); } @@ -637,15 +637,15 @@ kim_error_code_t kim_prompt_callback_default (kim_options_t *io_options, /* ------------------------------------------------------------------------ */ -kim_error_code_t kim_prompt_callback_gui (kim_options_t *io_options, +kim_error_code kim_prompt_callback_gui (kim_options *io_options, kim_prompt_type_t in_type, - kim_string_t in_title, - kim_string_t in_message, - kim_string_t in_description, + kim_string in_title, + kim_string in_message, + kim_string in_description, void **out_reply) { - kim_error_t err = KIM_NO_ERROR; - kim_error_code_t code = KIM_NO_ERROR_ECODE; + kim_error err = KIM_NO_ERROR; + kim_error_code code = KIM_NO_ERROR_ECODE; if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); } if (!err && !out_reply ) { err = param_error (6, "out_reply", "NULL"); } @@ -660,15 +660,15 @@ kim_error_code_t kim_prompt_callback_gui (kim_options_t *io_options, /* ------------------------------------------------------------------------ */ -kim_error_code_t kim_prompt_callback_cli (kim_options_t *io_options, +kim_error_code kim_prompt_callback_cli (kim_options *io_options, kim_prompt_type_t in_type, - kim_string_t in_title, - kim_string_t in_message, - kim_string_t in_description, + kim_string in_title, + kim_string in_message, + kim_string in_description, void **out_reply) { - kim_error_t err = KIM_NO_ERROR; - kim_error_code_t code = KIM_NO_ERROR_ECODE; + kim_error err = KIM_NO_ERROR; + kim_error_code code = KIM_NO_ERROR_ECODE; if (!err && !io_options) { err = param_error (1, "io_options", "NULL"); } if (!err && !out_reply ) { err = param_error (6, "out_reply", "NULL"); } @@ -683,11 +683,11 @@ kim_error_code_t kim_prompt_callback_cli (kim_options_t *io_options, /* ------------------------------------------------------------------------ */ -kim_error_code_t kim_prompt_callback_none (kim_options_t *io_options, +kim_error_code kim_prompt_callback_none (kim_options *io_options, kim_prompt_type_t in_type, - kim_string_t in_title, - kim_string_t in_message, - kim_string_t in_description, + kim_string in_title, + kim_string in_message, + kim_string in_description, void **out_reply) { return KIM_USER_CANCELED_ECODE; diff --git a/src/kim/lib/kim_options_private.h b/src/kim/lib/kim_options_private.h index ce75e4893..04d65c724 100644 --- a/src/kim/lib/kim_options_private.h +++ b/src/kim/lib/kim_options_private.h @@ -29,13 +29,13 @@ #include -kim_error_t kim_options_create_from_defaults (kim_options_t *out_options); +kim_error kim_options_create_from_defaults (kim_options *out_options); -kim_error_t kim_options_get_init_cred_options (kim_options_t in_options, +kim_error kim_options_get_init_cred_options (kim_options in_options, krb5_context in_context, krb5_get_init_creds_opt **out_init_cred_options); -kim_error_t kim_options_free_init_cred_options (krb5_context in_context, +kim_error kim_options_free_init_cred_options (krb5_context in_context, krb5_get_init_creds_opt **io_init_cred_options); #endif /* KIM_OPTIONS_PRIVATE_H */ diff --git a/src/kim/lib/kim_preferences.c b/src/kim/lib/kim_preferences.c index cf2ad8f2b..af8acb561 100644 --- a/src/kim/lib/kim_preferences.c +++ b/src/kim/lib/kim_preferences.c @@ -29,21 +29,21 @@ #pragma mark -- KIM Favorite Realms -- struct kim_favorite_identities_opaque { - kim_count_t count; - kim_identity_t *identities; + kim_count count; + kim_identity *identities; }; struct kim_favorite_identities_opaque kim_favorite_identities_initializer = { 0, NULL }; struct kim_favorite_identities_opaque kim_empty_favorite_identities_struct = { 0, NULL }; -const kim_favorite_identities_t kim_empty_favorite_identities = &kim_empty_favorite_identities_struct; +const kim_favorite_identities kim_empty_favorite_identities = &kim_empty_favorite_identities_struct; /* ------------------------------------------------------------------------ */ -static inline kim_error_t kim_favorite_identities_allocate (kim_favorite_identities_t *out_favorite_identities) +static inline kim_error kim_favorite_identities_allocate (kim_favorite_identities *out_favorite_identities) { - kim_error_t err = KIM_NO_ERROR; - kim_favorite_identities_t favorite_identities = NULL; + kim_error err = KIM_NO_ERROR; + kim_favorite_identities favorite_identities = NULL; if (!err && !out_favorite_identities) { err = param_error (1, "out_favorite_identities", "NULL"); } @@ -65,15 +65,15 @@ static inline kim_error_t kim_favorite_identities_allocate (kim_favorite_identit /* ------------------------------------------------------------------------ */ -static inline kim_error_t kim_favorite_identities_resize (kim_favorite_identities_t io_favorite_identities, - kim_count_t in_new_count) +static inline kim_error kim_favorite_identities_resize (kim_favorite_identities io_favorite_identities, + kim_count in_new_count) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_favorite_identities) { err = param_error (1, "io_favorite_identities", "NULL"); } if (!err && io_favorite_identities->count != in_new_count) { - kim_identity_t *identities = NULL; + kim_identity *identities = NULL; if (in_new_count == 0) { if (io_favorite_identities->identities) { @@ -103,10 +103,10 @@ static inline kim_error_t kim_favorite_identities_resize (kim_favorite_identitie /* ------------------------------------------------------------------------ */ -kim_error_t kim_favorite_identities_create (kim_favorite_identities_t *out_favorite_identities) +kim_error kim_favorite_identities_create (kim_favorite_identities *out_favorite_identities) { - kim_error_t err = KIM_NO_ERROR; - kim_favorite_identities_t favorite_identities = NULL; + kim_error err = KIM_NO_ERROR; + kim_favorite_identities favorite_identities = NULL; if (!err && !out_favorite_identities) { err = param_error (1, "out_favorite_identities", "NULL"); } @@ -126,11 +126,11 @@ kim_error_t kim_favorite_identities_create (kim_favorite_identities_t *out_favor /* ------------------------------------------------------------------------ */ -kim_error_t kim_favorite_identities_copy (kim_favorite_identities_t *out_favorite_identities, - kim_favorite_identities_t in_favorite_identities) +kim_error kim_favorite_identities_copy (kim_favorite_identities *out_favorite_identities, + kim_favorite_identities in_favorite_identities) { - kim_error_t err = KIM_NO_ERROR; - kim_favorite_identities_t favorite_identities = NULL; + kim_error err = KIM_NO_ERROR; + kim_favorite_identities favorite_identities = NULL; if (!err && !out_favorite_identities) { err = param_error (1, "out_favorite_identities", "NULL"); } if (!err && !in_favorite_identities ) { err = param_error (2, "in_favorite_identities", "NULL"); } @@ -144,7 +144,7 @@ kim_error_t kim_favorite_identities_copy (kim_favorite_identities_t *out_favorit } if (!err) { - kim_count_t i; + kim_count i; for (i = 0; !err && i < favorite_identities->count; i++) { err = kim_identity_copy (&favorite_identities->identities[i], @@ -164,10 +164,10 @@ kim_error_t kim_favorite_identities_copy (kim_favorite_identities_t *out_favorit /* ------------------------------------------------------------------------ */ -kim_error_t kim_favorite_identities_get_number_of_identities (kim_favorite_identities_t in_favorite_identities, - kim_count_t *out_number_of_identities) +kim_error kim_favorite_identities_get_number_of_identities (kim_favorite_identities in_favorite_identities, + kim_count *out_number_of_identities) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_favorite_identities ) { err = param_error (1, "in_favorite_identities", "NULL"); } if (!err && !out_number_of_identities) { err = param_error (2, "out_number_of_identities", "NULL"); } @@ -181,11 +181,11 @@ kim_error_t kim_favorite_identities_get_number_of_identities (kim_favorite_ident /* ------------------------------------------------------------------------ */ -kim_error_t kim_favorite_identities_get_identity_at_index (kim_favorite_identities_t in_favorite_identities, - kim_count_t in_index, - kim_identity_t *out_identity) +kim_error kim_favorite_identities_get_identity_at_index (kim_favorite_identities in_favorite_identities, + kim_count in_index, + kim_identity *out_identity) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_favorite_identities) { err = param_error (1, "in_favorite_identities", "NULL"); } if (!err && !out_identity ) { err = param_error (3, "out_identity", "NULL"); } @@ -205,12 +205,12 @@ kim_error_t kim_favorite_identities_get_identity_at_index (kim_favorite_identiti /* ------------------------------------------------------------------------ */ -kim_error_t kim_favorite_identities_add_identity (kim_favorite_identities_t io_favorite_identities, - kim_identity_t in_identity) +kim_error kim_favorite_identities_add_identity (kim_favorite_identities io_favorite_identities, + kim_identity in_identity) { - kim_error_t err = KIM_NO_ERROR; - kim_identity_t identity = NULL; - kim_count_t insert_at = 0; + kim_error err = KIM_NO_ERROR; + kim_identity identity = NULL; + kim_count insert_at = 0; if (!err && !io_favorite_identities) { err = param_error (1, "io_favorite_identities", "NULL"); } if (!err && !in_identity ) { err = param_error (2, "in_identity", "NULL"); } @@ -220,10 +220,10 @@ kim_error_t kim_favorite_identities_add_identity (kim_favorite_identities_t io_f } if (!err) { - kim_count_t i; + kim_count i; for (i = 0; !err && i < io_favorite_identities->count; i++) { - kim_comparison_t identity_comparison = 0; + kim_comparison identity_comparison = 0; err = kim_identity_compare (in_identity, io_favorite_identities->identities[i], &identity_comparison); @@ -233,7 +233,7 @@ kim_error_t kim_favorite_identities_add_identity (kim_favorite_identities_t io_f } else if (kim_comparison_is_equal_to (identity_comparison)) { /* already in list */ - kim_string_t display_string = NULL; + kim_string display_string = NULL; err = kim_identity_get_display_string (in_identity, &display_string); @@ -255,7 +255,7 @@ kim_error_t kim_favorite_identities_add_identity (kim_favorite_identities_t io_f } if (!err) { - kim_count_t move_count = io_favorite_identities->count - 1 - insert_at; + kim_count move_count = io_favorite_identities->count - 1 - insert_at; memmove (&io_favorite_identities->identities[insert_at + 1], &io_favorite_identities->identities[insert_at], @@ -271,29 +271,29 @@ kim_error_t kim_favorite_identities_add_identity (kim_favorite_identities_t io_f /* ------------------------------------------------------------------------ */ -kim_error_t kim_favorite_identities_remove_identity (kim_favorite_identities_t io_favorite_identities, - kim_identity_t in_identity) +kim_error kim_favorite_identities_remove_identity (kim_favorite_identities io_favorite_identities, + kim_identity in_identity) { - kim_error_t err = KIM_NO_ERROR; - kim_boolean_t found = FALSE; - kim_count_t i; + kim_error err = KIM_NO_ERROR; + kim_boolean found = FALSE; + kim_count i; if (!err && !io_favorite_identities) { err = param_error (1, "io_favorite_identities", "NULL"); } if (!err && !in_identity ) { err = param_error (2, "in_identity", "NULL"); } if (!err) { for (i = 0; !err && !found && i < io_favorite_identities->count; i++) { - kim_identity_t identity = io_favorite_identities->identities[i]; + kim_identity identity = io_favorite_identities->identities[i]; err = kim_identity_compare (in_identity, identity, &found); if (!err && found) { - kim_count_t new_count = io_favorite_identities->count - 1; + kim_count new_count = io_favorite_identities->count - 1; memmove (&io_favorite_identities->identities[i], &io_favorite_identities->identities[i + 1], (new_count - i) * sizeof (*io_favorite_identities->identities)); - kim_error_t terr = kim_favorite_identities_resize (io_favorite_identities, new_count); + kim_error terr = kim_favorite_identities_resize (io_favorite_identities, new_count); if (terr) { kim_debug_printf ("failed to resize list to %d. Continuing.", new_count); kim_error_free (&terr); @@ -305,7 +305,7 @@ kim_error_t kim_favorite_identities_remove_identity (kim_favorite_identities_t i } if (!err && !found) { - kim_string_t display_string = NULL; + kim_string display_string = NULL; err = kim_identity_get_display_string (in_identity, &display_string); @@ -321,14 +321,14 @@ kim_error_t kim_favorite_identities_remove_identity (kim_favorite_identities_t i /* ------------------------------------------------------------------------ */ -kim_error_t kim_favorite_identities_remove_all_identities (kim_favorite_identities_t io_favorite_identities) +kim_error kim_favorite_identities_remove_all_identities (kim_favorite_identities io_favorite_identities) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_favorite_identities) { err = param_error (1, "io_favorite_identities", "NULL"); } if (!err) { - kim_count_t i; + kim_count i; for (i = 0; i < io_favorite_identities->count; i++) { kim_identity_free (&io_favorite_identities->identities[i]); @@ -343,11 +343,11 @@ kim_error_t kim_favorite_identities_remove_all_identities (kim_favorite_identiti /* ------------------------------------------------------------------------ */ -void kim_favorite_identities_free (kim_favorite_identities_t *io_favorite_identities) +void kim_favorite_identities_free (kim_favorite_identities *io_favorite_identities) { if (io_favorite_identities && *io_favorite_identities && *io_favorite_identities != kim_default_favorite_identities) { - kim_count_t i; + kim_count i; for (i = 0; i < (*io_favorite_identities)->count; i++) { kim_identity_free (&(*io_favorite_identities)->identities[i]); @@ -361,22 +361,22 @@ void kim_favorite_identities_free (kim_favorite_identities_t *io_favorite_identi #pragma mark -- KIM Preferences -- struct kim_preferences_opaque { - kim_options_t options; - kim_boolean_t options_changed; - kim_boolean_t remember_options; - kim_boolean_t remember_options_changed; - kim_identity_t client_identity; - kim_boolean_t client_identity_changed; - kim_boolean_t remember_client_identity; - kim_boolean_t remember_client_identity_changed; - kim_lifetime_t minimum_lifetime; - kim_lifetime_t maximum_lifetime; - kim_boolean_t lifetime_range_changed; - kim_lifetime_t minimum_renewal_lifetime; - kim_lifetime_t maximum_renewal_lifetime; - kim_boolean_t renewal_lifetime_range_changed; - kim_favorite_identities_t favorite_identities; - kim_boolean_t favorite_identities_changed; + kim_options options; + kim_boolean options_changed; + kim_boolean remember_options; + kim_boolean remember_options_changed; + kim_identity client_identity; + kim_boolean client_identity_changed; + kim_boolean remember_client_identity; + kim_boolean remember_client_identity_changed; + kim_lifetime minimum_lifetime; + kim_lifetime maximum_lifetime; + kim_boolean lifetime_range_changed; + kim_lifetime minimum_renewal_lifetime; + kim_lifetime maximum_renewal_lifetime; + kim_boolean renewal_lifetime_range_changed; + kim_favorite_identities favorite_identities; + kim_boolean favorite_identities_changed; }; struct kim_preferences_opaque kim_preferences_initializer = { @@ -400,14 +400,14 @@ struct kim_preferences_opaque kim_preferences_initializer = { /* ------------------------------------------------------------------------ */ -static kim_error_t kim_preferences_read (kim_preferences_t in_preferences) +static kim_error kim_preferences_read (kim_preferences in_preferences) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_preferences) { err = param_error (1, "in_preferences", "NULL"); } if (!err) { - kim_lifetime_t lifetime = kim_default_lifetime; + kim_lifetime lifetime = kim_default_lifetime; err = kim_os_preferences_get_lifetime_for_key (kim_preference_key_lifetime, kim_default_lifetime, @@ -419,7 +419,7 @@ static kim_error_t kim_preferences_read (kim_preferences_t in_preferences) } if (!err) { - kim_boolean_t renewable = kim_default_renewable; + kim_boolean renewable = kim_default_renewable; err = kim_os_preferences_get_boolean_for_key (kim_preference_key_renewable, kim_default_renewable, @@ -431,7 +431,7 @@ static kim_error_t kim_preferences_read (kim_preferences_t in_preferences) } if (!err) { - kim_lifetime_t renewal_lifetime = kim_default_renewal_lifetime; + kim_lifetime renewal_lifetime = kim_default_renewal_lifetime; err = kim_os_preferences_get_lifetime_for_key (kim_preference_key_renewal_lifetime, kim_default_renewal_lifetime, @@ -443,7 +443,7 @@ static kim_error_t kim_preferences_read (kim_preferences_t in_preferences) } if (!err) { - kim_boolean_t forwardable = kim_default_forwardable; + kim_boolean forwardable = kim_default_forwardable; err = kim_os_preferences_get_boolean_for_key (kim_preference_key_forwardable, kim_default_forwardable, @@ -455,7 +455,7 @@ static kim_error_t kim_preferences_read (kim_preferences_t in_preferences) } if (!err) { - kim_boolean_t proxiable = kim_default_proxiable; + kim_boolean proxiable = kim_default_proxiable; err = kim_os_preferences_get_boolean_for_key (kim_preference_key_proxiable, kim_default_proxiable, @@ -467,7 +467,7 @@ static kim_error_t kim_preferences_read (kim_preferences_t in_preferences) } if (!err) { - kim_boolean_t addressless = kim_default_addressless; + kim_boolean addressless = kim_default_addressless; err = kim_os_preferences_get_boolean_for_key (kim_preference_key_addressless, kim_default_addressless, @@ -485,7 +485,7 @@ static kim_error_t kim_preferences_read (kim_preferences_t in_preferences) } if (!err) { - kim_identity_t default_identity = kim_default_client_identity; + kim_identity default_identity = kim_default_client_identity; err = kim_os_identity_create_for_username (&default_identity); @@ -539,14 +539,14 @@ static kim_error_t kim_preferences_read (kim_preferences_t in_preferences) /* ------------------------------------------------------------------------ */ -static kim_error_t kim_preferences_write (kim_preferences_t in_preferences) +static kim_error kim_preferences_write (kim_preferences in_preferences) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_preferences) { err = param_error (1, "in_preferences", "NULL"); } if (!err && in_preferences->remember_options && in_preferences->options_changed) { - kim_lifetime_t lifetime = kim_default_lifetime; + kim_lifetime lifetime = kim_default_lifetime; err = kim_options_get_lifetime (in_preferences->options, &lifetime); @@ -556,7 +556,7 @@ static kim_error_t kim_preferences_write (kim_preferences_t in_preferences) } if (!err) { - kim_boolean_t renewable = kim_default_renewable; + kim_boolean renewable = kim_default_renewable; err = kim_options_get_renewable (in_preferences->options, &renewable); @@ -567,7 +567,7 @@ static kim_error_t kim_preferences_write (kim_preferences_t in_preferences) } if (!err) { - kim_lifetime_t renewal_lifetime = kim_default_renewal_lifetime; + kim_lifetime renewal_lifetime = kim_default_renewal_lifetime; err = kim_options_get_renewal_lifetime (in_preferences->options, &renewal_lifetime); @@ -578,7 +578,7 @@ static kim_error_t kim_preferences_write (kim_preferences_t in_preferences) } if (!err) { - kim_boolean_t forwardable = kim_default_forwardable; + kim_boolean forwardable = kim_default_forwardable; err = kim_options_get_forwardable (in_preferences->options, &forwardable); @@ -589,7 +589,7 @@ static kim_error_t kim_preferences_write (kim_preferences_t in_preferences) } if (!err) { - kim_boolean_t proxiable = kim_default_proxiable; + kim_boolean proxiable = kim_default_proxiable; err = kim_options_get_proxiable (in_preferences->options, &proxiable); @@ -600,7 +600,7 @@ static kim_error_t kim_preferences_write (kim_preferences_t in_preferences) } if (!err) { - kim_boolean_t addressless = kim_default_addressless; + kim_boolean addressless = kim_default_addressless; err = kim_options_get_addressless (in_preferences->options, &addressless); @@ -617,7 +617,7 @@ static kim_error_t kim_preferences_write (kim_preferences_t in_preferences) } if (!err && in_preferences->remember_client_identity && in_preferences->client_identity_changed) { - kim_identity_t default_identity = kim_default_client_identity; + kim_identity default_identity = kim_default_client_identity; err = kim_os_identity_create_for_username (&default_identity); @@ -664,10 +664,10 @@ static kim_error_t kim_preferences_write (kim_preferences_t in_preferences) /* ------------------------------------------------------------------------ */ -static inline kim_error_t kim_preferences_allocate (kim_preferences_t *out_preferences) +static inline kim_error kim_preferences_allocate (kim_preferences *out_preferences) { - kim_error_t err = KIM_NO_ERROR; - kim_preferences_t preferences = NULL; + kim_error err = KIM_NO_ERROR; + kim_preferences preferences = NULL; if (!err && !out_preferences) { err = param_error (1, "out_preferences", "NULL"); } @@ -689,10 +689,10 @@ static inline kim_error_t kim_preferences_allocate (kim_preferences_t *out_prefe /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_create (kim_preferences_t *out_preferences) +kim_error kim_preferences_create (kim_preferences *out_preferences) { - kim_error_t err = KIM_NO_ERROR; - kim_preferences_t preferences = NULL; + kim_error err = KIM_NO_ERROR; + kim_preferences preferences = NULL; if (!err && !out_preferences) { err = param_error (1, "out_preferences", "NULL"); } @@ -721,11 +721,11 @@ kim_error_t kim_preferences_create (kim_preferences_t *out_preferences) /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_copy (kim_preferences_t *out_preferences, - kim_preferences_t in_preferences) +kim_error kim_preferences_copy (kim_preferences *out_preferences, + kim_preferences in_preferences) { - kim_error_t err = KIM_NO_ERROR; - kim_preferences_t preferences = NULL; + kim_error err = KIM_NO_ERROR; + kim_preferences preferences = NULL; if (!err && !out_preferences) { err = param_error (1, "out_preferences", "NULL"); } if (!err && !in_preferences ) { err = param_error (2, "in_preferences", "NULL"); } @@ -761,11 +761,11 @@ kim_error_t kim_preferences_copy (kim_preferences_t *out_preferences, /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_set_options (kim_preferences_t io_preferences, - kim_options_t in_options) +kim_error kim_preferences_set_options (kim_preferences io_preferences, + kim_options in_options) { - kim_error_t err = KIM_NO_ERROR; - kim_options_t options = NULL; + kim_error err = KIM_NO_ERROR; + kim_options options = NULL; if (!err && !io_preferences) { err = param_error (1, "io_preferences", "NULL"); } if (!err && !in_options ) { err = param_error (2, "in_options", "NULL"); } @@ -785,10 +785,10 @@ kim_error_t kim_preferences_set_options (kim_preferences_t io_preferences, /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_get_options (kim_preferences_t in_preferences, - kim_options_t *out_options) +kim_error kim_preferences_get_options (kim_preferences in_preferences, + kim_options *out_options) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_preferences) { err = param_error (1, "in_preferences", "NULL"); } if (!err && !out_options ) { err = param_error (2, "out_options", "NULL"); } @@ -802,10 +802,10 @@ kim_error_t kim_preferences_get_options (kim_preferences_t in_preferences, /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_set_remember_options (kim_preferences_t io_preferences, - kim_boolean_t in_remember_options) +kim_error kim_preferences_set_remember_options (kim_preferences io_preferences, + kim_boolean in_remember_options) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_preferences) { err = param_error (1, "io_preferences", "NULL"); } @@ -819,10 +819,10 @@ kim_error_t kim_preferences_set_remember_options (kim_preferences_t io_preferenc /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_get_remember_options (kim_preferences_t in_preferences, - kim_boolean_t *out_remember_options) +kim_error kim_preferences_get_remember_options (kim_preferences in_preferences, + kim_boolean *out_remember_options) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_preferences ) { err = param_error (1, "in_preferences", "NULL"); } if (!err && !out_remember_options) { err = param_error (2, "out_remember_options", "NULL"); } @@ -836,11 +836,11 @@ kim_error_t kim_preferences_get_remember_options (kim_preferences_t in_preferen /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_set_client_identity (kim_preferences_t io_preferences, - kim_identity_t in_client_identity) +kim_error kim_preferences_set_client_identity (kim_preferences io_preferences, + kim_identity in_client_identity) { - kim_error_t err = KIM_NO_ERROR; - kim_identity_t identity = KIM_IDENTITY_ANY; + kim_error err = KIM_NO_ERROR; + kim_identity identity = KIM_IDENTITY_ANY; if (!err && !io_preferences ) { err = param_error (1, "io_preferences", "NULL"); } /* in_client_identity may be KIM_IDENTITY_ANY */ @@ -860,10 +860,10 @@ kim_error_t kim_preferences_set_client_identity (kim_preferences_t io_preference /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_get_client_identity (kim_preferences_t in_preferences, - kim_identity_t *out_client_identity) +kim_error kim_preferences_get_client_identity (kim_preferences in_preferences, + kim_identity *out_client_identity) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_preferences ) { err = param_error (1, "in_preferences", "NULL"); } if (!err && !out_client_identity) { err = param_error (2, "out_client_identity", "NULL"); } @@ -877,10 +877,10 @@ kim_error_t kim_preferences_get_client_identity (kim_preferences_t in_preferenc /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_set_remember_client_identity (kim_preferences_t io_preferences, - kim_boolean_t in_remember_client_identity) +kim_error kim_preferences_set_remember_client_identity (kim_preferences io_preferences, + kim_boolean in_remember_client_identity) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_preferences) { err = param_error (1, "io_preferences", "NULL"); } @@ -894,10 +894,10 @@ kim_error_t kim_preferences_set_remember_client_identity (kim_preferences_t io_p /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_get_remember_client_identity (kim_preferences_t in_preferences, - kim_boolean_t *out_remember_client_identity) +kim_error kim_preferences_get_remember_client_identity (kim_preferences in_preferences, + kim_boolean *out_remember_client_identity) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_preferences ) { err = param_error (1, "in_preferences", "NULL"); } if (!err && !out_remember_client_identity) { err = param_error (2, "out_remember_client_identity", "NULL"); } @@ -911,10 +911,10 @@ kim_error_t kim_preferences_get_remember_client_identity (kim_preferences_t in_ /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_set_minimum_lifetime (kim_preferences_t io_preferences, - kim_lifetime_t in_minimum_lifetime) +kim_error kim_preferences_set_minimum_lifetime (kim_preferences io_preferences, + kim_lifetime in_minimum_lifetime) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_preferences) { err = param_error (1, "io_preferences", "NULL"); } @@ -928,10 +928,10 @@ kim_error_t kim_preferences_set_minimum_lifetime (kim_preferences_t io_preferenc /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_get_minimum_lifetime (kim_preferences_t in_preferences, - kim_lifetime_t *out_minimum_lifetime) +kim_error kim_preferences_get_minimum_lifetime (kim_preferences in_preferences, + kim_lifetime *out_minimum_lifetime) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_preferences ) { err = param_error (1, "in_preferences", "NULL"); } if (!err && !out_minimum_lifetime) { err = param_error (2, "out_minimum_lifetime", "NULL"); } @@ -945,10 +945,10 @@ kim_error_t kim_preferences_get_minimum_lifetime (kim_preferences_t in_preferen /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_set_maximum_lifetime (kim_preferences_t io_preferences, - kim_lifetime_t in_maximum_lifetime) +kim_error kim_preferences_set_maximum_lifetime (kim_preferences io_preferences, + kim_lifetime in_maximum_lifetime) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_preferences) { err = param_error (1, "io_preferences", "NULL"); } @@ -962,10 +962,10 @@ kim_error_t kim_preferences_set_maximum_lifetime (kim_preferences_t io_preferenc /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_get_maximum_lifetime (kim_preferences_t in_preferences, - kim_lifetime_t *out_maximum_lifetime) +kim_error kim_preferences_get_maximum_lifetime (kim_preferences in_preferences, + kim_lifetime *out_maximum_lifetime) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_preferences ) { err = param_error (1, "in_preferences", "NULL"); } if (!err && !out_maximum_lifetime) { err = param_error (2, "out_maximum_lifetime", "NULL"); } @@ -979,10 +979,10 @@ kim_error_t kim_preferences_get_maximum_lifetime (kim_preferences_t in_preferen /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_set_minimum_renewal_lifetime (kim_preferences_t io_preferences, - kim_lifetime_t in_minimum_renewal_lifetime) +kim_error kim_preferences_set_minimum_renewal_lifetime (kim_preferences io_preferences, + kim_lifetime in_minimum_renewal_lifetime) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_preferences) { err = param_error (1, "io_preferences", "NULL"); } @@ -996,10 +996,10 @@ kim_error_t kim_preferences_set_minimum_renewal_lifetime (kim_preferences_t io_p /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_get_minimum_renewal_lifetime (kim_preferences_t in_preferences, - kim_lifetime_t *out_minimum_renewal_lifetime) +kim_error kim_preferences_get_minimum_renewal_lifetime (kim_preferences in_preferences, + kim_lifetime *out_minimum_renewal_lifetime) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_preferences ) { err = param_error (1, "in_preferences", "NULL"); } if (!err && !out_minimum_renewal_lifetime) { err = param_error (2, "out_minimum_renewal_lifetime", "NULL"); } @@ -1013,10 +1013,10 @@ kim_error_t kim_preferences_get_minimum_renewal_lifetime (kim_preferences_t in_ /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_set_maximum_renewal_lifetime (kim_preferences_t io_preferences, - kim_lifetime_t in_maximum_renewal_lifetime) +kim_error kim_preferences_set_maximum_renewal_lifetime (kim_preferences io_preferences, + kim_lifetime in_maximum_renewal_lifetime) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_preferences) { err = param_error (1, "io_preferences", "NULL"); } @@ -1030,10 +1030,10 @@ kim_error_t kim_preferences_set_maximum_renewal_lifetime (kim_preferences_t io_p /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_get_maximum_renewal_lifetime (kim_preferences_t in_preferences, - kim_lifetime_t *out_maximum_renewal_lifetime) +kim_error kim_preferences_get_maximum_renewal_lifetime (kim_preferences in_preferences, + kim_lifetime *out_maximum_renewal_lifetime) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_preferences ) { err = param_error (1, "in_preferences", "NULL"); } if (!err && !out_maximum_renewal_lifetime) { err = param_error (2, "out_maximum_renewal_lifetime", "NULL"); } @@ -1047,11 +1047,11 @@ kim_error_t kim_preferences_get_maximum_renewal_lifetime (kim_preferences_t in_ /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_set_favorite_identities (kim_preferences_t io_preferences, - kim_favorite_identities_t in_favorite_identities) +kim_error kim_preferences_set_favorite_identities (kim_preferences io_preferences, + kim_favorite_identities in_favorite_identities) { - kim_error_t err = KIM_NO_ERROR; - kim_favorite_identities_t favorite_identities = NULL; + kim_error err = KIM_NO_ERROR; + kim_favorite_identities favorite_identities = NULL; if (!err && !io_preferences ) { err = param_error (1, "io_preferences", "NULL"); } if (!err && !in_favorite_identities) { err = param_error (2, "in_favorite_identities", "NULL"); } @@ -1071,10 +1071,10 @@ kim_error_t kim_preferences_set_favorite_identities (kim_preferences_t io_pr /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_get_favorite_identities (kim_preferences_t in_preferences, - kim_favorite_identities_t *out_favorite_identities) +kim_error kim_preferences_get_favorite_identities (kim_preferences in_preferences, + kim_favorite_identities *out_favorite_identities) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_preferences ) { err = param_error (1, "in_preferences", "NULL"); } if (!err && !out_favorite_identities) { err = param_error (2, "out_favorite_identities", "NULL"); } @@ -1088,9 +1088,9 @@ kim_error_t kim_preferences_get_favorite_identities (kim_preferences_t in_p /* ------------------------------------------------------------------------ */ -kim_error_t kim_preferences_synchronize (kim_preferences_t in_preferences) +kim_error kim_preferences_synchronize (kim_preferences in_preferences) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_preferences) { err = param_error (1, "in_preferences", "NULL"); } @@ -1107,7 +1107,7 @@ kim_error_t kim_preferences_synchronize (kim_preferences_t in_preferences) /* ------------------------------------------------------------------------ */ -void kim_preferences_free (kim_preferences_t *io_preferences) +void kim_preferences_free (kim_preferences *io_preferences) { if (io_preferences && *io_preferences) { kim_options_free (&(*io_preferences)->options); diff --git a/src/kim/lib/kim_preferences_private.h b/src/kim/lib/kim_preferences_private.h index a629fbbdb..5e8399f1e 100644 --- a/src/kim/lib/kim_preferences_private.h +++ b/src/kim/lib/kim_preferences_private.h @@ -29,7 +29,7 @@ #include -extern const kim_favorite_identities_t kim_empty_favorite_identities; +extern const kim_favorite_identities kim_empty_favorite_identities; typedef enum kim_preference_key_enum { kim_preference_key_lifetime, @@ -64,39 +64,39 @@ typedef enum kim_preference_key_enum { #define kim_default_maximum_renewal_lifetime 7*24*60*60 -kim_error_t kim_os_preferences_get_identity_for_key (kim_preference_key_t in_key, - kim_identity_t in_hardcoded_default, - kim_identity_t *out_identity); +kim_error kim_os_preferences_get_identity_for_key (kim_preference_key_t in_key, + kim_identity in_hardcoded_default, + kim_identity *out_identity); -kim_error_t kim_os_preferences_set_identity_for_key (kim_preference_key_t in_key, - kim_identity_t in_identity); +kim_error kim_os_preferences_set_identity_for_key (kim_preference_key_t in_key, + kim_identity in_identity); -kim_error_t kim_os_preferences_get_favorite_identities_for_key (kim_preference_key_t in_key, - kim_favorite_identities_t in_hardcoded_default, - kim_favorite_identities_t *out_favorite_identities); +kim_error kim_os_preferences_get_favorite_identities_for_key (kim_preference_key_t in_key, + kim_favorite_identities in_hardcoded_default, + kim_favorite_identities *out_favorite_identities); -kim_error_t kim_os_preferences_set_favorite_identities_for_key (kim_preference_key_t in_key, - kim_favorite_identities_t in_favorite_identities); +kim_error kim_os_preferences_set_favorite_identities_for_key (kim_preference_key_t in_key, + kim_favorite_identities in_favorite_identities); -kim_error_t kim_os_preferences_get_time_for_key (kim_preference_key_t in_key, - kim_time_t in_hardcoded_default, - kim_time_t *out_time); +kim_error kim_os_preferences_get_time_for_key (kim_preference_key_t in_key, + kim_time in_hardcoded_default, + kim_time *out_time); -kim_error_t kim_os_preferences_set_time_for_key (kim_preference_key_t in_key, - kim_time_t in_time); +kim_error kim_os_preferences_set_time_for_key (kim_preference_key_t in_key, + kim_time in_time); -kim_error_t kim_os_preferences_get_lifetime_for_key (kim_preference_key_t in_key, - kim_lifetime_t in_hardcoded_default, - kim_lifetime_t *out_lifetime); +kim_error kim_os_preferences_get_lifetime_for_key (kim_preference_key_t in_key, + kim_lifetime in_hardcoded_default, + kim_lifetime *out_lifetime); -kim_error_t kim_os_preferences_set_lifetime_for_key (kim_preference_key_t in_key, - kim_lifetime_t in_lifetime); +kim_error kim_os_preferences_set_lifetime_for_key (kim_preference_key_t in_key, + kim_lifetime in_lifetime); -kim_error_t kim_os_preferences_get_boolean_for_key (kim_preference_key_t in_key, - kim_boolean_t in_hardcoded_default, - kim_boolean_t *out_boolean); +kim_error kim_os_preferences_get_boolean_for_key (kim_preference_key_t in_key, + kim_boolean in_hardcoded_default, + kim_boolean *out_boolean); -kim_error_t kim_os_preferences_set_boolean_for_key (kim_preference_key_t in_key, - kim_boolean_t in_boolean); +kim_error kim_os_preferences_set_boolean_for_key (kim_preference_key_t in_key, + kim_boolean in_boolean); #endif /* KIM_PREFERENCES_PRIVATE_H */ diff --git a/src/kim/lib/kim_selection_hints.c b/src/kim/lib/kim_selection_hints.c index 4ed3fbada..709f1b95b 100644 --- a/src/kim/lib/kim_selection_hints.c +++ b/src/kim/lib/kim_selection_hints.c @@ -27,41 +27,41 @@ /* ------------------------------------------------------------------------ */ struct kim_selection_hints_opaque { - kim_string_t application_identifier; - kim_string_t application_name; - kim_string_t explanation; - kim_options_t options; - kim_boolean_t allow_user_interaction; - kim_boolean_t use_cached_results; - kim_string_t service_identity; - kim_string_t client_realm; - kim_string_t user; - kim_string_t service_realm; - kim_string_t service; - kim_string_t server; + kim_string application_identifier; + kim_string application_name; + kim_string explanation; + kim_options options; + kim_boolean allow_user_interaction; + kim_boolean use_cached_results; + kim_string service_identity; + kim_string client_realm; + kim_string user; + kim_string service_realm; + kim_string service; + kim_string server; }; struct kim_selection_hints_opaque kim_selection_hints_initializer = { - NULL, - NULL, - NULL, - KIM_OPTIONS_DEFAULT, - TRUE, - TRUE, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL +NULL, +NULL, +NULL, +KIM_OPTIONS_DEFAULT, +TRUE, +TRUE, +NULL, +NULL, +NULL, +NULL, +NULL, +NULL }; /* ------------------------------------------------------------------------ */ -static inline kim_error_t kim_selection_hints_allocate (kim_selection_hints_t *out_selection_hints) +static inline kim_error kim_selection_hints_allocate (kim_selection_hints *out_selection_hints) { - kim_error_t err = KIM_NO_ERROR; - kim_selection_hints_t selection_hints = NULL; + kim_error err = KIM_NO_ERROR; + kim_selection_hints selection_hints = NULL; if (!err && !out_selection_hints) { err = param_error (1, "out_selection_hints", "NULL"); } @@ -83,11 +83,11 @@ static inline kim_error_t kim_selection_hints_allocate (kim_selection_hints_t *o /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_create (kim_selection_hints_t *out_selection_hints, - kim_string_t in_application_identifier) +kim_error kim_selection_hints_create (kim_selection_hints *out_selection_hints, + kim_string in_application_identifier) { - kim_error_t err = KIM_NO_ERROR; - kim_selection_hints_t selection_hints = NULL; + kim_error err = KIM_NO_ERROR; + kim_selection_hints selection_hints = NULL; if (!err && !out_selection_hints ) { err = param_error (1, "out_selection_hints", "NULL"); } if (!err && !in_application_identifier) { err = param_error (1, "in_application_identifier", "NULL"); } @@ -113,11 +113,11 @@ kim_error_t kim_selection_hints_create (kim_selection_hints_t *out_selection_hin /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_copy (kim_selection_hints_t *out_selection_hints, - kim_selection_hints_t in_selection_hints) +kim_error kim_selection_hints_copy (kim_selection_hints *out_selection_hints, + kim_selection_hints in_selection_hints) { - kim_error_t err = KIM_NO_ERROR; - kim_selection_hints_t selection_hints = NULL; + kim_error err = KIM_NO_ERROR; + kim_selection_hints selection_hints = NULL; if (!err && !out_selection_hints) { err = param_error (1, "out_selection_hints", "NULL"); } if (!err && !in_selection_hints ) { err = param_error (1, "in_selection_hints", "NULL"); } @@ -191,10 +191,10 @@ kim_error_t kim_selection_hints_copy (kim_selection_hints_t *out_selection_hints /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_set_service_identity_hint (kim_selection_hints_t io_selection_hints, - kim_identity_t in_service_identity) +kim_error kim_selection_hints_set_service_identity_hint (kim_selection_hints io_selection_hints, + kim_identity in_service_identity) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_selection_hints ) { err = param_error (1, "io_selection_hints", "NULL"); } if (!err && !in_service_identity) { err = param_error (2, "in_service_identity", "KIM_IDENTITY_ANY"); } @@ -208,10 +208,10 @@ kim_error_t kim_selection_hints_set_service_identity_hint (kim_selection_hints_t /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_get_service_identity_hint (kim_selection_hints_t in_selection_hints, - kim_identity_t *out_service_identity) +kim_error kim_selection_hints_get_service_identity_hint (kim_selection_hints in_selection_hints, + kim_identity *out_service_identity) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_selection_hints ) { err = param_error (1, "in_selection_hints", "NULL"); } if (!err && !out_service_identity) { err = param_error (2, "out_service_identity", "NULL"); } @@ -225,10 +225,10 @@ kim_error_t kim_selection_hints_get_service_identity_hint (kim_selection_hints_t /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_set_client_realm_hint (kim_selection_hints_t io_selection_hints, - kim_string_t in_client_realm) +kim_error kim_selection_hints_set_client_realm_hint (kim_selection_hints io_selection_hints, + kim_string in_client_realm) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_selection_hints) { err = param_error (1, "io_selection_hints", "NULL"); } if (!err && !in_client_realm ) { err = param_error (2, "in_client_realm", "NULL"); } @@ -242,10 +242,10 @@ kim_error_t kim_selection_hints_set_client_realm_hint (kim_selection_hints_t io_ /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_get_client_realm_hint (kim_selection_hints_t in_selection_hints, - kim_string_t *out_client_realm) +kim_error kim_selection_hints_get_client_realm_hint (kim_selection_hints in_selection_hints, + kim_string *out_client_realm) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); } if (!err && !out_client_realm ) { err = param_error (2, "out_client_realm", "NULL"); } @@ -263,10 +263,10 @@ kim_error_t kim_selection_hints_get_client_realm_hint (kim_selection_hints_t in /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_set_user_hint (kim_selection_hints_t io_selection_hints, - kim_string_t in_user) +kim_error kim_selection_hints_set_user_hint (kim_selection_hints io_selection_hints, + kim_string in_user) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_selection_hints) { err = param_error (1, "io_selection_hints", "NULL"); } if (!err && !in_user ) { err = param_error (2, "in_user", "NULL"); } @@ -280,10 +280,10 @@ kim_error_t kim_selection_hints_set_user_hint (kim_selection_hints_t io_selectio /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_get_user_hint (kim_selection_hints_t in_selection_hints, - kim_string_t *out_user) +kim_error kim_selection_hints_get_user_hint (kim_selection_hints in_selection_hints, + kim_string *out_user) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); } if (!err && !out_user ) { err = param_error (2, "out_user", "NULL"); } @@ -301,10 +301,10 @@ kim_error_t kim_selection_hints_get_user_hint (kim_selection_hints_t in_selecti /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_set_service_realm_hint (kim_selection_hints_t io_selection_hints, - kim_string_t in_service_realm) +kim_error kim_selection_hints_set_service_realm_hint (kim_selection_hints io_selection_hints, + kim_string in_service_realm) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_selection_hints) { err = param_error (1, "io_selection_hints", "NULL"); } if (!err && !in_service_realm ) { err = param_error (2, "in_service_realm", "NULL"); } @@ -318,10 +318,10 @@ kim_error_t kim_selection_hints_set_service_realm_hint (kim_selection_hints_t io /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_get_service_realm_hint (kim_selection_hints_t in_selection_hints, - kim_string_t *out_service_realm) +kim_error kim_selection_hints_get_service_realm_hint (kim_selection_hints in_selection_hints, + kim_string *out_service_realm) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); } if (!err && !out_service_realm ) { err = param_error (2, "out_service_realm", "NULL"); } @@ -339,10 +339,10 @@ kim_error_t kim_selection_hints_get_service_realm_hint (kim_selection_hints_t i /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_set_service_hint (kim_selection_hints_t io_selection_hints, - kim_string_t in_service) +kim_error kim_selection_hints_set_service_hint (kim_selection_hints io_selection_hints, + kim_string in_service) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_selection_hints) { err = param_error (1, "io_selection_hints", "NULL"); } if (!err && !in_service ) { err = param_error (2, "in_service", "NULL"); } @@ -356,10 +356,10 @@ kim_error_t kim_selection_hints_set_service_hint (kim_selection_hints_t io_selec /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_get_service_hint (kim_selection_hints_t in_selection_hints, - kim_string_t *out_service) +kim_error kim_selection_hints_get_service_hint (kim_selection_hints in_selection_hints, + kim_string *out_service) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); } if (!err && !out_service ) { err = param_error (2, "out_service", "NULL"); } @@ -377,10 +377,10 @@ kim_error_t kim_selection_hints_get_service_hint (kim_selection_hints_t in_sele /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_set_server_hint (kim_selection_hints_t io_selection_hints, - kim_string_t in_server_hostname) +kim_error kim_selection_hints_set_server_hint (kim_selection_hints io_selection_hints, + kim_string in_server_hostname) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_selection_hints) { err = param_error (1, "io_selection_hints", "NULL"); } if (!err && !in_server_hostname) { err = param_error (2, "in_server_hostname", "NULL"); } @@ -394,10 +394,10 @@ kim_error_t kim_selection_hints_set_server_hint (kim_selection_hints_t io_select /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_get_server_hint (kim_selection_hints_t in_selection_hints, - kim_string_t *out_server_hostname) +kim_error kim_selection_hints_get_server_hint (kim_selection_hints in_selection_hints, + kim_string *out_server_hostname) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_selection_hints ) { err = param_error (1, "in_selection_hints", "NULL"); } if (!err && !out_server_hostname) { err = param_error (2, "out_server_hostname", "NULL"); } @@ -415,10 +415,10 @@ kim_error_t kim_selection_hints_get_server_hint (kim_selection_hints_t in_selec /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_set_application_name (kim_selection_hints_t io_selection_hints, - kim_string_t in_application_name) +kim_error kim_selection_hints_set_application_name (kim_selection_hints io_selection_hints, + kim_string in_application_name) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_selection_hints ) { err = param_error (1, "io_selection_hints", "NULL"); } if (!err && !in_application_name) { err = param_error (2, "in_application_name", "NULL"); } @@ -432,10 +432,10 @@ kim_error_t kim_selection_hints_set_application_name (kim_selection_hints_t io_s /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_get_application_name (kim_selection_hints_t in_selection_hints, - kim_string_t *out_application_name) +kim_error kim_selection_hints_get_application_name (kim_selection_hints in_selection_hints, + kim_string *out_application_name) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_selection_hints ) { err = param_error (1, "in_selection_hints", "NULL"); } if (!err && !out_application_name) { err = param_error (2, "out_application_name", "NULL"); } @@ -453,10 +453,10 @@ kim_error_t kim_selection_hints_get_application_name (kim_selection_hints_t in_ /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_set_explanation (kim_selection_hints_t io_selection_hints, - kim_string_t in_explanation) +kim_error kim_selection_hints_set_explanation (kim_selection_hints io_selection_hints, + kim_string in_explanation) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_selection_hints) { err = param_error (1, "io_selection_hints", "NULL"); } if (!err && !in_explanation ) { err = param_error (2, "in_explanation", "NULL"); } @@ -470,10 +470,10 @@ kim_error_t kim_selection_hints_set_explanation (kim_selection_hints_t io_select /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_get_explanation (kim_selection_hints_t in_selection_hints, - kim_string_t *out_explanation) +kim_error kim_selection_hints_get_explanation (kim_selection_hints in_selection_hints, + kim_string *out_explanation) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); } if (!err && !out_explanation ) { err = param_error (2, "out_explanation", "NULL"); } @@ -491,10 +491,10 @@ kim_error_t kim_selection_hints_get_explanation (kim_selection_hints_t in_selec /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_set_options (kim_selection_hints_t io_selection_hints, - kim_options_t in_options) +kim_error kim_selection_hints_set_options (kim_selection_hints io_selection_hints, + kim_options in_options) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_selection_hints) { err = param_error (1, "io_selection_hints", "NULL"); } if (!err && !in_options ) { err = param_error (2, "in_options", "NULL"); } @@ -508,10 +508,10 @@ kim_error_t kim_selection_hints_set_options (kim_selection_hints_t io_selection_ /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_get_options (kim_selection_hints_t in_selection_hints, - kim_options_t *out_options) +kim_error kim_selection_hints_get_options (kim_selection_hints in_selection_hints, + kim_options *out_options) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); } if (!err && !out_options ) { err = param_error (2, "out_options", "NULL"); } @@ -529,10 +529,10 @@ kim_error_t kim_selection_hints_get_options (kim_selection_hints_t in_selection /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_set_allow_user_interaction (kim_selection_hints_t io_selection_hints, - kim_boolean_t in_allow_user_interaction) +kim_error kim_selection_hints_set_allow_user_interaction (kim_selection_hints io_selection_hints, + kim_boolean in_allow_user_interaction) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_selection_hints ) { err = param_error (1, "io_selection_hints", "NULL"); } @@ -545,10 +545,10 @@ kim_error_t kim_selection_hints_set_allow_user_interaction (kim_selection_hints_ /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_get_allow_user_interaction (kim_selection_hints_t in_selection_hints, - kim_boolean_t *out_allow_user_interaction) +kim_error kim_selection_hints_get_allow_user_interaction (kim_selection_hints in_selection_hints, + kim_boolean *out_allow_user_interaction) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_selection_hints ) { err = param_error (1, "in_selection_hints", "NULL"); } if (!err && !out_allow_user_interaction) { err = param_error (2, "out_allow_user_interaction", "NULL"); } @@ -562,10 +562,10 @@ kim_error_t kim_selection_hints_get_allow_user_interaction (kim_selection_hints_ /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_set_remember_identity (kim_selection_hints_t io_selection_hints, - kim_boolean_t in_use_cached_results) +kim_error kim_selection_hints_set_remember_identity (kim_selection_hints io_selection_hints, + kim_boolean in_use_cached_results) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !io_selection_hints ) { err = param_error (1, "io_selection_hints", "NULL"); } @@ -578,10 +578,10 @@ kim_error_t kim_selection_hints_set_remember_identity (kim_selection_hints_t io_ /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_get_remember_identity (kim_selection_hints_t in_selection_hints, - kim_boolean_t *out_use_cached_results) +kim_error kim_selection_hints_get_remember_identity (kim_selection_hints in_selection_hints, + kim_boolean *out_use_cached_results) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_selection_hints ) { err = param_error (1, "in_selection_hints", "NULL"); } if (!err && !out_use_cached_results) { err = param_error (2, "out_use_cached_results", "NULL"); } @@ -595,12 +595,12 @@ kim_error_t kim_selection_hints_get_remember_identity (kim_selection_hints_t in /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_get_identity (kim_selection_hints_t in_selection_hints, - kim_identity_t *out_identity) +kim_error kim_selection_hints_get_identity (kim_selection_hints in_selection_hints, + kim_identity *out_identity) { - kim_error_t err = KIM_NO_ERROR; - kim_identity_t identity = NULL; - kim_ccache_t ccache = NULL; + kim_error err = KIM_NO_ERROR; + kim_identity identity = NULL; + kim_ccache ccache = NULL; if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); } if (!err && !out_identity ) { err = param_error (2, "out_identity", "NULL"); } @@ -626,10 +626,10 @@ kim_error_t kim_selection_hints_get_identity (kim_selection_hints_t in_selectio /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_remember_identity (kim_selection_hints_t in_selection_hints, - kim_identity_t in_identity) +kim_error kim_selection_hints_remember_identity (kim_selection_hints in_selection_hints, + kim_identity in_identity) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); } if (!err && !in_identity ) { err = param_error (2, "in_identity", "NULL"); } @@ -644,9 +644,9 @@ kim_error_t kim_selection_hints_remember_identity (kim_selection_hints_t in_sele /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_forget_identity (kim_selection_hints_t in_selection_hints) +kim_error kim_selection_hints_forget_identity (kim_selection_hints in_selection_hints) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); } @@ -659,14 +659,14 @@ kim_error_t kim_selection_hints_forget_identity (kim_selection_hints_t in_select /* ------------------------------------------------------------------------ */ -kim_error_t kim_selection_hints_get_preference_strings (kim_selection_hints_t in_selection_hints, - kim_selection_hints_preference_strings *io_preference_strings) +kim_error kim_selection_hints_get_preference_strings (kim_selection_hints in_selection_hints, + kim_selection_hints_preference_strings *io_preference_strings) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_selection_hints ) { err = param_error (1, "in_selection_hints", "NULL"); } if (!err && !io_preference_strings) { err = param_error (2, "io_preference_strings", "NULL"); } - + if (!err) { io_preference_strings->application_identifier = in_selection_hints->application_identifier; io_preference_strings->service_identity = in_selection_hints->service_identity; @@ -682,7 +682,7 @@ kim_error_t kim_selection_hints_get_preference_strings (kim_selection_hints_t /* ------------------------------------------------------------------------ */ -void kim_selection_hints_free (kim_selection_hints_t *io_selection_hints) +void kim_selection_hints_free (kim_selection_hints *io_selection_hints) { if (io_selection_hints && *io_selection_hints) { kim_string_free (&(*io_selection_hints)->application_identifier); diff --git a/src/kim/lib/kim_selection_hints_private.h b/src/kim/lib/kim_selection_hints_private.h index a975ff95f..fd056bf76 100644 --- a/src/kim/lib/kim_selection_hints_private.h +++ b/src/kim/lib/kim_selection_hints_private.h @@ -30,26 +30,26 @@ #include typedef struct kim_selection_hints_preference_strings { - kim_string_t application_identifier; - kim_string_t service_identity; - kim_string_t client_realm; - kim_string_t user; - kim_string_t service_realm; - kim_string_t service; - kim_string_t server; + kim_string application_identifier; + kim_string service_identity; + kim_string client_realm; + kim_string user; + kim_string service_realm; + kim_string service; + kim_string server; } kim_selection_hints_preference_strings; -kim_error_t kim_selection_hints_get_preference_strings (kim_selection_hints_t in_selection_hints, +kim_error kim_selection_hints_get_preference_strings (kim_selection_hints in_selection_hints, kim_selection_hints_preference_strings *io_preference_strings); -kim_error_t kim_os_selection_hints_lookup_identity (kim_selection_hints_t in_selection_hints, - kim_identity_t *out_identity); +kim_error kim_os_selection_hints_lookup_identity (kim_selection_hints in_selection_hints, + kim_identity *out_identity); -kim_error_t kim_os_selection_hints_remember_identity (kim_selection_hints_t in_selection_hints, - kim_identity_t in_identity); +kim_error kim_os_selection_hints_remember_identity (kim_selection_hints in_selection_hints, + kim_identity in_identity); -kim_error_t kim_os_selection_hints_forget_identity (kim_selection_hints_t in_selection_hints); +kim_error kim_os_selection_hints_forget_identity (kim_selection_hints in_selection_hints); #endif /* KIM_SELECTION_HINTS_PRIVATE_H */ diff --git a/src/kim/lib/kim_string.c b/src/kim/lib/kim_string.c index 941467b1e..eb9d9ac01 100644 --- a/src/kim/lib/kim_string.c +++ b/src/kim/lib/kim_string.c @@ -29,11 +29,11 @@ /* ------------------------------------------------------------------------ */ -static inline kim_error_t kim_string_allocate (kim_string_t *out_string, - kim_count_t in_length) +static inline kim_error kim_string_allocate (kim_string *out_string, + kim_count in_length) { - kim_error_t err = KIM_NO_ERROR; - kim_string_t string = NULL; + kim_error err = KIM_NO_ERROR; + kim_string string = NULL; if (!err && !out_string) { err = param_error (1, "out_string", "NULL"); } @@ -54,11 +54,11 @@ static inline kim_error_t kim_string_allocate (kim_string_t *out_string, /* ------------------------------------------------------------------------ */ -kim_error_t kim_string_create_from_format (kim_string_t *out_string, - kim_string_t in_format, - ...) +kim_error kim_string_create_from_format (kim_string *out_string, + kim_string in_format, + ...) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; va_list args; va_start (args, in_format); @@ -70,11 +70,11 @@ kim_error_t kim_string_create_from_format (kim_string_t *out_string, /* ------------------------------------------------------------------------ */ -kim_error_t kim_string_create_from_format_va_retcode (kim_string_t *out_string, - kim_string_t in_format, - va_list in_args) +kim_error kim_string_create_from_format_va_retcode (kim_string *out_string, + kim_string in_format, + va_list in_args) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; int count = vasprintf ((char **) out_string, in_format, in_args); if (count < 0) { err = os_error (ENOMEM); } @@ -84,12 +84,12 @@ kim_error_t kim_string_create_from_format_va_retcode (kim_string_t *out_string, /* ------------------------------------------------------------------------ */ -kim_error_t kim_string_create_from_format_va (kim_string_t *out_string, - kim_string_t in_format, - va_list in_args) +kim_error kim_string_create_from_format_va (kim_string *out_string, + kim_string in_format, + va_list in_args) { - kim_error_t err = KIM_NO_ERROR; - kim_string_t string = NULL; + kim_error err = KIM_NO_ERROR; + kim_string string = NULL; if (!err && !out_string) { err = param_error (1, "out_string", "NULL"); } if (!err && !in_format ) { err = param_error (2, "in_format", "NULL"); } @@ -110,12 +110,12 @@ kim_error_t kim_string_create_from_format_va (kim_string_t *out_string, /* ------------------------------------------------------------------------ */ -kim_error_t kim_string_create_from_buffer (kim_string_t *out_string, - const char *in_buffer, - kim_count_t in_length) +kim_error kim_string_create_from_buffer (kim_string *out_string, + const char *in_buffer, + kim_count in_length) { - kim_error_t err = KIM_NO_ERROR; - kim_string_t string = NULL; + kim_error err = KIM_NO_ERROR; + kim_string string = NULL; if (!err && !out_string) { err = param_error (1, "out_string", "NULL"); } if (!err && !in_buffer ) { err = param_error (2, "in_buffer", "NULL"); } @@ -137,15 +137,15 @@ kim_error_t kim_string_create_from_buffer (kim_string_t *out_string, /* ------------------------------------------------------------------------ */ -kim_error_t kim_string_copy (kim_string_t *out_string, - kim_string_t in_string) +kim_error kim_string_copy (kim_string *out_string, + kim_string in_string) { - kim_error_t err = KIM_NO_ERROR; - kim_string_t string = NULL; + kim_error err = KIM_NO_ERROR; + kim_string string = NULL; if (!err && !out_string) { err = param_error (1, "out_string", "NULL"); } if (!err && !in_string ) { err = param_error (2, "in_string", "NULL"); } - + if (!err) { err = kim_string_allocate (&string, strlen (in_string) + 1); } @@ -163,16 +163,16 @@ kim_error_t kim_string_copy (kim_string_t *out_string, /* ------------------------------------------------------------------------ */ -kim_error_t kim_string_compare (kim_string_t in_string, - kim_string_t in_compare_to_string, - kim_comparison_t *out_comparison) +kim_error kim_string_compare (kim_string in_string, + kim_string in_compare_to_string, + kim_comparison *out_comparison) { return kim_os_string_compare (in_string, in_compare_to_string, out_comparison); } /* ------------------------------------------------------------------------ */ -void kim_string_free (kim_string_t *io_string) +void kim_string_free (kim_string *io_string) { if (io_string && *io_string) { free ((char *) *io_string); diff --git a/src/kim/lib/kim_string_private.h b/src/kim/lib/kim_string_private.h index 72204c2ed..7f4913bc2 100644 --- a/src/kim/lib/kim_string_private.h +++ b/src/kim/lib/kim_string_private.h @@ -30,31 +30,31 @@ #include -kim_error_t kim_string_create_from_format (kim_string_t *out_string, - kim_string_t in_format, +kim_error kim_string_create_from_format (kim_string *out_string, + kim_string in_format, ...); -kim_error_t kim_string_create_from_format_va_retcode (kim_string_t *out_string, - kim_string_t in_format, +kim_error kim_string_create_from_format_va_retcode (kim_string *out_string, + kim_string in_format, va_list in_args); -kim_error_t kim_string_create_from_format_va (kim_string_t *out_string, - kim_string_t in_format, +kim_error kim_string_create_from_format_va (kim_string *out_string, + kim_string in_format, va_list in_args); -kim_error_t kim_string_create_from_buffer (kim_string_t *out_string, +kim_error kim_string_create_from_buffer (kim_string *out_string, const char *in_buffer, - kim_count_t in_length); + kim_count in_length); -kim_error_t kim_string_prepend (kim_string_t *io_string, - kim_string_t in_prefix); +kim_error kim_string_prepend (kim_string *io_string, + kim_string in_prefix); -kim_error_t kim_string_append (kim_string_t *io_string, - kim_string_t in_suffix); +kim_error kim_string_append (kim_string *io_string, + kim_string in_suffix); /* OS-specific because it should use UTF8-safe sorting where possible */ -kim_error_t kim_os_string_compare (kim_string_t in_string, - kim_string_t in_compare_to_string, - kim_comparison_t *out_comparison); +kim_error kim_os_string_compare (kim_string in_string, + kim_string in_compare_to_string, + kim_comparison *out_comparison); #endif /* KIM_STRING_PRIVATE_H */ diff --git a/src/kim/lib/mac/kim_os_identity.c b/src/kim/lib/mac/kim_os_identity.c index ed351a55f..02f953d6c 100644 --- a/src/kim/lib/mac/kim_os_identity.c +++ b/src/kim/lib/mac/kim_os_identity.c @@ -31,9 +31,9 @@ /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_identity_create_for_username (kim_identity_t *out_identity) +kim_error kim_os_identity_create_for_username (kim_identity *out_identity) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !out_identity) { err = param_error (1, "out_identity", "NULL"); } diff --git a/src/kim/lib/mac/kim_os_library.c b/src/kim/lib/mac/kim_os_library.c index 733f5c46c..cbe3c0d55 100644 --- a/src/kim/lib/mac/kim_os_library.c +++ b/src/kim/lib/mac/kim_os_library.c @@ -31,14 +31,14 @@ /* ------------------------------------------------------------------------ */ -void kim_os_library_debug_print (kim_string_t in_string) +void kim_os_library_debug_print (kim_string in_string) { dprintf (in_string); } /* ------------------------------------------------------------------------ */ -kim_boolean_t kim_os_library_caller_is_server (void) +kim_boolean kim_os_library_caller_is_server (void) { CFBundleRef mainBundle = CFBundleGetMainBundle (); if (mainBundle) { diff --git a/src/kim/lib/mac/kim_os_preferences.c b/src/kim/lib/mac/kim_os_preferences.c index 3cd2ab8e2..9bc5c8575 100644 --- a/src/kim/lib/mac/kim_os_preferences.c +++ b/src/kim/lib/mac/kim_os_preferences.c @@ -35,11 +35,11 @@ /* ------------------------------------------------------------------------ */ -static kim_error_t kim_os_preferences_cfstring_for_key (kim_preference_key_t in_key, +static kim_error kim_os_preferences_cfstring_for_key (kim_preference_key_t in_key, CFStringRef *out_kim_string_key, CFStringRef *out_kll_string_key) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !out_kim_string_key) { err = param_error (2, "out_kim_string_key", "NULL"); } if (!err && !out_kll_string_key) { err = param_error (3, "out_kll_string_key", "NULL"); } @@ -111,12 +111,12 @@ static kim_error_t kim_os_preferences_cfstring_for_key (kim_preference_key_t in_ /* ------------------------------------------------------------------------ */ -static kim_error_t kim_os_preferences_get_value (kim_preference_key_t in_key, +static kim_error kim_os_preferences_get_value (kim_preference_key_t in_key, CFTypeID in_type, CFPropertyListRef *out_value) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFPropertyListRef value = NULL; CFStringRef users[] = { kCFPreferencesCurrentUser, kCFPreferencesAnyUser, NULL }; CFStringRef files[] = { KIM_PREFERENCES_FILE, KLL_PREFERENCES_FILE, NULL }; @@ -131,7 +131,7 @@ static kim_error_t kim_os_preferences_get_value (kim_preference_key_t in_key, } if (!err) { - kim_count_t u, f, h; + kim_count u, f, h; if (!kim_library_allow_home_directory_access()) { users[0] = kCFPreferencesAnyUser; @@ -164,10 +164,10 @@ static kim_error_t kim_os_preferences_get_value (kim_preference_key_t in_key, /* ------------------------------------------------------------------------ */ -static kim_error_t kim_os_preferences_set_value (kim_preference_key_t in_key, +static kim_error kim_os_preferences_set_value (kim_preference_key_t in_key, CFPropertyListRef in_value) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFStringRef kim_key = NULL; CFStringRef kll_key = NULL; @@ -178,7 +178,7 @@ static kim_error_t kim_os_preferences_set_value (kim_preference_key_t in_key, } if (!err) { - kim_boolean_t homedir_ok = kim_library_allow_home_directory_access(); + kim_boolean homedir_ok = kim_library_allow_home_directory_access(); CFStringRef user = homedir_ok ? kCFPreferencesCurrentUser : kCFPreferencesAnyUser; CFStringRef host = homedir_ok ? kCFPreferencesAnyHost : kCFPreferencesCurrentHost; @@ -195,12 +195,12 @@ static kim_error_t kim_os_preferences_set_value (kim_preference_key_t in_key, /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_preferences_get_identity_for_key (kim_preference_key_t in_key, - kim_identity_t in_hardcoded_default, - kim_identity_t *out_identity) +kim_error kim_os_preferences_get_identity_for_key (kim_preference_key_t in_key, + kim_identity in_hardcoded_default, + kim_identity *out_identity) { - kim_error_t err = KIM_NO_ERROR; - kim_string_t string = NULL; + kim_error err = KIM_NO_ERROR; + kim_string string = NULL; CFStringRef value = NULL; if (!err && !out_identity) { err = param_error (2, "out_identity", "NULL"); } @@ -235,12 +235,12 @@ kim_error_t kim_os_preferences_get_identity_for_key (kim_preference_key_t in_ke /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_preferences_set_identity_for_key (kim_preference_key_t in_key, - kim_identity_t in_identity) +kim_error kim_os_preferences_set_identity_for_key (kim_preference_key_t in_key, + kim_identity in_identity) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFStringRef value = NULL; - kim_string_t string = NULL; + kim_string string = NULL; /* in_identity can be KIM_IDENTITY_ANY */ @@ -269,11 +269,11 @@ kim_error_t kim_os_preferences_set_identity_for_key (kim_preference_key_t in_key /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_preferences_get_favorite_identities_for_key (kim_preference_key_t in_key, - kim_favorite_identities_t in_hardcoded_default, - kim_favorite_identities_t *out_favorite_identities) +kim_error kim_os_preferences_get_favorite_identities_for_key (kim_preference_key_t in_key, + kim_favorite_identities in_hardcoded_default, + kim_favorite_identities *out_favorite_identities) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFArrayRef value = NULL; if (!err && !out_favorite_identities) { err = param_error (2, "out_favorite_identities", "NULL"); } @@ -288,7 +288,7 @@ kim_error_t kim_os_preferences_get_favorite_identities_for_key (kim_preference_k err = kim_favorite_identities_copy (out_favorite_identities, in_hardcoded_default); } else { - kim_favorite_identities_t favorite_identities = NULL; + kim_favorite_identities favorite_identities = NULL; CFIndex count = CFArrayGetCount (value); CFIndex i; @@ -296,8 +296,8 @@ kim_error_t kim_os_preferences_get_favorite_identities_for_key (kim_preference_k for (i = 0; !err && i < count; i++) { CFStringRef cfstring = NULL; - kim_string_t string = NULL; - kim_identity_t identity = NULL; + kim_string string = NULL; + kim_identity identity = NULL; cfstring = (CFStringRef) CFArrayGetValueAtIndex (value, i); if (!cfstring || CFGetTypeID (cfstring) != CFStringGetTypeID ()) { @@ -336,11 +336,11 @@ kim_error_t kim_os_preferences_get_favorite_identities_for_key (kim_preference_k /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_preferences_set_favorite_identities_for_key (kim_preference_key_t in_key, - kim_favorite_identities_t in_favorite_identities) +kim_error kim_os_preferences_set_favorite_identities_for_key (kim_preference_key_t in_key, + kim_favorite_identities in_favorite_identities) { - kim_error_t err = KIM_NO_ERROR; - kim_count_t count = 0; + kim_error err = KIM_NO_ERROR; + kim_count count = 0; CFMutableArrayRef value = NULL; if (!err && !in_favorite_identities) { err = param_error (2, "in_favorite_identities", "NULL"); } @@ -355,11 +355,11 @@ kim_error_t kim_os_preferences_set_favorite_identities_for_key (kim_preference_k } if (!err) { - kim_count_t i; + kim_count i; for (i = 0; !err && i < count; i++) { - kim_identity_t identity = NULL; - kim_string_t string = NULL; + kim_identity identity = NULL; + kim_string string = NULL; CFStringRef cfstring = NULL; err = kim_favorite_identities_get_identity_at_index (in_favorite_identities, i, &identity); @@ -393,11 +393,11 @@ kim_error_t kim_os_preferences_set_favorite_identities_for_key (kim_preference_k /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_preferences_get_time_for_key (kim_preference_key_t in_key, - kim_time_t in_hardcoded_default, - kim_time_t *out_time) +kim_error kim_os_preferences_get_time_for_key (kim_preference_key_t in_key, + kim_time in_hardcoded_default, + kim_time *out_time) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFNumberRef value = NULL; if (!err && !out_time) { err = param_error (2, "out_time", "NULL"); } @@ -427,10 +427,10 @@ kim_error_t kim_os_preferences_get_time_for_key (kim_preference_key_t in_key, /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_preferences_set_time_for_key (kim_preference_key_t in_key, - kim_time_t in_time) +kim_error kim_os_preferences_set_time_for_key (kim_preference_key_t in_key, + kim_time in_time) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFNumberRef value = NULL; SInt32 number = (SInt32) in_time; @@ -450,11 +450,11 @@ kim_error_t kim_os_preferences_set_time_for_key (kim_preference_key_t in_key, /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_preferences_get_lifetime_for_key (kim_preference_key_t in_key, - kim_lifetime_t in_hardcoded_default, - kim_lifetime_t *out_lifetime) +kim_error kim_os_preferences_get_lifetime_for_key (kim_preference_key_t in_key, + kim_lifetime in_hardcoded_default, + kim_lifetime *out_lifetime) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFNumberRef value = NULL; if (!err && !out_lifetime) { err = param_error (2, "out_lifetime", "NULL"); } @@ -484,10 +484,10 @@ kim_error_t kim_os_preferences_get_lifetime_for_key (kim_preference_key_t in_ke /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_preferences_set_lifetime_for_key (kim_preference_key_t in_key, - kim_lifetime_t in_lifetime) +kim_error kim_os_preferences_set_lifetime_for_key (kim_preference_key_t in_key, + kim_lifetime in_lifetime) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFNumberRef value = NULL; SInt32 number = (SInt32) in_lifetime; @@ -507,11 +507,11 @@ kim_error_t kim_os_preferences_set_lifetime_for_key (kim_preference_key_t in_key /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_preferences_get_boolean_for_key (kim_preference_key_t in_key, - kim_boolean_t in_hardcoded_default, - kim_boolean_t *out_boolean) +kim_error kim_os_preferences_get_boolean_for_key (kim_preference_key_t in_key, + kim_boolean in_hardcoded_default, + kim_boolean *out_boolean) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFBooleanRef value = NULL; if (!err && !out_boolean) { err = param_error (2, "out_boolean", "NULL"); } @@ -536,10 +536,10 @@ kim_error_t kim_os_preferences_get_boolean_for_key (kim_preference_key_t in_key /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_preferences_set_boolean_for_key (kim_preference_key_t in_key, - kim_boolean_t in_boolean) +kim_error kim_os_preferences_set_boolean_for_key (kim_preference_key_t in_key, + kim_boolean in_boolean) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFBooleanRef value = in_boolean ? kCFBooleanTrue : kCFBooleanFalse; if (!err) { diff --git a/src/kim/lib/mac/kim_os_private.h b/src/kim/lib/mac/kim_os_private.h index bebf98732..07cdf91f0 100644 --- a/src/kim/lib/mac/kim_os_private.h +++ b/src/kim/lib/mac/kim_os_private.h @@ -36,19 +36,19 @@ CFStringEncoding kim_os_string_get_encoding (void); CFStringRef kim_os_string_get_cfstring_for_key_and_dictionary (CFStringRef in_key, CFBundleRef in_bundle); -CFStringRef kim_os_string_get_cfstring_for_key (kim_string_t in_key_string); +CFStringRef kim_os_string_get_cfstring_for_key (kim_string in_key_string); -kim_error_t kim_os_string_create_from_cfstring (kim_string_t *out_string, +kim_error kim_os_string_create_from_cfstring (kim_string *out_string, CFStringRef in_cfstring); -kim_error_t kim_os_string_create_for_key (kim_string_t *out_string, - kim_string_t in_key_string); +kim_error kim_os_string_create_for_key (kim_string *out_string, + kim_string in_key_string); -kim_error_t kim_os_string_get_cfstring (kim_string_t in_string, +kim_error kim_os_string_get_cfstring (kim_string in_string, CFStringRef *out_cfstring); -kim_error_t kim_os_string_compare_to_cfstring (kim_string_t in_string, +kim_error kim_os_string_compare_to_cfstring (kim_string in_string, CFStringRef in_compare_to_cfstring, - kim_comparison_t *out_comparison); + kim_comparison *out_comparison); #endif /* KIM_PRIVATE_H */ diff --git a/src/kim/lib/mac/kim_os_selection_hints.c b/src/kim/lib/mac/kim_os_selection_hints.c index e19ac777c..0151324a5 100644 --- a/src/kim/lib/mac/kim_os_selection_hints.c +++ b/src/kim/lib/mac/kim_os_selection_hints.c @@ -45,9 +45,9 @@ /* ------------------------------------------------------------------------ */ -static kim_error_t kim_os_selection_hints_get_selection_hints_array (CFArrayRef *out_selection_hints_array) +static kim_error kim_os_selection_hints_get_selection_hints_array (CFArrayRef *out_selection_hints_array) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFPropertyListRef value = NULL; CFStringRef users[] = { kCFPreferencesCurrentUser, kCFPreferencesAnyUser, NULL }; CFStringRef hosts[] = { kCFPreferencesCurrentHost, kCFPreferencesAnyHost, NULL }; @@ -55,7 +55,7 @@ static kim_error_t kim_os_selection_hints_get_selection_hints_array (CFArrayRef if (!err && !out_selection_hints_array) { err = param_error (1, "out_selection_hints_array", "NULL"); } if (!err) { - kim_count_t u, h; + kim_count u, h; if (!kim_library_allow_home_directory_access()) { users[0] = kCFPreferencesAnyUser; @@ -87,14 +87,14 @@ static kim_error_t kim_os_selection_hints_get_selection_hints_array (CFArrayRef /* ------------------------------------------------------------------------ */ -static kim_error_t kim_os_selection_hints_set_selection_hints_array (CFArrayRef in_selection_hints_array) +static kim_error kim_os_selection_hints_set_selection_hints_array (CFArrayRef in_selection_hints_array) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; if (!err && !in_selection_hints_array) { err = param_error (1, "in_selection_hints_array", "NULL"); } if (!err) { - kim_boolean_t homedir_ok = kim_library_allow_home_directory_access(); + kim_boolean homedir_ok = kim_library_allow_home_directory_access(); CFStringRef user = homedir_ok ? kCFPreferencesCurrentUser : kCFPreferencesAnyUser; CFStringRef host = homedir_ok ? kCFPreferencesAnyHost : kCFPreferencesCurrentHost; @@ -112,13 +112,13 @@ static kim_error_t kim_os_selection_hints_set_selection_hints_array (CFArrayRef /* ------------------------------------------------------------------------ */ -static kim_error_t kim_os_selection_hints_create_dictionary (kim_selection_hints_t in_selection_hints, - kim_identity_t in_identity, +static kim_error kim_os_selection_hints_create_dictionary (kim_selection_hints in_selection_hints, + kim_identity in_identity, CFDictionaryRef *out_hints_dictionary) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; kim_selection_hints_preference_strings preference_strings = { NULL, NULL, NULL, NULL, NULL, NULL, NULL }; - kim_string_t identity_string = NULL; + kim_string identity_string = NULL; CFStringRef keys[KIM_MAX_HINTS] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; CFStringRef values[KIM_MAX_HINTS] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; CFIndex i = 0; @@ -192,19 +192,19 @@ static kim_error_t kim_os_selection_hints_create_dictionary (kim_selection_hints /* ------------------------------------------------------------------------ */ -static kim_boolean_t kim_os_selection_hints_compare_hint (kim_string_t in_string, +static kim_boolean kim_os_selection_hints_compare_hint (kim_string in_string, CFStringRef in_value) { - kim_boolean_t equal = 0; + kim_boolean equal = 0; if (!in_string && !in_value) { equal = 1; } else if (in_string && in_value) { if (CFGetTypeID (in_value) == CFStringGetTypeID ()) { - kim_comparison_t comparison; + kim_comparison comparison; - kim_error_t err = kim_os_string_compare_to_cfstring (in_string, in_value, + kim_error err = kim_os_string_compare_to_cfstring (in_string, in_value, &comparison); if (!err && kim_comparison_is_equal_to (comparison)) { @@ -222,13 +222,13 @@ static kim_boolean_t kim_os_selection_hints_compare_hint (kim_string_t in_string /* ------------------------------------------------------------------------ */ -static kim_error_t kim_os_selection_hints_compare_to_dictionary (kim_selection_hints_t in_selection_hints, +static kim_error kim_os_selection_hints_compare_to_dictionary (kim_selection_hints in_selection_hints, CFDictionaryRef in_hints_dictionary, - kim_boolean_t *out_hints_equal) + kim_boolean *out_hints_equal) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; kim_selection_hints_preference_strings preference_strings = { NULL, NULL, NULL, NULL, NULL, NULL, NULL }; - kim_boolean_t hints_equal = 1; + kim_boolean hints_equal = 1; if (!err && !in_selection_hints ) { err = param_error (1, "in_selection_hints", "NULL"); } if (!err && !in_hints_dictionary) { err = param_error (2, "in_hints_dictionary", "NULL"); } @@ -289,12 +289,12 @@ static kim_error_t kim_os_selection_hints_compare_to_dictionary (kim_selection_h /* ------------------------------------------------------------------------ */ -static kim_error_t kim_os_selection_hints_get_dictionary_identity (CFDictionaryRef in_dictionary, - kim_identity_t *out_identity) +static kim_error kim_os_selection_hints_get_dictionary_identity (CFDictionaryRef in_dictionary, + kim_identity *out_identity) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFStringRef identity_cfstr = NULL; - kim_string_t identity_string = NULL; + kim_string identity_string = NULL; identity_cfstr = CFDictionaryGetValue (in_dictionary, KIM_IDENTITY_HINT); if (!identity_cfstr || CFGetTypeID (identity_cfstr) != CFStringGetTypeID ()) { @@ -319,14 +319,14 @@ static kim_error_t kim_os_selection_hints_get_dictionary_identity (CFDictionaryR /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_selection_hints_lookup_identity (kim_selection_hints_t in_selection_hints, - kim_identity_t *out_identity) +kim_error kim_os_selection_hints_lookup_identity (kim_selection_hints in_selection_hints, + kim_identity *out_identity) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFArrayRef hints_array = NULL; CFIndex i = 0; CFIndex count = 0; - kim_boolean_t found = 0; + kim_boolean found = 0; CFDictionaryRef found_dictionary = NULL; if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); } @@ -374,16 +374,16 @@ kim_error_t kim_os_selection_hints_lookup_identity (kim_selection_hints_t in_se /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_selection_hints_remember_identity (kim_selection_hints_t in_selection_hints, - kim_identity_t in_identity) +kim_error kim_os_selection_hints_remember_identity (kim_selection_hints in_selection_hints, + kim_identity in_identity) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFArrayRef old_hints_array = NULL; CFMutableArrayRef new_hints_array = NULL; CFIndex count = 0; CFIndex i = 0; - kim_boolean_t hint_already_exists = 0; - kim_boolean_t hints_array_changed = 0; + kim_boolean hint_already_exists = 0; + kim_boolean hints_array_changed = 0; if (!err && !in_selection_hints) { err = param_error (1, "in_selection_hints", "NULL"); } if (!err && !in_identity ) { err = param_error (2, "in_identity", "NULL"); } @@ -409,8 +409,8 @@ kim_error_t kim_os_selection_hints_remember_identity (kim_selection_hints_t in_s for (i = 0; !err && i < count; i++) { CFDictionaryRef dictionary = NULL; - kim_identity_t identity = NULL; - kim_boolean_t hints_equal = 0; + kim_identity identity = NULL; + kim_boolean hints_equal = 0; dictionary = CFArrayGetValueAtIndex (new_hints_array, i); if (!dictionary) { err = os_error (ENOMEM); } @@ -427,7 +427,7 @@ kim_error_t kim_os_selection_hints_remember_identity (kim_selection_hints_t in_s } if (!err && hints_equal) { - kim_comparison_t comparison; + kim_comparison comparison; err = kim_os_selection_hints_get_dictionary_identity (dictionary, &identity); @@ -478,9 +478,9 @@ kim_error_t kim_os_selection_hints_remember_identity (kim_selection_hints_t in_s /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_selection_hints_forget_identity (kim_selection_hints_t in_selection_hints) +kim_error kim_os_selection_hints_forget_identity (kim_selection_hints in_selection_hints) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFArrayRef old_hints_array = NULL; CFMutableArrayRef new_hints_array = NULL; CFIndex count = 0; @@ -504,7 +504,7 @@ kim_error_t kim_os_selection_hints_forget_identity (kim_selection_hints_t in_sel for (i = 0; !err && i < count; i++) { CFDictionaryRef dictionary = NULL; - kim_boolean_t hints_equal = 0; + kim_boolean hints_equal = 0; dictionary = CFArrayGetValueAtIndex (new_hints_array, i); if (!dictionary) { err = os_error (ENOMEM); } diff --git a/src/kim/lib/mac/kim_os_string.c b/src/kim/lib/mac/kim_os_string.c index a4c5699e6..4ccb2a821 100644 --- a/src/kim/lib/mac/kim_os_string.c +++ b/src/kim/lib/mac/kim_os_string.c @@ -83,7 +83,7 @@ CFStringRef kim_os_string_get_cfstring_for_key_and_dictionary (CFStringRef in_ke /* ------------------------------------------------------------------------ */ /* WARNING: DO NOT CALL check_error() -- it is called by error_message()!! */ -CFStringRef kim_os_string_get_cfstring_for_key (kim_string_t in_key_string) +CFStringRef kim_os_string_get_cfstring_for_key (kim_string in_key_string) { CFStringRef key = NULL; CFStringRef value = NULL; @@ -121,11 +121,11 @@ CFStringRef kim_os_string_get_cfstring_for_key (kim_string_t in_key_string) /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_string_create_from_cfstring (kim_string_t *out_string, +kim_error kim_os_string_create_from_cfstring (kim_string *out_string, CFStringRef in_cfstring) { - kim_error_t err = KIM_NO_ERROR; - kim_string_t string = NULL; + kim_error err = KIM_NO_ERROR; + kim_string string = NULL; CFStringEncoding encoding = kim_os_string_get_encoding (); CFIndex length = 0; @@ -157,10 +157,10 @@ kim_error_t kim_os_string_create_from_cfstring (kim_string_t *out_string, /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_string_create_for_key (kim_string_t *out_string, - kim_string_t in_key_string) +kim_error kim_os_string_create_for_key (kim_string *out_string, + kim_string in_key_string) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFStringRef value = NULL; if (!err && !out_string ) { err = param_error (1, "out_string", "NULL"); } @@ -181,10 +181,10 @@ kim_error_t kim_os_string_create_for_key (kim_string_t *out_string, /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_string_get_cfstring (kim_string_t in_string, +kim_error kim_os_string_get_cfstring (kim_string in_string, CFStringRef *out_cfstring) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFStringRef cfstring = NULL; if (!err && !in_string ) { err = param_error (1, "in_string", "NULL"); } @@ -207,11 +207,11 @@ kim_error_t kim_os_string_get_cfstring (kim_string_t in_string, /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_string_compare (kim_string_t in_string, - kim_string_t in_compare_to_string, - kim_comparison_t *out_comparison) +kim_error kim_os_string_compare (kim_string in_string, + kim_string in_compare_to_string, + kim_comparison *out_comparison) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFStringRef cfstring = NULL; CFStringRef compare_to_cfstring = NULL; @@ -240,11 +240,11 @@ kim_error_t kim_os_string_compare (kim_string_t in_string, /* ------------------------------------------------------------------------ */ -kim_error_t kim_os_string_compare_to_cfstring (kim_string_t in_string, +kim_error kim_os_string_compare_to_cfstring (kim_string in_string, CFStringRef in_compare_to_cfstring, - kim_comparison_t *out_comparison) + kim_comparison *out_comparison) { - kim_error_t err = KIM_NO_ERROR; + kim_error err = KIM_NO_ERROR; CFStringRef cfstring = NULL; if (!err && !in_string ) { err = param_error (1, "in_string", "NULL"); } diff --git a/src/kim/test/test_kim_common.c b/src/kim/test/test_kim_common.c index 1e3b9673e..75b7116cc 100644 --- a/src/kim/test/test_kim_common.c +++ b/src/kim/test/test_kim_common.c @@ -92,7 +92,7 @@ void end_test (kim_test_state_t in_state) void fail_if_error (kim_test_state_t in_state, const char *in_function, - kim_error_t in_err, + kim_error in_err, const char *in_format, ...) { @@ -118,7 +118,7 @@ void fail_if_error (kim_test_state_t in_state, void fail_if_error_code (kim_test_state_t in_state, const char *in_function, - kim_error_code_t in_code, + kim_error_code in_code, const char *in_format, ...) { diff --git a/src/kim/test/test_kim_common.h b/src/kim/test/test_kim_common.h index 161224239..bb85cb18c 100644 --- a/src/kim/test/test_kim_common.h +++ b/src/kim/test/test_kim_common.h @@ -49,7 +49,7 @@ void end_test (kim_test_state_t in_state); void fail_if_error (kim_test_state_t in_state, const char *in_function, - kim_error_t in_err, + kim_error in_err, const char *in_format, ...) #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) @@ -59,7 +59,7 @@ __attribute__ ((__format__ (__printf__, 4, 5))) void fail_if_error_code (kim_test_state_t in_state, const char *in_function, - kim_error_code_t in_code, + kim_error_code in_code, const char *in_format, ...) #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) diff --git a/src/kim/test/test_kim_identity.c b/src/kim/test/test_kim_identity.c index be97726a7..5a0c63fa6 100644 --- a/src/kim/test/test_kim_identity.c +++ b/src/kim/test/test_kim_identity.c @@ -29,9 +29,9 @@ typedef struct test_identity_d { const char *string; const char *display_string; - kim_boolean_t is_tgt_service; + kim_boolean is_tgt_service; const char *realm; - kim_count_t component_count; + kim_count component_count; const char *components[5]; } test_identity_t; @@ -61,17 +61,17 @@ test_identity_t test_identities[] = { void test_kim_identity_create_from_krb5_principal (kim_test_state_t state) { - kim_count_t i = 0; + kim_count i = 0; start_test (state, "kim_identity_create_from_krb5_principal"); for (i = 0; test_identities[i].string; i++) { krb5_error_code code = 0; - kim_error_t err = NULL; + kim_error err = NULL; krb5_context context = NULL; krb5_principal principal = NULL; - kim_identity_t identity = NULL; - kim_string_t string = NULL; + kim_identity identity = NULL; + kim_string string = NULL; printf ("."); @@ -122,14 +122,14 @@ void test_kim_identity_create_from_krb5_principal (kim_test_state_t state) void test_kim_identity_create_from_string (kim_test_state_t state) { - kim_count_t i = 0; + kim_count i = 0; start_test (state, "kim_identity_create_from_string"); for (i = 0; test_identities[i].string; i++) { - kim_error_t err = NULL; - kim_identity_t identity = NULL; - kim_string_t string = NULL; + kim_error err = NULL; + kim_identity identity = NULL; + kim_string string = NULL; printf ("."); @@ -167,15 +167,15 @@ void test_kim_identity_create_from_string (kim_test_state_t state) void test_kim_identity_copy (kim_test_state_t state) { - kim_count_t i = 0; + kim_count i = 0; start_test (state, "kim_identity_copy"); for (i = 0; test_identities[i].string; i++) { - kim_error_t err = NULL; - kim_identity_t identity = NULL; - kim_identity_t identity_copy = NULL; - kim_string_t string = NULL; + kim_error err = NULL; + kim_identity identity = NULL; + kim_identity identity_copy = NULL; + kim_string string = NULL; printf ("."); @@ -219,13 +219,13 @@ void test_kim_identity_copy (kim_test_state_t state) void test_kim_identity_compare (kim_test_state_t state) { - kim_count_t i, j = 0; + kim_count i, j = 0; start_test (state, "kim_identity_create_from_string"); for (i = 0; test_identities[i].string; i++) { - kim_error_t err = NULL; - kim_identity_t identity = NULL; + kim_error err = NULL; + kim_identity identity = NULL; printf ("."); @@ -235,8 +235,8 @@ void test_kim_identity_compare (kim_test_state_t state) test_identities[i].string); for (j = 0; !err && test_identities[j].string; j++) { - kim_identity_t compare_to_identity = NULL; - kim_comparison_t comparison = 0; + kim_identity compare_to_identity = NULL; + kim_comparison comparison = 0; err = kim_identity_create_from_string (&compare_to_identity, test_identities[j].string); fail_if_error (state, "kim_identity_create_from_string", err, @@ -277,14 +277,14 @@ void test_kim_identity_compare (kim_test_state_t state) void test_kim_identity_get_display_string (kim_test_state_t state) { - kim_count_t i = 0; + kim_count i = 0; start_test (state, "kim_identity_get_display_string"); for (i = 0; test_identities[i].string; i++) { - kim_error_t err = NULL; - kim_identity_t identity = NULL; - kim_string_t string = NULL; + kim_error err = NULL; + kim_identity identity = NULL; + kim_string string = NULL; printf ("."); @@ -321,14 +321,14 @@ void test_kim_identity_get_display_string (kim_test_state_t state) void test_kim_identity_get_realm (kim_test_state_t state) { - kim_count_t i = 0; + kim_count i = 0; start_test (state, "kim_identity_get_realm"); for (i = 0; test_identities[i].string; i++) { - kim_error_t err = NULL; - kim_identity_t identity = NULL; - kim_string_t realm = NULL; + kim_error err = NULL; + kim_identity identity = NULL; + kim_string realm = NULL; printf ("."); @@ -364,14 +364,14 @@ void test_kim_identity_get_realm (kim_test_state_t state) void test_kim_identity_get_number_of_components (kim_test_state_t state) { - kim_count_t i = 0; + kim_count i = 0; start_test (state, "kim_identity_get_number_of_components"); for (i = 0; test_identities[i].string; i++) { - kim_error_t err = NULL; - kim_identity_t identity = NULL; - kim_count_t count = 0; + kim_error err = NULL; + kim_identity identity = NULL; + kim_count count = 0; printf ("."); @@ -407,14 +407,14 @@ void test_kim_identity_get_number_of_components (kim_test_state_t state) void test_kim_identity_get_component_at_index (kim_test_state_t state) { - kim_count_t i = 0; + kim_count i = 0; start_test (state, "kim_identity_get_component_at_index"); for (i = 0; test_identities[i].string; i++) { - kim_error_t err = NULL; - kim_identity_t identity = NULL; - kim_count_t c = 0; + kim_error err = NULL; + kim_identity identity = NULL; + kim_count c = 0; printf ("."); @@ -426,7 +426,7 @@ void test_kim_identity_get_component_at_index (kim_test_state_t state) } for (c = 0; !err && c < test_identities[i].component_count; c++) { - kim_string_t component = NULL; + kim_string component = NULL; err = kim_identity_get_component_at_index (identity, c, &component); fail_if_error (state, "kim_identity_get_component_at_index", err, @@ -455,17 +455,17 @@ void test_kim_identity_get_component_at_index (kim_test_state_t state) void test_kim_identity_get_krb5_principal (kim_test_state_t state) { - kim_count_t i = 0; + kim_count i = 0; start_test (state, "kim_identity_get_krb5_principal"); for (i = 0; test_identities[i].string; i++) { krb5_error_code code = 0; - kim_error_t err = NULL; + kim_error err = NULL; krb5_context context = NULL; krb5_principal principal = NULL; krb5_principal identity_principal = NULL; - kim_identity_t identity = NULL; + kim_identity identity = NULL; printf ("."); @@ -518,12 +518,12 @@ void test_kim_identity_get_krb5_principal (kim_test_state_t state) /* void test_kim_identity_is_tgt_service (kim_test_state_t state) { - kim_count_t i = 0; + kim_count i = 0; start_test (state, "kim_identity_is_tgt_service"); for (i = 0; test_identities[i].string; i++) { - kim_error_t err = NULL; + kim_error err = NULL; kim_identity_t identity = NULL; kim_boolean_t is_tgt_service = 0; diff --git a/src/kim/test/test_kim_preferences.c b/src/kim/test/test_kim_preferences.c index 6cf0ba76d..7c7637ef6 100644 --- a/src/kim/test/test_kim_preferences.c +++ b/src/kim/test/test_kim_preferences.c @@ -34,8 +34,8 @@ void test_kim_preferences_create (kim_test_state_t state) start_test (state, "kim_preferences_create"); { - kim_error_t err = NULL; - kim_preferences_t prefs = NULL; + kim_error err = NULL; + kim_preferences prefs = NULL; err = kim_preferences_create (&prefs); fail_if_error (state, "kim_preferences_create", err, @@ -56,9 +56,9 @@ void test_kim_preferences_copy (kim_test_state_t state) start_test (state, "test_kim_preferences_copy"); { - kim_error_t err = NULL; - kim_preferences_t prefs = NULL; - kim_preferences_t prefs_copy = NULL; + kim_error err = NULL; + kim_preferences prefs = NULL; + kim_preferences prefs_copy = NULL; err = kim_preferences_create (&prefs); fail_if_error (state, "kim_preferences_create", err, @@ -86,11 +86,11 @@ void test_kim_preferences_set_options (kim_test_state_t state) start_test (state, "kim_preferences_set_options"); { - kim_error_t err = NULL; - kim_preferences_t prefs = NULL; - kim_options_t old_options = NULL; - kim_options_t new_options = NULL; - kim_options_t verify_options = NULL; + kim_error err = NULL; + kim_preferences prefs = NULL; + kim_options old_options = NULL; + kim_options new_options = NULL; + kim_options verify_options = NULL; const char *custom_data = "Some custom data"; const char *verify_custom_data = NULL; @@ -163,9 +163,9 @@ void test_kim_preferences_set_remember_options (kim_test_state_t state) start_test (state, "kim_preferences_set_remember_options"); { - kim_error_t err = NULL; - kim_preferences_t prefs = NULL; - kim_boolean_t remember_options = FALSE; + kim_error err = NULL; + kim_preferences prefs = NULL; + kim_boolean remember_options = FALSE; err = kim_preferences_create (&prefs); fail_if_error (state, "kim_preferences_create", err, @@ -220,13 +220,13 @@ void test_kim_preferences_set_client_identity (kim_test_state_t state) start_test (state, "kim_preferences_set_client_identity"); { - kim_error_t err = NULL; - kim_preferences_t prefs = NULL; - kim_string_t test_string = "user@EXAMPLE.COM"; - kim_identity_t test_identity = KIM_IDENTITY_ANY; - kim_string_t string = NULL; - kim_identity_t identity = KIM_IDENTITY_ANY; - kim_comparison_t comparison = 0; + kim_error err = NULL; + kim_preferences prefs = NULL; + kim_string test_string = "user@EXAMPLE.COM"; + kim_identity test_identity = KIM_IDENTITY_ANY; + kim_string string = NULL; + kim_identity identity = KIM_IDENTITY_ANY; + kim_comparison comparison = 0; err = kim_preferences_create (&prefs); fail_if_error (state, "kim_preferences_create", err, diff --git a/src/kim/test/test_kim_selection_hints.c b/src/kim/test/test_kim_selection_hints.c index d2bc51151..696082df8 100644 --- a/src/kim/test/test_kim_selection_hints.c +++ b/src/kim/test/test_kim_selection_hints.c @@ -41,12 +41,12 @@ void test_kim_selection_hints_set_service_identity_hint (kim_test_state_t state) { - kim_error_t err = NULL; - kim_selection_hints_t hints = NULL; - kim_identity_t service_identity = NULL; - kim_identity_t identity = KIM_IDENTITY_ANY; - kim_string_t string = NULL; - kim_comparison_t comparison = 0; + kim_error err = NULL; + kim_selection_hints hints = NULL; + kim_identity service_identity = NULL; + kim_identity identity = KIM_IDENTITY_ANY; + kim_string string = NULL; + kim_comparison comparison = 0; start_test (state, "kim_selection_hints_set_service_identity_hint"); @@ -108,10 +108,10 @@ void test_kim_selection_hints_set_service_identity_hint (kim_test_state_t state) void test_kim_selection_hints_set_client_realm_hint (kim_test_state_t state) { - kim_error_t err = NULL; - kim_selection_hints_t hints = NULL; - kim_string_t string = NULL; - kim_comparison_t comparison = 0; + kim_error err = NULL; + kim_selection_hints hints = NULL; + kim_string string = NULL; + kim_comparison comparison = 0; start_test (state, "kim_selection_hints_set_client_realm_hint"); @@ -157,10 +157,10 @@ void test_kim_selection_hints_set_client_realm_hint (kim_test_state_t state) void test_kim_selection_hints_set_user_hint (kim_test_state_t state) { - kim_error_t err = NULL; - kim_selection_hints_t hints = NULL; - kim_string_t string = NULL; - kim_comparison_t comparison = 0; + kim_error err = NULL; + kim_selection_hints hints = NULL; + kim_string string = NULL; + kim_comparison comparison = 0; start_test (state, "kim_selection_hints_set_user_hint"); @@ -206,10 +206,10 @@ void test_kim_selection_hints_set_user_hint (kim_test_state_t state) void test_kim_selection_hints_set_service_realm_hint (kim_test_state_t state) { - kim_error_t err = NULL; - kim_selection_hints_t hints = NULL; - kim_string_t string = NULL; - kim_comparison_t comparison = 0; + kim_error err = NULL; + kim_selection_hints hints = NULL; + kim_string string = NULL; + kim_comparison comparison = 0; start_test (state, "kim_selection_hints_set_service_realm_hint"); @@ -255,10 +255,10 @@ void test_kim_selection_hints_set_service_realm_hint (kim_test_state_t state) void test_kim_selection_hints_set_service_hint (kim_test_state_t state) { - kim_error_t err = NULL; - kim_selection_hints_t hints = NULL; - kim_string_t string = NULL; - kim_comparison_t comparison = 0; + kim_error err = NULL; + kim_selection_hints hints = NULL; + kim_string string = NULL; + kim_comparison comparison = 0; start_test (state, "kim_selection_hints_set_service_hint"); @@ -304,10 +304,10 @@ void test_kim_selection_hints_set_service_hint (kim_test_state_t state) void test_kim_selection_hints_set_server_hint (kim_test_state_t state) { - kim_error_t err = NULL; - kim_selection_hints_t hints = NULL; - kim_string_t string = NULL; - kim_comparison_t comparison = 0; + kim_error err = NULL; + kim_selection_hints hints = NULL; + kim_string string = NULL; + kim_comparison comparison = 0; start_test (state, "kim_selection_hints_set_server_hint"); @@ -353,13 +353,13 @@ void test_kim_selection_hints_set_server_hint (kim_test_state_t state) void test_kim_selection_hints_remember_identity (kim_test_state_t state) { - kim_error_t err = NULL; - kim_selection_hints_t hints = NULL; - kim_identity_t service_identity = NULL; - kim_identity_t client_identity = NULL; - kim_string_t string = NULL; - kim_identity_t identity = KIM_IDENTITY_ANY; - kim_comparison_t comparison = 0; + kim_error err = NULL; + kim_selection_hints hints = NULL; + kim_identity service_identity = NULL; + kim_identity client_identity = NULL; + kim_string string = NULL; + kim_identity identity = KIM_IDENTITY_ANY; + kim_comparison comparison = 0; start_test (state, "kim_selection_hints_remember_identity");