2015-02-27 15:01:06 +01:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Wireless daemon for Linux
|
|
|
|
*
|
2019-10-25 00:43:08 +02:00
|
|
|
* Copyright (C) 2015-2019 Intel Corporation. All rights reserved.
|
2015-02-27 15:01:06 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
2015-03-02 15:19:05 +01:00
|
|
|
enum agent_result {
|
|
|
|
AGENT_RESULT_OK,
|
|
|
|
AGENT_RESULT_FAILED,
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef void (*agent_request_passphrase_func_t) (enum agent_result result,
|
|
|
|
const char *passphrase,
|
2016-05-16 19:05:28 +02:00
|
|
|
struct l_dbus_message *message,
|
2015-03-02 15:19:05 +01:00
|
|
|
void *user_data);
|
2018-04-18 07:03:32 +02:00
|
|
|
typedef void (*agent_request_user_name_passwd_func_t) (enum agent_result result,
|
|
|
|
const char *user, const char *password,
|
|
|
|
struct l_dbus_message *message,
|
|
|
|
void *user_data);
|
2017-08-18 00:20:39 +02:00
|
|
|
typedef void (*agent_request_destroy_func_t)(void *user_data);
|
2015-03-02 15:19:05 +01:00
|
|
|
|
2016-05-25 01:37:19 +02:00
|
|
|
void agent_shutdown(void);
|
2015-03-02 15:19:05 +01:00
|
|
|
|
|
|
|
unsigned int agent_request_passphrase(const char *path,
|
|
|
|
agent_request_passphrase_func_t callback,
|
2016-05-16 19:05:28 +02:00
|
|
|
struct l_dbus_message *message,
|
2017-08-18 00:20:39 +02:00
|
|
|
void *user_data,
|
|
|
|
agent_request_destroy_func_t destroy);
|
2018-04-18 07:03:32 +02:00
|
|
|
unsigned int agent_request_pkey_passphrase(const char *path,
|
|
|
|
agent_request_passphrase_func_t callback,
|
|
|
|
struct l_dbus_message *trigger,
|
|
|
|
void *user_data,
|
|
|
|
agent_request_destroy_func_t destroy);
|
|
|
|
unsigned int agent_request_user_name_password(const char *path,
|
|
|
|
agent_request_user_name_passwd_func_t callback,
|
|
|
|
struct l_dbus_message *trigger,
|
|
|
|
void *user_data,
|
|
|
|
agent_request_destroy_func_t destroy);
|
|
|
|
unsigned int agent_request_user_password(const char *path, const char *user,
|
|
|
|
agent_request_passphrase_func_t callback,
|
|
|
|
struct l_dbus_message *trigger, void *user_data,
|
|
|
|
agent_request_destroy_func_t destroy);
|
2016-06-10 11:49:34 +02:00
|
|
|
bool agent_request_cancel(unsigned int req_id, int reason);
|