JackMachClientChannel.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 __JackMachClientChannel__
00021 #define __JackMachClientChannel__
00022 
00023 #include "JackChannel.h"
00024 #include "JackMachPort.h"
00025 #include "JackThread.h"
00026 
00027 namespace Jack
00028 {
00029 
00030 class JackLibClient;
00031 
00036 class JackMachClientChannel : public JackClientChannelInterface, public JackRunnableInterface
00037 {
00038 
00039     private:
00040 
00041         JackMachPort fClientPort;    
00042         JackMachPort fServerPort;    
00043         mach_port_t     fPrivatePort;
00044         JackThread*     fThread;                 
00046     public:
00047 
00048         JackMachClientChannel();
00049         virtual ~JackMachClientChannel();
00050 
00051         int Open(const char* name, JackClient* client);
00052         void Close();
00053 
00054         int Start();
00055         void Stop();
00056 
00057         void ClientNew(const char* name, int* shared_engine, int* shared_client, int* shared_graph, int* result);
00058         void ClientClose(int refnum, int* result);
00059 
00060         void ClientActivate(int refnum, int* result);
00061         void ClientDeactivate(int refnum, int* result);
00062 
00063         void PortRegister(int refnum, const char* name, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result);
00064         void PortUnRegister(int refnum, jack_port_id_t port_index, int* result);
00065 
00066         void PortConnect(int refnum, const char* src, const char* dst, int* result);
00067         void PortDisconnect(int refnum, const char* src, const char* dst, int* result);
00068 
00069         void PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result);
00070         void PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result);
00071 
00072         void SetBufferSize(jack_nframes_t buffer_size, int* result);
00073         void SetFreewheel(int onoff, int* result);
00074 
00075         void ReleaseTimebase(int refnum, int* result);
00076         void SetTimebaseCallback(int refnum, int conditional, int* result);
00077 
00078                 // JackRunnableInterface interface
00079                 bool Execute();
00080 };
00081 
00082 
00083 } // end of namespace
00084 
00085 #endif
00086 

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