xj qian
2024-06-25 1e63e2b6046ffcdc8127da028d122fa414c6a0d7
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
#pragma once
 
#include "xbase.hpp"
#include "kobject/kxml.hpp"
#include "kobject/kxaserver.hpp"
using KXMLDOMDocument=Hxsoft::XFrame::KXMLDOMDocument;
using kxaserver = Hxsoft::XFrame::IXAServer;
class   xaserver
{
public:
    //读取开发的对象,pObject should in( 'xpage','entity','sheet','workflow','worknode','xquery','xaction'
    static int GetDevObject(LPCTSTR pStrServer,LPCTSTR pObject,LPCTSTR pObjGuid, KXMLDOMDocument&xml)
    {
        return kxaserver::GetDevObject(pStrServer,pObject,pObjGuid,xml);
    }
    //static int GetDevObject(ITrans * pTrans,LPCTSTR pObject,LPCTSTR pObjGuid, KXMLDOMDocument&xml);
    //int GetDevObject(LPCTSTR pObject,LPCTSTR pObjGuid, KXMLDOMDocument &xml);
 
public:
    //执行服务命令
    static LPTSTR ProcessCmd(LPCTSTR pStrServer,LPCTSTR pStrCmd,LPCTSTR pExtStr, bool needlogin=false)
    {
         return kxaserver::ProcessCmd(pStrServer, pStrCmd,pExtStr, needlogin);
    }
    static int ProcessCmd(LPCTSTR pStrServer,LPCTSTR pStrCmd,LPCTSTR pExtStr,BYTE * &pData,int &len)
    {
        return kxaserver::ProcessCmd(pStrServer,pStrCmd,pExtStr,pData,len);
    }
    //static int ProcessCmd(ITrans * pTrans,LPCTSTR pStrCmd,LPCTSTR pExtStr,BYTE * &pData,int &len);
    //int ProcessCmd(LPCTSTR pStrCmd,LPCTSTR pExtStr,BYTE * &pData,int &len)
    //int ProcessCmd(LPCTSTR pStrServer,LPCTSTR pStrCmd,LPCTSTR pExtStr,BYTE * &pData,int &len, HWND hWnd);
    //执行服务命令并装载到xml对象中
    static int FetchXml(LPCTSTR pStrServer,LPCTSTR pStrCmd,LPCTSTR pExtStr,KXMLDOMDocument &xml)
    {
        return kxaserver::FetchXml(pStrServer,pStrCmd,pExtStr,xml);
    }
    //static int FetchXml(ITrans * pTrans,LPCTSTR pStrCmd,LPCTSTR pExtStr,KXMLDOMDocument &xml);
    //int FetchXml(LPCTSTR pStrCmd,LPCTSTR pExtStr,KXMLDOMDocument &xml);
 
public:
    //执行服务命令并装载到xml对象中
    static int LoadUrl(LPCTSTR pStrServer,LPCTSTR pUrl,LPCTSTR pExtStr,BYTE * &pData,int &len,bool bCache=true)
    {
        return kxaserver::LoadUrl(pStrServer,pUrl,pExtStr,pData,len,bCache);
    }
    //static int LoadUrl(ITrans * pTrans,LPCTSTR pUrl,LPCTSTR pExtStr,BYTE * &pData,int &len,bool bCache=true);
    //int LoadUrl(LPCTSTR pUrl,LPCTSTR pExtStr,BYTE * &pData,int &len,bool bCache=true);
    //执行服务命令并装载到xml对象中
    static int LoadUrl(LPCTSTR pStrServer,LPCTSTR pUrl,LPCTSTR pExtStr,KXMLDOMDocument &xml)
    {
        return kxaserver::LoadUrl(pStrServer,pUrl,pExtStr,xml);
    }
    //static int LoadUrl(ITrans * pTrans,LPCTSTR pUrl,LPCTSTR pExtStr,KXMLDOMDocument &xml);
    //int LoadUrl(LPCTSTR pUrl,LPCTSTR pExtStr,KXMLDOMDocument &xml);
    //读取XPage
    static int LoadXPage(LPCTSTR pStrServer,LPCTSTR pStrUrl,KXMLDOMDocument &xml)
    {
        return kxaserver::LoadXPage(pStrServer,pStrUrl,xml);
    }
    //static int LoadXPage(ITrans * pTrans,LPCTSTR pStrUrl,KXMLDOMDocument &xml);
    //int LoadXPage(LPCTSTR pStrUrl,KXMLDOMDocument &xml);
 
public:
    //执行XQuery命令
    static int ExecXQuery(LPCTSTR pStrServer,LPCTSTR pObjGuid,LPCTSTR pArgs,BYTE * &pData,int &len)
    {
        return kxaserver::ExecXQuery(pStrServer,pObjGuid,pArgs,pData,len);
    }
    static int ExecXQuery(LPCTSTR pStrServer,LPCTSTR pObjGuid,LPCTSTR pArgs,KXMLDOMDocument &xml)
    {
         return kxaserver::ExecXQuery(pStrServer,pObjGuid,pArgs,xml);
    }
    static int ExecXAction(LPCTSTR pStrServer,LPCTSTR pObjGuid,LPCTSTR pArgs,BYTE * &pData,int &len)
    {
         return kxaserver::ExecXAction(pStrServer,pObjGuid,pArgs,pData,len);
    }
    static int ExecXAction(LPCTSTR pStrServer,LPCTSTR pObjGuid,LPCTSTR pArgs,KXMLDOMDocument &xml)
    {
         return kxaserver::ExecXAction(pStrServer,pObjGuid,pArgs,xml);
    }
 
