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 #include "JackSession.h"
00029
00030 namespace Jack
00031 {
00032
00037 PRE_PACKED_STRUCTURE
00038 struct JackClientControl : public JackShmMemAble
00039 {
00040 char fName[JACK_CLIENT_NAME_SIZE + 1];
00041 bool fCallback[kMaxNotification];
00042 volatile jack_transport_state_t fTransportState;
00043 volatile bool fTransportSync;
00044 volatile bool fTransportTimebase;
00045 int fRefNum;
00046 int fPID;
00047 bool fActive;
00048
00049 int fSessionID;
00050 char fSessionCommand[JACK_SESSION_COMMAND_SIZE];
00051 jack_session_flags_t fSessionFlags;
00052
00053 JackClientControl(const char* name, int pid, int refnum, int uuid)
00054 {
00055 Init(name, pid, refnum, uuid);
00056 }
00057
00058 JackClientControl(const char* name)
00059 {
00060 Init(name, 0, -1, -1);
00061 }
00062
00063 JackClientControl()
00064 {
00065 Init("", 0, -1, -1);
00066 }
00067
00068 void Init(const char* name, int pid, int refnum, int uuid)
00069 {
00070 strcpy(fName, name);
00071 for (int i = 0; i < kMaxNotification; i++)
00072 fCallback[i] = false;
00073
00074 fCallback[kAddClient] = true;
00075 fCallback[kRemoveClient] = true;
00076 fCallback[kActivateClient] = true;
00077 fCallback[kLatencyCallback] = true;
00078
00079 fCallback[kStartFreewheelCallback] = true;
00080 fCallback[kStopFreewheelCallback] = true;
00081 fRefNum = refnum;
00082 fPID = pid;
00083 fTransportState = JackTransportStopped;
00084 fTransportSync = false;
00085 fTransportTimebase = false;
00086 fActive = false;
00087
00088 fSessionID = uuid;
00089 }
00090
00091 } POST_PACKED_STRUCTURE;
00092
00093 }
00094
00095
00096 #endif