JackChannel.h 4.19 KB
Newer Older
sletz's avatar
sletz committed
1
/*
sletz's avatar
sletz committed
2
Copyright (C) 2004-2008 Grame
sletz's avatar
sletz committed
3
4

This program is free software; you can redistribute it and/or modify
sletz's avatar
sletz committed
5
6
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
sletz's avatar
sletz committed
7
8
9
10
11
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
sletz's avatar
sletz committed
12
GNU Lesser General Public License for more details.
sletz's avatar
sletz committed
13

sletz's avatar
sletz committed
14
15
16
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software 
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
sletz's avatar
sletz committed
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

*/

#ifndef __JackChannel__
#define __JackChannel__

#include "types.h"

namespace Jack
{

class JackClientInterface;
class JackClient;
class JackServer;
struct JackEngineControl;
class JackGraphManager;

34
35
namespace detail
{
sletz's avatar
sletz committed
36

sletz's avatar
sletz committed
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*!
\brief Inter process channel for server/client bidirectionnal communication : request and (receiving) notifications.
*/

class JackClientChannelInterface
{

    public:

        JackClientChannelInterface()
        {}
        virtual ~JackClientChannelInterface()
        {}

        // Open the Server/Client connection
52
        virtual int Open(const char* server_name, const char* name, char* name_res, JackClient* obj, jack_options_t options, jack_status_t* status)
sletz's avatar
sletz committed
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
        {
            return 0;
        }

        // Close the Server/Client connection
        virtual void Close()
        {}

        // Start listening for messages from the server
        virtual int Start()
        {
            return 0;
        }

        // Stop listening for messages from the server
        virtual void Stop()
        {}
sletz's avatar
sletz committed
70
71

        virtual int ServerCheck(const char* server_name)
sletz's avatar
sletz committed
72
        {
sletz's avatar
sletz committed
73
74
75
76
            return -1;
        }

        virtual void ClientCheck(const char* name, char* name_res, int protocol, int options, int* status, int* result)
77
        {}
78
        virtual void ClientOpen(const char* name, int pid, int* shared_engine, int* shared_client, int* shared_graph, int* result)
sletz's avatar
sletz committed
79
        {}
sletz's avatar
sletz committed
80
        virtual void ClientOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, int* result)
sletz's avatar
sletz committed
81
82
83
84
        {}
        virtual void ClientClose(int refnum, int* result)
        {}

85
        virtual void ClientActivate(int refnum, int state, int* result)
sletz's avatar
sletz committed
86
87
88
89
        {}
        virtual void ClientDeactivate(int refnum, int* result)
        {}

sletz's avatar
sletz committed
90
        virtual void PortRegister(int refnum, const char* name, const char* type, unsigned int flags, unsigned int buffer_size, unsigned int* port_index, int* result)
sletz's avatar
sletz committed
91
92
93
94
95
96
97
98
99
100
101
102
        {}
        virtual void PortUnRegister(int refnum, jack_port_id_t port_index, int* result)
        {}

        virtual void PortConnect(int refnum, const char* src, const char* dst, int* result)
        {}
        virtual void PortDisconnect(int refnum, const char* src, const char* dst, int* result)
        {}
        virtual void PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst, int* result)
        {}
        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)
        {}
sletz's avatar
sletz committed
105

106
        virtual void SetBufferSize(jack_nframes_t buffer_size, int* result)
sletz's avatar
sletz committed
107
108
109
110
111
112
113
114
        {}
        virtual void SetFreewheel(int onoff, int* result)
        {}

        virtual void ReleaseTimebase(int refnum, int* result)
        {}

        virtual void SetTimebaseCallback(int refnum, int conditional, int* result)
115
        {}
sletz's avatar
sletz committed
116
117

        virtual void GetInternalClientName(int refnum, int int_ref, char* name_res, int* result)
118
119
        {}

sletz's avatar
sletz committed
120
        virtual void InternalClientHandle(int refnum, const char* client_name, int* status, int* int_ref, int* result)
sletz's avatar
sletz committed
121
122
        {}

sletz's avatar
sletz committed
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* result)
124
        {}
sletz's avatar
sletz committed
125
126

        virtual void InternalClientUnload(int refnum, int int_ref, int* status, int* result)
127
        {}
sletz's avatar
sletz committed
128
        
sletz's avatar
sletz committed
129
};
sletz's avatar
sletz committed
130

131
}
sletz's avatar
sletz committed
132
133
134
135
136

} // end of namespace

#endif