    static int ExecXQuery(LPCTSTR pStrServer,LPCTSTR pObjGuid,LPCTSTR pArgs,int &val)
    {
         return kxaserver::ExecXQuery(pStrServer,pObjGuid,pArgs,val);
    }
    static int ExecXAction(LPCTSTR pStrServer,LPCTSTR pObjGuid,LPCTSTR pArgs)
    {
         return kxaserver::ExecXAction(pStrServer,pObjGuid,pArgs);
    }
 
    //static int ExecXQuery(ITrans * pTrans,LPCTSTR pObjGuid,LPCTSTR pArgs,BYTE * &pData,int &len);
    //static int ExecXQuery(ITrans * pTrans,LPCTSTR pObjGuid,LPCTSTR pArgs,KXMLDOMDocument &xml);
    //static int ExecXAction(ITrans * pTrans,LPCTSTR pObjGuid,LPCTSTR pArgs,BYTE * &pData,int &len);
    //static int ExecXAction(ITrans * pTrans,LPCTSTR pObjGuid,LPCTSTR pArgs,KXMLDOMDocument &xml);
 
    //int ExecXQuery(LPCTSTR pObjGuid,LPCTSTR pArgs,BYTE * &pData,int &len);
    //int ExecXQuery(LPCTSTR pObjGuid,LPCTSTR pArgs,KXMLDOMDocument &xml);
    //int ExecXAction(LPCTSTR pObjGuid,LPCTSTR pArgs,BYTE * &pData,int &len);
    //int ExecXAction(LPCTSTR pObjGuid,LPCTSTR pArgs,KXMLDOMDocument &xml);
 
    static LPCTSTR ExecArgs(LPCTSTR pArgs)
    {
        return kxaserver::ExecArgs(pArgs);
    }
public:
    //重新连接
    static int ReConnect(LPCTSTR pStrServer)
    {
        return kxaserver::ReConnect(pStrServer);
    }
    //static int ReConnect(ITrans * pTrans);
    //int ReConnect();
public:
    //得到用户
    static LPCTSTR GetUserNo()
    {
        return kxaserver::GetUserNo();
    }
    static LPCTSTR GetVersion()
    {
        return kxaserver::GetVersion();
    }
    static LPWSTR GetComputerNameEx()
    {
        return kxaserver::GetComputerNameEx();
 
    }
    static LPWSTR GetAppPath()
    {
        return kxaserver::GetAppPath();
 
    }
    static int SetUID(LPWSTR uid)
    {
        return kxaserver::SetUID(uid);
    }
    static LPWSTR GetUID()
    {
        return kxaserver::GetUID();
    }
    static LPWSTR GetMacAddress()
    {
        return kxaserver::GetMacAddress();
    }
    static LPWSTR GetIpAddress()
    {
        return kxaserver::GetIpAddress();
    }
    static LPWSTR GetConnectId()
    {
        return kxaserver::GetConnectId();
    }
    static int SetLoginLog(LPCTSTR pStrServer,LPWSTR pStatus)
    {
        return kxaserver::SetLoginLog(pStrServer,pStatus);
   }        
    static void SetDataToClip(LPCTSTR DataStr)
    {
        return kxaserver::SetDataToClip(DataStr);
    }
 
public:
    //设置交易对象
    //ITrans * m_pTrans;
    //int SetTrans(ITrans *);
    //ITrans * GetTrans();
 
    static int UploadEx(LPCTSTR pUri,LPCTSTR pName,HWND m_hWnd,LPCTSTR pSource=NULL,BOOL bCompress=false)
    {
        return kxaserver::UploadEx((LPTSTR)pUri, (LPTSTR)pName,m_hWnd, (LPTSTR)pSource,bCompress);
 
    }
    static int Upload(LPTSTR pUri,LPTSTR pName,HWND m_hWnd,LPTSTR pSource=NULL,BOOL bCompress=false)
    {
        return kxaserver::Upload(pUri,pName,m_hWnd,pSource,bCompress);
    }
 
    static int Upload(LPCTSTR pUri,LPCTSTR pName,LPCTSTR pPath,HWND m_hWnd,LPCTSTR pSource=NULL,BOOL bCompress=false)
    {
        return kxaserver::Upload((LPTSTR)pUri, (LPTSTR)pName, (LPTSTR)pPath,m_hWnd, (LPTSTR)pSource,bCompress);
    }
 
    static int FileCopy(LPCTSTR pUri,LPCTSTR pName,LPCTSTR pUri1,LPCTSTR pName1)
    {
        return kxaserver::FileCopy((LPTSTR)pUri, (LPTSTR)pName, (LPTSTR)pUri1, (LPTSTR)pName1);
    }
    static LPCTSTR UploadFile(LPCTSTR pUri,LPCTSTR pName,HWND m_hWnd,LPCTSTR pSource,BOOL bCompress)
    {
        return kxaserver::UploadFile((LPTSTR)pUri,(LPTSTR)pName,m_hWnd,(LPTSTR)pSource,bCompress);
    }
    static int __DeleteFile(LPTSTR pName)
    {
        return kxaserver::__DeleteFile(pName);
    }
    static int __CreateDirectory(LPCTSTR pName)
    {
        return kxaserver::__CreateDirectory((LPTSTR)pName);
    }
    static int DownLoadFile(LPCTSTR pStrServer,LPCTSTR pUrl,LPCTSTR pExt,LPTSTR pName=NULL)
    {
        return kxaserver::DownLoadFile(pStrServer,pUrl,pExt,pName);
    }
 
    static int UploadData(LPCTSTR pUri,LPCTSTR pName,LPCTSTR pData)
    {
        return kxaserver::UploadData((LPTSTR)pUri, (LPTSTR)pName, (LPTSTR)pData);
    }
};