3 * Author: Lukas Krejci <krejci.l@centrum.cz>, (C) 2008
4 * Copyright: See COPYING file that comes with this distribution
7 #ifndef BEACONS_connection_impl_base_H
8 #define BEACONS_connection_impl_base_H
10 #include <beacons/config.hpp>
11 #include <beacons/reference_countable.hpp>
12 #include <beacons/invokable.hpp>
19 * Base class for connection implementation.
20 * Defines the minimal interface that the connection
21 * implementation supports.
23 class connection_impl_base
: public reference_countable
{
27 connection_impl_base() : _token(new invokable::token_ptr::item_type
) {}
29 virtual void disconnect() = 0;
30 virtual bool connected() const = 0;
32 #ifdef BEACONS_ENABLE_CONNECTION_BLOCKING
33 virtual bool blocked() const = 0;
36 invokable::token_ptr
token() const {
42 invokable::token_ptr _token
;