JackChannel.h

00001 /*
00002 Copyright (C) 2004-2008 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 __JackChannel__
00021 #define __JackChannel__
00022 
00023 #include "types.h"
00024 #include "JackError.h"
00025 
00026 namespace Jack
00027 {
00028 
00029 class JackClientInterface;
00030 class JackClient;
00031 class JackServer;
00032 struct JackEngineControl;
00033 class JackGraphManager;
00034 
00039 class JackClientChannelInterface
00040 {
00041 
00042     public:
00043 
00044         JackClientChannelInterface()
00045         {}
00046         virtual ~JackClientChannelInterface()
00047         {}
00048 
00049         // Open the Server/Client connection
00050         virtual int Open(const char* server_name, const char* name, char* name_res, JackClient* obj, jack_options_t options, jack_status_t* status)
00051         {
00052             return 0;
00053         }
00054 
00055         // Close the Server/Client connection
00056         virtual void Close()
00057         {}
00058 
00059         // Start listening for messages from the server
00060         virtual int Start()
00061         {
00062             return 0;
00063         }
00064 
00065         // Stop listening for messages from the server
00066         virtual void Stop()
00067         {}
00068                 
00069                 virtual int ServerCheck(const char* server_name)
00070         {
00071                         return -1;
00072                 }
00073                 
00074                 virtual void ClientCheck(const char* name, char* name_res, int protocol, int options, int* status, int* result)
00075         {}
00076         virtual void ClientOpen(const char* name, int* shared_engine, int* shared_client, int* shared_graph, int* result)
00077         {}
00078         virtual void ClientOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, int* result)
00079         {}
00080         virtual void ClientClose(int refnum, int* result)
00081         {}
00082 
00083         virtual void ClientActivate(int refnum, int* result)
00084         {}
00085         virtual void ClientDeactivate(int refnum, int* result)
00086         {}
00087 
00088         virtual void PortRegister(int refnum, const char* name, const char* type, unsigned int flags, unsigned int buffer_size, unsigned int* port_index, int* result)
00089         {}
00090         virtual void PortUnRegister(int refnum, jack_port_id_t port_index, int* result)
00091         {}
00092 
00093         virtual void PortConnect(int refnum, const char* src, const char* dst, int* result)
00094         {}
00095         virtual void PortDisconnect(int refnum, const char* src, const char* dst, int* result)
00096         {}
00097         virtual void PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
00098         {}
00099         virtual void PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
00100         {}
00101 
00102         virtual void SetBufferSize(jack_nframes_t buffer_size, int* result)
00103         {}
00104         virtual void SetFreewheel(int onoff, int* result)
00105         {}
00106 
00107         virtual void ReleaseTimebase(int refnum, int* result)
00108         {}
00109 
00110         virtual void SetTimebaseCallback(int refnum, int conditional, int* result)
00111         {}
00112                 
00113                 virtual void GetInternalClientName(int refnum, int int_ref, char* name_res, int* result)
00114         {}
00115 
00116                 virtual void InternalClientHandle(int refnum, const char* client_name, int* status, int* int_ref, int* result)
00117         {}
00118 
00119                 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)
00120         {}
00121                 
00122                 virtual void InternalClientUnload(int refnum, int int_ref, int* status, int* result)
00123         {}
00124 };
00125 
00130 class JackNotifyChannelInterface
00131 {
00132 
00133     public:
00134 
00135         JackNotifyChannelInterface()
00136         {}
00137         virtual ~JackNotifyChannelInterface()
00138         {}
00139 
00140         // Open the Server/Client connection
00141         virtual int Open(const char* name)
00142         {
00143             return 0;
00144         }
00145         // Close the Server/Client connection
00146         virtual void Close()
00147         {}
00148 
00149         /*
00150         The "sync" parameter allows to choose between "synchronous" and "asynchronous" notification
00151         */
00152         virtual void ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2, int* result)
00153         {}
00154 
00155 };
00156 
00161 class JackServerChannelInterface
00162 {
00163 
00164     public:
00165 
00166         JackServerChannelInterface()
00167         {}
00168         virtual ~JackServerChannelInterface()
00169         {}
00170 
00171         // Open the Server/Client connection
00172         virtual int Open(const char* server_name, JackServer* server)
00173         {
00174             return 0;
00175         }
00176         // Close the Server/Client connection
00177         virtual void Close()
00178         {}
00179 };
00180 
00185 class JackServerNotifyChannelInterface
00186 {
00187 
00188     public:
00189 
00190         JackServerNotifyChannelInterface()
00191         {}
00192         virtual ~JackServerNotifyChannelInterface()
00193         {}
00194 
00195         // Open the Server RT/Server connection
00196         virtual int Open(const char* server_name)
00197         {
00198             return 0;
00199         }
00200         // Close the Server RT/Server connection
00201         virtual void Close()
00202         {}
00203 
00204         virtual void ClientNotify(int refnum, int notify, int value1, int value2)
00205         {}
00206 
00207 };
00208 
00209 
00210 } // end of namespace
00211 
00212 #endif
00213 

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