JackChannel.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 __JackChannel__
00021 #define __JackChannel__
00022 
00023 #include "types.h"
00024 #include "JackError.h"
00025 #include "JackTransportEngine.h"
00026 
00027 namespace Jack
00028 {
00029 
00030 class JackClientInterface;
00031 class JackClient;
00032 class JackServer;
00033 struct JackEngineControl;
00034 class JackGraphManager;
00035 
00040 class JackClientChannelInterface
00041 {
00042 
00043     public:
00044 
00045         JackClientChannelInterface()
00046         {}
00047         virtual ~JackClientChannelInterface()
00048         {}
00049 
00050         // Open the Server/Client connection
00051         virtual int Open(const char* name, JackClient* obj)
00052         {
00053             return 0;
00054         }
00055 
00056         // Close the Server/Client connection
00057         virtual void Close()
00058         {}
00059 
00060         // Start listening for messages from the server
00061         virtual int Start()
00062         {
00063             return 0;
00064         }
00065 
00066         // Stop listening for messages from the server
00067         virtual void Stop()
00068         {}
00069 
00070         virtual void ClientNew(const char* name, int* shared_engine, int* shared_client, int* shared_graph, int* result)
00071         {}
00072         virtual void ClientNew(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, int* result)
00073         {}
00074         virtual void ClientClose(int refnum, int* result)
00075         {}
00076 
00077         virtual void ClientActivate(int refnum, int* result)
00078         {}
00079         virtual void ClientDeactivate(int refnum, int* result)
00080         {}
00081 
00082         virtual void PortRegister(int refnum, const char* name, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result)
00083         {}
00084         virtual void PortUnRegister(int refnum, jack_port_id_t port_index, int* result)
00085         {}
00086 
00087         virtual void PortConnect(int refnum, const char* src, const char* dst, int* result)
00088         {}
00089         virtual void PortDisconnect(int refnum, const char* src, const char* dst, int* result)
00090         {}
00091         virtual void PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
00092         {}
00093         virtual void PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
00094         {}
00095 
00096         virtual void SetBufferSize(jack_nframes_t buffer_size, int* result)
00097         {}
00098         virtual void SetFreewheel(int onoff, int* result)
00099         {}
00100 
00101         virtual void ReleaseTimebase(int refnum, int* result)
00102         {}
00103 
00104         virtual void SetTimebaseCallback(int refnum, int conditional, int* result)
00105         {}
00106 
00107 };
00108 
00113 class JackNotifyChannelInterface
00114 {
00115 
00116     public:
00117 
00118         JackNotifyChannelInterface()
00119         {}
00120         virtual ~JackNotifyChannelInterface()
00121         {}
00122 
00123         // Open the Server/Client connection
00124         virtual int Open(const char* name)
00125         {
00126             return 0;
00127         }
00128         // Close the Server/Client connection
00129         virtual void Close()
00130         {}
00131 
00132         /*
00133         The "sync" parameter allows to choose between "synchronous" and "asynchronous" notification
00134         */
00135         virtual void ClientNotify(int refnum, const char* name, int notify, int sync, int value, int* result)
00136         {}
00137 
00138         typedef enum {
00139             kAddClient = 0,
00140             kRemoveClient = 1,
00141                         kActivateClient = 2,
00142             kXRunCallback = 3,
00143             kGraphOrderCallback = 4,
00144             kBufferSizeCallback = 5,
00145             kStartFreewheel = 6,
00146             kStopFreewheel = 7,
00147             kPortRegistrationOn = 8,
00148             kPortRegistrationOff = 9,
00149             kZombifyClient = 10,
00150             kDeadClient = 11
00151     } NotificationType;
00152 
00153 };
00154 
00159 class JackServerChannelInterface
00160 {
00161 
00162     public:
00163 
00164         JackServerChannelInterface()
00165         {}
00166         virtual ~JackServerChannelInterface()
00167         {}
00168 
00169         // Open the Server/Client connection
00170         virtual int Open(JackServer* server)
00171         {
00172             return 0;
00173         }
00174         // Close the Server/Client connection
00175         virtual void Close()
00176         {}
00177 };
00178 
00183 class JackServerNotifyChannelInterface
00184 {
00185 
00186     public:
00187 
00188         JackServerNotifyChannelInterface()
00189         {}
00190         virtual ~JackServerNotifyChannelInterface()
00191         {}
00192 
00193         // Open the Server RT/Server connection
00194         virtual int Open()
00195         {
00196             return 0;
00197         }
00198         // Close the Server RT/Server connection
00199         virtual void Close()
00200         {}
00201 
00202         virtual void ClientNotify(int refnum, int notify, int value)
00203         {}
00204 
00205 };
00206 
00207 
00208 } // end of namespace
00209 
00210 #endif
00211 

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