Jack2  1.9.9
JackChannel.h
1 /*
2 Copyright (C) 2004-2008 Grame
3 
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2.1 of the License, or
7 (at your option) any later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13 
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 
18 */
19 
20 #ifndef __JackChannel__
21 #define __JackChannel__
22 
23 #include "types.h"
24 #include "JackSession.h"
25 
26 namespace Jack
27 {
28 
29 class JackClientInterface;
30 class JackClient;
31 class JackServer;
32 struct JackEngineControl;
33 class JackGraphManager;
34 
35 namespace detail
36 {
37 
39 {
40 
41  public:
42 
44  {}
46  {}
47 
48  virtual int Read(void* data, int len) = 0;
49  virtual int Write(void* data, int len) = 0;
50 
51 };
52 
54 {
55 
56  public:
57 
59  {}
60  virtual ~JackRequestInterface()
61  {}
62 
63  virtual int Connect(const char* dir, const char* name, int which) = 0;
64  virtual int Close() = 0;
65 
66 };
67 
69 {
70 
71  public:
72 
74  {}
76  {}
77 
78  virtual int Read(void* data, int len) { return -1; }
79  virtual int Write(void* data, int len) { return -1; }
80 
81  virtual int Connect(const char* dir, const char* name, int which) { return -1; }
82  virtual int Close() { return -1; }
83 
84 };
85 
91 {
92 
93  public:
94 
96  {}
98  {}
99 
100  // Open the Server/Client connection
101  virtual int Open(const char* server_name, const char* name, int uuid, char* name_res, JackClient* obj, jack_options_t options, jack_status_t* status)
102  {
103  return 0;
104  }
105 
106  // Close the Server/Client connection
107  virtual void Close()
108  {}
109 
110  // Start listening for messages from the server
111  virtual int Start()
112  {
113  return 0;
114  }
115 
116  // Stop listening for messages from the server
117  virtual void Stop()
118  {}
119 
120  virtual int ServerCheck(const char* server_name)
121  {
122  return -1;
123  }
124 
125  virtual void ClientCheck(const char* name, int uuid, char* name_res, int protocol, int options, int* status, int* result, int open)
126  {}
127  virtual void ClientOpen(const char* name, int pid, int uuid, int* shared_engine, int* shared_client, int* shared_graph, int* result)
128  {}
129  virtual void ClientOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, int* result)
130  {}
131  virtual void ClientClose(int refnum, int* result)
132  {}
133 
134  virtual void ClientActivate(int refnum, int is_real_time, int* result)
135  {}
136  virtual void ClientDeactivate(int refnum, int* result)
137  {}
138 
139  virtual void PortRegister(int refnum, const char* name, const char* type, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port_index, int* result)
140  {}
141  virtual void PortUnRegister(int refnum, jack_port_id_t port_index, int* result)
142  {}
143 
144  virtual void PortConnect(int refnum, const char* src, const char* dst, int* result)
145  {}
146  virtual void PortDisconnect(int refnum, const char* src, const char* dst, int* result)
147  {}
148  virtual void PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
149  {}
150  virtual void PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
151  {}
152  virtual void PortRename(int refnum, jack_port_id_t port, const char* name, int* result)
153  {}
154 
155  virtual void SetBufferSize(jack_nframes_t buffer_size, int* result)
156  {}
157  virtual void SetFreewheel(int onoff, int* result)
158  {}
159  virtual void ComputeTotalLatencies(int* result)
160  {}
161 
162  virtual void ReleaseTimebase(int refnum, int* result)
163  {}
164  virtual void SetTimebaseCallback(int refnum, int conditional, int* result)
165  {}
166 
167  virtual void GetInternalClientName(int refnum, int int_ref, char* name_res, int* result)
168  {}
169  virtual void InternalClientHandle(int refnum, const char* client_name, int* status, int* int_ref, int* result)
170  {}
171  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 uuid, int* result)
172  {}
173  virtual void InternalClientUnload(int refnum, int int_ref, int* status, int* result)
174  {}
175 
176  virtual void SessionNotify(int refnum, const char* target, jack_session_event_type_t type, const char* path, jack_session_command_t** result)
177  {}
178  virtual void SessionReply(int refnum, int* result)
179  {}
180  virtual void GetUUIDForClientName(int refnum, const char* client_name, char* uuid_res, int* result)
181  {}
182  virtual void GetClientNameForUUID(int refnum, const char* uuid, char* name_res, int* result)
183  {}
184  virtual void ReserveClientName(int refnum, const char* client_name, const char *uuid, int* result)
185  {}
186  virtual void ClientHasSessionCallback(const char* client_name, int* result)
187  {}
188 
189  virtual bool IsChannelThread()
190  {
191  return false;
192  }
193 };
194 
195 }
196 
197 } // end of namespace
198 
199 #endif
200 
Inter process channel for server/client bidirectionnal communication : request and (receiving) notifi...
Definition: JackChannel.h:90
Graph manager: contains the connection manager and the port array.
Engine control in shared memory.
The base class for clients: share part of the implementation for JackInternalClient and JackLibClient...
Definition: JackClient.h:47