auth-client.c revision 9ddd3d7d8651985e373a6c48e0ddc76b8a4ef1c7
2e37d45867d081db150ab78dad303b9077aea24fTimo Sirainen/* Copyright (c) 2005-2011 Dovecot authors, see the included COPYING file */
9137c55411aa39d41c1e705ddc34d5bd26c65021Timo Sirainenauth_client_init(const char *auth_socket_path, unsigned int client_pid,
9137c55411aa39d41c1e705ddc34d5bd26c65021Timo Sirainen client->auth_socket_path = i_strdup(auth_socket_path);
9137c55411aa39d41c1e705ddc34d5bd26c65021Timo Sirainen client->conn = auth_server_connection_init(client);
9137c55411aa39d41c1e705ddc34d5bd26c65021Timo Sirainen (void)auth_server_connection_connect(client->conn);
9137c55411aa39d41c1e705ddc34d5bd26c65021Timo Sirainenvoid auth_client_deinit(struct auth_client **_client)
90ed03ab289947f5576d2c616ada27724f50e9cdTimo Sirainenvoid auth_client_connect(struct auth_client *client)
9ddd3d7d8651985e373a6c48e0ddc76b8a4ef1c7Timo Sirainenvoid auth_client_disconnect(struct auth_client *client, const char *reason)
9ddd3d7d8651985e373a6c48e0ddc76b8a4ef1c7Timo Sirainen auth_server_connection_disconnect(client->conn, reason);
6ef7e31619edfaa17ed044b45861d106a86191efTimo Sirainenbool auth_client_is_connected(struct auth_client *client)
05817ffe09295892e1aa5c4a7f91d060e249563cTimo Sirainenbool auth_client_is_disconnected(struct auth_client *client)
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainenvoid auth_client_set_connect_notify(struct auth_client *client,
9137c55411aa39d41c1e705ddc34d5bd26c65021Timo Sirainenauth_client_get_available_mechs(struct auth_client *client,
9137c55411aa39d41c1e705ddc34d5bd26c65021Timo Sirainen unsigned int *mech_count)
9137c55411aa39d41c1e705ddc34d5bd26c65021Timo Sirainen return array_get(&client->conn->available_auth_mechs, mech_count);
9137c55411aa39d41c1e705ddc34d5bd26c65021Timo Sirainenauth_client_find_mech(struct auth_client *client, const char *name)
e20e638805c4bd54e039891a3e92760b1dfa189aTimo Sirainen array_foreach(&client->conn->available_auth_mechs, mech) {