/*
 * Copyright (C) 2013 Andreas Degert
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

/*
** use make_jsonrpc_methods.py to generate jsonrpc_methods.cc
**
** this is basically a gperf file. Make sure you have the gperf
** package installed.
*/
%language=ANSI-C
%struct-type
%7bit
%readonly-tables
%omit-struct-type
%enum

/*
** make_jsonrpc_methods.py will replace the has_result field
** in the list below with the enum value, resulting in
** structure methodnames. An additional table with method name
**  and has_result indexed by the enum value will be added to
** the code generated by gperf.
*/
struct CmdConnection::methodnames;

/* RPC method name, has_result */
%%

/* Guitarix Server */

"getversion", true
"shutdown", false
"listen", false
"unlisten", false


/* Engine */

"getstate", true
"setstate", false
"jack_cpu_load", true
"set_jack_insert", false

/* Parameter, ParamMap */

"get", true
"set", false
"parameterlist", true
"get_parameter", true
"get_parameter_value", true
"desc", true
"list", true
"insert_param", false
"get_updates", false

/* Preset Banks */

"banks", true
"setpreset", false
"create_default_scratch_preset", false
"sendcc", false
"bank_insert_content", true
"bank_insert_new", true
"get_bank", true
"rename_bank", true
"bank_remove", true
"bank_get_contents", true
"bank_reorder", false
"bank_check_reparse", true
"bank_get_filename", true
"bank_set_flag", false
"convert_preset", true
"bank_save", false
"pf_save", false
"save_current", false
"save_preset", false

// presets in a bank
"presets", true
"rename_preset", true
"reorder_preset", false
"erase_preset", false
"pf_append", false
"pf_insert_before", false
"pf_insert_after", false


/* Unit Presets */

"plugin_preset_list_load", true
"plugin_preset_list_sync_set", false
"plugin_preset_list_set", false
"plugin_preset_list_save", false
"plugin_preset_list_remove", false


/* Effect Plugins */

"pluginlist", true
"plugin_load_ui", true
"get_rack_unit_order", true
"insert_rack_unit", false
"remove_rack_unit", false
"queryunit", true


/* Midi Controller */

"get_midi_controller_map", true
"midi_size", true
"midi_deleteParameter", false
"midi_modifyCurrent", false
"midi_get_config_mode", true
"midi_set_config_mode", false
"midi_set_current_control", false
"set_midi_channel", false
"request_midi_value_update", false
"get_last_midi_control_value", true
"set_last_midi_control_value", false
"get_midi_feedback", true
"set_midi_feedback", false

/* Tuner */

"get_tuning", true
"get_tuner_freq", true
"get_tuner_note", true
"switch_tuner", false
"tuner_used_for_display", false
"tuner_used_by_midi", false


/* Oscilloscope */

"set_oscilloscope_mul_buffer", false
"get_oscilloscope_mul_buffer", true


/* Convolver */

"reload_impresp_list", false
"load_impresp_dirs", true
"read_audio", true


/* Ladspa Loader */

"load_ladspalist", true
"save_ladspalist", false
"ladspaloader_update_plugins", true


/* Direct Guitar Control */

"get_tuner_switcher_active", true
"tuner_switcher_activate", false
"tuner_switcher_deactivate", false
"tuner_switcher_toggle", false

%%
