Commit f2085bbd authored by sletz's avatar sletz
Browse files

Parameter renaming.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3657 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 158d3149
......@@ -82,7 +82,7 @@ class JackClientChannelInterface
virtual void ClientClose(int refnum, int* result)
{}
virtual void ClientActivate(int refnum, int state, int* result)
virtual void ClientActivate(int refnum, int is_real_time, int* result)
{}
virtual void ClientDeactivate(int refnum, int* result)
{}
......
......@@ -641,14 +641,14 @@ int JackEngine::ClientCloseAux(int refnum, JackClientInterface* client, bool wai
return 0;
}
int JackEngine::ClientActivate(int refnum, bool state)
int JackEngine::ClientActivate(int refnum, bool is_real_time)
{
AssertRefnum(refnum);
JackClientInterface* client = fClientTable[refnum];
assert(fClientTable[refnum]);
jack_log("JackEngine::ClientActivate ref = %ld name = %s", refnum, client->GetClientControl()->fName);
if (state)
if (is_real_time)
fGraphManager->Activate(refnum);
// Wait for graph state change to be effective
......
......@@ -88,7 +88,7 @@ class SERVER_EXPORT JackEngine
int ClientExternalClose(int refnum);
int ClientInternalClose(int refnum, bool wait);
int ClientActivate(int refnum, bool state);
int ClientActivate(int refnum, bool is_real_time);
int ClientDeactivate(int refnum);
int GetClientPID(const char* name);
......
......@@ -63,9 +63,9 @@ class JackInternalClientChannel : public detail::JackClientChannelInterface
*result = fEngine->ClientInternalClose(refnum, true);
}
void ClientActivate(int refnum, int state, int* result)
void ClientActivate(int refnum, int is_real_time, int* result)
{
*result = fEngine->ClientActivate(refnum, state);
*result = fEngine->ClientActivate(refnum, is_real_time);
}
void ClientDeactivate(int refnum, int* result)
{
......
......@@ -83,10 +83,10 @@ class SERVER_EXPORT JackLockedEngine : public JackLockAble
return fEngine.ClientInternalClose(refnum, wait);
}
int ClientActivate(int refnum, bool state)
int ClientActivate(int refnum, bool is_real_time)
{
JackLock lock(this);
return fEngine.ClientActivate(refnum, state);
return fEngine.ClientActivate(refnum, is_real_time);
}
int ClientDeactivate(int refnum)
{
......
......@@ -297,25 +297,25 @@ struct JackActivateRequest : public JackRequest
{
int fRefNum;
int fState;
int fIsRealTime;
JackActivateRequest()
{}
JackActivateRequest(int refnum, int state)
: JackRequest(JackRequest::kActivateClient), fRefNum(refnum), fState(state)
JackActivateRequest(int refnum, int is_real_time)
: JackRequest(JackRequest::kActivateClient), fRefNum(refnum), fIsRealTime(is_real_time)
{}
int Read(JackChannelTransaction* trans)
{
CheckRes(trans->Read(&fRefNum, sizeof(int)));
return trans->Read(&fState, sizeof(int));
return trans->Read(&fIsRealTime, sizeof(int));
}
int Write(JackChannelTransaction* trans)
{
CheckRes(JackRequest::Write(trans));
CheckRes(trans->Write(&fRefNum, sizeof(int)));
return trans->Write(&fState, sizeof(int));
return trans->Write(&fIsRealTime, sizeof(int));
}
} POST_PACKED_STRUCTURE;
......
......@@ -59,12 +59,12 @@ rpc_type server_rpc_jack_client_close(mach_port_t private_port, int refnum, int*
return KERN_SUCCESS;
}
rpc_type server_rpc_jack_client_activate(mach_port_t private_port, int refnum, int state, int* result)
rpc_type server_rpc_jack_client_activate(mach_port_t private_port, int refnum, int is_real_time, int* result)
{
jack_log("rpc_jack_client_activate");
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port];
assert(channel);
*result = channel->GetEngine()->ClientActivate(refnum, state);
*result = channel->GetEngine()->ClientActivate(refnum, is_real_time);
return KERN_SUCCESS;
}
......
......@@ -154,9 +154,9 @@ void JackMachClientChannel::ClientClose(int refnum, int* result)
}
}
void JackMachClientChannel::ClientActivate(int refnum, int state, int* result)
void JackMachClientChannel::ClientActivate(int refnum, int is_real_time, int* result)
{
kern_return_t res = rpc_jack_client_activate(fPrivatePort, refnum, state, result);
kern_return_t res = rpc_jack_client_activate(fPrivatePort, refnum, is_real_time, result);
if (res != KERN_SUCCESS) {
*result = -1;
jack_error("JackMachClientChannel::ClientActivate err = %s", mach_error_string(res));
......
......@@ -61,7 +61,7 @@ class JackMachClientChannel : public detail::JackClientChannelInterface, public
{}
void ClientClose(int refnum, int* result);
void ClientActivate(int refnum, int state, int* result);
void ClientActivate(int refnum, int is_real_time, int* result);
void ClientDeactivate(int refnum, int* result);
void PortRegister(int refnum, const char* name, const char* type, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result);
......
......@@ -168,9 +168,9 @@ void JackSocketClientChannel::ClientClose(int refnum, int* result)
ServerSyncCall(&req, &res, result);
}
void JackSocketClientChannel::ClientActivate(int refnum, int state, int* result)
void JackSocketClientChannel::ClientActivate(int refnum, int is_real_time, int* result)
{
JackActivateRequest req(refnum, state);
JackActivateRequest req(refnum, is_real_time);
JackResult res;
ServerSyncCall(&req, &res, result);
}
......
......@@ -66,7 +66,7 @@ class JackSocketClientChannel : public detail::JackClientChannelInterface, publi
{}
void ClientClose(int refnum, int* result);
void ClientActivate(int refnum, int state, int* result);
void ClientActivate(int refnum, int is_real_time, int* result);
void ClientDeactivate(int refnum, int* result);
void PortRegister(int refnum, const char* name, const char* type, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result);
......
......@@ -203,7 +203,7 @@ bool JackSocketServerChannel::HandleRequest(int fd)
JackResult res;
jack_log("JackRequest::ActivateClient");
if (req.Read(socket) == 0)
res.fResult = fServer->GetEngine()->ClientActivate(req.fRefNum, req.fState);
res.fResult = fServer->GetEngine()->ClientActivate(req.fRefNum, req.fIsRealTime);
if (res.Write(socket) < 0)
jack_error("JackRequest::ActivateClient write error ref = %d", req.fRefNum);
break;
......
......@@ -167,9 +167,9 @@ void JackWinNamedPipeClientChannel::ClientClose(int refnum, int* result)
ServerSyncCall(&req, &res, result);
}
void JackWinNamedPipeClientChannel::ClientActivate(int refnum, int state, int* result)
void JackWinNamedPipeClientChannel::ClientActivate(int refnum, int is_real_time, int* result)
{
JackActivateRequest req(refnum, state);
JackActivateRequest req(refnum, is_real_time);
JackResult res;
ServerSyncCall(&req, &res, result);
}
......
......@@ -64,7 +64,7 @@ class JackWinNamedPipeClientChannel : public detail::JackClientChannelInterface,
{}
void ClientClose(int refnum, int* result);
void ClientActivate(int refnum, int state, int* result);
void ClientActivate(int refnum, int is_real_time, int* result);
void ClientDeactivate(int refnum, int* result);
void PortRegister(int refnum, const char* name, const char* type, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result);
......
......@@ -138,7 +138,7 @@ bool JackClientPipeThread::HandleRequest()
JackResult res;
jack_log("JackRequest::ActivateClient");
if (req.Read(fPipe) == 0)
res.fResult = fServer->GetEngine()->ClientActivate(req.fRefNum, req.fState);
res.fResult = fServer->GetEngine()->ClientActivate(req.fRefNum, req.fIsRealTime);
res.Write(fPipe);
break;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment