From f04d64869f3b1de54fb343f28f955584780001b8 Mon Sep 17 00:00:00 2001 From: mataes2007 Date: Sat, 26 Nov 2011 15:41:10 +0000 Subject: Project folders rename part 3 git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@215 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- ImportTXT/BRMSIP.inc | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 ImportTXT/BRMSIP.inc (limited to 'ImportTXT/BRMSIP.inc') diff --git a/ImportTXT/BRMSIP.inc b/ImportTXT/BRMSIP.inc new file mode 100644 index 0000000..552a98a --- /dev/null +++ b/ImportTXT/BRMSIP.inc @@ -0,0 +1,77 @@ +{$ifdef BIN_IMPORT_} +var rsz:integer; + +{$else} +begin + pt:=integer(pFileText); + i:=0; + if FileLen>=$30 then + if (StrLComp(PChar(pt),'midp-rms',8)=0) then + begin + if FileLen>=$48 then + if (RLInteger(pt+$40)=$48) then + begin + fsz:=RLInteger(pt+$44); + i:=$48; + end; + if (RLInteger(pt+$28)=$30) then + begin + fsz:=RLInteger(pt+$2C); + i:=$30; + end; + + if (DContact.hContact=0) or (DContact.hContact=INVALID_HANDLE_VALUE) then + if (fContact.hContact<>0) and (fContact.hContact<>INVALID_HANDLE_VALUE) then + DContact:=fContact; + if (DContact.hContact<>0) and (DContact.hContact<>INVALID_HANDLE_VALUE) then + begin + proto:=GetContactProto(DContact.hContact); + DoMessage(ITXT_THREAD_DEST_CONTACT,DContact.hContact,0); + DoMessage(ITXT_THREAD_START,0,0); + DoMessage(ITXT_THREAD_MAXPROGRESS,0,fsz); + while i0 then Inc(AddedMessages) + else begin + s:= 'Error adding message to DB'; + DoMessage(ITXT_THREAD_ERROR,integer(PWideChar(s)),0); break; end + + else Inc(Duplicates); + finally + inc(i,rsz); + end; + DoMessage(ITXT_THREAD_PROGRESS,i,0); + end; + end + else + begin + s:=TranslateWideString('Can''t determine destination contact'); + DoMessage(ITXT_THREAD_ERROR,integer(PWideChar(s)),0); + end; + end + else + begin + s:=WideFormat(TranslateWideString('Its not %s file'),['midp-rms']); + DoMessage(ITXT_THREAD_ERROR,integer(PWideChar(s)),0); + end + else //file len + +end; +{$endif} -- cgit v1.2.3