#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);
|
}
|
static xstring GetUserId()
|
{
|
return GetUID();
|
}
|
};
|