k2hash 1.1.34 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/k2h_shm.h CHANGED
@@ -27,120 +27,125 @@
27
27
  //---------------------------------------------------------
28
28
  // K2hNode Class
29
29
  //---------------------------------------------------------
30
- class K2hNode : public Nan::ObjectWrap
30
+ class K2hNode : public Napi::ObjectWrap<K2hNode>
31
31
  {
32
32
  friend class K2hQueue;
33
33
  friend class K2hKeyQueue;
34
34
 
35
35
  public:
36
- static void Init(void);
37
- static NAN_METHOD(NewInstance);
36
+ static void Init(Napi::Env env, Napi::Object exports);
37
+ static Napi::Object NewInstance(Napi::Env env);
38
38
 
39
- private:
40
- explicit K2hNode(void);
39
+ // Constructor / Destructor
40
+ explicit K2hNode(const Napi::CallbackInfo& info);
41
41
  ~K2hNode();
42
42
 
43
- static NAN_METHOD(New);
44
-
45
- static NAN_METHOD(On);
46
- static NAN_METHOD(OnCreate);
47
- static NAN_METHOD(OnOpen);
48
- static NAN_METHOD(OnOpenRW);
49
- static NAN_METHOD(OnOpenRO);
50
- static NAN_METHOD(OnOpenTempfile);
51
- static NAN_METHOD(OnOpenMem);
52
- static NAN_METHOD(OnClose);
53
- static NAN_METHOD(OnGet);
54
- static NAN_METHOD(OnGetSubkeys);
55
- static NAN_METHOD(OnGetAttrs);
56
- static NAN_METHOD(OnGetAttrValue);
57
- static NAN_METHOD(OnSet);
58
- static NAN_METHOD(OnAddSubkey);
59
- static NAN_METHOD(OnAddSubkeys);
60
- static NAN_METHOD(OnAddAttr);
61
- static NAN_METHOD(OnRemove);
62
- static NAN_METHOD(OnRemoveAll);
63
- static NAN_METHOD(OnLoad);
64
- static NAN_METHOD(OnPut);
65
- static NAN_METHOD(Off);
66
- static NAN_METHOD(OffCreate);
67
- static NAN_METHOD(OffOpen);
68
- static NAN_METHOD(OffOpenRW);
69
- static NAN_METHOD(OffOpenRO);
70
- static NAN_METHOD(OffOpenTempfile);
71
- static NAN_METHOD(OffOpenMem);
72
- static NAN_METHOD(OffClose);
73
- static NAN_METHOD(OffGet);
74
- static NAN_METHOD(OffGetSubkeys);
75
- static NAN_METHOD(OffGetAttrs);
76
- static NAN_METHOD(OffGetAttrValue);
77
- static NAN_METHOD(OffSet);
78
- static NAN_METHOD(OffAddSubkey);
79
- static NAN_METHOD(OffAddSubkeys);
80
- static NAN_METHOD(OffAddAttr);
81
- static NAN_METHOD(OffRemove);
82
- static NAN_METHOD(OffRemoveAll);
83
- static NAN_METHOD(OffLoad);
84
- static NAN_METHOD(OffPut);
85
-
86
- static NAN_METHOD(Create);
87
- static NAN_METHOD(Open);
88
- static NAN_METHOD(OpenRW);
89
- static NAN_METHOD(OpenRO);
90
- static NAN_METHOD(OpenTempfile);
91
- static NAN_METHOD(OpenMem);
92
- static NAN_METHOD(Close);
93
-
94
- static NAN_METHOD(GetValue);
95
- static NAN_METHOD(GetSubkeys);
96
-
97
- static NAN_METHOD(SetValue);
98
- static NAN_METHOD(AddSubkey);
99
- static NAN_METHOD(AddSubkeys);
100
-
101
- static NAN_METHOD(Remove);
102
- static NAN_METHOD(RemoveAll);
103
-
104
- static NAN_METHOD(PrintState);
105
- static NAN_METHOD(PrintVersion);
106
-
107
- static NAN_METHOD(DumpHead);
108
- static NAN_METHOD(DumpKeytable);
109
- static NAN_METHOD(DumpFullKeytable);
110
- static NAN_METHOD(DumpElementtable);
111
- static NAN_METHOD(DumpFull);
112
-
113
- static NAN_METHOD(Transaction);
114
- static NAN_METHOD(EnableTransaction);
115
- static NAN_METHOD(DisableTransaction);
116
-
117
- static NAN_METHOD(GetTransactionThreadPool);
118
- static NAN_METHOD(SetTransactionThreadPool);
119
- static NAN_METHOD(UnsetTransactionThreadPool);
120
-
121
- static NAN_METHOD(PutArchive);
122
- static NAN_METHOD(LoadArchive);
123
-
124
- static NAN_METHOD(getQueue);
125
- static NAN_METHOD(getKeyQueue);
126
-
127
- static NAN_METHOD(SetCommonAttribute);
128
- static NAN_METHOD(CleanCommonAttribute);
129
-
130
- static NAN_METHOD(AddAttrPluginLib);
131
- static NAN_METHOD(AddAttrCryptPass);
132
-
133
- static NAN_METHOD(GetAttrVersionInfos);
134
- static NAN_METHOD(GetAttrInfos);
135
- static NAN_METHOD(GetAttrs);
136
- static NAN_METHOD(GetAttrValue);
137
-
138
- static NAN_METHOD(AddAttr);
43
+ private:
44
+ Napi::Value New(const Napi::CallbackInfo& info);
45
+
46
+ Napi::Value On(const Napi::CallbackInfo& info);
47
+ Napi::Value OnCreate(const Napi::CallbackInfo& info);
48
+ Napi::Value OnOpen(const Napi::CallbackInfo& info);
49
+ Napi::Value OnOpenRW(const Napi::CallbackInfo& info);
50
+ Napi::Value OnOpenRO(const Napi::CallbackInfo& info);
51
+ Napi::Value OnOpenTempfile(const Napi::CallbackInfo& info);
52
+ Napi::Value OnOpenMem(const Napi::CallbackInfo& info);
53
+ Napi::Value OnClose(const Napi::CallbackInfo& info);
54
+ Napi::Value OnGet(const Napi::CallbackInfo& info);
55
+ Napi::Value OnGetSubkeys(const Napi::CallbackInfo& info);
56
+ Napi::Value OnGetAttrs(const Napi::CallbackInfo& info);
57
+ Napi::Value OnGetAttrValue(const Napi::CallbackInfo& info);
58
+ Napi::Value OnSet(const Napi::CallbackInfo& info);
59
+ Napi::Value OnAddSubkey(const Napi::CallbackInfo& info);
60
+ Napi::Value OnAddSubkeys(const Napi::CallbackInfo& info);
61
+ Napi::Value OnAddAttr(const Napi::CallbackInfo& info);
62
+ Napi::Value OnRemove(const Napi::CallbackInfo& info);
63
+ Napi::Value OnRemoveAll(const Napi::CallbackInfo& info);
64
+ Napi::Value OnLoad(const Napi::CallbackInfo& info);
65
+ Napi::Value OnPut(const Napi::CallbackInfo& info);
66
+ Napi::Value Off(const Napi::CallbackInfo& info);
67
+ Napi::Value OffCreate(const Napi::CallbackInfo& info);
68
+ Napi::Value OffOpen(const Napi::CallbackInfo& info);
69
+ Napi::Value OffOpenRW(const Napi::CallbackInfo& info);
70
+ Napi::Value OffOpenRO(const Napi::CallbackInfo& info);
71
+ Napi::Value OffOpenTempfile(const Napi::CallbackInfo& info);
72
+ Napi::Value OffOpenMem(const Napi::CallbackInfo& info);
73
+ Napi::Value OffClose(const Napi::CallbackInfo& info);
74
+ Napi::Value OffGet(const Napi::CallbackInfo& info);
75
+ Napi::Value OffGetSubkeys(const Napi::CallbackInfo& info);
76
+ Napi::Value OffGetAttrs(const Napi::CallbackInfo& info);
77
+ Napi::Value OffGetAttrValue(const Napi::CallbackInfo& info);
78
+ Napi::Value OffSet(const Napi::CallbackInfo& info);
79
+ Napi::Value OffAddSubkey(const Napi::CallbackInfo& info);
80
+ Napi::Value OffAddSubkeys(const Napi::CallbackInfo& info);
81
+ Napi::Value OffAddAttr(const Napi::CallbackInfo& info);
82
+ Napi::Value OffRemove(const Napi::CallbackInfo& info);
83
+ Napi::Value OffRemoveAll(const Napi::CallbackInfo& info);
84
+ Napi::Value OffLoad(const Napi::CallbackInfo& info);
85
+ Napi::Value OffPut(const Napi::CallbackInfo& info);
86
+
87
+ Napi::Value Create(const Napi::CallbackInfo& info);
88
+ Napi::Value Open(const Napi::CallbackInfo& info);
89
+ Napi::Value OpenRW(const Napi::CallbackInfo& info);
90
+ Napi::Value OpenRO(const Napi::CallbackInfo& info);
91
+ Napi::Value OpenTempfile(const Napi::CallbackInfo& info);
92
+ Napi::Value OpenMem(const Napi::CallbackInfo& info);
93
+ Napi::Value Close(const Napi::CallbackInfo& info);
94
+
95
+ Napi::Value GetValue(const Napi::CallbackInfo& info);
96
+ Napi::Value GetSubkeys(const Napi::CallbackInfo& info);
97
+
98
+ Napi::Value SetValue(const Napi::CallbackInfo& info);
99
+ Napi::Value AddSubkey(const Napi::CallbackInfo& info);
100
+ Napi::Value AddSubkeys(const Napi::CallbackInfo& info);
101
+
102
+ Napi::Value Remove(const Napi::CallbackInfo& info);
103
+ Napi::Value RemoveAll(const Napi::CallbackInfo& info);
104
+
105
+ Napi::Value PrintState(const Napi::CallbackInfo& info);
106
+ Napi::Value PrintVersion(const Napi::CallbackInfo& info);
107
+
108
+ Napi::Value DumpHead(const Napi::CallbackInfo& info);
109
+ Napi::Value DumpKeytable(const Napi::CallbackInfo& info);
110
+ Napi::Value DumpFullKeytable(const Napi::CallbackInfo& info);
111
+ Napi::Value DumpElementtable(const Napi::CallbackInfo& info);
112
+ Napi::Value DumpFull(const Napi::CallbackInfo& info);
113
+
114
+ Napi::Value Transaction(const Napi::CallbackInfo& info);
115
+ Napi::Value EnableTransaction(const Napi::CallbackInfo& info);
116
+ Napi::Value DisableTransaction(const Napi::CallbackInfo& info);
117
+
118
+ Napi::Value GetTransactionThreadPool(const Napi::CallbackInfo& info);
119
+ Napi::Value SetTransactionThreadPool(const Napi::CallbackInfo& info);
120
+ Napi::Value UnsetTransactionThreadPool(const Napi::CallbackInfo& info);
121
+
122
+ Napi::Value PutArchive(const Napi::CallbackInfo& info);
123
+ Napi::Value LoadArchive(const Napi::CallbackInfo& info);
124
+
125
+ Napi::Value getQueue(const Napi::CallbackInfo& info);
126
+ Napi::Value getKeyQueue(const Napi::CallbackInfo& info);
127
+
128
+ Napi::Value SetCommonAttribute(const Napi::CallbackInfo& info);
129
+ Napi::Value CleanCommonAttribute(const Napi::CallbackInfo& info);
130
+
131
+ Napi::Value AddAttrPluginLib(const Napi::CallbackInfo& info);
132
+ Napi::Value AddAttrCryptPass(const Napi::CallbackInfo& info);
133
+
134
+ Napi::Value GetAttrVersionInfos(const Napi::CallbackInfo& info);
135
+ Napi::Value GetAttrInfos(const Napi::CallbackInfo& info);
136
+ Napi::Value GetAttrs(const Napi::CallbackInfo& info);
137
+ Napi::Value GetAttrValue(const Napi::CallbackInfo& info);
138
+
139
+ Napi::Value AddAttr(const Napi::CallbackInfo& info);
140
+
141
+ public:
142
+ // constructor reference
143
+ static Napi::FunctionReference constructor;
144
+
145
+ StackEmitCB _cbs;
139
146
 
140
147
  private:
141
- static Nan::Persistent<v8::Function> constructor;
142
- K2HShm _k2hshm;
143
- StackEmitCB _cbs;
148
+ K2HShm _k2hshm;
144
149
  };
145
150
 
146
151
  #endif