~ubuntu-branches/ubuntu/maverick/libtorrent-rasterbar/maverick

« back to all changes in this revision

Viewing changes to include/libtorrent/asio/detail/timer_queue_base.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Cristian Greco
  • Date: 2008-07-02 10:46:21 UTC
  • Revision ID: james.westby@ubuntu.com-20080702104621-jzx3pfke9lkcxfxn
Tags: upstream-0.13.1
ImportĀ upstreamĀ versionĀ 0.13.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// timer_queue_base.hpp
 
3
// ~~~~~~~~~~~~~~~~~~~~
 
4
//
 
5
// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 
6
//
 
7
// Distributed under the Boost Software License, Version 1.0. (See accompanying
 
8
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
9
//
 
10
 
 
11
#ifndef ASIO_DETAIL_TIMER_QUEUE_BASE_HPP
 
12
#define ASIO_DETAIL_TIMER_QUEUE_BASE_HPP
 
13
 
 
14
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
 
15
# pragma once
 
16
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
17
 
 
18
#include "asio/detail/push_options.hpp"
 
19
 
 
20
#include "asio/detail/socket_types.hpp" // Must come before posix_time.
 
21
 
 
22
#include "asio/detail/push_options.hpp"
 
23
#include <boost/date_time/posix_time/posix_time_types.hpp>
 
24
#include "asio/detail/pop_options.hpp"
 
25
 
 
26
#include "asio/detail/noncopyable.hpp"
 
27
 
 
28
namespace asio {
 
29
namespace detail {
 
30
 
 
31
class timer_queue_base
 
32
  : private noncopyable
 
33
{
 
34
public:
 
35
  // Destructor.
 
36
  virtual ~timer_queue_base() {}
 
37
 
 
38
  // Whether there are no timers in the queue.
 
39
  virtual bool empty() const = 0;
 
40
 
 
41
  // Get the time to wait until the next timer.
 
42
  virtual boost::posix_time::time_duration wait_duration() const = 0;
 
43
 
 
44
  // Dispatch all ready timers.
 
45
  virtual void dispatch_timers() = 0;
 
46
 
 
47
  // Dispatch any pending cancels for timers.
 
48
  virtual void dispatch_cancellations() = 0;
 
49
 
 
50
  // Destroy timers that are waiting to be cleaned up.
 
51
  virtual void cleanup_timers() = 0;
 
52
 
 
53
  // Destroy all timers.
 
54
  virtual void destroy_timers() = 0;
 
55
};
 
56
 
 
57
} // namespace detail
 
58
} // namespace asio
 
59
 
 
60
#include "asio/detail/pop_options.hpp"
 
61
 
 
62
#endif // ASIO_DETAIL_TIMER_QUEUE_BASE_HPP