00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _FLUIDSYNTH_SHELL_H
00022 #define _FLUIDSYNTH_SHELL_H
00023
00024
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 FLUIDSYNTH_API fluid_istream_t fluid_get_stdin(void);
00044 FLUIDSYNTH_API fluid_ostream_t fluid_get_stdout(void);
00045
00046 FLUIDSYNTH_API char* fluid_get_userconf(char* buf, int len);
00047 FLUIDSYNTH_API char* fluid_get_sysconf(char* buf, int len);
00048
00049
00052 typedef int (*fluid_cmd_func_t)(void* data, int ac, char** av, fluid_ostream_t out);
00053
00054 typedef struct {
00055 char* name;
00056 char* topic;
00057 fluid_cmd_func_t handler;
00058 void* data;
00059 char* help;
00060 } fluid_cmd_t;
00061
00062
00073 FLUIDSYNTH_API
00074 fluid_cmd_handler_t* new_fluid_cmd_handler(fluid_synth_t* synth);
00075
00076 FLUIDSYNTH_API
00077 void delete_fluid_cmd_handler(fluid_cmd_handler_t* handler);
00078
00087 FLUIDSYNTH_API
00088 int fluid_cmd_handler_register(fluid_cmd_handler_t* handler, fluid_cmd_t* cmd);
00089
00090 FLUIDSYNTH_API
00091 int fluid_cmd_handler_unregister(fluid_cmd_handler_t* handler, char* cmd);
00092
00093
00096 FLUIDSYNTH_API
00097 int fluid_command(fluid_cmd_handler_t* handler, char* cmd, fluid_ostream_t out);
00098
00099 FLUIDSYNTH_API
00100 int fluid_source(fluid_cmd_handler_t* handler, char* filename);
00101
00102 FLUIDSYNTH_API
00103 void fluid_usershell(fluid_settings_t* settings, fluid_cmd_handler_t* handler);
00104
00105
00108 FLUIDSYNTH_API
00109 fluid_shell_t* new_fluid_shell(fluid_settings_t* settings, fluid_cmd_handler_t* handler,
00110 fluid_istream_t in, fluid_ostream_t out, int thread);
00111
00112 FLUIDSYNTH_API void delete_fluid_shell(fluid_shell_t* shell);
00113
00114
00115
00118 typedef fluid_cmd_handler_t* (*fluid_server_newclient_func_t)(void* data, char* addr);
00119
00120 FLUIDSYNTH_API
00121 fluid_server_t* new_fluid_server(fluid_settings_t* settings,
00122 fluid_server_newclient_func_t func,
00123 void* data);
00124
00125 FLUIDSYNTH_API void delete_fluid_server(fluid_server_t* server);
00126
00127 FLUIDSYNTH_API int fluid_server_join(fluid_server_t* server);
00128
00129
00130 #ifdef __cplusplus
00131 }
00132 #endif
00133
00134 #endif