00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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
00029 namespace Jack
00030 {
00031
00036 struct JackClientControl : public JackShmMemAble
00037 {
00038 char fName[JACK_CLIENT_NAME_SIZE + 1];
00039 bool fCallback[kMaxNotification];
00040 volatile jack_transport_state_t fTransportState;
00041 volatile bool fTransportSync;
00042 volatile bool fTransportTimebase;
00043 int fRefNum;
00044 int fPID;
00045 bool fActive;
00046 bool fServer;
00047
00048 JackClientControl(const char* name, int pid, int refnum)
00049 {
00050 Init(name, pid, refnum);
00051 }
00052
00053 JackClientControl(const char* name)
00054 {
00055 Init(name, 0, -1);
00056 }
00057
00058 JackClientControl()
00059 {
00060 Init("", 0, -1);
00061 }
00062
00063 void Init(const char* name, int pid, int refnum)
00064 {
00065 strcpy(fName, name);
00066 for (int i = 0; i < kMaxNotification; i++)
00067 fCallback[i] = false;
00068
00069 fCallback[kAddClient] = true;
00070 fCallback[kRemoveClient] = true;
00071 fCallback[kActivateClient] = true;
00072
00073 fCallback[kStartFreewheelCallback] = true;
00074 fCallback[kStopFreewheelCallback] = true;
00075 fRefNum = refnum;
00076 fPID = pid;
00077 fTransportState = JackTransportStopped;
00078 fTransportSync = false;
00079 fTransportTimebase = false;
00080 fActive = false;
00081 fServer = true;
00082 }
00083
00084 };
00085
00086 }
00087
00088
00089 #endif