fxsdk/fxlink/fxlink.h
Lephenixnoir 9d30377d90
fxlink: full rewrite; deeper device management and TUI
This commit rewrites the entire device management layer of fxlink on the
libusb side, providing new abstractions that support live/async device
management, including communication.

This system is put to use in a new TUI interactive mode (fxlink -t)
which can run in the background, connects to calculators automatically
without interfering with file transfer tools, and is much more detailed
in its interface than the previous interactive mode (fxlink -i).

The TUI mode will also soon be extended to support sending data.
2023-03-03 00:29:00 +01:00

42 lines
1.4 KiB
C

//---------------------------------------------------------------------------//
// ==>/[_]\ fxlink: A community communication tool for CASIO calculators. //
// |:::| Made by Lephe' as part of the fxSDK. //
// \___/ License: MIT <https://opensource.org/licenses/MIT> //
//---------------------------------------------------------------------------//
// fxlink.fxlink: Options and mode functions
#pragma once
#include <fxlink/filter.h>
#include <libusb.h>
/* Global and command-line options. */
struct fxlink_options {
/* If not NULL, gets a copy of all text messages received in either
interactive mode */
FILE *log_file;
/* Extra details (mainly interactive messages) */
bool verbose;
};
extern struct fxlink_options options;
/* Main function for -l */
int main_list(struct fxlink_filter *filter, delay_t *delay,
libusb_context *context);
/* Main function for -b */
int main_blocks(struct fxlink_filter *filter, delay_t *delay);
/* Main function for -s */
int main_send(struct fxlink_filter *filter, delay_t *delay, char **files);
/* Main function for -i */
int main_interactive(struct fxlink_filter *filter, delay_t *delay,
libusb_context *context);
/* Main function for -t */
int main_tui_interactive(libusb_context *context);
/* Main function for -p */
int main_push(struct fxlink_filter *filter, delay_t *delay,
libusb_context *context, char **files);