xrootd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
XrdClChannelHandlerList.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // Copyright (c) 2012 by European Organization for Nuclear Research (CERN)
3 // Author: Lukasz Janyst <ljanyst@cern.ch>
4 //------------------------------------------------------------------------------
5 // XRootD is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // XRootD 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.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with XRootD. If not, see <http://www.gnu.org/licenses/>.
17 //------------------------------------------------------------------------------
18 
19 #ifndef __XRD_CL_CHANNEL_HANDLER_LIST_HH__
20 #define __XRD_CL_CHANNEL_HANDLER_LIST_HH__
21 
22 #include <list>
23 #include <utility>
25 #include "XrdCl/XrdClStatus.hh"
26 #include <XrdSys/XrdSysPthread.hh>
27 
28 namespace XrdCl
29 {
30  //----------------------------------------------------------------------------
32  //----------------------------------------------------------------------------
34  {
35  public:
36  //------------------------------------------------------------------------
38  //------------------------------------------------------------------------
39  void AddHandler( ChannelEventHandler *handler );
40 
41  //------------------------------------------------------------------------
43  //------------------------------------------------------------------------
44  void RemoveHandler( ChannelEventHandler *handler );
45 
46  //------------------------------------------------------------------------
48  //------------------------------------------------------------------------
50  Status status );
51 
52  private:
53  std::list<ChannelEventHandler*> pHandlers;
55  };
56 }
57 
58 #endif // __XRD_CL_CHANNEL_HANDLER_LIST_HH__
void RemoveHandler(ChannelEventHandler *handler)
Remove the channel event handler.
A helper for handling channel event handlers.
Definition: XrdClChannelHandlerList.hh:33
std::list< ChannelEventHandler * > pHandlers
Definition: XrdClChannelHandlerList.hh:53
Procedure execution status.
Definition: XrdClStatus.hh:113
Definition: XrdSysPthread.hh:164
void ReportEvent(ChannelEventHandler::ChannelEvent event, Status status)
Report an event to the channel event handlers.
Channel event handler.
Definition: XrdClPostMasterInterfaces.hh:209
void AddHandler(ChannelEventHandler *handler)
Add a channel event handler.
ChannelEvent
Events that may have occurred to the channel.
Definition: XrdClPostMasterInterfaces.hh:215
XrdSysMutex pMutex
Definition: XrdClChannelHandlerList.hh:54