summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-12 21:28:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-12 21:28:12 +0000
commit91eb23f044911477f615e7e25e1425b667c3f1fa (patch)
tree783ff1dbb6ef98f9a7a7979bff8f9383caee9aa4 /include
parent627687a2d798a8fa4ecbe4578c75d93bf97f6da5 (diff)
pascal sources sync
git-svn-id: http://svn.miranda-ng.org/main/trunk@4435 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r--include/delphi/m_clist.inc1
-rw-r--r--include/delphi/m_core.inc26
-rw-r--r--include/delphi/m_database.inc17
-rw-r--r--include/delphi/m_helpers.inc56
-rw-r--r--include/delphi/m_idle.inc41
-rw-r--r--include/delphi/m_message.inc54
-rw-r--r--include/delphi/m_popup.inc6
-rw-r--r--include/delphi/m_skin.inc17
-rw-r--r--include/delphi/m_xml.inc32
9 files changed, 177 insertions, 73 deletions
diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc
index 5fe6680289..ac6c1746e2 100644
--- a/include/delphi/m_clist.inc
+++ b/include/delphi/m_clist.inc
@@ -89,7 +89,6 @@ const
CMIF_ROOTHANDLE = 384; // means that hParentMenu member is set (since 0.8#26)
CMIF_UNICODE = 512; // will return TCHAR* instead of AnsiChar*
CMIF_KEEPUNTRANSLATED = 1024; // don't translate a menu item
- CMIF_ICONFROMICOLIB = 2048; // use icolibName instead of hIcon
CMIF_DEFAULT = 4096; // this menu item is the default one
diff --git a/include/delphi/m_core.inc b/include/delphi/m_core.inc
index 7daa189ceb..773b93a11c 100644
--- a/include/delphi/m_core.inc
+++ b/include/delphi/m_core.inc
@@ -164,12 +164,11 @@ function db_set_utf(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:
function db_set_blob(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:pointer; len:uint):int_ptr; stdcall;
external CoreDLL name 'db_set_blob';
-// Aliases
+// deprecated Aliases
function DBFreeVariant(dbv:PDBVARIANT):int_ptr; stdcall;
external CoreDLL name 'db_free';
function DBDeleteContactSetting(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:pAnsiChar):int_ptr; stdcall;
external CoreDLL name 'db_unset';
-
function DBGetContactSettingByte(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:int):int; stdcall;
external CoreDLL name 'db_get_b';
function DBGetContactSettingWord(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:int):int; stdcall;
@@ -200,7 +199,6 @@ function DBWriteContactSettingUTF8String(hContact:THANDLE; const szModule:pAnsiC
function DBWriteContactSettingBlob(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:pointer; len:uint):int_ptr; stdcall;
external CoreDLL name 'db_set_blob';
-
///////////////////////////////////////////////////////////////////////////////
// events, hooks & services
@@ -213,16 +211,16 @@ type
TMIRANDAHOOKOBJ = function(ptr:pointer;wParam:WPARAM;lParam:LPARAM): int; cdecl;
TMIRANDAHOOKOBJPARAM = function(ptr:pointer;wParam:WPARAM;lParam,lParam1: LPARAM): int; cdecl;
- TMIRANDASERVICE = function(wParam: WPARAM; lParam: LPARAM): uint_ptr; cdecl;
- TMIRANDASERVICEPARAM = function(wParam:WPARAM;lParam,lParam1:LPARAM):uint_ptr; cdecl;
- TMIRANDASERVICEOBJ = function(ptr:pointer;wParam,lParam:LPARAM):uint_ptr; cdecl;
- TMIRANDASERVICEOBJPARAM = function(ptr:pointer;wParam:WPARAM;lParam,lParam1:LPARAM):uint_ptr; cdecl;
+ TMIRANDASERVICE = function(wParam: WPARAM; lParam: LPARAM): int_ptr; cdecl;
+ TMIRANDASERVICEPARAM = function(wParam:WPARAM;lParam,lParam1:LPARAM):int_ptr; cdecl;
+ TMIRANDASERVICEOBJ = function(ptr:pointer;wParam,lParam:LPARAM):int_ptr; cdecl;
+ TMIRANDASERVICEOBJPARAM = function(ptr:pointer;wParam:WPARAM;lParam,lParam1:LPARAM):int_ptr; cdecl;
const
{$IFDEF WIN64}
- CALLSERVICE_NOTFOUND = uint_ptr($8000000000000000);
+ CALLSERVICE_NOTFOUND = int_ptr($8000000000000000);
{$ELSE}
- CALLSERVICE_NOTFOUND = uint_ptr($80000000);
+ CALLSERVICE_NOTFOUND = int_ptr($80000000);
{$ENDIF}
function CreateHookableEvent(const name: PAnsiChar): THANDLE; stdcall;
@@ -268,9 +266,9 @@ function DestroyServiceFunction(hService:THANDLE):int; stdcall;
function ServiceExists(const name:PAnsiChar):int; stdcall;
external CoreDLL name 'ServiceExists';
-function CallService(const name:PAnsiChar; wParam:WPARAM; lParam:LPARAM):uint_ptr; stdcall;
+function CallService(const name:PAnsiChar; wParam:WPARAM; lParam:LPARAM):int_ptr; stdcall;
external CoreDLL name 'CallService';
-function CallServiceSync(const name:PAnsiChar; wParam:WPARAM; lParam:LPARAM):uint_ptr; stdcall;
+function CallServiceSync(const name:PAnsiChar; wParam:WPARAM; lParam:LPARAM):int_ptr; stdcall;
external CoreDLL name 'CallServiceSync';
function CallFunctionAsync(ptr1,ptr2:pointer):int; stdcall;
@@ -280,16 +278,16 @@ procedure KillModuleServices(hInst:HINST); stdcall;
procedure KillObjectServices(var ptr); stdcall;
external CoreDLL name 'KillObjectServices';
-function CallContactService(hContact:THANDLE;const name:PAnsiChar;wParam:WPARAM;lParam:LPARAM):uint_ptr; cdecl;
+function CallContactService(hContact:THANDLE;const name:PAnsiChar;wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl;
external CoreDLL name 'CallContactService';
-function CallProtoService(const szModule:PAnsiChar;const szService:PAnsiChar;wParam:WPARAM;lParam:LPARAM):uint_ptr; cdecl;
+function CallProtoService(const szModule:PAnsiChar;const szService:PAnsiChar;wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl;
external CoreDLL name 'CallProtoService';
///////////////////////////////////////////////////////////////////////////////
// http
// returned result must be freed using mir_free()
-function mir_urlEncode(url:pAnsiChar):pAnsiChar; stdcall;
+function mir_urlEncode(url:pAnsiChar): pAnsiChar; stdcall;
external CoreDLL name 'mir_urlEncode';
///////////////////////////////////////////////////////////////////////////////
diff --git a/include/delphi/m_database.inc b/include/delphi/m_database.inc
index 0cb6eeacb4..eda633e728 100644
--- a/include/delphi/m_database.inc
+++ b/include/delphi/m_database.inc
@@ -253,14 +253,14 @@ Always returns 0.
type
PDBEVENTTYPEDESCR = ^TDBEVENTTYPEDESCR;
TDBEVENTTYPEDESCR = record
- cbSize :int; // structure size in bytes
- module :PAnsiChar; // event module name
- eventType :int; // event id, unique for this module
- descr :PAnsiChar; // event type description (i.e. "File Transfer")
- textService:PAnsiChar; // service name for MS_DB_EVENT_GETTEXT (0.8+, default Module+'/GetEventText'+EvtID)
- iconService:PAnsiChar; // service name for MS_DB_EVENT_GETICON (0.8+, default Module+'/GetEventIcon'+EvtID)
- eventIcon :THANDLE; // icolib handle to eventicon (0.8+, default 'eventicon_'+Module+EvtID)
- flags :DWORD; // flags, combination of the DETF_*
+ cbSize :int; // structure size in bytes
+ module :PAnsiChar; // event module name
+ eventType :int; // event id, unique for this module (actually, word size)
+ descr :PAnsiChar; // event type description (i.e. "File Transfer")
+ textService:PAnsiChar; // service name for MS_DB_EVENT_GETTEXT (0.8+, default Module+'/GetEventText'+EvtID)
+ iconService:PAnsiChar; // service name for MS_DB_EVENT_GETICON (0.8+, default Module+'/GetEventIcon'+EvtID)
+ eventIcon :THANDLE; // icolib handle to eventicon (0.8+, default 'eventicon_'+Module+EvtID)
+ flags :DWORD; // flags, combination of the DETF_*
end;
const
@@ -315,7 +315,6 @@ const
modules are free to define their own, beginning at 2000
DBEVENTINFO.timestamp is in GMT, as returned by time()
}
-
const
MS_DB_EVENT_ADD:PAnsiChar = 'DB/Event/Add';
diff --git a/include/delphi/m_helpers.inc b/include/delphi/m_helpers.inc
index b7dcd80bdd..345bcc107a 100644
--- a/include/delphi/m_helpers.inc
+++ b/include/delphi/m_helpers.inc
@@ -43,7 +43,16 @@ function Langpack_Register:int_ptr;
function ProtoBroadcastAck(const szModule: PAnsiChar; hContact: THandle; type_: int; result_: int; hProcess: THandle; lParam: LPARAM): int_ptr;
function CreateProtoServiceFunction(const szModule, szService: PAnsiChar; serviceProc: TMIRANDASERVICE): int_ptr;
-function LoadSkinnedIcon(id: int): THandle;
+function Srmm_AddIcon (sid: PStatusIconData):int_ptr;
+procedure Srmm_RemoveIcon(sid: PStatusIconData);
+procedure Srmm_ModifyIcon(hContact:THANDLE; sid:PStatusIconData);
+function Srmm_GetNthIcon(hContact:THANDLE; index:int):pStatusIconData;
+
+function LoadSkinnedIcon (id: int): HICON;
+function LoadSkinnedIconHandle(id: int): THandle;
+function LoadSkinnedIconBig (id: int): HICON;
+function LoadSkinnedIconName (id: int): PAnsiChar;
+
function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THandle;
function SkinAddNewSound(const name, description, defaultFile: PAnsiChar): int_ptr;
function SkinPlaySound (const name: PAnsiChar): int_ptr;
@@ -367,11 +376,52 @@ begin
Result := CreateServiceFunction(szStr, @serviceProc);
end;
+function Srmm_AddIcon(sid: PStatusIconData):int_ptr;
+ {$IFDEF AllowInline}inline;{$ENDIF}
+begin
+ result:=CallService(MS_MSG_ADDICON, hLangpack, LPARAM(sid));
+end;
+
+procedure Srmm_RemoveIcon(sid: PStatusIconData);
+ {$IFDEF AllowInline}inline;{$ENDIF}
+begin
+ CallService(MS_MSG_REMOVEICON, 0, LPARAM(sid));
+end;
+
+procedure Srmm_ModifyIcon(hContact:THANDLE; sid:PStatusIconData);
+ {$IFDEF AllowInline}inline;{$ENDIF}
+begin
+ CallService(MS_MSG_GETNTHICON, hContact, LPARAM(sid));
+end;
+
+function Srmm_GetNthIcon(hContact:THANDLE; index:int):PStatusIconData;
+ {$IFDEF AllowInline}inline;{$ENDIF}
+begin
+ result:=PStatusIconData(CallService(MS_MSG_GETNTHICON, hContact, index));
+end;
+
+function LoadSkinnedIcon(id: int): HICON;
+ {$IFDEF AllowInline}inline;{$ENDIF}
+begin
+ Result := HICON(CallService(MS_SKIN_LOADICON, id, 0));
+end;
+
+function LoadSkinnedIconHandle(id: int): THandle;
+ {$IFDEF AllowInline}inline;{$ENDIF}
+begin
+ Result := THANDLE(CallService(MS_SKIN_LOADICON, id, 1));
+end;
+
+function LoadSkinnedIconBig(id: int): HICON;
+ {$IFDEF AllowInline}inline;{$ENDIF}
+begin
+ Result := HICON(CallService(MS_SKIN_LOADICON, id, 2));
+end;
-function LoadSkinnedIcon(id: int): THandle;
+function LoadSkinnedIconName(id: int): PAnsiChar;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
- Result := CallService(MS_SKIN_LOADICON, id, 0);
+ Result := PAnsiChar(CallService(MS_SKIN_LOADICON, id, 3));
end;
function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THandle;
diff --git a/include/delphi/m_idle.inc b/include/delphi/m_idle.inc
index f3646fbc40..c8d3203028 100644
--- a/include/delphi/m_idle.inc
+++ b/include/delphi/m_idle.inc
@@ -33,19 +33,19 @@ const
IDF_PRIVACY = $8; // if set, the information provided shouldn't be given to third parties.
const
- {
- wParam: 0
- lParam: IDF_ (or'd field)
- Affect: This event is fired when information about idle changes.
- Note: You will get multiple calls with IDF_ISIDLE set, the first is for short idle
- then long idle, then anytime during you might get IDF_ONFORCE if the screensaver
- or station become locked.
+{
+ wParam: 0
+ lParam: IDF_ (or'd field)
+ Affect: This event is fired when information about idle changes.
+ Note: You will get multiple calls with IDF_ISIDLE set, the first is for short idle
+ then long idle, then anytime during you might get IDF_ONFORCE if the screensaver
+ or station become locked.
- It is up to you to keep state, i.e. once the idle that you care about is reported
- ignore other status notifications with IDF_ISIDLE set until you get one with
- IDF_ISIDLE isn't set.
- Version: 0.3.4a+ (2004/09/16)
- }
+ It is up to you to keep state, i.e. once the idle that you care about is reported
+ ignore other status notifications with IDF_ISIDLE set until you get one with
+ IDF_ISIDLE isn't set.
+ Version: 0.3.4a+ (2004/09/16)
+}
ME_IDLE_CHANGED:PAnsiChar = 'Miranda/Idle/Changed';
type
@@ -59,14 +59,15 @@ type
idleType : int;
idlesoundsoff: int;
end;
- {
- wParam; 0
- lParam: address of MIRANDA_IDLE_INFO
- Affect: Return information about current idle settings, like short/long idle time in mins
- and if the user wants that info kept private, etc
- Returns: zero on success, non zero on failure
- Version: 0.3.4 (2004/09/16)
- }
+
+{
+ wParam; 0
+ lParam: address of MIRANDA_IDLE_INFO
+ Affect: Return information about current idle settings, like short/long idle time in mins
+ and if the user wants that info kept private, etc
+ Returns: zero on success, non zero on failure
+ Version: 0.3.4 (2004/09/16)
+}
const
MS_IDLE_GETIDLEINFO:PAnsiChar = 'Miranda/Idle/GetInfo';
diff --git a/include/delphi/m_message.inc b/include/delphi/m_message.inc
index 5e25657de8..a89204f1b0 100644
--- a/include/delphi/m_message.inc
+++ b/include/delphi/m_message.inc
@@ -70,18 +70,18 @@ type
end;
const
- MS_MSG_GETWINDOWAPI:PAnsiChar = 'MessageAPI/WindowAPI';
{ wparam=0
lparam=0
Returns a dword with the current message api version
Current version is 0,0,0,4
}
+ MS_MSG_GETWINDOWAPI:PAnsiChar = 'MessageAPI/WindowAPI';
- MS_MSG_GETWINDOWCLASS:PAnsiChar = 'MessageAPI/WindowClass';
{ wparam=(AnsiChar*)szBuf
lparam=(int)cbSize size of buffer
Sets the window class name in wParam (ex. "SRMM" for srmm.dll)
}
+ MS_MSG_GETWINDOWCLASS:PAnsiChar = 'MessageAPI/WindowClass';
type
PMessageWindowInputData = ^TMessageWindowInputData;
@@ -113,20 +113,21 @@ type
TMessageWindowData = TMessageWindowOutputData;
const
- MS_MSG_GETWINDOWDATA:PAnsiChar = 'MessageAPI/GetWindowData';
{ wparam=(MessageWindowInputData*)
lparam=(MessageWindowOutputData*)
returns 0 on success and returns non-zero (1) on error or if no window data
exists for that hcontact
}
+ MS_MSG_GETWINDOWDATA:PAnsiChar = 'MessageAPI/GetWindowData';
- ME_MSG_WINDOWPOPUP:PAnsiChar = 'MessageAPI/WindowPopupRequested';
{ wParam = 0
lParam = (MessageWindowPopupData *)&MessageWindowPopupData;
Fired to allow plugins to add itens to the msg window popup menu
Always fired twice: once with MSG_WINDOWPOPUP_SHOWING and once with MSG_WINDOWPOPUP_SELECTED.
This is done to allow cleaning of resources.
}
+ ME_MSG_WINDOWPOPUP:PAnsiChar = 'MessageAPI/WindowPopupRequested';
+
MSG_WINDOWPOPUP_SHOWING = 1;
MSG_WINDOWPOPUP_SELECTED = 2;
@@ -145,20 +146,22 @@ type
selection:int; // The menu control id or 0 if no one was selected
end;
-// status icons - HICONs will be automatically destroyed when removed or when miranda exits
+// status icons
const
MBF_DISABLED = 1;
MBF_HIDDEN = 2;
+ MBF_UNICODE = 4;
type
- StatusIconData = record
- cbSize :int;
+ pStatusIconData = ^tStatusIconData;
+ tStatusIconData = record
+ cbSize :int; // must be equal to sizeof(StatusIconData)
szModule :PAnsiChar; // used in combo with the dwId below to create a unique identifier
- dwId :DWORD;
+ dwId :DWORD; // uniquely defines a button inside a module
hIcon,
hIconDisabled:HICON; // hIconDisabled is optional - if null, will use hIcon in the disabled state
flags :int; // one of MBF_* above
- szTooltip :PAnsiChar;
+ szTooltip :TChar; // controlled by MBF_UNICODE
end;
const
@@ -166,7 +169,8 @@ const
// otherwize it was a left click
type
- StatusIconClickData = record
+ pStatusIconClickData = ^tStatusIconClickData;
+ tStatusIconClickData = record
cbSize :int;
clickLocation:TPOINT; // click location, in screen coordinates
szModule :PAnsiChar;
@@ -175,16 +179,27 @@ type
end;
const
+{
+ wParam = hLangpack
+ lParam = (StatusIconData *)&StatusIconData
+}
MS_MSG_ADDICON:PAnsiChar = 'MessageAPI/AddIcon';
-// lParam = (StatusIconData *)&StatusIconData
+{
+ wParam = 0
+ lParam = (StatusIconData *)&StatusIconData
+ only szModule and szId are used
+}
MS_MSG_REMOVEICON:PAnsiChar = 'MessageAPI/RemoveIcon';
+
{
- lParam = (StatusIconData *)&StatusIconData
- only szModule and szId are used
+ wParam = (HANDLE)hContact
+ lParam = (int)zero-based index of a visible icon
+ returns (StatusIconData*)icon description filled for the required contact
+ don't free this memory.
}
+ MS_MSG_GETNTHICON:PAnsiChar = 'MessageAPI/GetNthIcon';
- MS_MSG_MODIFYICON:PAnsiChar = 'MessageAPI/ModifyIcon';
{
wParam = (HANDLE)hContact
lParam = (StatusIconData *)&StatusIconData
@@ -192,11 +207,20 @@ const
otherwise, only the flags field is valid
if either hIcon, hIconDisabled or szTooltip is null, they will not be modified
}
+ MS_MSG_MODIFYICON:PAnsiChar = 'MessageAPI/ModifyIcon';
- ME_MSG_ICONPRESSED:PAnsiChar = 'MessageAPI/IconPressed';
{
wParam = (HANDLE)hContact;
lParam = (StatusIconClickData *)&StatusIconClickData;
catch to show a popup menu, etc.
}
+ ME_MSG_ICONPRESSED:PAnsiChar = 'MessageAPI/IconPressed';
+
+{
+ wParam = (HANDLE)hContact;
+ lParam = (StatusIconkData*)pIcon
+ catch to be notified about the icon list's change.
+}
+ ME_MSG_ICONSCHANGED:PAnsiChar = 'MessageAPI/IconsChanged';
+
{$ENDIF}
diff --git a/include/delphi/m_popup.inc b/include/delphi/m_popup.inc
index 4e870963f4..9ec0df58d5 100644
--- a/include/delphi/m_popup.inc
+++ b/include/delphi/m_popup.inc
@@ -162,8 +162,8 @@ You may pass additional creation flags via lParam:
APF_NO_POPUP = 8;
APF_NEWDATA = $10;
- MS_POPUP_ADDPOPUPW :PAnsiChar = 'PopUp/AddPopUpW';
- MS_POPUP_ADDPOPUP :PAnsiChar = 'PopUp/AddPopUpEx';
+ MS_POPUP_ADDPOPUPW:PAnsiChar = 'PopUp/AddPopUpW';
+ MS_POPUP_ADDPOPUP :PAnsiChar = 'PopUp/AddPopUpEx';
{
Returns the handle to the contact associated to the specified PopUpWindow.
@@ -234,7 +234,6 @@ You may pass additional creation flags via lParam:
returns: > 0 for success, -1 for failure, 0 if the failure is due to second line not being shown. (but you could call PUIsSecondLineShown() before changing the text...)
Changes the text displayed in the second line of the popup.
}
-
MS_POPUP_CHANGETEXTW:PAnsiChar = 'PopUp/ChangetextW';
{
@@ -242,7 +241,6 @@ You may pass additional creation flags via lParam:
lParam = (LPARAM)(POPUPDATAEX*)newData
Changes the entire popup
}
-
MS_POPUP_CHANGEW:PAnsiChar = 'PopUp/ChangeW';
{
diff --git a/include/delphi/m_skin.inc b/include/delphi/m_skin.inc
index 9163305fce..342a8045ce 100644
--- a/include/delphi/m_skin.inc
+++ b/include/delphi/m_skin.inc
@@ -120,13 +120,15 @@ type
const
{
- wParam : ICON_ID or handle
- lParam : 0 if ICON_ID, else 1
+ wParam : ICON_ID
+ lParam : 0 - return HICON
+ 1 - return icolib handle
+ 2 - return big icon HICON
+ 3 - return icolib icon name
Affect : Load an icon from the user's custom skin lib, or from the exe
if there isn't one loaded, see notes
Return : HICON for the new icon, do *not* DestroyIcon() the return value
- returns NULL(0) if ICON_ID is invalid, but always success for a
- valid ID.
+ returns NULL(0) if ICON_ID is invalid, but always success for a valid ID.
}
MS_SKIN_LOADICON:PAnsiChar = 'Skin/Icons/Load';
@@ -155,15 +157,16 @@ const
wParam : 0
lParam : Pointer to a null terminated string containing the name of the
sound to play
- Affect : play a named sound event, play name should of been added
+ Affect : plays a named sound event, play name should of been added
with MS_SKIN_ADDNEWSOUND, see notes
Notes : function will not fail, it will play the Windows
}
MS_SKIN_PLAYSOUND:PAnsiChar = 'Skin/Sounds/Play';
{
- wParam : 0
- lParam : PWideChar containing the name of the file to play
+ wParam = 0
+ lParam = (WideChar *) ptszFileName
+ Affect: plays any sound file
}
MS_SKIN_PLAYSOUNDFILE:PAnsiChar = 'Skin/Sounds/PlayFile';
diff --git a/include/delphi/m_xml.inc b/include/delphi/m_xml.inc
index a085193eaf..92c18faf04 100644
--- a/include/delphi/m_xml.inc
+++ b/include/delphi/m_xml.inc
@@ -34,6 +34,32 @@ type
XML_ELEM_TYPE_CHILD,XML_ELEM_TYPE_ATTRIBUTE,
XML_ELEM_TYPE_TEXT ,XML_ELEM_TYPE_CLEAR);
+/// Enumeration for XML parse errors.
+type
+ XMLError = (
+ eXMLErrorNone,
+ eXMLErrorMissingEndTag,
+ eXMLErrorNoXMLTagFound,
+ eXMLErrorEmpty,
+ eXMLErrorMissingTagName,
+ eXMLErrorMissingEndTagName,
+ eXMLErrorUnmatchedEndTag,
+ eXMLErrorUnmatchedEndClearTag,
+ eXMLErrorUnexpectedToken,
+ eXMLErrorNoElements,
+ eXMLErrorFileNotFound,
+ eXMLErrorFirstTagNotFound,
+ eXMLErrorUnknownCharacterEntity,
+ eXMLErrorCharacterCodeAbove255,
+ eXMLErrorCharConversionError,
+ eXMLErrorCannotOpenWriteFile,
+ eXMLErrorCannotWriteFile,
+
+ eXMLErrorBase64DataSizeIsNotMultipleOf4,
+ eXMLErrorBase64DecodeIllegalCharacter,
+ eXMLErrorBase64DecodeTruncatedData,
+ eXMLErrorBase64DecodeBufferTooSmall);
+
const
XML_API_SIZEOF_V1 = SizeOf(size_t)+26*sizeof(dword);
@@ -115,6 +141,9 @@ type
positionOfChildByName :function(node:HXML; name:PAnsiChar; i:int):XML_ELEMENT_POS;cdecl;
positionOfText :function(node:HXML; i:int):XML_ELEMENT_POS;cdecl;
positionOfClear :function(node:HXML; i:int):XML_ELEMENT_POS;cdecl;
+
+ parseFile:function(filename:PAnsiChar; datalen:pint; tag:PAnsiChar):HXML;
+ toFile :function(node:HXML; filename:PAnsiChar; withformattiing:int):XMLError;
end;
XML_API_W = record
@@ -194,6 +223,9 @@ type
positionOfChildByName :function(node:HXML; name:PWideChar; i:int):XML_ELEMENT_POS;cdecl;
positionOfText :function(node:HXML; i:int):XML_ELEMENT_POS;cdecl;
positionOfClear :function(node:HXML; i:int):XML_ELEMENT_POS;cdecl;
+
+ parseFile:function(filename:PAnsiChar; datalen:pint; tag:PAnsiChar):HXML;
+ toFile :function(node:HXML; filename:PAnsiChar; withformattiing:int):XMLError;
end;
// every protocol should declare this variable to use the XML API