/[svn]/linuxsampler/trunk/src/network/lscpserver.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/network/lscpserver.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1135 by iliev, Thu Mar 29 09:40:45 2007 UTC revision 1200 by iliev, Thu May 24 14:04:18 2007 UTC
# Line 44  Line 44 
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
# Line 154  class LSCPServer : public Thread { Line 159  class LSCPServer : public Thread {
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, bool Recursive = false);
165            String GetDbInstrumentDirectories(String Dir, bool Recursive = false);
166            String GetDbInstrumentDirectoryInfo(String Dir);
167            String SetDbInstrumentDirectoryName(String Dir, String Name);
168            String MoveDbInstrumentDirectory(String Dir, String Dst);
169            String CopyDbInstrumentDirectory(String Dir, String Dst);
170            String SetDbInstrumentDirectoryDescription(String Dir, String Desc);
171            String FindDbInstrumentDirectories(String Dir, std::map<String,String> Parameters, bool Recursive = true);
172            String AddDbInstruments(String DbDir, String FilePath, int Index = -1, bool bBackground = false);
173            String AddDbInstruments(String ScanMode, String DbDir, String FsDir, bool bBackground = false);
174            String RemoveDbInstrument(String Instr);
175            String GetDbInstrumentCount(String Dir, bool Recursive = false);
176            String GetDbInstruments(String Dir, bool Recursive = false);
177            String GetDbInstrumentInfo(String Instr);
178            String SetDbInstrumentName(String Instr, String Name);
179            String MoveDbInstrument(String Instr, String Dst);
180            String CopyDbInstrument(String Instr, String Dst);
181            String SetDbInstrumentDescription(String Instr, String Desc);
182            String FindDbInstruments(String Dir, std::map<String,String> Parameters, bool Recursive = true);
183            String GetDbInstrumentsJobInfo(int JobId);
184          String ResetChannel(uint uiSamplerChannel);          String ResetChannel(uint uiSamplerChannel);
185          String ResetSampler();          String ResetSampler();
186          String GetServerInfo();          String GetServerInfo();
# Line 163  class LSCPServer : public Thread { Line 190  class LSCPServer : public Thread {
190          String SetGlobalVolume(double dVolume);          String SetGlobalVolume(double dVolume);
191          String SubscribeNotification(LSCPEvent::event_t);          String SubscribeNotification(LSCPEvent::event_t);
192          String UnsubscribeNotification(LSCPEvent::event_t);          String UnsubscribeNotification(LSCPEvent::event_t);
         String QueryDatabase(String query);  
193          String SetEcho(yyparse_param_t* pSession, double boolean_value);          String SetEcho(yyparse_param_t* pSession, double boolean_value);
194          void   AnswerClient(String ReturnMessage);          void   AnswerClient(String ReturnMessage);
195    
# Line 174  class LSCPServer : public Thread { Line 200  class LSCPServer : public Thread {
200          static int EventSubscribers( std::list<LSCPEvent::event_t> events );          static int EventSubscribers( std::list<LSCPEvent::event_t> events );
201          static void LockRTNotify( void ) { RTNotifyMutex.Lock(); }          static void LockRTNotify( void ) { RTNotifyMutex.Lock(); }
202          static void UnlockRTNotify( void ) { RTNotifyMutex.Unlock(); }          static void UnlockRTNotify( void ) { RTNotifyMutex.Unlock(); }
203        static String FilterEndlines(String s);
204    
205      protected:      protected:
206          int            hSocket;          int            hSocket;
# Line 312  class LSCPServer : public Thread { Line 339  class LSCPServer : public Thread {
339                   */                   */
340                  virtual void TotalVoiceCountChanged(int NewCount);                  virtual void TotalVoiceCountChanged(int NewCount);
341          } eventHandler;          } eventHandler;
342    
343    #if HAVE_SQLITE3
344            class DbInstrumentsEventHandler : public InstrumentsDb::Listener {
345                public:
346    
347                    /**
348                     * Invoked when the number of instrument directories
349                     * in a specific directory has changed.
350                     * @param Dir The absolute pathname of the directory in
351                     * which the number of directories is changed.
352                     */
353                    virtual void DirectoryCountChanged(String Dir);
354    
355                    /**
356                     * Invoked when the settings of an instrument directory
357                     * are changed.
358                     * @param Dir The absolute pathname of the directory
359                     * whose settings are changed.
360                     */
361                    virtual void DirectoryInfoChanged(String Dir);
362    
363                    /**
364                     * Invoked when an instrument directory is renamed.
365                     * @param Dir The old absolute pathname of the directory.
366                     * @param NewName The new name of the directory.
367                     */
368                    virtual void DirectoryNameChanged(String Dir, String NewName);
369    
370                    /**
371                     * Invoked when the number of instruments
372                     * in a specific directory has changed.
373                     * @param Dir The absolute pathname of the directory in
374                     * which the number of instruments is changed.
375                     */
376                    virtual void InstrumentCountChanged(String Dir);
377    
378                    /**
379                     * Invoked when the settings of an instrument are changed.
380                     * @param Instr The absolute pathname of the instrument
381                     * whose settings are changed.
382                     */
383                    virtual void InstrumentInfoChanged(String Instr);
384    
385                    /**
386                     * Invoked when an instrument is renamed.
387                     * @param Instr The old absolute pathname of the instrument.
388                     * @param NewName The new name of the directory.
389                     */
390                    virtual void InstrumentNameChanged(String Instr, String NewName);
391    
392                    /**
393                     * Invoked when the status of particular job is changed.
394                     * @param JobId The ID of the job.
395                     */
396                    virtual void JobStatusChanged(int JobId);
397            } dbInstrumentsEventHandler;
398    #endif // HAVE_SQLITE3
399  };  };
400    
401  #endif // __LSCPSERVER_H_  #endif // __LSCPSERVER_H_

Legend:
Removed from v.1135  
changed lines
  Added in v.1200

  ViewVC Help
Powered by ViewVC