diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-20 13:55:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-20 13:55:58 +0000 |
commit | 04f4e2acfbc82946ca3def654214c08071a87359 (patch) | |
tree | 871e1f476ed5086e8ebbd7e182ea2a89707cc249 /plugins/Actman/iac_dbrw.pas | |
parent | 24cbc87262dc8856741db8e9f8388c18b16583ad (diff) |
xml api became a set of functions
git-svn-id: http://svn.miranda-ng.org/main/trunk@14288 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Actman/iac_dbrw.pas')
-rw-r--r-- | plugins/Actman/iac_dbrw.pas | 89 |
1 files changed, 25 insertions, 64 deletions
diff --git a/plugins/Actman/iac_dbrw.pas b/plugins/Actman/iac_dbrw.pas index f9faa18293..dffd5ca233 100644 --- a/plugins/Actman/iac_dbrw.pas +++ b/plugins/Actman/iac_dbrw.pas @@ -389,79 +389,40 @@ begin end;
1: begin
- with xmlparser do
+ tmp:=xmlGetAttrValue(HXML(node),ioOper);
+ if lstrcmpiw(tmp,ioDelete)=0 then flags:=flags or ACF_DBDELETE
+ else if lstrcmpiw(tmp,ioWrite )=0 then flags:=flags or ACF_DBWRITE;
+ tmp:=xmlGetAttrValue(HXML(node),ioContact);
+ if lstrcmpiw(tmp,ioCurrent)=0 then flags:=flags or ACF_CURRENT
+ else if lstrcmpiw(tmp,ioResult )=0 then flags:=flags or ACF_RESULT
+ else if lstrcmpiw(tmp,ioParam )=0 then flags:=flags or ACF_PARAM
+ else if lstrcmpiw(tmp,ioContact)=0 then
begin
- tmp:=getAttrValue(HXML(node),ioOper);
- if lstrcmpiw(tmp,ioDelete)=0 then flags:=flags or ACF_DBDELETE
- else if lstrcmpiw(tmp,ioWrite )=0 then flags:=flags or ACF_DBWRITE;
- // else if lstrcmpiw(tmp,ioRead)=0 then ;
- tmp:=getAttrValue(HXML(node),ioContact);
- if lstrcmpiw(tmp,ioCurrent)=0 then flags:=flags or ACF_CURRENT
- else if lstrcmpiw(tmp,ioResult )=0 then flags:=flags or ACF_RESULT
- else if lstrcmpiw(tmp,ioParam )=0 then flags:=flags or ACF_PARAM
- else if lstrcmpiw(tmp,ioContact)=0 then
- begin
- dbcontact:=ImportContact(HXML(node));
- end;
-
- StrDupW(dbmodule ,getAttrValue(HXML(node),ioModule));
- StrDupW(dbsetting,getAttrValue(HXML(node),ioSetting));
-
- if StrToInt(getAttrValue(HXML(node),ioFileVariable))=1 then flags:=flags or ACF_RW_MODULE;
- if StrToInt(getAttrValue(HXML(node),ioArgVariable ))=1 then flags:=flags or ACF_RW_SETTING;
- if StrToInt(getAttrValue(HXML(node),ioVariables ))=1 then flags:=flags or ACF_RW_VALUE;
-
- tmp:=getAttrValue(HXML(node),ioType);
- if lstrcmpiw(tmp,ioByte )=0 then flags:=flags or ACF_DBBYTE
- else if lstrcmpiw(tmp,ioWord )=0 then flags:=flags or ACF_DBWORD
- else if lstrcmpiw(tmp,ioDword)=0 then
- else if lstrcmpiw(tmp,ioAnsi )=0 then flags:=flags or ACF_DBANSI
- else flags:=flags or ACF_DBUTEXT;
-
- if StrToInt(getAttrValue(HXML(node),ioSaveValue))=1 then
- flags:=flags or ACF_SAVE;
-
- if StrToInt(getAttrValue(HXML(node),ioLast))=1 then
- flags:=flags or ACF_LAST
- else
- StrDupW(dbvalue,getText(HXML(node)));
- end;
- end;
-{
- 2: begin
- pc:=GetParamSectionStr(node,ioOper);
- if lstrcmpi(pc,ioDelete)=0 then flags:=flags or ACF_DBDELETE
- else if lstrcmpi(pc,ioWrite )=0 then flags:=flags or ACF_DBWRITE;
-// else if lstrcmpiw(tmp,ioRead)=0 then ;
- pc:=GetParamSectionStr(node,ioContact);
- if lstrcmpi(pc,ioCurrent)=0 then flags:=flags or ACF_CURRENT
- else if lstrcmpi(pc,ioResult )=0 then flags:=flags or ACF_RESULT
- else if lstrcmpi(pc,ioParam )=0 then flags:=flags or ACF_PARAM
- else if lstrcmpi(pc,ioContact)=0 then
- begin
- dbcontact:=ImportContactINI(node);
+ dbcontact:=ImportContact(HXML(node));
end;
- UF8ToWide(GetParamSectionStr(node,ioModule ),dbmodule);
- UF8ToWide(GetParamSectionStr(node,ioSetting),dbsetting);
+ StrDupW(dbmodule ,xmlGetAttrValue(HXML(node),ioModule));
+ StrDupW(dbsetting,xmlGetAttrValue(HXML(node),ioSetting));
- if GetParamSectionInt(node,ioFileVariable)=1 then flags:=flags or ACF_RW_MODULE;
- if GetParamSectionInt(node,ioArgVariable )=1 then flags:=flags or ACF_RW_SETTING;
- if GetParamSectionInt(node,ioVariables )=1 then flags:=flags or ACF_RW_VALUE;
+ if StrToInt(xmlGetAttrValue(HXML(node),ioFileVariable))=1 then flags:=flags or ACF_RW_MODULE;
+ if StrToInt(xmlGetAttrValue(HXML(node),ioArgVariable ))=1 then flags:=flags or ACF_RW_SETTING;
+ if StrToInt(xmlGetAttrValue(HXML(node),ioVariables ))=1 then flags:=flags or ACF_RW_VALUE;
+
+ tmp:=xmlGetAttrValue(HXML(node),ioType);
+ if lstrcmpiw(tmp,ioByte )=0 then flags:=flags or ACF_DBBYTE
+ else if lstrcmpiw(tmp,ioWord )=0 then flags:=flags or ACF_DBWORD
+ else if lstrcmpiw(tmp,ioDword)=0 then
+ else if lstrcmpiw(tmp,ioAnsi )=0 then flags:=flags or ACF_DBANSI
+ else flags:=flags or ACF_DBUTEXT;
- pc:=GetParamSectionStr(node,ioType);
- if lstrcmpi(pc,ioByte )=0 then flags:=flags or ACF_DBBYTE
- else if lstrcmpi(pc,ioWord )=0 then flags:=flags or ACF_DBWORD
- else if lstrcmpi(pc,ioDword)=0 then
- else if lstrcmpi(pc,ioAnsi )=0 then flags:=flags or ACF_DBANSI
- else flags:=flags or ACF_DBUTEXT;
+ if StrToInt(xmlGetAttrValue(HXML(node),ioSaveValue))=1 then
+ flags:=flags or ACF_SAVE;
- if GetParamSectionInt(node,ioLast))=1 then
+ if StrToInt(xmlGetAttrValue(HXML(node),ioLast))=1 then
flags:=flags or ACF_LAST
else
- UF8ToWide(GetParamSectionStr(node,'value'),dbvalue); //!!
+ StrDupW(dbvalue,xmlGetText(HXML(node)));
end;
-}
end;
end;
|