From 1019f1b943ae17bb116bbd2223fcbd0532657055 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 6 Apr 2007 02:20:48 +0000 Subject: LASH project saving/restoring. git-svn-id: http://svn.drobilla.net/lad/patchage@400 a436a847-0d15-0410-975c-d299462d15a1 --- src/LashDriver.h | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'src/LashDriver.h') diff --git a/src/LashDriver.h b/src/LashDriver.h index cac5bfd..dde644a 100644 --- a/src/LashDriver.h +++ b/src/LashDriver.h @@ -19,6 +19,7 @@ #define LASHDRIVER_H #include +#include #include "Driver.h" class Patchage; @@ -32,7 +33,7 @@ public: void attach(bool launch_daemon); void detach(); - bool is_attached() const { return lash_enabled(_client); } + bool is_attached() const { return _server_interface->enabled(); } bool connect(boost::shared_ptr, boost::shared_ptr) { return false; } @@ -42,12 +43,24 @@ public: void refresh() {} - void process_events(); + void process_events() { _server_interface->process_events(); } + + void restore_project(const std::string& directory); + void set_project_directory(const std::string& directory); + void save_project(); + void close_project(); private: - Patchage* _app; - lash_client_t* _client; - lash_args_t* _args; + Patchage* _app; + std::string _project_name; + + lash_args_t* _args; + SharedPtr _server_interface; + + void on_project_add(const SharedPtr project); + void on_save_file(const std::string& directory); + void on_restore_file(const std::string& directory); + void on_quit(); void handle_event(lash_event_t* conf); void handle_config(lash_config_t* conf); -- cgit v1.2.1