xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdCl
XrdClInQueue.hh
Go to the documentation of this file.
1
//------------------------------------------------------------------------------
2
// Copyright (c) 2011-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_IN_QUEUE_HH__
20
#define __XRD_CL_IN_QUEUE_HH__
21
22
#include <
XrdSys/XrdSysPthread.hh
>
23
#include <list>
24
#include <utility>
25
#include "
XrdCl/XrdClStatus.hh
"
26
#include "
XrdCl/XrdClPostMasterInterfaces.hh
"
27
28
namespace
XrdCl
29
{
30
class
Message;
31
32
//----------------------------------------------------------------------------
34
//----------------------------------------------------------------------------
35
class
InQueue
36
{
37
public
:
38
//------------------------------------------------------------------------
40
//------------------------------------------------------------------------
41
bool
AddMessage
(
Message
*msg );
42
43
//------------------------------------------------------------------------
48
//------------------------------------------------------------------------
49
void
AddMessageHandler
(
IncomingMsgHandler
*handler, time_t expires );
50
51
//------------------------------------------------------------------------
53
//------------------------------------------------------------------------
54
void
RemoveMessageHandler
(
IncomingMsgHandler
*handler );
55
56
//------------------------------------------------------------------------
58
//------------------------------------------------------------------------
59
void
ReportStreamEvent
(
IncomingMsgHandler::StreamEvent
event,
60
uint16_t streamNum,
61
Status
status );
62
63
//------------------------------------------------------------------------
65
//------------------------------------------------------------------------
66
void
ReportTimeout
( time_t now = 0 );
67
68
private
:
69
typedef
std::pair<IncomingMsgHandler *, time_t>
HandlerAndExpire
;
70
typedef
std::list<HandlerAndExpire>
HandlerList
;
71
std::list<Message *>
pMessages
;
72
HandlerList
pHandlers
;
73
XrdSysMutex
pMutex
;
74
};
75
}
76
77
#endif // __XRD_CL_IN_QUEUE_HH__
Generated by
1.8.3.1