LMMS
Loading...
Searching...
No Matches
calf_plugins::host_session Class Reference

#include <host_session.h>

Inheritance diagram for calf_plugins::host_session:
calf_plugins::main_window_owner_iface calf_plugins::session_client_iface

Public Member Functions

 host_session (session_environment_iface *)
void open ()
void add_plugin (std::string name, std::string preset, std::string instance_name=std::string())
void create_plugins_from_list ()
void connect ()
void close ()
bool activate_preset (int plugin, const std::string &preset, bool builtin)
void remove_all_plugins ()
std::string get_next_instance_name (const std::string &effect_name)
std::string get_full_plugin_name (const std::string &effect_name)
void set_signal_handlers ()
 Set handlers for SIGUSR1 (that LADISH uses to invoke Save function), SIGTERM and SIGHUP.
std::string get_client_name () const
 Client name for window title bar.
virtual char * open_file (const char *name)
 Implementation of open file functionality (TODO).
virtual char * save_file (const char *name)
 Implementation of save file functionality.
virtual void load (session_load_iface *)
 Load from session manager.
virtual void save (session_save_iface *)
 Save to session manager.
virtual void new_plugin (const char *name)
virtual void remove_plugin (plugin_ctl_iface *plugin)
virtual void rename_plugin (plugin_ctl_iface *plugin, const char *name)
virtual void on_main_window_destroy ()
 Called on 'destroy' event of the main window.
virtual void on_idle ()
 Called from idle handler.
virtual void reorder_plugins ()
virtual std::string get_current_filename () const
 Get the file name of the current rack.
virtual void set_current_filename (const std::string &name)
 Set the file name of the current rack.
 ~host_session ()
Public Member Functions inherited from calf_plugins::main_window_owner_iface
virtual ~main_window_owner_iface ()
Public Member Functions inherited from calf_plugins::session_client_iface
virtual ~session_client_iface ()

Static Public Member Functions

static void signal_handler (int signum)
 unix signal handler

Public Attributes

std::string client_name
 Requested JACK client name.
std::string input_name
 Template for input names.
std::string output_name
 Template for output names.
std::string midi_name
 Template for MIDI port names.
std::string load_name
 Name of the file to load at start.
bool only_load_if_exists
 Use load_name as session state name - doesn't signal an error if the file doesn't exist, but uses it for saving.
std::vector< std::string > plugin_names
 Plugins to create on startup, in create_plugins_from_list (based on command line).
std::map< int, std::string > presets
 Requested presets for the plugins in plugin_names.
session_manager_ifacesession_manager
 Selected session manager (if any).
volatile bool save_file_on_next_idle_call
 Save has been requested from SIGUSR1 handler.
volatile int quit_on_next_idle_call
 If non-zero, quit has been requested through signal with same value.
jack_session_event_t *volatile handle_event_on_next_idle_call
 JACK session event to handle on the next idle call.
std::string current_filename
 File name of the current rack.
std::string jack_session_id
 Jack session ID, if given via command line, otherwise empty.
std::string calfjackhost_cmd
 Command used to start the JACK host.
jack_client client
std::string autoconnect_midi
int autoconnect_midi_index
std::set< intchains
std::vector< jack_host * > plugins
main_window_ifacemain_win
std::set< std::string > instances
bool has_gui
bool has_trayicon
plugin_gui_windowgui_win
session_environment_ifacesession_env

Private Member Functions

void handle_jack_session_event (jack_session_event_t *event)

Static Private Member Functions

static void session_callback (jack_session_event_t *event, void *arg)

Static Private Attributes

static host_sessioninstance = NULL

Constructor & Destructor Documentation

◆ host_session()

host_session::host_session ( session_environment_iface * se)

◆ ~host_session()

host_session::~host_session ( )

Member Function Documentation

◆ activate_preset()

bool host_session::activate_preset ( int plugin,
const std::string & preset,
bool builtin )

◆ add_plugin()

void host_session::add_plugin ( std::string name,
std::string preset,
std::string instance_name = std::string() )

◆ close()

void host_session::close ( )

◆ connect()

void host_session::connect ( )

◆ create_plugins_from_list()

void host_session::create_plugins_from_list ( )

◆ get_client_name()

std::string host_session::get_client_name ( ) const
virtual

Client name for window title bar.

Implements calf_plugins::main_window_owner_iface.

◆ get_current_filename()

std::string host_session::get_current_filename ( ) const
virtual

Get the file name of the current rack.

Implements calf_plugins::main_window_owner_iface.

◆ get_full_plugin_name()

std::string host_session::get_full_plugin_name ( const std::string & effect_name)

◆ get_next_instance_name()

std::string host_session::get_next_instance_name ( const std::string & effect_name)

◆ handle_jack_session_event()

void host_session::handle_jack_session_event ( jack_session_event_t * event)
private

