Ignore:
Timestamp:
03/13/13 10:49:50 (12 years ago)
Author:
tbretz
Message:
Added new dim functions to get access to the description of a single service or the list of all available services.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/InterpreterV8.h

    r14983 r15043  
    1313
    1414#include "State.h"
     15#include "Service.h"
    1516#include "Description.h"
    1617#include "EventImp.h"
     
    7879    v8::Handle<v8::Value> FuncGetState(const v8::Arguments& args);
    7980    v8::Handle<v8::Value> FuncGetStates(const v8::Arguments& args);
     81    v8::Handle<v8::Value> FuncGetService(const v8::Arguments& args);
     82    v8::Handle<v8::Value> FuncGetServices(const v8::Arguments& args);
    8083    v8::Handle<v8::Value> FuncNewState(const v8::Arguments& args);
    8184    //v8::Handle<v8::Value> FuncOpen(const v8::Arguments& args);
     
    129132    static v8::Handle<v8::Value> WrapGetState(const v8::Arguments &args) { if (This) return This->FuncGetState(args); else return v8::Undefined(); }
    130133    static v8::Handle<v8::Value> WrapGetStates(const v8::Arguments &args){ if (This) return This->FuncGetStates(args);else return v8::Undefined(); }
     134    static v8::Handle<v8::Value> WrapGetService(const v8::Arguments &args){ if (This) return This->FuncGetService(args);else return v8::Undefined(); }
     135    static v8::Handle<v8::Value> WrapGetServices(const v8::Arguments &args){ if (This) return This->FuncGetServices(args);else return v8::Undefined(); }
    131136    //static v8::Handle<v8::Value> WrapOpen(const v8::Arguments &args)     { if (This) return This->FuncOpen(args);     else return v8::Undefined(); }
    132137    static v8::Handle<v8::Value> WrapSubscription(const v8::Arguments &args){ if (This) return This->FuncSubscription(args);else return v8::Undefined(); }
     
    185190    virtual State JsGetCurrentState() const { return State(); }
    186191    virtual std::vector<State> JsGetStates(const std::string &) { return std::vector<State>(); }
     192    virtual std::set<Service> JsGetServices() { return std::set<Service>(); }
     193    virtual std::vector<Description> JsGetDescription(const std::string &) { return std::vector<Description>(); }
    187194
    188195    virtual std::vector<Description> JsDescription(const std::string &) { return std::vector<Description>(); };
Note: See TracChangeset for help on using the changeset viewer.