2 Copyright (C) 2004-2008 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.
21 #ifndef __JackWinNamedPipeServerChannel__
22 #define __JackWinNamedPipeServerChannel__
24 #include "JackWinNamedPipe.h"
25 #include "JackPlatformPlug.h"
26 #include "JackConstants.h"
28 #include "JackRequestDecoder.h"
37 class JackClientPipeThread
: public JackRunnableInterface
, public JackClientHandlerInterface
42 JackWinNamedPipeClient
* fPipe
;
43 JackRequestDecoder
* fDecoder
;
48 void ClientAdd(detail::JackChannelTransactionInterface
* socket
, JackClientOpenRequest
* req
, JackClientOpenResult
*res
);
49 void ClientRemove(detail::JackChannelTransactionInterface
* socket
, int refnum
);
57 JackClientPipeThread(JackWinNamedPipeClient
* pipe
);
58 virtual ~JackClientPipeThread();
60 int Open(JackServer
* server
); // Open the Server/Client connection
61 void Close(); // Close the Server/Client connection
63 // JackRunnableInterface interface
66 // To be used for find out if the object can be deleted
69 return (fRefNum
>= 0);
75 \brief JackServerChannel using pipe.
78 class JackWinNamedPipeServerChannel
: public JackRunnableInterface
83 JackWinNamedPipeServer fRequestListenPipe
; // Pipe to create request socket for the client
85 JackThread fThread
; // Thread to execute the event loop
86 char fServerName
[JACK_SERVER_CONTROL_NAME_SIZE
];
88 std::list
<JackClientPipeThread
*> fClientList
;
90 void ClientAdd(JackWinNamedPipeClient
* pipe
);
97 JackWinNamedPipeServerChannel();
98 ~JackWinNamedPipeServerChannel();
100 int Open(const char* server_name
, JackServer
* server
); // Open the Server/Client connection
101 void Close(); // Close the Server/Client connection
106 // JackRunnableInterface interface
112 } // end of namespace