JackClientControl.h

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 "JackNotification.h"
00028 #include "transport_types.h"
00029 
00030 namespace Jack
00031 {
00032 
00037 struct JackClientControl : public JackShmMem
00038 {
00039     char fName[JACK_CLIENT_NAME_SIZE + 1];
00040         bool fCallback[kMaxNotification];
00041         volatile jack_transport_state_t fTransportState;
00042         int fRefNum;
00043         bool fZombie;
00044         bool fActive;
00045 
00046     JackClientControl(const char* name, int refnum)
00047     {
00048         Init(name, refnum);
00049     }
00050 
00051     JackClientControl(const char* name)
00052     {
00053         Init(name, -1);
00054     }
00055 
00056     JackClientControl()
00057     {
00058         Init("", -1);
00059     }
00060 
00061     void Init(const char* name, int refnum)
00062     {
00063         strcpy(fName, name);
00064                 for (int i = 0; i < kMaxNotification; i++) 
00065                         fCallback[i] = false;
00066                 // Always activated
00067                 fCallback[kAddClient] = true;
00068                 fCallback[kRemoveClient] = true;
00069                 fCallback[kActivateClient] = true;
00070         fRefNum = refnum;
00071         fTransportState = JackTransportStopped;
00072         fZombie = false;
00073         fActive = false;
00074     }
00075 
00076 };
00077 
00078 } // end of namespace
00079 
00080 
00081 #endif

Generated on Mon Oct 15 17:11:13 2007 for Jackdmp by  doxygen 1.5.1