streaming: Implement stream_result_future::handle_progress

This commit is contained in:
Asias He
2015-07-17 16:10:19 +08:00
parent d74e414d09
commit 1f5feee5f2
2 changed files with 7 additions and 8 deletions

View File

@@ -102,4 +102,9 @@ stream_state stream_result_future::get_current_state() {
return stream_state(plan_id, description, _coordinator->get_all_session_info());
}
void stream_result_future::handle_progress(progress_info progress) {
_coordinator->update_progress(progress);
fire_stream_event(progress_event(plan_id, std::move(progress)));
}
} // namespace streaming

View File

@@ -27,6 +27,7 @@
#include "streaming/stream_coordinator.hh"
#include "streaming/stream_event_handler.hh"
#include "streaming/stream_state.hh"
#include "streaming/progress_info.hh"
#include <vector>
namespace streaming {
@@ -125,14 +126,7 @@ public:
void handle_session_complete(shared_ptr<stream_session> session);
#if 0
public void handleProgress(ProgressInfo progress)
{
coordinator.updateProgress(progress);
fireStreamEvent(new StreamEvent.ProgressEvent(planId, progress));
}
:A
#endif
void handle_progress(progress_info progress);
template <typename Event>
void fire_stream_event(Event event);