This repository has been archived by the owner on May 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 89
/
ad_block_client_wrap.h
57 lines (46 loc) · 2.24 KB
/
ad_block_client_wrap.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
47
48
49
50
51
52
53
54
55
56
57
/* Copyright (c) 2015 Brian R. Bondy. Distributed under the MPL2 license.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef AD_BLOCK_CLIENT_WRAP_H_
#define AD_BLOCK_CLIENT_WRAP_H_
#include <node.h>
#include <node_object_wrap.h>
#include "./ad_block_client.h"
namespace ad_block_client_wrap {
/**
* Wraps AdBlockClient for use in Node
*/
class AdBlockClientWrap : public AdBlockClient, public node::ObjectWrap {
public:
static void Init(v8::Local<v8::Object> exports);
private:
AdBlockClientWrap();
virtual ~AdBlockClientWrap();
static void New(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Clear(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Parse(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Matches(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Serialize(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Deserialize(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Cleanup(const v8::FunctionCallbackInfo<v8::Value>& args);
static void AddTag(const v8::FunctionCallbackInfo<v8::Value>& args);
static void RemoveTag(const v8::FunctionCallbackInfo<v8::Value>& args);
static void GetParsingStats(const v8::FunctionCallbackInfo<v8::Value>& args);
static void GetMatchingStats(const v8::FunctionCallbackInfo<v8::Value>& args);
static void GetFilters(const v8::FunctionCallbackInfo<v8::Value>& args);
static void GetFingerprint(const v8::FunctionCallbackInfo<v8::Value>& args);
static void EnableBadFingerprintDetection(
const v8::FunctionCallbackInfo<v8::Value>& args);
static void GenerateBadFingerprintsHeader(
const v8::FunctionCallbackInfo<v8::Value>& args);
static void GenerateDefaultManifestFile(
const v8::FunctionCallbackInfo<v8::Value>& args);
static void GenerateRegionalManifestFiles(
const v8::FunctionCallbackInfo<v8::Value>& args);
static void FindMatchingFilters(
const v8::FunctionCallbackInfo<v8::Value>& args);
static v8::Persistent<v8::Function> constructor;
};
} // namespace ad_block_client_wrap
#endif // AD_BLOCK_CLIENT_WRAP_H_