2 Copyright (C) 2004-2006 Grame
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2.1 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #ifndef __JackWinNamedPipeServerChannel__
21 #define __JackWinNamedPipeServerChannel__
23 #include "JackChannel.h"
24 #include "JackWinNamedPipe.h"
25 #include "JackThread.h"
32 class JackClientPipeThread
: public JackRunnableInterface
37 JackWinNamedPipeClient
* fPipe
;
42 void AddClient(JackWinNamedPipeClient
* pipe
, char* name
, int* shared_engine
, int* shared_client
, int* shared_ports
, int* result
);
43 void RemoveClient(JackWinNamedPipeClient
* pipe
, int refnum
);
44 void KillClient(JackWinNamedPipeClient
* pipe
);
50 JackClientPipeThread(JackWinNamedPipeClient
* pipe
);
51 virtual ~JackClientPipeThread();
53 int Open(JackServer
* server
); // Open the Server/Client connection
54 void Close(); // Close the Server/Client connection
56 int HandleRequest(JackWinNamedPipeClient
* pipe
);
58 // JackRunnableInterface interface
63 return (fRefNum
>= 0);
68 \brief JackServerChannel using pipe.
71 class JackWinNamedPipeServerChannel
: public JackServerChannelInterface
, public JackRunnableInterface
76 JackWinNamedPipeServer fRequestListenPipe
; // Pipe to create request socket for the client
78 JackThread
* fThread
; // Thread to execute the event loop
80 std::list
<JackClientPipeThread
*> fClientList
;
82 void AddClient(JackWinNamedPipeClient
* pipe
);
86 JackWinNamedPipeServerChannel();
87 virtual ~JackWinNamedPipeServerChannel();
89 int Open(JackServer
* server
); // Open the Server/Client connection
90 void Close(); // Close the Server/Client connection
92 // JackRunnableInterface interface