diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-01 23:11:39 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-01 23:11:39 +0000 |
commit | 8ef40f0bd018c6f9295977c206714db8d1e6159c (patch) | |
tree | 2acbdcb3743bb4d1b6bbfc49953cc164b11a6089 /plugins/mRadio/i_search.inc | |
parent | 427891e0d28becb428ae8435954399f2e4daa9fe (diff) |
code cleanup for pascal plugins
git-svn-id: http://svn.miranda-ng.org/main/trunk@3828 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/mRadio/i_search.inc')
-rw-r--r-- | plugins/mRadio/i_search.inc | 109 |
1 files changed, 0 insertions, 109 deletions
diff --git a/plugins/mRadio/i_search.inc b/plugins/mRadio/i_search.inc index d4330e84d1..ffd0b8b6de 100644 --- a/plugins/mRadio/i_search.inc +++ b/plugins/mRadio/i_search.inc @@ -1,90 +1,5 @@ {search station code}
-(*
-procedure SetAvatar(hContact:THANDLE);
-var
- success:boolean;
- fname:pAnsiChar;
- url:pWideChar;
- buf,buf1,buf2:array [0..MAX_PATH-1] of AnsiChar;
- ext:array [0..15] of AnsiChar;
- section:pAnsiChar;
- pc:pAnsiChar;
- i:integer;
-begin
- // get url
- url:=DBReadUnicode(hContact,PluginName,optStationURL);
- // translate to Ansi
- FastWideToAnsiBuf(url,buf);
- mFreeMem(url);
-
- // search in INI
- i:=GetFSize(storage);
- if i=0 then
- i:=32767;
- mGetMem(pc,i+1);
- pc^:=#0;
- GetPrivateProfileSectionNamesA(pc,i,storage);
- section:=pc;
-
- while section^<>#0 do
- begin
- GetPrivateProfileStringA(section,'URL','',buf1,SizeOf(buf1),storage);
- if StrCmp(@buf,@buf1)=0 then
- break;
-
- while section^<>#0 do inc(section);
- inc(section);
- end;
- mFreeMem(pc);
-
- if section^<>#0 then
- begin
- // get avatar link
- buf[0]:=#0;
- GetPrivateProfileStringA(section,'Avatar','',buf,SizeOf(buf),storage);
-
- if buf[0]<>#0 then
- begin
- // Here we trying to get Avatar chache directory
- // (create it if needs)
- // and copy (load) owr avatars there
- // in : buf = source avatar path
- // out: fname = destination (file name in cache)
- // rule for name is?..
-
-
- if StrPos(buf,'://')=nil then
- begin
- fname:=@buf;
- success:=FileExists(fname);
- // need to copy this file to avatar cache
- end
- else
- begin
- // download file
-{
- GetTempPathA(MAX_PATH,pAnsiChar(@buf1));
- pc:=extract(pAnsiChar(@buf),true);
- StrCat(pAnsiChar(@buf1),pc);
- mFreeMem(pc);
-}
- //mrAvt
-
- GetExt(pAnsiChar(@buf),pAnsiChar(@ext));
- GetTempPathA(MAX_PATH,pAnsiChar(@buf2));
- GetTempFileNameA(pAnsiChar(@buf2),'mrAvt',GetCurrentTime,pAnsiChar(@buf1));
- ChangeExt(pAnsiChar(@buf1),PAnsiChar(@ext));
- //
- fname:=@buf1;
- success:=GetFile(pAnsiChar(@buf),fname);
- end;
- if success then
- CallService(MS_AV_SETAVATAR,hContact,LPARAM(fname));
- end;
- end;
-end;
-*)
type
TMySearchFilter = record
lStation,
@@ -239,7 +154,6 @@ begin with filter do
begin
-// CallService(MS_UTILS_PATHTOABSOLUTE,dword(@ini1),dword(@ini));
lBitrate:=GetDlgItemInt(wnd,IDC_BITRATE,ltmp,false);
if IsDlgButtonChecked(wnd,IDC_LT)=BST_CHECKED then lBitrateMode:=-1
else if IsDlgButtonChecked(wnd,IDC_EQ)=BST_CHECKED then lBitrateMode:=0
@@ -378,29 +292,6 @@ begin if lurl<>nil then
begin
-{
-// find contact
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
- while hContact<>0 do
- begin
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)),
- PluginName)=0 then
- begin
- p:=DBReadString(hContact,PluginName,optStationURL);
- l:=StrCmp(p,lurl)=0;
- mFreeMem(p);
- if l then
- begin
- DBDeleteSetting(hContact,strCList,'NotOnList');
- DBDeleteSetting(hContact,strCList,'Hidden');
- result:=hContact;
- exit;
- end;
- end;
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
- end;
-// if not found
-}
hContact:=CallService(MS_DB_CONTACT_ADD,0,0);
if hContact<>0 then
begin
|