📄 pfgcondapi.pas
字号:
unit pfgCondAPI;
{**************************************************************************}
{* pfgCondAPI Unit *}
{* *}
{* Header file conversion of CondAPI.h *}
{* *}
{* Header file converted by Paul Gilbert Nov 2000. *}
{**************************************************************************}
interface
{
/*****************************************************************************
*
* Copyright (c) 1998-1999 Palm Computing, Inc. or its subsidiaries.
* All rights reserved.
*
****************************************************************************/
// File: condapi.h
//
// Module:
//
//
// Description: Publicly consumable header file prototyping the 'C' API
// and the structures used for their parameters.
// When using the Microsoft compiler we asure packed
// structures on single byte boundaries, with the pragma(1).
//
//
/////////////////////////////////////////////////////////////////////////////
// REVISION HISTORY:
// jayita 10/10/97 moved to separate header from syncmgr.h
// jayita 4/15/98 moved error codes from basemon.h
//
/////////////////////////////////////////////////////////////////////////////
}
uses Windows, pfgSubscribe, pfgSyncMgr, pfgWTypes;
// conduit C API
type
ConduitInfoEnum = Integer;
ConduitCfgEnum = Integer;
const
{ ConduitInfoEnum enumeration }
eConduitName=0; eMfcVersion=1; eDefaultAction=2;
eConduitInfoDoNotUse= $ffffffff;
{ ConduitCfgEnum enumaration }
eConfig1 = 0; eConduitCfgDoNotUse= $ffffffff;
MFC_VERSION_41 = $00000410;
MFC_VERSION_50 = $00000500;
MFC_VERSION_60 = $00000600;
MFC_NOT_USED = $10000000;
type
ConduitRequestInfoType = packed record
dwVersion: DWORD;
dwSize: DWORD;
dwCreatorId: DWORD;
dwUserId: DWORD;
szUser: Array [0..63] of TCHAR;
end;
CONDUITREQUESTINFO = ConduitRequestInfoType;
PConduitRequestInfoType = ^ConduitRequestInfoType;
CfgConduitInfoType = packed record
dwVersion: DWORD;
dwSize: DWORD;
dwCreatorId: DWORD;
dwUserId: DWORD;
szUser: Array [0..63] of TCHAR;
m_PathName: Array [0..BIG_PATH-1] of Char;
syncPermanent: eSyncTypes;
syncTemporary: eSyncTypes;
syncNew: eSyncTypes;
syncPref: eSyncPref;
end;
CFGCONDUITINFO = CfgConduitInfoType;
PCfgConduitInfoType = ^CfgConduitInfoType;
const
CONDUITREQUESTINFO_VERSION_1 = $00000001;
SZ_CONDUITREQUESTINFO = sizeof(CONDUITREQUESTINFO);
CFGCONDUITINFO_VERSION_1 = $00000001;
SZ_CFGCONDUITINFO = sizeof(CFGCONDUITINFO);
{ Method declarations }
type
PROGRESSFN = function (pProgress: PChar): HResult; cdecl;
POPENCONDUIT = function (pProgress: PROGRESSFN; const Props: CSyncProperties): HResult; cdecl;
PCONFIGURECONDUIT = function (const props: CSyncPreference): HResult; cdecl;
PGETCONDUITNAME = function (name: PChar; nLen: Word): HResult; cdecl;
PGETCONDUITVERSION = function(): DWORD; cdecl;
PGETCONDUITINFO = function(infoType: ConduitInfoEnum; pInArgs: Pointer;
pOut: Pointer; var pdwOutSize: DWORD): HResult; cdecl;
PCFGCONDUIT = function (cfgType: ConduitCfgEnum; pArgs: Pointer;
var pdwArgsSize: DWORD): HResult; cdecl;
{
function OpenConduit(pProgress: PROGRESSFN; const Props: CSyncProperties): HResult; cdecl;
function ConfigureConduit(const props: CSyncPreference): HResult; cdecl;
function GetConduitName(name: PChar; nLen: WORD): HResult; cdecl;
function GetConduitVersion: DWORD; cdecl;
function GetConduitInfo(infoType: ConduitInfoEnum; pInArgs: Pointer;
pOut: Pointer; var pdwOutSize: DWORD): HResult; cdecl;
function CfgConduit(cfgType: ConduitCfgEnum; pArgs: Pointer; var pdwArgsSize: DWORD): HResult; cdecl;
}
{ For file link }
{
type
PSubProperties = ^SubProperties;
PPSubProperties = ^PSubProperties;
PCSubInfo = ^CSubInfo;
PPCSubInfo = ^PCSubInfo;
PCONFIGURESUBSCRIPTION = function(subProps: PPSubProperties): HResult; cdecl;
PSUBSSUPPORT) = function: HResult; cdecl;
PUPDATETABLES) = function (subProps: PSubProperties): HResult; cdecl;
PIMPORTDATA = function (info: PPCSubInfo): HResult; cdecl;
function ConfigureSubscription(subProps: PPSubProperties): HResult; cdecl;
function SubscriptionSupported(): HResult; cdecl;
function UpdateTables(subProps: PSubProperties): HResult; cdecl;
function ImportData(info: PPCSubInfo): HResult; cdecl;
}
/////////////////////////////////////////////////////////////////////////////////////////////////
//
// Error codes for the Conduit DLL's range $5000 - $5FFF
//
const
CONDERR_NONE = $0000;
CONDERR_FIRST = $1000;
CONDERR_NO_REMOTE_CATEGORIES = CONDERR_FIRST + 1;
CONDERR_NO_LOCAL_CATEGORIES = CONDERR_FIRST + 2;
CONDERR_SAVE_REMOTE_CATEGORIES = CONDERR_FIRST + 3;
CONDERR_BAD_REMOTE_TABLES = CONDERR_FIRST + 4;
CONDERR_BAD_LOCAL_TABLES = CONDERR_FIRST + 5;
CONDERR_BAD_LOCAL_BACKUP = CONDERR_FIRST + 6;
CONDERR_ADD_LOCAL_RECORD = CONDERR_FIRST + 7;
CONDERR_ADD_REMOTE_RECORD = CONDERR_FIRST + 8;
CONDERR_CHANGE_REMOTE_RECORD = CONDERR_FIRST + 9;
CONDERR_RAW_RECORD_ALLOCATE = CONDERR_FIRST + $0A;
CONDERR_REMOTE_CHANGES_NOT_SENT = CONDERR_FIRST + $0B;
CONDERR_LOCAL_MEMORY_ALLOC_FAILED = CONDERR_FIRST + $0C;
CONDERR_CONVERT_TO_REMOTE_CATS = CONDERR_FIRST + $0D;
CONDERR_CONVERT_TO_LOCAL_CATS = CONDERR_FIRST + $0E;
CONDERR_CONVERT_TO_REMOTE_REC = CONDERR_FIRST + $0F;
CONDERR_CONVERT_FROM_REMOTE_REC = CONDERR_FIRST + $10;
CONDERR_REMOTE_RECS_NOT_PURGED = CONDERR_FIRST + $11;
CONDERR_BAD_SYNC_TYPE = CONDERR_FIRST + $12;
CONDERR_DATE_MOVED = CONDERR_FIRST + $50;
CONDERR_SUBSCRIBE_FAILED = CONDERR_FIRST + $60;
// Error codes added 01/23/98
CONDERR_UNSUPPORTED_CONDUITINFO_ENUM = CONDERR_FIRST + $70;
CONDERR_INVALID_PTR = CONDERR_FIRST + $71;
CONDERR_BUFFER_TOO_SMALL = CONDERR_FIRST + $72;
CONDERR_INVALID_BUFFER_SIZE = CONDERR_FIRST + $73;
CONDERR_INVALID_INARGS_PTR = CONDERR_FIRST + $74;
CONDERR_INVALID_INARGS_STRUCT = CONDERR_FIRST + $75;
CONDERR_CONDUIT_RESOURCE_FAILURE = CONDERR_FIRST + $76;
CONDERR_INVALID_OUTSIZE_PTR = CONDERR_FIRST + $77;
CONDERR_INVALID_ARGSSIZE_PTR = CONDERR_FIRST + $78;
CONDERR_UNSUPPORTED_CFGCONDUIT_ENUM = CONDERR_FIRST + $79;
CONDERR_INVALID_ARGSSIZE = CONDERR_FIRST + $7A;
CONDERR_UNSUPPORTED_STRUCT_VERSION = CONDERR_FIRST + $7B;
implementation
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -