source: trunk/src/halTorrentIntEvents.hpp @ 748

Revision 748, 1.7 KB checked in by Eoin, 10 years ago (diff)

Restoring torrents to their proper states fixed.

Line 
1
2//         Copyright Eóin O'Callaghan 2009 - 2009.
3// Distributed under the Boost Software License, Version 1.0.
4//    (See accompanying file LICENSE_1_0.txt or copy at
5//          http://www.boost.org/LICENSE_1_0.txt)
6
7#pragma once
8
9#include "halTorrentInternal.hpp"
10
11#include <boost/statechart/event.hpp>
12#include <boost/statechart/transition.hpp>
13#include <boost/statechart/custom_reaction.hpp>
14
15namespace hal
16{
17
18namespace sc = boost::statechart;
19
20struct ev_remove_from_session : sc::event<ev_remove_from_session>
21{
22public:
23        ev_remove_from_session(bool write_data) :
24                write_data_(write_data)
25        {}
26
27const bool& write_data() const { return write_data_; }
28
29private:
30        bool write_data_;
31};
32
33struct ev_add_to_session : sc::event<ev_add_to_session>
34{
35public:
36        ev_add_to_session(bool pause) :
37                pause_(pause)
38        {}
39
40        const bool& pause() const { return pause_; }
41
42private:
43        bool pause_;
44};
45
46struct ev_start : sc::event<ev_start> {};
47
48struct ev_error_alert : sc::event<ev_error_alert>
49{
50public:
51        ev_error_alert(wstring& e) :
52                err_(e)
53        {}
54
55        const wstring& error() const { return err_; }
56
57private:
58        wstring err_;
59};
60
61struct ev_pause : sc::event< ev_pause > {};
62struct ev_paused_alert : sc::event<ev_paused_alert> {};
63
64struct ev_stop : sc::event< ev_stop > {};
65struct ev_resume : sc::event< ev_resume > {};
66struct ev_resumed_alert : sc::event<ev_resumed_alert> {};
67
68struct ev_force_recheck : sc::event< ev_force_recheck > {};
69
70struct ev_write_resume_data : sc::event< ev_write_resume_data > {};
71struct ev_resume_data_alert : sc::event< ev_resume_data_alert > {};
72struct ev_resume_data_failed_alert : sc::event< ev_resume_data_alert > {};
73
74} // namespace hal
Note: See TracBrowser for help on using the repository browser.