libwebsockets
Lightweight C library for HTML5 websockets
Toggle main menu visibility
class="ui-resizable-handle">
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
22
struct
lws_auth_device_client_ops
{
23
uint32_t
abi_version
;
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
38
struct
lws_auth_device_client_api
{
39
uint32_t
abi_version
;
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
uint32_t
unsigned int uint32_t
Definition
libwebsockets.h:695
lws_auth_device_client_api
Definition
lws-auth-device-client.h:38
lws_auth_device_client_api::abi_version
uint32_t abi_version
Definition
lws-auth-device-client.h:39
lws_auth_device_client_api::start_auth_flow
void(* start_auth_flow)(struct lws_vhost *vh, const char *mixer_url, const char *logical_name)
Definition
lws-auth-device-client.h:42
lws_auth_device_client_ops
Definition
lws-auth-device-client.h:22
lws_auth_device_client_ops::display_code
void(* display_code)(struct lws_vhost *vh, const char *logical_name, const char *user_code)
Definition
lws-auth-device-client.h:32
lws_auth_device_client_ops::pairing_indication
void(* pairing_indication)(struct lws_vhost *vh, const char *logical_name, int start)
Definition
lws-auth-device-client.h:29
lws_auth_device_client_ops::auth_success
void(* auth_success)(struct lws_vhost *vh, const char *logical_name, const char *access_token)
Definition
lws-auth-device-client.h:26
lws_auth_device_client_ops::abi_version
uint32_t abi_version
Definition
lws-auth-device-client.h:23
include
libwebsockets
lws-auth-device-client.h
Generated on
for libwebsockets by
1.18.0