| // SPDX-License-Identifier: (GPL-2.0-only OR MIT) |
| /* |
| * Copyright (C) 2024 Amlogic, Inc. All rights reserved |
| */ |
| |
| #ifndef BINC_AGENT_H |
| #define BINC_AGENT_H |
| |
| #include <gio/gio.h> |
| #include "adapter.h" |
| |
| #ifdef __cplusplus |
| extern "C" { |
| #endif |
| |
| typedef gboolean (*AgentRequestAuthorizationCallback)(Device *device); |
| |
| typedef guint32 (*AgentRequestPasskeyCallback)(Device *device); |
| |
| typedef enum { |
| DISPLAY_ONLY, DISPLAY_YES_NO, KEYBOARD_ONLY, NO_INPUT_NO_OUTPUT, KEYBOARD_DISPLAY |
| } IoCapability; |
| |
| typedef struct binc_agent Agent; |
| |
| Agent *binc_agent_create(Adapter *adapter, const char *path, IoCapability io_capability); |
| |
| void binc_agent_set_request_authorization_cb(Agent *agent, AgentRequestAuthorizationCallback callback); |
| |
| void binc_agent_set_request_passkey_cb(Agent *agent, AgentRequestPasskeyCallback callback); |
| |
| void binc_agent_free(Agent *agent); |
| |
| #ifdef __cplusplus |
| } |
| #endif |
| |
| #endif //BINC_AGENT_H |