1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
|
/*
Copyright (C) 2004-2008 Grame
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __JackInternalClientChannel__
#define __JackInternalClientChannel__
#include "JackChannel.h"
namespace Jack
{
/*!
\brief JackClientChannel for server internal clients.
*/
class JackInternalClientChannel : public detail::JackClientChannelInterface
{
private:
JackServer* fServer;
JackLockedEngine* fEngine;
public:
JackInternalClientChannel(JackServer* server): fServer(server), fEngine(server->GetEngine())
{}
virtual ~JackInternalClientChannel()
{}
void ClientCheck(const char* name, jack_uuid_t uuid, char* name_res, int protocol, int options, int* status, int* result, int open)
{
*result = fEngine->ClientCheck(name, uuid, name_res, protocol, options, status);
}
void ClientOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, int* result)
{
*result = fEngine->ClientInternalOpen(name, ref, shared_engine, shared_manager, client, true);
}
void ClientClose(int refnum, int* result)
{
*result = fEngine->ClientInternalClose(refnum, true);
}
void ClientActivate(int refnum, int is_real_time, int* result)
{
*result = fEngine->ClientActivate(refnum, is_real_time);
}
void ClientDeactivate(int refnum, int* result)
{
*result = fEngine->ClientDeactivate(refnum);
}
void PortRegister(int refnum, const char* name, const char* type, unsigned int flags, unsigned int buffer_size, unsigned int* port_index, int* result)
{
*result = fEngine->PortRegister(refnum, name, type, flags, buffer_size, port_index);
}
void PortUnRegister(int refnum, jack_port_id_t port_index, int* result)
{
*result = fEngine->PortUnRegister(refnum, port_index);
}
void PortConnect(int refnum, const char* src, const char* dst, int* result)
{
*result = fEngine->PortConnect(refnum, src, dst);
}
void PortDisconnect(int refnum, const char* src, const char* dst, int* result)
{
*result = fEngine->PortDisconnect(refnum, src, dst);
}
void PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
{
*result = fEngine->PortConnect(refnum, src, dst);
}
void PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
{
*result = fEngine->PortDisconnect(refnum, src, dst);
}
void PortRename(int refnum, jack_port_id_t port, const char* name, int* result)
{
*result = fEngine->PortRename(refnum, port, name);
}
void SetBufferSize(jack_nframes_t buffer_size, int* result)
{
*result = fServer->SetBufferSize(buffer_size);
}
void SetFreewheel(int onoff, int* result)
{
*result = fServer->SetFreewheel(onoff);
}
void ComputeTotalLatencies(int* result)
{
*result = fEngine->ComputeTotalLatencies();
}
void ReleaseTimebase(int refnum, int* result)
{
*result = fServer->ReleaseTimebase(refnum);
}
void SetTimebaseCallback(int refnum, int conditional, int* result)
{
*result = fServer->SetTimebaseCallback(refnum, conditional);
}
void GetInternalClientName(int refnum, int int_ref, char* name_res, int* result)
{
*result = fEngine->GetInternalClientName(int_ref, name_res);
}
void InternalClientHandle(int refnum, const char* client_name, int* status, int* int_ref, int* result)
{
*result = fEngine->InternalClientHandle(client_name, status, int_ref);
}
void InternalClientLoad(int refnum, const char* client_name, const char* so_name, const char* objet_data, int options, int* status, int* int_ref, jack_uuid_t uuid, int* result)
{
*result = fServer->InternalClientLoad1(client_name, so_name, objet_data, options, int_ref, uuid, status);
}
void InternalClientUnload(int refnum, int int_ref, int* status, int* result)
{
*result = fEngine->InternalClientUnload(int_ref, status);
}
void SessionNotify(int refnum, const char *target, jack_session_event_type_t type, const char *path, jack_session_command_t** result)
{
JackSessionNotifyResult* res;
fEngine->SessionNotify(refnum, target, type, path, NULL, &res);
if (res == NULL) {
*result = NULL;
return;
}
*result = res->GetCommands();
delete(res);
}
void SessionReply(int refnum, int* result)
{
*result = fEngine->SessionReply(refnum);
}
void GetUUIDForClientName(int refnum, const char* client_name, char* uuid_res, int* result)
{
*result = fEngine->GetUUIDForClientName(client_name, uuid_res);
}
void GetClientNameForUUID(int refnum, const char* uuid, char* name_res, int* result)
{
*result = fEngine->GetClientNameForUUID(uuid, name_res);
}
void ReserveClientName(int refnum, const char* client_name, const char *uuid, int* result)
{
*result = fEngine->ReserveClientName(client_name, uuid);
}
void ClientHasSessionCallback(const char* client_name, int* result)
{
*result = fEngine->ClientHasSessionCallback(client_name);
}
};
} // end of namespace
#endif
|