2015-02-27 15:01:06 +01:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Wireless daemon for Linux
|
|
|
|
*
|
|
|
|
* Copyright (C) 2015 Intel Corporation. All rights reserved.
|
|
|
|
*
|
|
|
|
* 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);
|
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-21 03:39:35 +02:00
|
|
|
bool agent_init(struct l_dbus *dbus);
|
|
|
|
bool agent_exit(struct l_dbus *dbus);
|
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);
|
2016-06-10 11:49:34 +02:00
|
|
|
bool agent_request_cancel(unsigned int req_id, int reason);
|