summaryrefslogtreecommitdiff
path: root/plugins/mRadio
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-19 14:24:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-19 14:24:12 +0000
commit83310365c69bd40365ee0ae0e16c99c28e24cd0b (patch)
tree10ac18bfdc3fcf0fd62a5aba3ccb5dedffa2e410 /plugins/mRadio
parentd68cd04d6f7b997692476b531bdc30f546a50efd (diff)
- all static protocol services replaced with functions;
- m_protomod.h removed as useless git-svn-id: http://svn.miranda-ng.org/main/trunk@14260 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/mRadio')
-rw-r--r--plugins/mRadio/i_myservice.inc6
-rw-r--r--plugins/mRadio/i_optdlg.inc13
-rw-r--r--plugins/mRadio/i_search.inc2
-rw-r--r--plugins/mRadio/i_visual.inc3
-rw-r--r--plugins/mRadio/mradio.dpr2
5 files changed, 9 insertions, 17 deletions
diff --git a/plugins/mRadio/i_myservice.inc b/plugins/mRadio/i_myservice.inc
index 3aa403398d..88ae278633 100644
--- a/plugins/mRadio/i_myservice.inc
+++ b/plugins/mRadio/i_myservice.inc
@@ -13,7 +13,7 @@ begin
begin
if wParam=0 then
wParam:=GetCListSelContact;
- p:=GetContactProtoAcc(wParam);
+ p:=Proto_GetBaseAccountName(wParam);
if (p=nil) or (StrCmp(p,PluginName)<>0) then
exit;
hContact:=wParam;
@@ -161,7 +161,7 @@ begin
result:=CallService(MS_DB_CONTACT_ADD,0,0);
if result<>0 then
begin
- CallService(MS_PROTO_ADDTOCONTACT,result,lparam(PluginName));
+ Proto_AddToContact(result,PluginName);
DBWriteString(result,PluginName,optStationURL,pc);
DBWriteString(result,PluginName,optFirstName ,pc);
@@ -297,7 +297,7 @@ begin
result:=CallService(MS_DB_CONTACT_ADD,0,0);
if result<>0 then
begin
- CallService(MS_PROTO_ADDTOCONTACT,result,tlparam(PluginName));
+ Proto_AddToContact(result,PluginName);
//
// DBWriteByte(result,strCList,'Hidden' ,0);
DBWriteByte(result,strCList,'NotOnList',1);
diff --git a/plugins/mRadio/i_optdlg.inc b/plugins/mRadio/i_optdlg.inc
index 52df888dd8..3b13dffae6 100644
--- a/plugins/mRadio/i_optdlg.inc
+++ b/plugins/mRadio/i_optdlg.inc
@@ -682,8 +682,7 @@ begin
begin
if value._type=DBVT_DELETED then
begin
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,wParam,0)),
- PluginName)<>0 then exit;
+ if StrCmp(Proto_GetProtoName(wParam),PluginName)<>0 then exit;
pc:=DBReadString(wParam,PluginName,optNick);
DBWriteString(wParam,strCList,optMyHandle,pc);
@@ -697,8 +696,7 @@ begin
if StrCmp(szSetting,optAge)=0 then
begin
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,wParam,0)),
- PluginName)<>0 then exit;
+ if StrCmp(Proto_GetProtoName(wParam),PluginName)<>0 then exit;
if value._type=DBVT_DELETED then
i:=DBReadWord(wParam,PluginName,optAge)
else
@@ -712,8 +710,7 @@ begin
DBVT_ASCIIZ ,
DBVT_WCHAR ,
DBVT_UTF8 :
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,wParam,0)),
- PluginName)<>0 then exit;
+ if StrCmp(Proto_GetProtoName(wParam),PluginName)<>0 then exit;
else
exit;
end;
@@ -739,8 +736,4 @@ begin
result:=0;
if ActiveContact<>THANDLE(wParam) then exit;
ControlCenter(MRC_STOP,wParam);
-
-{ if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,wParam,0)),
- PluginName)<>0 then exit;
-}
end;
diff --git a/plugins/mRadio/i_search.inc b/plugins/mRadio/i_search.inc
index 81e1a00eca..d6e65e4794 100644
--- a/plugins/mRadio/i_search.inc
+++ b/plugins/mRadio/i_search.inc
@@ -400,7 +400,7 @@ begin
hContact:=CallService(MS_DB_CONTACT_ADD,0,0);
if hContact<>0 then
begin
- CallService(MS_PROTO_ADDTOCONTACT,hContact,tlparam(PluginName));
+ Proto_AddToContact(hContact,PluginName);
// URL
DBWriteUnicode(hContact,PluginName,optStationURL,lurl);
DBWriteUnicode(hContact,PluginName,optFirstName ,lurl);
diff --git a/plugins/mRadio/i_visual.inc b/plugins/mRadio/i_visual.inc
index 5f56bcd4c7..68a7479312 100644
--- a/plugins/mRadio/i_visual.inc
+++ b/plugins/mRadio/i_visual.inc
@@ -9,8 +9,7 @@ var
begin
FillChar(mi,SizeOf(mi),0);
mi.cbSize:=sizeof(mi);
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)),
- PluginName)<>0 then
+ if StrCmp(Proto_GetProtoName(hContact),PluginName)<>0 then
begin
mi.flags:=CMIM_FLAGS or CMIF_HIDDEN;
CallService(MS_CLIST_MODIFYMENUITEM,hCMenuItemPlay,tlparam(@mi));
diff --git a/plugins/mRadio/mradio.dpr b/plugins/mRadio/mradio.dpr
index e929303b0d..2d60f57c1b 100644
--- a/plugins/mRadio/mradio.dpr
+++ b/plugins/mRadio/mradio.dpr
@@ -168,7 +168,7 @@ begin
desc.cbSize:=PROTOCOLDESCRIPTOR_V3_SIZE;//SizeOf(desc);
desc.szName:=PluginName;
desc._type :=PROTOTYPE_VIRTUAL;
- CallService(MS_PROTO_REGISTERMODULE,0,lparam(@desc));
+ Proto_RegisterModule(@desc);
// hooks and services
hhRadioStatus:=CreateHookableEvent(ME_RADIO_STATUS);