1#if !defined(RESIP_TIMERQUEUE_HXX)
2#define RESIP_TIMERQUEUE_HXX
4#if defined(HAVE_CONFIG_H)
26class TransactionMessage;
107 return mTimers.top().getWhen();
123 std::ostream&
encode(std::ostream& str)
const
127 return str <<
"TimerQueue[ size =" <<
mTimers.size()
128 <<
" top=" <<
mTimers.top() <<
"]" ;
132 return str <<
"TimerQueue[ size = 0 ]";
136#ifndef RESIP_USE_STL_STREAMS
141 return str <<
"TimerQueue[ size =" <<
mTimers.size()
142 <<
" top=" <<
mTimers.top() <<
"]" ;
146 return str <<
"TimerQueue[ size = 0 ]";
153 std::priority_queue<T, TimerVector, std::greater<T> >
mTimers;
214#include <openssl/ssl.h>
239#ifndef RESIP_USE_STL_STREAMS
uint64_t add(unsigned int timeMs, Message *payload)
~BaseTimeLimitTimerQueue()
virtual void addToFifo(Message *, TimeLimitFifo< Message >::DepthUsage)=0
virtual void processTimer(const TimerWithPayload &timer)
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
uint64_t add(SSL *, unsigned long msOffset)
virtual void processTimer(const TimerWithPayload &timer)
A templated, threadsafe message-queue class.
The base-class used for message-passing.
virtual void addToFifo(Message *, TimeLimitFifo< Message >::DepthUsage)
std::vector< T, std::allocator< T > > TimerVector
unsigned int msTillNextTimer()
provides the time in milliseconds before the next timer will fire
std::priority_queue< T, TimerVector, std::greater< T > > mTimers
std::ostream & encode(std::ostream &str) const
EncodeStream & encode(EncodeStream &str) const
virtual uint64_t process()
gets the set of timers that have fired, and inserts TimerMsg into the state machine fifo and applicat...
virtual void processTimer(const T &timer)=0
virtual ~TimerQueue()
deletes the message associated with the timer as well.
static uint64_t getTimeMs()
Returns the current clock time in milliseconds.
uint64_t add(Timer::Type type, const Data &transactionId, unsigned long msOffset)
virtual void processTimer(const TransactionTimer &timer)
virtual void processTimer(const TimerWithPayload &timer)
uint64_t add(unsigned int timeMs, Message *payload)
dcm! – add UnusedChecking(_enum) below;
unsigned long long uint64_t
EncodeStream & operator<<(EncodeStream &strm, const BaseException &e)