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"
31 struct JackEngineControl
;
34 \brief Internal clients in the server.
37 class JackInternalClient
: public JackClient
42 JackClientControl fClientControl
; /*! Client control */
46 JackInternalClient(JackServer
* server
, JackSynchro
* table
);
47 virtual ~JackInternalClient();
49 int Open(const char* server_name
, const char* name
, jack_uuid_t uuid
, jack_options_t options
, jack_status_t
* status
);
50 void ShutDown(jack_status_t code
, const char* message
);
52 JackGraphManager
* GetGraphManager() const;
53 JackEngineControl
* GetEngineControl() const;
54 JackClientControl
* GetClientControl() const;
56 static JackGraphManager
* fGraphManager
; /*! Shared memory Port manager */
57 static JackEngineControl
* fEngineControl
; /*! Shared engine control */
61 \brief Loadable internal clients in the server.
64 typedef int (*InitializeCallback
)(jack_client_t
*, const char*);
65 typedef int (*InternalInitializeCallback
)(jack_client_t
*, const JSList
* params
);
66 typedef void (*FinishCallback
)(void *);
68 class JackLoadableInternalClient
: public JackInternalClient
74 FinishCallback fFinish
;
75 JackDriverDescFunction fDescriptor
;
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
93 InitializeCallback fInitialize
;
94 char fObjectData
[JACK_LOAD_INIT_LIMIT
];
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_uuid_t uuid
, jack_options_t options
, jack_status_t
* status
);
107 class JackLoadableInternalClient2
: public JackLoadableInternalClient
112 InternalInitializeCallback fInitialize
;
113 const JSList
* fParameters
;
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_uuid_t uuid
, jack_options_t options
, jack_status_t
* status
);
127 } // end of namespace