Jack2  1.9.8
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 
43 {
44 
45  public:
46 
48  {}
50  {}
51 
52  // Open the Server/Client connection
53  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)
54  {
55  return 0;
56  }
57 
58  // Close the Server/Client connection
59  virtual void Close()
60  {}
61 
62  // Start listening for messages from the server
63  virtual int Start()
64  {
65  return 0;
66  }
67 
68  // Stop listening for messages from the server
69  virtual void Stop()
70  {}
71 
72  virtual int ServerCheck(const char* server_name)
73  {
74  return -1;
75  }
76 
77  virtual void ClientCheck(const char* name, int uuid, char* name_res, int protocol, int options, int* status, int* result, int open)
78  {}
79  virtual void ClientOpen(const char* name, int pid, int uuid, int* shared_engine, int* shared_client, int* shared_graph, int* result)
80  {}
81  virtual void ClientOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, int* result)
82  {}
83  virtual void ClientClose(int refnum, int* result)
84  {}
85 
86  virtual void ClientActivate(int refnum, int is_real_time, int* result)
87  {}
88  virtual void ClientDeactivate(int refnum, int* result)
89  {}
90 
91  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)
92  {}
93  virtual void PortUnRegister(int refnum, jack_port_id_t port_index, int* result)
94  {}
95 
96  virtual void PortConnect(int refnum, const char* src, const char* dst, int* result)
97  {}
98  virtual void PortDisconnect(int refnum, const char* src, const char* dst, int* result)
99  {}
100  virtual void PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
101  {}
102  virtual void PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
103  {}
104  virtual void PortRename(int refnum, jack_port_id_t port, const char* name, int* result)
105  {}
106 
107  virtual void SetBufferSize(jack_nframes_t buffer_size, int* result)
108  {}
109  virtual void SetFreewheel(int onoff, int* result)
110  {}
111  virtual void ComputeTotalLatencies(int* result)
112  {}
113 
114  virtual void ReleaseTimebase(int refnum, int* result)
115  {}
116  virtual void SetTimebaseCallback(int refnum, int conditional, int* result)
117  {}
118 
119  virtual void GetInternalClientName(int refnum, int int_ref, char* name_res, int* result)
120  {}
121  virtual void InternalClientHandle(int refnum, const char* client_name, int* status, int* int_ref, int* result)
122  {}
123  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)
124  {}
125  virtual void InternalClientUnload(int refnum, int int_ref, int* status, int* result)
126  {}
127 
128  virtual void SessionNotify(int refnum, const char* target, jack_session_event_type_t type, const char* path, jack_session_command_t** result)
129  {}
130  virtual void SessionReply(int refnum, int* result)
131  {}
132  virtual void GetUUIDForClientName(int refnum, const char* client_name, char* uuid_res, int* result)
133  {}
134  virtual void GetClientNameForUUID(int refnum, const char* uuid, char* name_res, int* result)
135  {}
136  virtual void ReserveClientName(int refnum, const char* client_name, const char *uuid, int* result)
137  {}
138  virtual void ClientHasSessionCallback(const char* client_name, int* result)
139  {}
140 
141  virtual bool IsChannelThread()
142  {
143  return false;
144  }
145 };
146 
147 }
148 
149 } // end of namespace
150 
151 #endif
152