Commit 4c5d1440 authored by sletz's avatar sletz
Browse files

Remove uneeded jack_port_connect API.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1928 0c269be4-1314-0410-8aa9-9f06e86f4224
parent fb4414b8
......@@ -22,6 +22,7 @@ Nedko Arnaudov
2008-03-10 Stephane Letz <letz@grame.fr>
* Nedko Arnaudov log patch.
* Remove uneeded jack_port_connect API.
2008-03-07 Stephane Letz <letz@grame.fr>
......
......@@ -1059,29 +1059,6 @@ EXPORT int jack_disconnect(jack_client_t* ext_client, const char* src, const cha
}
}
EXPORT int jack_port_connect(jack_client_t* ext_client, jack_port_t* src, jack_port_t* dst)
{
#ifdef __CLIENTDEBUG__
JackLibGlobals::CheckContext();
#endif
JackClient* client = (JackClient*)ext_client;
if (client == NULL) {
jack_error("jack_port_connect called with a NULL client");
return -1;
}
jack_port_id_t mysrc = (jack_port_id_t)src;
if (!CheckPort(mysrc)) {
jack_error("jack_port_connect called with a NULL src port");
return -1;
}
jack_port_id_t mydst = (jack_port_id_t)dst;
if (!CheckPort(mydst)) {
jack_error("jack_port_connect called with a NULL dst port");
return -1;
}
return client->PortConnect(mysrc, mydst);
}
EXPORT int jack_port_disconnect(jack_client_t* ext_client, jack_port_t* src)
{
#ifdef __CLIENTDEBUG__
......
......@@ -527,13 +527,6 @@ EXPORT int jack_disconnect(jack_client_t* ext_client, const char* src, const cha
return (*jack_disconnect_fun)(ext_client, src, dst);
}
typedef int (*jack_port_connect_fun_def)(jack_client_t* ext_client, jack_port_t* src, jack_port_t* dst);
static jack_port_connect_fun_def jack_port_connect_fun = 0;
EXPORT int jack_port_connect(jack_client_t* ext_client, jack_port_t* src, jack_port_t* dst)
{
return (*jack_port_connect_fun)(ext_client, src, dst);
}
typedef int (*jack_port_disconnect_fun_def)(jack_client_t* ext_client, jack_port_t* src);
static jack_port_disconnect_fun_def jack_port_disconnect_fun = 0;
EXPORT int jack_port_disconnect(jack_client_t* ext_client, jack_port_t* src)
......@@ -1080,8 +1073,7 @@ static bool init_library()
jack_port_monitoring_input_fun = (jack_port_monitoring_input_fun_def)dlsym(gLibrary, "jack_port_monitoring_input");
jack_connect_fun = (jack_connect_fun_def)dlsym(gLibrary, "jack_connect");
jack_disconnect_fun = (jack_disconnect_fun_def)dlsym(gLibrary, "jack_disconnect");
jack_port_connect_fun = (jack_port_connect_fun_def)dlsym(gLibrary, "jack_port_connect");
jack_port_disconnect_fun = (jack_port_disconnect_fun_def)dlsym(gLibrary, "jack_port_disconnect");
jack_port_disconnect_fun = (jack_port_disconnect_fun_def)dlsym(gLibrary, "jack_port_disconnect");
jack_port_name_size_fun = (jack_port_name_size_fun_def)dlsym(gLibrary, "jack_port_name_size");
jack_port_type_size_fun = (jack_port_type_size_fun_def)dlsym(gLibrary, "jack_port_type_size");
jack_get_sample_rate_fun = (jack_get_sample_rate_fun_def)dlsym(gLibrary, "jack_get_sample_rate");
......
......@@ -552,14 +552,6 @@ int JackClient::PortDisconnect(const char* src, const char* dst)
return result;
}
int JackClient::PortConnect(jack_port_id_t src, jack_port_id_t dst)
{
JackLog("JackClient::PortConnect src = %ld dst = %ld\n", src, dst);
int result = -1;
fChannel->PortConnect(GetClientControl()->fRefNum, src, dst, &result);
return result;
}
int JackClient::PortDisconnect(jack_port_id_t src)
{
JackLog("JackClient::PortDisconnect src = %ld\n", src);
......
......@@ -138,7 +138,6 @@ class JackClient : public JackClientInterface, public JackRunnableInterface
virtual int PortConnect(const char* src, const char* dst);
virtual int PortDisconnect(const char* src, const char* dst);
virtual int PortConnect(jack_port_id_t src, jack_port_id_t dst);
virtual int PortDisconnect(jack_port_id_t src);
virtual int PortIsMine(jack_port_id_t port_index);
......
......@@ -278,36 +278,6 @@ int JackDebugClient::PortDisconnect(const char* src, const char* dst)
return res;
}
int JackDebugClient::PortConnect(jack_port_id_t src, jack_port_id_t dst)
{
CheckClient();
if (!fIsActivated)
*fStream << "!!! ERROR !!! : Trying to connect port " << src << " to " << dst << " while the client has not been activated !" << endl;
int res = fClient->PortConnect(src, dst);
int i;
for (i = (fTotalPortNumber - 1); i >= 0; i--) { // We search the record into the history
if (fPortList[i].idport == src) { // We found the record in sources
if (fPortList[i].IsUnregistrated != 0)
*fStream << "!!! ERROR !!! : Connecting port " << src << " previoulsy unregistered !" << endl;
fPortList[i].IsConnected++;
*fStream << "Connecting port " << src << ". ";
break;
} else if (fPortList[i].idport == dst) { // We found the record in dest
if (fPortList[i].IsUnregistrated != 0)
*fStream << "!!! ERROR !!! : Connecting port " << dst << " previoulsy unregistered !" << endl;
fPortList[i].IsConnected++;
*fStream << "Connecting port " << dst << ". ";
break;
}
}
if (i == 0) // Port is not found
*fStream << "JackClientDebug : PortConnect : port was not found in debug database !" << endl;
if (res == -1)
*fStream << "Client '" << fClientName << "' try to do Portconnect but server return " << res << " ." << endl;
//*fStream << "Client Port Connect with ID done." << endl;
return res;
}
int JackDebugClient::PortDisconnect(jack_port_id_t src)
{
CheckClient();
......
......@@ -91,8 +91,7 @@ class JackDebugClient : public JackClient
int PortConnect(const char* src, const char* dst);
int PortDisconnect(const char* src, const char* dst);
int PortConnect(jack_port_id_t src, jack_port_id_t dst);
int PortDisconnect(jack_port_id_t src);
int PortDisconnect(jack_port_id_t src);
int PortIsMine(jack_port_id_t port_index);
......
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