libx52 0.3.0
Saitek X52/X52Pro drivers for Linux/Unix
Loading...
Searching...
No Matches
x52dcomm.h
Go to the documentation of this file.
1/*
2 * Saitek X52 Pro MFD & LED driver
3 *
4 * Copyright (C) 2021 Nirenjan Krishnan (nirenjan@nirenjan.org)
5 *
6 * SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
7 */
8
20#ifndef X52DCOMM_H
21#define X52DCOMM_H
22
23#include <stddef.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
55int x52d_dial_command(const char *sock_path);
56
76int x52d_dial_notify(const char *sock_path);
77
95int x52d_format_command(int argc, const char **argv, char *buffer, size_t buflen);
96
124int x52d_send_command(int sock_fd, char *buffer, size_t bufin, size_t bufout);
125
129typedef int (* x52d_notify_callback_fn)(int argc, char **argv);
130
151
153#ifdef __cplusplus
154}
155#endif
156#endif // !defined X52DCOMM_H
157
158
int x52d_recv_notification(int sock_fd, x52d_notify_callback_fn callback)
Receive a notification from the daemon.
int x52d_dial_command(const char *sock_path)
Open a connection to the daemon command socket.
int x52d_format_command(int argc, const char **argv, char *buffer, size_t buflen)
Format a series of command strings into a buffer.
int(* x52d_notify_callback_fn)(int argc, char **argv)
Notification callback function type.
Definition x52dcomm.h:129
int x52d_dial_notify(const char *sock_path)
Open a connection to the daemon notify socket.
int x52d_send_command(int sock_fd, char *buffer, size_t bufin, size_t bufout)
Send a command to the daemon and retrieve the response.