--- linuxsampler/trunk/src/network/lscpserver.h 2007/05/24 14:04:18 1200 +++ linuxsampler/trunk/src/network/lscpserver.h 2007/12/03 13:59:03 1535 @@ -24,6 +24,10 @@ #ifndef __LSCPSERVER_H_ #define __LSCPSERVER_H_ +#if defined(WIN32) +#include +typedef int socklen_t; +#else #include #include #include @@ -33,6 +37,7 @@ #include #include #include +#endif #include @@ -44,7 +49,7 @@ #include "../common/Thread.h" #include "../common/Mutex.h" #include "../common/Condition.h" -#include "../common/global.h" +#include "../common/global_private.h" #include "../drivers/midi/MidiInstrumentMapper.h" @@ -180,6 +185,8 @@ String CopyDbInstrument(String Instr, String Dst); String SetDbInstrumentDescription(String Instr, String Desc); String FindDbInstruments(String Dir, std::map Parameters, bool Recursive = true); + String FormatInstrumentsDb(); + String EditSamplerChannelInstrument(uint uiSamplerChannel); String GetDbInstrumentsJobInfo(int JobId); String ResetChannel(uint uiSamplerChannel); String ResetSampler(); @@ -188,6 +195,9 @@ String GetTotalVoiceCountMax(); String GetGlobalVolume(); String SetGlobalVolume(double dVolume); + String GetFileInstruments(String Filename); + String ListFileInstruments(String Filename); + String GetFileInstrumentInfo(String Filename, uint InstrumentID); String SubscribeNotification(LSCPEvent::event_t); String UnsubscribeNotification(LSCPEvent::event_t); String SetEcho(yyparse_param_t* pSession, double boolean_value); @@ -232,6 +242,12 @@ bool HasSoloChannel(); void MuteNonSoloChannels(); void UnmuteChannels(); + + /** + * Throws an exception if the specified file is not found or + * if directory is specified. + */ + static void VerifyFile(String Filename); static std::map bufferedNotifies; static Mutex NotifyMutex; @@ -261,13 +277,13 @@ * @param NewCount The new number of sampler channels. */ virtual void ChannelCountChanged(int NewCount); - + /** * Invoked when the number of audio output devices has changed. * @param NewCount The new number of audio output devices. */ virtual void AudioDeviceCountChanged(int NewCount); - + /** * Invoked when the number of MIDI input devices has changed. * @param NewCount The new number of MIDI input devices. @@ -280,7 +296,7 @@ * @param NewCount The new number of MIDI instruments. */ virtual void MidiInstrumentCountChanged(int MapId, int NewCount); - + /** * Invoked when a MIDI instrument in a MIDI instrument map is changed. * @param MapId The numerical ID of the MIDI instrument map. @@ -288,7 +304,7 @@ * @param Program The MIDI program number of the instrument. */ virtual void MidiInstrumentInfoChanged(int MapId, int Bank, int Program); - + /** * Invoked when the number of MIDI instrument maps has changed. * @param NewCount The new number of MIDI instruments. @@ -300,7 +316,7 @@ * @param MapId The numerical ID of the MIDI instrument map. */ virtual void MidiInstrumentMapInfoChanged(int MapId); - + /** * Invoked when the number of effect sends * on the specified sampler channel has changed. @@ -343,56 +359,12 @@ #if HAVE_SQLITE3 class DbInstrumentsEventHandler : public InstrumentsDb::Listener { public: - - /** - * Invoked when the number of instrument directories - * in a specific directory has changed. - * @param Dir The absolute pathname of the directory in - * which the number of directories is changed. - */ virtual void DirectoryCountChanged(String Dir); - - /** - * Invoked when the settings of an instrument directory - * are changed. - * @param Dir The absolute pathname of the directory - * whose settings are changed. - */ virtual void DirectoryInfoChanged(String Dir); - - /** - * Invoked when an instrument directory is renamed. - * @param Dir The old absolute pathname of the directory. - * @param NewName The new name of the directory. - */ virtual void DirectoryNameChanged(String Dir, String NewName); - - /** - * Invoked when the number of instruments - * in a specific directory has changed. - * @param Dir The absolute pathname of the directory in - * which the number of instruments is changed. - */ virtual void InstrumentCountChanged(String Dir); - - /** - * Invoked when the settings of an instrument are changed. - * @param Instr The absolute pathname of the instrument - * whose settings are changed. - */ virtual void InstrumentInfoChanged(String Instr); - - /** - * Invoked when an instrument is renamed. - * @param Instr The old absolute pathname of the instrument. - * @param NewName The new name of the directory. - */ virtual void InstrumentNameChanged(String Instr, String NewName); - - /** - * Invoked when the status of particular job is changed. - * @param JobId The ID of the job. - */ virtual void JobStatusChanged(int JobId); } dbInstrumentsEventHandler; #endif // HAVE_SQLITE3