• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_wsdlconnection.h"
8 
9 #include <vector>
10 
11 #include "fxjs/cfx_v8.h"
12 #include "fxjs/js_resources.h"
13 #include "fxjs/xfa/cfxjse_value.h"
14 #include "v8/include/v8-primitive.h"
15 #include "xfa/fxfa/parser/cxfa_wsdlconnection.h"
16 
17 const CJX_MethodSpec CJX_WsdlConnection::MethodSpecs[] = {
18     {"execute", execute_static}};
19 
CJX_WsdlConnection(CXFA_WsdlConnection * connection)20 CJX_WsdlConnection::CJX_WsdlConnection(CXFA_WsdlConnection* connection)
21     : CJX_Node(connection) {
22   DefineMethods(MethodSpecs);
23 }
24 
25 CJX_WsdlConnection::~CJX_WsdlConnection() = default;
26 
DynamicTypeIs(TypeTag eType) const27 bool CJX_WsdlConnection::DynamicTypeIs(TypeTag eType) const {
28   return eType == static_type__ || ParentType__::DynamicTypeIs(eType);
29 }
30 
execute(CFXJSE_Engine * runtime,const std::vector<v8::Local<v8::Value>> & params)31 CJS_Result CJX_WsdlConnection::execute(
32     CFXJSE_Engine* runtime,
33     const std::vector<v8::Local<v8::Value>>& params) {
34   if (!params.empty() && params.size() != 1)
35     return CJS_Result::Failure(JSMessage::kParamError);
36 
37   return CJS_Result::Success(runtime->NewBoolean(false));
38 }
39