Subversion Repositories HomeAutomation

Rev

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

Rev 1608 Rev 1625
Line 23... Line 23...
23
#include "Manager.h"
23
#include "Manager.h"
24
 
24
 
25
namespace atom {
25
namespace atom {
26
namespace vm {
26
namespace vm {
27
   
27
   
28
Plugin::Plugin()
28
Plugin::Plugin(boost::asio::io_service& io_service) : io_service_(io_service)
29
{
29
{
30
    this->tracker_ = TrackerPointer(new char);
30
    this->tracker_ = TrackerPointer(new char);
31
}
31
}
32
 
32
 
33
Plugin::~Plugin()
33
Plugin::~Plugin()
Line 55... Line 55...
55
   
55
   
56
}
56
}
57
 
57
 
58
void Plugin::Call(unsigned int request_id, std::string name, ArgumentListPointer arguments)
58
void Plugin::Call(unsigned int request_id, std::string name, ArgumentListPointer arguments)
59
{
59
{
60
    Manager::Instance()->Call(this->name_, request_id, name, arguments);
60
    Manager::Instance()->CallHandler(this->name_, request_id, name, arguments);
61
}
61
}
62
 
62
 
63
void Plugin::Execute(unsigned int request_id, std::string code)
63
void Plugin::Execute(unsigned int request_id, std::string code)
64
{
64
{
65
    Manager::Instance()->Execute(this->name_, request_id, code);
65
    Manager::Instance()->ExecuteHandler(this->name_, request_id, code);
66
}
66
}
67
 
67
 
68
void Plugin::ExportFunction(std::string name, v8::InvocationCallback function)
68
void Plugin::ExportFunction(std::string name, v8::InvocationCallback function)
69
{
69
{
70
    this->export_functions_[name] = function;
70
    this->export_functions_[name] = function;