◆ load()

void host_session::load ( session_load_iface * stream)
virtual

Load from session manager.

Implements calf_plugins::session_client_iface.

◆ new_plugin()

void host_session::new_plugin ( const char * name)
virtual

◆ on_idle()

void host_session::on_idle ( )
virtual

Called from idle handler.

Implements calf_plugins::main_window_owner_iface.

◆ on_main_window_destroy()

void host_session::on_main_window_destroy ( )
virtual

Called on 'destroy' event of the main window.

Implements calf_plugins::main_window_owner_iface.

◆ open()

void host_session::open ( )

◆ open_file()

char * host_session::open_file ( const char * name)
virtual

Implementation of open file functionality (TODO).

Implements calf_plugins::main_window_owner_iface.

◆ remove_all_plugins()

void host_session::remove_all_plugins ( )

◆ remove_plugin()

void host_session::remove_plugin ( plugin_ctl_iface * plugin)
virtual

◆ rename_plugin()

void host_session::rename_plugin ( plugin_ctl_iface * plugin,
const char * name )
virtual

◆ reorder_plugins()

void host_session::reorder_plugins ( )
virtual

◆ save()

void host_session::save ( session_save_iface * stream)
virtual

Save to session manager.

Implements calf_plugins::session_client_iface.

◆ save_file()

char * host_session::save_file ( const char * name)
virtual

Implementation of save file functionality.

Implements calf_plugins::main_window_owner_iface.

◆ session_callback()

void host_session::session_callback ( jack_session_event_t * event,
void * arg )
staticprivate

◆ set_current_filename()

void host_session::set_current_filename ( const std::string & name)
virtual

Set the file name of the current rack.

Implements calf_plugins::main_window_owner_iface.

◆ set_signal_handlers()

void host_session::set_signal_handlers ( )

Set handlers for SIGUSR1 (that LADISH uses to invoke Save function), SIGTERM and SIGHUP.

◆ signal_handler()

void host_session::signal_handler ( int signum)
static

unix signal handler

Member Data Documentation

◆ autoconnect_midi

std::string calf_plugins::host_session::autoconnect_midi

◆ autoconnect_midi_index

int calf_plugins::host_session::autoconnect_midi_index

◆ calfjackhost_cmd

std::string calf_plugins::host_session::calfjackhost_cmd

Command used to start the JACK host.

◆ chains

std::set<int> calf_plugins::host_session::chains

◆ client

jack_client calf_plugins::host_session::client

◆ client_name

std::string calf_plugins::host_session::client_name

Requested JACK client name.

◆ current_filename

std::string calf_plugins::host_session::current_filename

File name of the current rack.

◆ gui_win

plugin_gui_window* calf_plugins::host_session::gui_win

◆ handle_event_on_next_idle_call

jack_session_event_t* volatile calf_plugins::host_session::handle_event_on_next_idle_call

JACK session event to handle on the next idle call.

◆ has_gui

bool calf_plugins::host_session::has_gui

◆ has_trayicon

bool calf_plugins::host_session::has_trayicon

◆ input_name

std::string calf_plugins::host_session::input_name

Template for input names.

◆ instance

host_session * host_session::instance = NULL
staticprivate

◆ instances

std::set<std::string> calf_plugins::host_session::instances

◆ jack_session_id

std::string calf_plugins::host_session::jack_session_id

Jack session ID, if given via command line, otherwise empty.

◆ load_name

std::string calf_plugins::host_session::load_name

Name of the file to load at start.

◆ main_win

main_window_iface* calf_plugins::host_session::main_win

◆ midi_name

std::string calf_plugins::host_session::midi_name

Template for MIDI port names.

◆ only_load_if_exists

bool calf_plugins::host_session::only_load_if_exists

Use load_name as session state name - doesn't signal an error if the file doesn't exist, but uses it for saving.

◆ output_name

std::string calf_plugins::host_session::output_name

Template for output names.

◆ plugin_names

std::vector<std::string> calf_plugins::host_session::plugin_names

Plugins to create on startup, in create_plugins_from_list (based on command line).

◆ plugins

std::vector<jack_host *> calf_plugins::host_session::plugins

◆ presets

std::map<int, std::string> calf_plugins::host_session::presets

Requested presets for the plugins in plugin_names.

◆ quit_on_next_idle_call

volatile int calf_plugins::host_session::quit_on_next_idle_call

If non-zero, quit has been requested through signal with same value.

◆ save_file_on_next_idle_call

volatile bool calf_plugins::host_session::save_file_on_next_idle_call

Save has been requested from SIGUSR1 handler.

◆ session_env

session_environment_iface* calf_plugins::host_session::session_env

◆ session_manager

session_manager_iface* calf_plugins::host_session::session_manager

Selected session manager (if any).


The documentation for this class was generated from the following files: