iwd_agent: surface Cancel + stub EAP methods, expose cancel hook

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>
This commit is contained in:
nemunaire 2026-04-09 12:01:35 +07:00
commit 9f2a9373aa
4 changed files with 57 additions and 1 deletions

View file

@ -13,8 +13,14 @@ 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);