• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 PDFium Authors. All rights reserved.
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/cfxjse_value.h"
12 #include "fxjs/js_resources.h"
13 #include "xfa/fxfa/parser/cxfa_wsdlconnection.h"
14 
15 const CJX_MethodSpec CJX_WsdlConnection::MethodSpecs[] = {
16     {"execute", execute_static}};
17 
CJX_WsdlConnection(CXFA_WsdlConnection * connection)18 CJX_WsdlConnection::CJX_WsdlConnection(CXFA_WsdlConnection* connection)
19     : CJX_Node(connection) {
20   DefineMethods(MethodSpecs, FX_ArraySize(MethodSpecs));
21 }
22 
~CJX_WsdlConnection()23 CJX_WsdlConnection::~CJX_WsdlConnection() {}
24 
execute(CJS_V8 * runtime,const std::vector<v8::Local<v8::Value>> & params)25 CJS_Return CJX_WsdlConnection::execute(
26     CJS_V8* runtime,
27     const std::vector<v8::Local<v8::Value>>& params) {
28   if (!params.empty() && params.size() != 1)
29     return CJS_Return(JSGetStringFromID(JSMessage::kParamError));
30   return CJS_Return(runtime->NewBoolean(false));
31 }
32 
dataDescription(CFXJSE_Value * pValue,bool bSetting,XFA_Attribute eAttribute)33 void CJX_WsdlConnection::dataDescription(CFXJSE_Value* pValue,
34                                          bool bSetting,
35                                          XFA_Attribute eAttribute) {
36   Script_Attribute_String(pValue, bSetting, eAttribute);
37 }
38 
execute(CFXJSE_Value * pValue,bool bSetting,XFA_Attribute eAttribute)39 void CJX_WsdlConnection::execute(CFXJSE_Value* pValue,
40                                  bool bSetting,
41                                  XFA_Attribute eAttribute) {
42   Script_Attribute_String(pValue, bSetting, eAttribute);
43 }
44