Jack2 1.9.12

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
37 class JackInternalClient : public JackClient
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 void ShutDown(jack_status_t code, const char* message);
51
52 JackGraphManager* GetGraphManager() const;
53 JackEngineControl* GetEngineControl() const;
54 JackClientControl* GetClientControl() const;
55
56 static JackGraphManager* fGraphManager;
57 static JackEngineControl* fEngineControl;
58 };
59
64 typedef int (*InitializeCallback)(jack_client_t*, const char*);
65 typedef int (*InternalInitializeCallback)(jack_client_t*, const JSList* params);
66 typedef void (*FinishCallback)(void *);
67
68 class JackLoadableInternalClient : public JackInternalClient
69 {
70
71 protected:
72
73 JACK_HANDLE fHandle;
74 FinishCallback fFinish;
75 JackDriverDescFunction fDescriptor;
76
77 public:
78
79 JackLoadableInternalClient(JackServer* server, JackSynchro* table)
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
88 class JackLoadableInternalClient1 : public JackLoadableInternalClient
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);
99 virtual ~JackLoadableInternalClient1()
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
107 class JackLoadableInternalClient2 : public JackLoadableInternalClient
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
Jack::JackInternalClient
Internal clients in the server.
Definition: JackInternalClient.h:37
Jack::JackPosixSemaphore
Inter process synchronization using POSIX semaphore.
Definition: JackPosixSemaphore.h:36
Jack::JackLoadableInternalClient2
Definition: JackInternalClient.h:107
Jack::JackLoadableInternalClient1
Definition: JackInternalClient.h:88
Jack::JackGraphManager
Graph manager: contains the connection manager and the port array.
Definition: JackGraphManager.h:40
Jack::JackServer
The Jack server.
Definition: JackServer.h:46
Jack::JackClient::Init
bool Init()
Called once when the thread starts.
Definition: JackClient.cpp:501
Jack::JackLoadableInternalClient
Definition: JackInternalClient.h:68
Jack::JackInternalClient::JackInternalClient
JackInternalClient(JackServer *server, JackSynchro *table)
Definition: JackInternalClient.cpp:56
Jack::JackEngineControl
Engine control in shared memory.
Definition: JackEngineControl.h:49
_JSList
Definition: linux/alsa/jslist.h:35
Jack::JackInternalClient::fEngineControl
static JackEngineControl * fEngineControl
Definition: JackInternalClient.h:57
Jack::JackClient
The base class for clients: share part of the implementation for JackInternalClient and JackLibClient...
Definition: JackClient.h:47
Jack::JackClientControl
Client control possibly in shared memory.
Definition: JackClientControl.h:38