LASHClient.h (1330B)
1 /* 2 ZynAddSubFX - a software synthesizer 3 4 LASHClient.h - LASH support 5 Copyright (C) 2006-2009 Lars Luthman 6 Author: Lars Luthman 7 8 This program is free software; you can redistribute it and/or 9 modify it under the terms of the GNU General Public License 10 as published by the Free Software Foundation; either version 2 11 of the License, or (at your option) any later version. 12 */ 13 #ifndef LASHClient_h 14 #define LASHClient_h 15 16 #include <string> 17 #include <pthread.h> 18 #include <lash/lash.h> 19 20 namespace zyn { 21 22 /** This class wraps up some functions for initialising and polling 23 * the LASH daemon.*/ 24 class LASHClient 25 { 26 public: 27 /**Enum to represent the LASH events that are currently handled*/ 28 enum Event { 29 Save, 30 Restore, 31 Quit, 32 NoEvent 33 }; 34 35 /** Constructor 36 * @param argc number of arguments 37 * @param argv the text arguments*/ 38 LASHClient(int *argc, char ***argv); 39 40 /**set the ALSA id 41 * @param id new ALSA id*/ 42 void setalsaid(int id); 43 /**Set the JACK name 44 * @param name the new name*/ 45 void setjackname(const char *name); 46 Event checkevents(std::string &filename); 47 void confirmevent(Event event); 48 49 private: 50 51 lash_client_t *client; 52 }; 53 54 } 55 56 #endif