00001 /* 00002 Copyright (C) 2003 Paul Davis 00003 Copyright (C) 2004-2006 Grame 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 00019 */ 00020 00021 #ifndef __JackClientControl__ 00022 #define __JackClientControl__ 00023 00024 #include "JackShmMem.h" 00025 #include "JackPort.h" 00026 #include "JackSynchro.h" 00027 #include "transport_types.h" 00028 00029 namespace Jack 00030 { 00031 00036 struct JackClientControl : public JackShmMem 00037 { 00038 char fName[JACK_CLIENT_NAME_SIZE + 1]; 00039 volatile jack_transport_state_t fTransportState; 00040 int fRefNum; 00041 bool fZombie; 00042 bool fActive; 00043 00044 JackClientControl(const char* name, int refnum) 00045 { 00046 Init(name, refnum); 00047 } 00048 00049 JackClientControl(const char* name) 00050 { 00051 Init(name, -1); 00052 } 00053 00054 JackClientControl() 00055 { 00056 Init("", -1); 00057 } 00058 00059 virtual ~JackClientControl() 00060 {} 00061 00062 void Init(const char* name, int refnum) 00063 { 00064 strcpy(fName, name); 00065 fRefNum = refnum; 00066 fTransportState = JackTransportStopped; 00067 fZombie = false; 00068 fActive = false; 00069 } 00070 00071 }; 00072 00073 } // end of namespace 00074 00075 00076 #endif