From e80b647faa5a61c81964252a395fe4cb48443315 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Tue, 28 Jan 2014 17:10:22 +0000 Subject: reinstating session command array --- NT/src/rendercontext.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'NT/src/rendercontext.h') diff --git a/NT/src/rendercontext.h b/NT/src/rendercontext.h index 097af3f..a84cad8 100644 --- a/NT/src/rendercontext.h +++ b/NT/src/rendercontext.h @@ -43,6 +43,12 @@ namespace Rotor { #define RENDER 3 #define LOAD_GRAPH 4 + class Session_command { + public: + Session_command(){body="";}; + string uid,method,id,body; + vector commands; + }; class Render_status { public: Render_status():status(0),progress(0.0){}; @@ -50,6 +56,11 @@ namespace Rotor { int status; double progress; }; + class Render_settings { + public: + Render_settings(int w=640,int h=360):width(w),height(h){}; + int width,height; + }; class Render_context: public Poco::Task { public: Render_context(const std::string& _id): Task(_id) { @@ -76,6 +87,12 @@ namespace Rotor { sleep(100); } } + bool set_preset(std::string& _preset){ + if (presets.find(_preset)==presets.end()) return false; + preset=_preset; + return true; + } + void session_command(const Session_command& command,xmlIO& XML,Poco::Net::HTTPResponse::HTTPStatus& status); Render_status get_render_status(const string &uid){ if (renders.find(uid)!=renders.end()){ if (renders[uid].status==RENDERING){ @@ -89,7 +106,9 @@ namespace Rotor { Graph graph; private: std::string id; - std::unordered_map renders; + std::unordered_map renders; + std::unordered_map presets; + std::string preset; }; }; -- cgit v1.2.3