Subversion Repositories HomeAutomation

Rev

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

Rev 1644 Rev 1647
Line 46... Line 46...
46
}
46
}
47
 
47
 
48
void Storage::InitializeDone()
48
void Storage::InitializeDone()
49
{
49
{
50
    Plugin::InitializeDone();
50
    Plugin::InitializeDone();
-
 
51
}
-
 
52
 
-
 
53
void Storage::CallOutput(unsigned int request_id, std::string output)
-
 
54
{
-
 
55
    LOG.Info(output);
51
}
56
}
52
 
57
 
53
Value Storage::Export_GetParameters(const v8::Arguments& args)
58
Value Storage::Export_GetParameters(const v8::Arguments& args)
54
{
59
{
55
    v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext());
60
    v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext());
56
   
61
   
57
    LOG.Debug(std::string(__FUNCTION__) + " called!");
62
    //LOG.Debug(std::string(__FUNCTION__) + " called!");
58
   
63
   
59
    if (args.Length() < 1)
64
    if (args.Length() < 1)
60
    {
65
    {
61
        LOG.Error(std::string(__FUNCTION__) + ": To few arguments.");
66
        LOG.Error(std::string(__FUNCTION__) + ": To few arguments.");
-
 
67
        return v8::Boolean::New(false);
62
    }
68
    }
63
   
69
   
64
    v8::String::AsciiValue store_name(args[0]);
70
    v8::String::AsciiValue store_name(args[0]);
65
   
71
   
66
    storage::Store::ParameterList parameters = storage::Manager::Instance()->GetParameters(*store_name);
72
    storage::Store::ParameterList parameters = storage::Manager::Instance()->GetParameters(*store_name);
Line 77... Line 83...
77
 
83
 
78
Value Storage::Export_GetParameter(const v8::Arguments& args)
84
Value Storage::Export_GetParameter(const v8::Arguments& args)
79
{
85
{
80
    v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext());
86
    v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext());
81
   
87
   
82
    LOG.Debug(std::string(__FUNCTION__) + " called!");
88
    //LOG.Debug(std::string(__FUNCTION__) + " called!");
83
   
89
   
84
    if (args.Length() < 2)
90
    if (args.Length() < 2)
85
    {
91
    {
86
        LOG.Error(std::string(__FUNCTION__) + ": To few arguments.");
92
        LOG.Error(std::string(__FUNCTION__) + ": To few arguments.");
-
 
93
        return v8::Boolean::New(false);
87
    }
94
    }
88
   
95
   
89
    v8::String::AsciiValue store_name(args[0]);
96
    v8::String::AsciiValue store_name(args[0]);
90
    v8::String::AsciiValue parameter_name(args[1]);
97
    v8::String::AsciiValue parameter_name(args[1]);
91
   
98
   
Line 105... Line 112...
105
 
112
 
106
Value Storage::Export_SetParameter(const v8::Arguments& args)
113
Value Storage::Export_SetParameter(const v8::Arguments& args)
107
{
114
{
108
    v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext());
115
    v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext());
109
   
116
   
110
    LOG.Debug(std::string(__FUNCTION__) + " called!");
117
    //LOG.Debug(std::string(__FUNCTION__) + " called!");
111
   
118
   
112
    if (args.Length() < 3)
119
    if (args.Length() < 3)
113
    {
120
    {
114
        LOG.Error(std::string(__FUNCTION__) + ": To few arguments.");
121
        LOG.Error(std::string(__FUNCTION__) + ": To few arguments.");
-
 
122
        return v8::Boolean::New(false);
115
    }
123
    }
116
   
124
   
117
    v8::String::AsciiValue store_name(args[0]);
125
    v8::String::AsciiValue store_name(args[0]);
118
    v8::String::AsciiValue parameter_name(args[1]);
126
    v8::String::AsciiValue parameter_name(args[1]);
119
    v8::String::AsciiValue parameter_value(args[2]);
127
    v8::String::AsciiValue parameter_value(args[2]);