This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
device-node.h
executable file
·46 lines (38 loc) · 1.71 KB
/
device-node.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef DEVICE_NODE_H
#define DEVICE_NODE_H
#include <node.h>
#include <node_object_wrap.h>
#include <device.h>
#include <v8.h>
class DeviceNode : public node::ObjectWrap {
public:
void setDevice(Device* device);
//Wrapped
static v8::Persistent<v8::Function> constructor;
static void Init(v8::Handle<v8::Object>);
static void NewInstance(const v8::FunctionCallbackInfo<v8::Value>& args);
static DeviceNode* getObjectInternal(v8::Local<v8::Object>);
//GETTERS
static void GetName(const v8::FunctionCallbackInfo<v8::Value>&);
static void GetId(const v8::FunctionCallbackInfo<v8::Value>&);
static void GetModel(const v8::FunctionCallbackInfo<v8::Value>&);
static void GetProtocol(const v8::FunctionCallbackInfo<v8::Value>&);
static void GetDeviceType(const v8::FunctionCallbackInfo<v8::Value>&);
static void GetLastSentValue(const v8::FunctionCallbackInfo<v8::Value>&);
static void GetMethods(const v8::FunctionCallbackInfo<v8::Value>&);
static void GetDimValue(const v8::FunctionCallbackInfo<v8::Value>&);
static void IsOn(const v8::FunctionCallbackInfo<v8::Value>&);
static void IsDimmable(const v8::FunctionCallbackInfo<v8::Value>&);
//ACTIONS
static void TurnOn(const v8::FunctionCallbackInfo<v8::Value>&);
static void TurnOff(const v8::FunctionCallbackInfo<v8::Value>&);
static void Dim(const v8::FunctionCallbackInfo<v8::Value>&);
private:
explicit DeviceNode();
~DeviceNode();
static void New(const v8::FunctionCallbackInfo<v8::Value>& args);
static DeviceNode* getDeviceBinding(const v8::FunctionCallbackInfo<v8::Value>&);
static int getIntParameter(const v8::FunctionCallbackInfo<v8::Value>& args);
Device *_device;
};
#endif