JackWinNamedPipeClientChannel.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 Lesser General Public License as published by
00006   the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
00013   
00014   You should have received a copy of the GNU Lesser General Public License
00015   along with this program; if not, write to the Free Software 
00016   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017 
00018 */
00019 
00020 #ifndef __JackWinNamedPipeClientChannel__
00021 #define __JackWinNamedPipeClientChannel__
00022 
00023 #include "JackChannel.h"
00024 #include "JackWinNamedPipe.h"
00025 #include "JackThread.h"
00026 #include "JackRequest.h"
00027 
00028 namespace Jack
00029 {
00030 
00035 class JackWinNamedPipeClientChannel : public JackClientChannelInterface, public JackRunnableInterface
00036 {
00037 
00038     private:
00039 
00040         JackWinNamedPipeClient fRequestPipe;                    // Pipe to communicate with the server
00041         JackWinNamedPipeServer fNotificationListenPipe; // Pipe listener for server notification
00042         JackThread*     fThread;                                                        // Thread to execute the event loop
00043         JackClient*     fClient;
00044 
00045         void ServerSyncCall(JackRequest* req, JackResult* res, int* result);
00046         void ServerAsyncCall(JackRequest* req, JackResult* res, int* result);
00047 
00048     public:
00049 
00050         JackWinNamedPipeClientChannel();
00051         virtual ~JackWinNamedPipeClientChannel();
00052 
00053         int Open(const char* server_name, const char* name, char* name_res, JackClient* obj, jack_options_t options, jack_status_t* status);
00054         void Close();
00055 
00056         int Start();
00057         void Stop();
00058                 
00059                 int ServerCheck(const char* server_name);
00060 
00061         void ClientCheck(const char* name, char* name_res, int protocol, int options, int* status, int* result);
00062                 void ClientOpen(const char* name, int* shared_engine, int* shared_client, int* shared_graph, int* result);
00063         void ClientClose(int refnum, int* result);
00064 
00065         void ClientActivate(int refnum, int* result);
00066         void ClientDeactivate(int refnum, int* result);
00067 
00068         void PortRegister(int refnum, const char* name, const char* type, unsigned int flags, unsigned int buffer_size, unsigned int* port_index, int* result);
00069         void PortUnRegister(int refnum, jack_port_id_t port_index, int* result);
00070 
00071         void PortConnect(int refnum, const char* src, const char* dst, int* result);
00072         void PortDisconnect(int refnum, const char* src, const char* dst, int* result);
00073 
00074         void PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result);
00075         void PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result);
00076 
00077         void SetBufferSize(jack_nframes_t buffer_size, int* result);
00078         void SetFreewheel(int onoff, int* result);
00079 
00080         void ReleaseTimebase(int refnum, int* result);
00081         void SetTimebaseCallback(int refnum, int conditional, int* result);
00082 
00083                 void GetInternalClientName(int refnum, int int_ref, char* name_res, int* result);
00084         void InternalClientHandle(int refnum, const char* client_name, int* status, int* int_ref, int* result);
00085         virtual void InternalClientLoad(int refnum, const char* client_name, const char* so_name, const char* objet_data, int options, int* status, int* int_ref, int* result);
00086         virtual void InternalClientUnload(int refnum, int int_ref, int* status, int* result);
00087     
00088         // JackRunnableInterface interface
00089         bool Init();
00090         bool Execute();
00091 };
00092 
00093 } // end of namespace
00094 
00095 #endif
00096 

Generated on Thu Feb 14 11:16:02 2008 for Jackdmp by  doxygen 1.5.1