44 |
#include "../common/Thread.h" |
#include "../common/Thread.h" |
45 |
#include "../common/Mutex.h" |
#include "../common/Mutex.h" |
46 |
#include "../common/Condition.h" |
#include "../common/Condition.h" |
47 |
|
#include "../common/global.h" |
48 |
|
|
49 |
#include "../drivers/midi/MidiInstrumentMapper.h" |
#include "../drivers/midi/MidiInstrumentMapper.h" |
50 |
|
|
51 |
|
#if HAVE_SQLITE3 |
52 |
|
#include "../db/InstrumentsDb.h" |
53 |
|
#endif |
54 |
|
|
55 |
/// TCP Port on which the server should listen for connection requests. |
/// TCP Port on which the server should listen for connection requests. |
56 |
#define LSCP_ADDR INADDR_ANY |
#define LSCP_ADDR INADDR_ANY |
57 |
#define LSCP_PORT 8888 |
#define LSCP_PORT 8888 |
159 |
String SetFxSendAudioOutputChannel(uint uiSamplerChannel, uint FxSendID, uint FxSendChannel, uint DeviceChannel); |
String SetFxSendAudioOutputChannel(uint uiSamplerChannel, uint FxSendID, uint FxSendChannel, uint DeviceChannel); |
160 |
String SetFxSendMidiController(uint uiSamplerChannel, uint FxSendID, uint MidiController); |
String SetFxSendMidiController(uint uiSamplerChannel, uint FxSendID, uint MidiController); |
161 |
String SetFxSendLevel(uint uiSamplerChannel, uint FxSendID, double dLevel); |
String SetFxSendLevel(uint uiSamplerChannel, uint FxSendID, double dLevel); |
162 |
|
String AddDbInstrumentDirectory(String Dir); |
163 |
|
String RemoveDbInstrumentDirectory(String Dir, bool Force = false); |
164 |
|
String GetDbInstrumentDirectoryCount(String Dir); |
165 |
|
String GetDbInstrumentDirectories(String Dir); |
166 |
|
String GetDbInstrumentDirectoryInfo(String Dir); |
167 |
|
String SetDbInstrumentDirectoryName(String Dir, String Name); |
168 |
|
String MoveDbInstrumentDirectory(String Dir, String Dst); |
169 |
|
String SetDbInstrumentDirectoryDescription(String Dir, String Desc); |
170 |
|
String AddDbInstruments(String DbDir, String FilePath, int Index = -1); |
171 |
|
String AddDbInstrumentsFlat(String DbDir, String FilePath); |
172 |
|
String AddDbInstrumentsNonrecursive(String DbDir, String FsDir); |
173 |
|
String RemoveDbInstrument(String Instr); |
174 |
|
String GetDbInstrumentCount(String Dir); |
175 |
|
String GetDbInstruments(String Dir); |
176 |
|
String GetDbInstrumentInfo(String Instr); |
177 |
|
String SetDbInstrumentName(String Instr, String Name); |
178 |
|
String MoveDbInstrument(String Instr, String Dst); |
179 |
|
String SetDbInstrumentDescription(String Instr, String Desc); |
180 |
String ResetChannel(uint uiSamplerChannel); |
String ResetChannel(uint uiSamplerChannel); |
181 |
String ResetSampler(); |
String ResetSampler(); |
182 |
String GetServerInfo(); |
String GetServerInfo(); |
186 |
String SetGlobalVolume(double dVolume); |
String SetGlobalVolume(double dVolume); |
187 |
String SubscribeNotification(LSCPEvent::event_t); |
String SubscribeNotification(LSCPEvent::event_t); |
188 |
String UnsubscribeNotification(LSCPEvent::event_t); |
String UnsubscribeNotification(LSCPEvent::event_t); |
|
String QueryDatabase(String query); |
|
189 |
String SetEcho(yyparse_param_t* pSession, double boolean_value); |
String SetEcho(yyparse_param_t* pSession, double boolean_value); |
190 |
void AnswerClient(String ReturnMessage); |
void AnswerClient(String ReturnMessage); |
191 |
|
|
196 |
static int EventSubscribers( std::list<LSCPEvent::event_t> events ); |
static int EventSubscribers( std::list<LSCPEvent::event_t> events ); |
197 |
static void LockRTNotify( void ) { RTNotifyMutex.Lock(); } |
static void LockRTNotify( void ) { RTNotifyMutex.Lock(); } |
198 |
static void UnlockRTNotify( void ) { RTNotifyMutex.Unlock(); } |
static void UnlockRTNotify( void ) { RTNotifyMutex.Unlock(); } |
199 |
|
static String FilterEndlines(String s); |
200 |
|
|
201 |
protected: |
protected: |
202 |
int hSocket; |
int hSocket; |
335 |
*/ |
*/ |
336 |
virtual void TotalVoiceCountChanged(int NewCount); |
virtual void TotalVoiceCountChanged(int NewCount); |
337 |
} eventHandler; |
} eventHandler; |
338 |
|
|
339 |
|
#if HAVE_SQLITE3 |
340 |
|
class DbInstrumentsEventHandler : public InstrumentsDb::Listener { |
341 |
|
public: |
342 |
|
|
343 |
|
/** |
344 |
|
* Invoked when the number of instrument directories |
345 |
|
* in a specific directory has changed. |
346 |
|
* @param Dir The absolute pathname of the directory in |
347 |
|
* which the number of directories is changed. |
348 |
|
*/ |
349 |
|
virtual void DirectoryCountChanged(String Dir); |
350 |
|
|
351 |
|
/** |
352 |
|
* Invoked when the settings of an instrument directory |
353 |
|
* are changed. |
354 |
|
* @param Dir The absolute pathname of the directory |
355 |
|
* whose settings are changed. |
356 |
|
*/ |
357 |
|
virtual void DirectoryInfoChanged(String Dir); |
358 |
|
|
359 |
|
/** |
360 |
|
* Invoked when an instrument directory is renamed. |
361 |
|
* @param Dir The old absolute pathname of the directory. |
362 |
|
* @param NewName The new name of the directory. |
363 |
|
*/ |
364 |
|
virtual void DirectoryNameChanged(String Dir, String NewName); |
365 |
|
|
366 |
|
/** |
367 |
|
* Invoked when the number of instruments |
368 |
|
* in a specific directory has changed. |
369 |
|
* @param Dir The absolute pathname of the directory in |
370 |
|
* which the number of instruments is changed. |
371 |
|
*/ |
372 |
|
virtual void InstrumentCountChanged(String Dir); |
373 |
|
|
374 |
|
/** |
375 |
|
* Invoked when the settings of an instrument are changed. |
376 |
|
* @param Instr The absolute pathname of the instrument |
377 |
|
* whose settings are changed. |
378 |
|
*/ |
379 |
|
virtual void InstrumentInfoChanged(String Instr); |
380 |
|
|
381 |
|
/** |
382 |
|
* Invoked when an instrument is renamed. |
383 |
|
* @param Instr The old absolute pathname of the instrument. |
384 |
|
* @param NewName The new name of the directory. |
385 |
|
*/ |
386 |
|
virtual void InstrumentNameChanged(String Instr, String NewName); |
387 |
|
} dbInstrumentsEventHandler; |
388 |
|
#endif // HAVE_SQLITE3 |
389 |
}; |
}; |
390 |
|
|
391 |
#endif // __LSCPSERVER_H_ |
#endif // __LSCPSERVER_H_ |