Subversion Repositories HomeAutomation

Rev

Rev 1619 | Rev 1644 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1619 Rev 1625
Line 52... Line 52...
52
    void AddPlugin(Plugin::Pointer plugin);
52
    void AddPlugin(Plugin::Pointer plugin);
53
    void Start(std::string script_path);
53
    void Start(std::string script_path);
54
   
54
   
55
    void Call(std::string plugin_name, unsigned int request_id, std::string name, ArgumentListPointer arguments);
55
    void Call(std::string plugin_name, unsigned int request_id, std::string name, ArgumentListPointer arguments);
56
    void Execute(std::string plugin_name, unsigned int request_id, std::string code);
56
    void Execute(std::string plugin_name, unsigned int request_id, std::string code);
-
 
57
   
-
 
58
    void CallHandler(std::string plugin_name, unsigned int request_id, std::string name, ArgumentListPointer arguments);
-
 
59
    void ExecuteHandler(std::string plugin_name, unsigned int request_id, std::string code);
57
   
60
   
58
    bool LoadScript(std::string scriptname);
61
    bool LoadScript(std::string scriptname);
59
    bool ImportFunction(std::string functionname);
62
    bool ImportFunction(std::string functionname);
60
   
63
   
61
    v8::Persistent<v8::Context>& GetContext();
64
    v8::Persistent<v8::Context>& GetContext();
62
   
65
   
63
private:
66
private:
64
    typedef std::vector<Plugin::Pointer> PluginList;
67
    typedef std::vector<Plugin::Pointer> PluginList;
65
   
68
   
66
    static Pointer instance_;
69
    static Pointer instance_;
67
   
70
   
68
    std::string script_path_;
71
    std::string script_path_;
69
   
72
   
70
    v8::Persistent<v8::Context> context_;
73
    v8::Persistent<v8::Context> context_;
71
    v8::HandleScope handle_scope_;
74
    v8::HandleScope handle_scope_;
72
    v8::Persistent<v8::ObjectTemplate> object_template_;
75
    v8::Persistent<v8::ObjectTemplate> object_template_;
73
   
76
   
74
    PluginList plugins_;
77
    PluginList plugins_;
75
    ImportFunctionList functions_;
78
    ImportFunctionList functions_;
76
   
79
   
77
    Manager();
80
    Manager();
78
   
81
   
79
    void StartHandler();
82
    void StartHandler();
80
   
83
 
81
    void CallHandler(std::string plugin_name, unsigned int request_id, std::string name, ArgumentListPointer arguments);
-
 
82
    void ExecuteHandler(std::string plugin_name, unsigned int request_id, std::string code);
-
 
83
   
84
   
84
    void SendResponse(std::string plugin_name, unsigned int request_id, std::string response);
85
    void SendResponse(std::string plugin_name, unsigned int request_id, std::string response);
85
   
86
   
86
    std::string FormatException(v8::TryCatch& try_catch);
87
    std::string FormatException(v8::TryCatch& try_catch);
87
   
88