This repository was archived by the owner on Feb 2, 2019. It is now read-only.
forked from Artikash/Textractor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbinding.cc
More file actions
30 lines (27 loc) · 1.34 KB
/
binding.cc
File metadata and controls
30 lines (27 loc) · 1.34 KB
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
#include "nodewrapper/wrapper_api.h"
using v8::FunctionTemplate;
using v8::Handle;
using v8::Object;
using v8::String;
using Nan::GetFunction;
using Nan::New;
using Nan::Set;
NAN_MODULE_INIT(InitAll) {
Set(target, New<String>("start").ToLocalChecked(),
GetFunction(New<FunctionTemplate>(NodeWrapper::Start)).ToLocalChecked());
Set(target, New<String>("onProcessAttach").ToLocalChecked(),
GetFunction(New<FunctionTemplate>(NodeWrapper::OnProcessAttach)).ToLocalChecked());
Set(target, New<String>("onProcessDetach").ToLocalChecked(),
GetFunction(New<FunctionTemplate>(NodeWrapper::OnProcessDetach)).ToLocalChecked());
Set(target, New<String>("onThreadCreate").ToLocalChecked(),
GetFunction(New<FunctionTemplate>(NodeWrapper::OnThreadCreate)).ToLocalChecked());
Set(target, New<String>("onThreadRemove").ToLocalChecked(),
GetFunction(New<FunctionTemplate>(NodeWrapper::OnThreadRemove)).ToLocalChecked());
Set(target, New<String>("injectProcess").ToLocalChecked(),
GetFunction(New<FunctionTemplate>(NodeWrapper::InjectProcess)).ToLocalChecked());
Set(target, New<String>("detachProcess").ToLocalChecked(),
GetFunction(New<FunctionTemplate>(NodeWrapper::DetachProcess)).ToLocalChecked());
Set(target, New<String>("insertHook").ToLocalChecked(),
GetFunction(New<FunctionTemplate>(NodeWrapper::InsertHook)).ToLocalChecked());
}
NODE_MODULE(addon, InitAll)