~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): Christophe Sauthier
  • Date: 2010-08-10 12:59:37 UTC
  • mfrom: (1.3.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100810125937-jbcmmf17y8yo9hgz
Tags: 0.15.0-0ubuntu1
* New upstream version.
* debian/patches/100_fix_html_docs.patch: refreshed.
* debian/control: bump up standards-version to 3.9.1 (no changes).

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
 
  // Complete all timers that are waiting to be completed.
51
 
  virtual void complete_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