libwebsockets
Lightweight C library for HTML5 websockets
Loading...
Searching...
No Matches
lws-auth-device-client.h
Go to the documentation of this file.
1/*
2 * libwebsockets - small server side websockets and web server implementation
3 *
4 * Copyright (C) 2010 - 2026 Andy Green <andy@warmcat.com>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 */
16
17#ifndef _PROTOCOL_LWS_AUTH_DEVICE_CLIENT_H
18#define _PROTOCOL_LWS_AUTH_DEVICE_CLIENT_H
19
20#define LWS_AUTH_DEVICE_CLIENT_ABI_VERSION 1
21
24
25 /* Called when authorization completes successfully to let the app proceed */
26 void (*auth_success)(struct lws_vhost *vh, const char *logical_name, const char *access_token);
27
28 /* Called to start / stop flashing an LED or similar "pairing indication" */
29 void (*pairing_indication)(struct lws_vhost *vh, const char *logical_name, int start);
30
31 /* Optional callback when code is retrieved */
32 void (*display_code)(struct lws_vhost *vh, const char *logical_name, const char *user_code);
33
34 /* Optional callback to get a human-readable name for the device */
35 const char *(*get_device_name)(struct lws_vhost *vh, const char *logical_name);
36};
37
40
41 /* Start the auth flow against the given mixer URL for a specific logical device */
42 void (*start_auth_flow)(struct lws_vhost *vh, const char *mixer_url, const char *logical_name);
43};
44
45#endif
unsigned int uint32_t
void(* display_code)(struct lws_vhost *vh, const char *logical_name, const char *user_code)
void(* pairing_indication)(struct lws_vhost *vh, const char *logical_name, int start)
void(* auth_success)(struct lws_vhost *vh, const char *logical_name, const char *access_token)
void(* start_auth_flow)(struct lws_vhost *vh, const char *mixer_url, const char *logical_name)