/* These are all static "per-class" signals */
- RegionFactory::CheckNewRegion.connect_same_thread (*this, boost::bind (&Session::add_region, this, _1));
SourceFactory::SourceCreated.connect_same_thread (*this, boost::bind (&Session::add_source, this, _1));
PlaylistFactory::PlaylistCreated.connect_same_thread (*this, boost::bind (&Session::add_playlist, this, _1, _2));
- Processor::ProcessorCreated.connect_same_thread (*this, boost::bind (&Session::add_processor, this, _1));
AutomationList::AutomationListCreated.connect_same_thread (*this, boost::bind (&Session::add_automation_list, this, _1));
Controllable::Destroyed.connect_same_thread (*this, boost::bind (&Session::remove_controllable, this, _1));
IO::PortCountChanged.connect_same_thread (*this, boost::bind (&Session::ensure_buffers, this, _1));
sys::remove (xml_path);
}
+#ifdef HAVE_JACK_SESSION
+void
+Session::jack_session_event( jack_session_event_t * event )
+{
+ if (save_state ("jacksession_snap")) {
+ event->flags = JackSessionSaveError;
+ } else {
+ sys::path xml_path (_session_dir->root_path());
+ xml_path /= legalize_for_path ("jacksession_snap") + statefile_suffix;
+
+ string cmd ("PROG_NAME -U ");
+ cmd += event->client_uuid;
+ cmd += ' \"';
+ cmd += xml_path.to_string();
+ cmd += '\"';
+
+ event->command_line = strdup (cmd.c_str());
+ }
+
+ jack_session_reply (_engine.jack(), event);
+
+ if (event->type == JackSessionSaveAndQuit) {
+ // TODO: make ardour quit.
+ }
+
+ jack_session_event_free( event );
+}
+#endif
+
int
Session::save_state (string snapshot_name, bool pending)
{