JackInternalClientChannel.h

00001 /*
00002 Copyright (C) 2004-2006 Grame  
00003 
00004 This program is free software; you can redistribute it and/or modify
00005   it under the terms of the GNU General Public License as published by
00006   the Free Software Foundation; either version 2 of the License, or
00007   (at your option) any later version.
00008 
00009   This program is distributed in the hope that it will be useful,
00010   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012   GNU General Public License for more details.
00013 
00014   You should have received a copy of the GNU General Public License
00015   along with this program; if not, write to the Free Software
00016   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 
00018 */
00019 
00020 #ifndef __JackInternalClientChannel__
00021 #define __JackInternalClientChannel__
00022 
00023 #include "JackChannel.h"
00024 
00025 namespace Jack
00026 {
00027 
00032 class JackInternalClientChannel : public JackClientChannelInterface
00033 {
00034 
00035     private:
00036 
00037         JackServer* fServer;
00038         JackEngine* fEngine;
00039 
00040     public:
00041 
00042         JackInternalClientChannel(JackServer* server): fServer(server), fEngine(server->GetEngine())
00043         {}
00044         virtual ~JackInternalClientChannel()
00045         {}
00046 
00047         void ClientNew(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, int* result)
00048         {
00049             *result = fEngine->ClientInternalNew(name, ref, shared_engine, shared_manager, client);
00050         }
00051         void ClientClose(int refnum, int* result)
00052         {
00053             *result = fEngine->ClientInternalClose(refnum);
00054         }
00055         void ClientActivate(int refnum, int* result)
00056         {
00057             *result = fServer->Activate(refnum);
00058         }
00059         void ClientDeactivate(int refnum, int* result)
00060         {
00061             *result = fServer->Deactivate(refnum);
00062         }
00063 
00064         void PortRegister(int refnum, const char* name, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result)
00065         {
00066             *result = fEngine->PortRegister(refnum, name, flags, buffer_size, port_index);
00067         }
00068         void PortUnRegister(int refnum, jack_port_id_t port_index, int* result)
00069         {
00070             *result = fEngine->PortUnRegister(refnum, port_index);
00071         }
00072 
00073         void PortConnect(int refnum, const char* src, const char* dst, int* result)
00074         {
00075             *result = fEngine->PortConnect(refnum, src, dst);
00076         }
00077         void PortDisconnect(int refnum, const char* src, const char* dst, int* result)
00078         {
00079             *result = fEngine->PortDisconnect(refnum, src, dst);
00080         }
00081 
00082         void PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
00083         {
00084             *result = fEngine->PortConnect(refnum, src, dst);
00085         }
00086         void PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
00087         {
00088             *result = fEngine->PortDisconnect(refnum, src, dst);
00089         }
00090 
00091         void SetBufferSize(jack_nframes_t buffer_size, int* result)
00092         {
00093             *result = fServer->SetBufferSize(buffer_size);
00094         }
00095         void SetFreewheel(int onoff, int* result)
00096         {
00097             *result = fServer->SetFreewheel(onoff);
00098         }
00099 
00100         // A FINIR
00101         virtual void ReleaseTimebase(int refnum, int* result)
00102         {
00103             *result = fEngine->ReleaseTimebase(refnum);
00104         }
00105 
00106         virtual void SetTimebaseCallback(int refnum, int conditional, int* result)
00107         {
00108             *result = fEngine->SetTimebaseCallback(refnum, conditional);
00109         }
00110 
00111 };
00112 
00113 } // end of namespace
00114 
00115 #endif
00116 

Generated on Wed Jan 10 11:42:45 2007 for Jackdmp by  doxygen 1.4.5