diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2016-01-20 05:35:09 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2016-01-20 05:35:09 +0300 |
commit | 09a905e401df451f12673d75dc8d4d72ee73b7c9 (patch) | |
tree | 75e620ca41dd673f9286f3351f2982c2bbfc51e1 /server/include/api_core_events.h | |
parent | bb8cd8a9ff7d80046cc2c7d41742c74d8f811c62 (diff) |
server:
very basic implementation of download_state_changed event api call for plugins
started work on thread safety (plugins may and will be multithreaded, so api for plugins should be thread safe)
Diffstat (limited to 'server/include/api_core_events.h')
-rw-r--r-- | server/include/api_core_events.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/server/include/api_core_events.h b/server/include/api_core_events.h index e7e0dac..072ec45 100644 --- a/server/include/api_core_events.h +++ b/server/include/api_core_events.h @@ -21,15 +21,24 @@ #ifndef API_CORE_EVENTS_H #define API_CORE_EVENTS_H +class module_base; + namespace core_events { enum download_state {download_stopped, download_running, download_completed, download_error}; +struct download_state_info +{ + int download_id; + download_state state; +}; + + class core_events { public: - virtual void download_state_changed(int download_id, download_state state); + virtual void download_state_changed(module_base *m, std::list<download_state_info> state_list); }; }; |