2023-03-03 00:29:00 +01:00
|
|
|
//---------------------------------------------------------------------------//
|
|
|
|
// ==>/[_]\ 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>
|
2021-04-03 11:58:30 +02:00
|
|
|
#include <libusb.h>
|
|
|
|
|
2023-03-03 00:29:00 +01:00
|
|
|
/* Global and command-line options. */
|
|
|
|
struct fxlink_options {
|
|
|
|
/* If not NULL, gets a copy of all text messages received in either
|
|
|
|
interactive mode */
|
2022-05-01 17:20:47 +02:00
|
|
|
FILE *log_file;
|
2023-03-03 00:29:00 +01:00
|
|
|
/* Extra details (mainly interactive messages) */
|
|
|
|
bool verbose;
|
2022-05-01 17:20:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct fxlink_options options;
|
|
|
|
|
2021-04-03 11:58:30 +02:00
|
|
|
/* Main function for -l */
|
2023-03-03 00:29:00 +01:00
|
|
|
int main_list(struct fxlink_filter *filter, delay_t *delay,
|
|
|
|
libusb_context *context);
|
2021-04-03 11:58:30 +02:00
|
|
|
|
|
|
|
/* Main function for -b */
|
2023-03-03 00:29:00 +01:00
|
|
|
int main_blocks(struct fxlink_filter *filter, delay_t *delay);
|
2021-04-03 11:58:30 +02:00
|
|
|
|
|
|
|
/* Main function for -s */
|
2024-01-30 22:19:19 +01:00
|
|
|
int main_send(struct fxlink_filter *filter, delay_t *delay, char **files,
|
|
|
|
char *outfolder);
|
2021-04-03 11:58:30 +02:00
|
|
|
|
2021-05-25 20:46:27 +02:00
|
|
|
/* Main function for -i */
|
2023-03-03 00:29:00 +01:00
|
|
|
int main_interactive(struct fxlink_filter *filter, delay_t *delay,
|
|
|
|
libusb_context *context);
|
2023-01-18 00:02:29 +01:00
|
|
|
|
2023-03-03 00:29:00 +01:00
|
|
|
/* Main function for -t */
|
|
|
|
int main_tui_interactive(libusb_context *context);
|
2021-05-25 20:46:27 +02:00
|
|
|
|
2023-03-03 00:29:00 +01:00
|
|
|
/* Main function for -p */
|
|
|
|
int main_push(struct fxlink_filter *filter, delay_t *delay,
|
|
|
|
libusb_context *context, char **files);
|