JackSynchro.h

00001 /*
00002 Copyright (C) 2004-2008 Grame  
00003 
00004 This program is free software; you can redistribute it and/or modify
00005   it under the terms of the GNU General Public License as published by
00006   the Free Software Foundation; either version 2 of the License, or
00007   (at your option) any later version.
00008 
00009   This program is distributed in the hope that it will be useful,
00010   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012   GNU General Public License for more details.
00013 
00014   You should have received a copy of the GNU General Public License
00015   along with this program; if not, write to the Free Software
00016   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 
00018 */
00019 
00020 #ifndef __JackSynchro__
00021 #define __JackSynchro__
00022 
00023 #include "JackError.h"
00024 
00025 #define SYNC_MAX_NAME_SIZE 256
00026 
00027 namespace Jack
00028 {
00029 
00034 class JackSynchro
00035 {
00036 
00037     protected:
00038 
00039         char fName[SYNC_MAX_NAME_SIZE];
00040         bool fFlush; // If true, signal are "flushed" : used for drivers that do no consume the signal
00041 
00042         virtual void BuildName(const char* name, const char* server_name, char* res)
00043         {}
00044 
00045     public:
00046 
00047         JackSynchro(): fFlush(false)
00048         {}
00049         virtual ~JackSynchro()
00050         {}
00051 
00052         virtual bool Signal()
00053         {
00054             return true;
00055         }
00056         virtual bool SignalAll()
00057         {
00058             return true;
00059         }
00060         virtual bool Wait()
00061         {
00062             return true;
00063         }
00064         virtual bool TimedWait(long usec)
00065         {
00066             return true;
00067         }
00068         virtual bool Allocate(const char* name, const char* server_name, int value)
00069         {
00070             return true;
00071         }
00072         virtual bool Connect(const char* name, const char* server_name)
00073         {
00074             return true;
00075         }
00076         virtual bool ConnectInput(const char* name, const char* server_name)
00077         {
00078             return true;
00079         }
00080         virtual bool ConnectOutput(const char* name, const char* server_name)
00081         {
00082             return true;
00083         }
00084         virtual bool Disconnect()
00085         {
00086             return true;
00087         }
00088         virtual void Destroy()
00089         {}
00090 
00091         void SetFlush(bool mode)
00092         {
00093             fFlush = mode;
00094         }
00095 
00096 };
00097 
00098 
00099 } // end of namespace
00100 
00101 #endif
00102 

Generated on Thu Feb 14 11:16:02 2008 for Jackdmp by  doxygen 1.5.1