Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cjx_source.cpp
Go to the documentation of this file.
1// Copyright 2017 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#include "fxjs/xfa/cjx_source.h"
8
9#include <vector>
10
11#include "fxjs/js_resources.h"
12#include "fxjs/xfa/cfxjse_value.h"
13#include "third_party/base/containers/span.h"
14#include "xfa/fxfa/parser/cxfa_source.h"
15
16const CJX_MethodSpec CJX_Source::MethodSpecs[] = {
17 {"addNew", addNew_static},
18 {"cancel", cancel_static},
19 {"cancelBatch", cancelBatch_static},
20 {"close", close_static},
21 {"delete", deleteItem_static},
22 {"first", first_static},
23 {"hasDataChanged", hasDataChanged_static},
24 {"isBOF", isBOF_static},
25 {"isEOF", isEOF_static},
26 {"last", last_static},
27 {"next", next_static},
28 {"open", open_static},
29 {"previous", previous_static},
30 {"requery", requery_static},
31 {"resync", resync_static},
32 {"update", update_static},
33 {"updateBatch", updateBatch_static}};
34
35CJX_Source::CJX_Source(CXFA_Source* src) : CJX_Node(src) {
36 DefineMethods(MethodSpecs);
37}
38
39CJX_Source::~CJX_Source() = default;
40
41bool CJX_Source::DynamicTypeIs(TypeTag eType) const {
42 return eType == static_type__ || ParentType__::DynamicTypeIs(eType);
43}
44
45CJS_Result CJX_Source::next(CFXJSE_Engine* runtime,
46 pdfium::span<v8::Local<v8::Value>> params) {
47 if (!params.empty())
49
51}
52
53CJS_Result CJX_Source::cancelBatch(CFXJSE_Engine* runtime,
54 pdfium::span<v8::Local<v8::Value>> params) {
55 if (!params.empty())
57
59}
60
61CJS_Result CJX_Source::first(CFXJSE_Engine* runtime,
62 pdfium::span<v8::Local<v8::Value>> params) {
63 if (!params.empty())
65
67}
68
69CJS_Result CJX_Source::updateBatch(CFXJSE_Engine* runtime,
70 pdfium::span<v8::Local<v8::Value>> params) {
71 if (!params.empty())
73
75}
76
77CJS_Result CJX_Source::previous(CFXJSE_Engine* runtime,
78 pdfium::span<v8::Local<v8::Value>> params) {
79 if (!params.empty())
81
83}
84
85CJS_Result CJX_Source::isBOF(CFXJSE_Engine* runtime,
86 pdfium::span<v8::Local<v8::Value>> params) {
87 if (!params.empty())
89
91}
92
93CJS_Result CJX_Source::isEOF(CFXJSE_Engine* runtime,
94 pdfium::span<v8::Local<v8::Value>> params) {
95 if (!params.empty())
97
99}
100
101CJS_Result CJX_Source::cancel(CFXJSE_Engine* runtime,
102 pdfium::span<v8::Local<v8::Value>> params) {
103 if (!params.empty())
105
107}
108
109CJS_Result CJX_Source::update(CFXJSE_Engine* runtime,
110 pdfium::span<v8::Local<v8::Value>> params) {
111 if (!params.empty())
113
115}
116
117CJS_Result CJX_Source::open(CFXJSE_Engine* runtime,
118 pdfium::span<v8::Local<v8::Value>> params) {
119 if (!params.empty())
121
123}
124
125CJS_Result CJX_Source::deleteItem(CFXJSE_Engine* runtime,
126 pdfium::span<v8::Local<v8::Value>> params) {
127 if (!params.empty())
129
131}
132
133CJS_Result CJX_Source::addNew(CFXJSE_Engine* runtime,
134 pdfium::span<v8::Local<v8::Value>> params) {
135 if (!params.empty())
137
139}
140
141CJS_Result CJX_Source::requery(CFXJSE_Engine* runtime,
142 pdfium::span<v8::Local<v8::Value>> params) {
143 if (!params.empty())
145
147}
148
149CJS_Result CJX_Source::resync(CFXJSE_Engine* runtime,
150 pdfium::span<v8::Local<v8::Value>> params) {
151 if (!params.empty())
153
155}
156
157CJS_Result CJX_Source::close(CFXJSE_Engine* runtime,
158 pdfium::span<v8::Local<v8::Value>> params) {
159 if (!params.empty())
161
163}
164
165CJS_Result CJX_Source::last(CFXJSE_Engine* runtime,
166 pdfium::span<v8::Local<v8::Value>> params) {
167 if (!params.empty())
169
171}
172
173CJS_Result CJX_Source::hasDataChanged(
174 CFXJSE_Engine* runtime,
175 pdfium::span<v8::Local<v8::Value>> params) {
176 if (!params.empty())
178
180}
181
182void CJX_Source::db(v8::Isolate* pIsolate,
183 v8::Local<v8::Value>* pValue,
184 bool bSetting,
185 XFA_Attribute eAttribute) {}
friend class EventParamScope
static CJS_Result Success()
Definition cjs_result.h:27
static CJS_Result Failure(JSMessage id)
Definition cjs_result.h:34
bool DynamicTypeIs(TypeTag eType) const override
Definition cjx_node.cpp:112
void DefineMethods(pdfium::span< const CJX_MethodSpec > methods)
~CJX_Source() override
bool DynamicTypeIs(TypeTag eType) const override
XFA_Attribute
Definition fxfa_basic.h:67
JSMessage