diff options
Diffstat (limited to 'NT/src/rendercontext.h')
| -rw-r--r-- | NT/src/rendercontext.h | 21 |
1 files changed, 20 insertions, 1 deletions
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<string> 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<string,Render_status> renders; + std::unordered_map<std::string,Render_status> renders; + std::unordered_map<std::string,Render_settings> presets; + std::string preset; }; }; |
