iwd's Cancel(reason) now invokes a UI callback (registered via iwd_manager_set_cancel_handler) so the popup can tear down an open auth dialog. Stubbed RequestPrivateKeyPassphrase / RequestUserNameAndPassword / RequestUserPassword to return Canceled instead of leaving them unimplemented (which would unregister us). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
29 lines
1.1 KiB
C
29 lines
1.1 KiB
C
#ifndef IWD_AGENT_H
|
|
#define IWD_AGENT_H
|
|
|
|
#include <Eldbus.h>
|
|
|
|
typedef struct _Iwd_Agent Iwd_Agent;
|
|
typedef struct _Iwd_Agent_Request Iwd_Agent_Request;
|
|
|
|
/* The UI registers a single handler that is called whenever iwd asks for
|
|
* a passphrase. The handler must eventually call iwd_agent_reply() or
|
|
* iwd_agent_cancel() with the request token. */
|
|
typedef void (*Iwd_Agent_Passphrase_Cb)(void *data,
|
|
Iwd_Agent_Request *req,
|
|
const char *network_path);
|
|
|
|
/* Fired when iwd issues a Cancel(reason) for the in-flight passphrase
|
|
* request — the UI should tear down any open auth dialog. */
|
|
typedef void (*Iwd_Agent_Cancel_Cb)(void *data, const char *reason);
|
|
|
|
Iwd_Agent *iwd_agent_new (Eldbus_Connection *conn,
|
|
Iwd_Agent_Passphrase_Cb cb, void *data);
|
|
|
|
void iwd_agent_set_cancel_cb(Iwd_Agent *a, Iwd_Agent_Cancel_Cb cb, void *data);
|
|
void iwd_agent_free(Iwd_Agent *a);
|
|
|
|
void iwd_agent_reply (Iwd_Agent_Request *req, const char *passphrase);
|
|
void iwd_agent_cancel(Iwd_Agent_Request *req);
|
|
|
|
#endif
|