Update OSX install script.
[jack2.git] / common / JackInternalClient.h
blobfe3981390946eef5d43acc517c4c0e3fb75cebc6
1 /*
2 Copyright (C) 2001 Paul Davis
3 Copyright (C) 2004-2008 Grame
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.
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.
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.
21 #ifndef __JackInternalClient__
22 #define __JackInternalClient__
24 #include "JackClient.h"
25 #include "JackClientControl.h"
26 #include "driver_interface.h"
28 namespace Jack
31 struct JackEngineControl;
33 /*!
34 \brief Internal clients in the server.
37 class JackInternalClient : public JackClient
40 private:
42 JackClientControl fClientControl; /*! Client control */
44 public:
46 JackInternalClient(JackServer* server, JackSynchro* table);
47 virtual ~JackInternalClient();
49 int Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status);
51 JackGraphManager* GetGraphManager() const;
52 JackEngineControl* GetEngineControl() const;
53 JackClientControl* GetClientControl() const;
55 static JackGraphManager* fGraphManager; /*! Shared memory Port manager */
56 static JackEngineControl* fEngineControl; /*! Shared engine cotrol */
59 /*!
60 \brief Loadable internal clients in the server.
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) ();
68 class JackLoadableInternalClient : public JackInternalClient
71 protected:
73 JACK_HANDLE fHandle;
74 FinishCallback fFinish;
75 JackDriverDescFunction fDescriptor;
77 public:
79 JackLoadableInternalClient(JackServer* server, JackSynchro* table)
80 :JackInternalClient(server, table), fHandle(NULL), fFinish(NULL), fDescriptor(NULL)
82 virtual ~JackLoadableInternalClient();
84 virtual int Init(const char* so_name);
88 class JackLoadableInternalClient1 : public JackLoadableInternalClient
91 private:
93 InitializeCallback fInitialize;
94 char fObjectData[JACK_LOAD_INIT_LIMIT];
96 public:
98 JackLoadableInternalClient1(JackServer* server, JackSynchro* table, const char* object_data);
99 virtual ~JackLoadableInternalClient1()
102 int Init(const char* so_name);
103 int Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status);
107 class JackLoadableInternalClient2 : public JackLoadableInternalClient
110 private:
112 InternalInitializeCallback fInitialize;
113 const JSList* fParameters;
115 public:
117 JackLoadableInternalClient2(JackServer* server, JackSynchro* table, const JSList* parameters);
118 virtual ~JackLoadableInternalClient2()
121 int Init(const char* so_name);
122 int Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status);
127 } // end of namespace
129 #endif