Jack2  1.9.8
JackInternalClient.h
1 /*
2 Copyright (C) 2001 Paul Davis
3 Copyright (C) 2004-2008 Grame
4 
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 
19 */
20 
21 #ifndef __JackInternalClient__
22 #define __JackInternalClient__
23 
24 #include "JackClient.h"
25 #include "JackClientControl.h"
26 #include "driver_interface.h"
27 
28 namespace Jack
29 {
30 
31 struct JackEngineControl;
32 
38 {
39 
40  private:
41 
42  JackClientControl fClientControl;
44  public:
45 
46  JackInternalClient(JackServer* server, JackSynchro* table);
47  virtual ~JackInternalClient();
48 
49  int Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status);
50 
51  JackGraphManager* GetGraphManager() const;
52  JackEngineControl* GetEngineControl() const;
53  JackClientControl* GetClientControl() const;
54 
55  static JackGraphManager* fGraphManager;
57 };
58 
63 typedef int (*InitializeCallback)(jack_client_t*, const char*);
64 typedef int (*InternalInitializeCallback)(jack_client_t*, const JSList* params);
65 typedef void (*FinishCallback)(void *);
66 typedef jack_driver_desc_t * (*JackDriverDescFunction) ();
67 
69 {
70 
71  protected:
72 
73  JACK_HANDLE fHandle;
74  FinishCallback fFinish;
75  JackDriverDescFunction fDescriptor;
76 
77  public:
78 
80  :JackInternalClient(server, table), fHandle(NULL), fFinish(NULL), fDescriptor(NULL)
81  {}
82  virtual ~JackLoadableInternalClient();
83 
84  virtual int Init(const char* so_name);
85 
86 };
87 
89 {
90 
91  private:
92 
93  InitializeCallback fInitialize;
94  char fObjectData[JACK_LOAD_INIT_LIMIT];
95 
96  public:
97 
98  JackLoadableInternalClient1(JackServer* server, JackSynchro* table, const char* object_data);
100  {}
101 
102  int Init(const char* so_name);
103  int Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status);
104 
105 };
106 
108 {
109 
110  private:
111 
112  InternalInitializeCallback fInitialize;
113  const JSList* fParameters;
114 
115  public:
116 
117  JackLoadableInternalClient2(JackServer* server, JackSynchro* table, const JSList* parameters);
118  virtual ~JackLoadableInternalClient2()
119  {}
120 
121  int Init(const char* so_name);
122  int Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status);
123 
124 };
125 
126 
127 } // end of namespace
128 
129 #endif