diff options
author | Alexey Kulakov <panda75@bk.ru> | 2014-02-02 09:39:36 +0000 |
---|---|---|
committer | Alexey Kulakov <panda75@bk.ru> | 2014-02-02 09:39:36 +0000 |
commit | 7c53c3c262dd67bbe9bcac3971621face2455f82 (patch) | |
tree | dc3ac8c5fb55a284a82a2b55968bf6d6d3de19b5 /plugins/mRadio/i_service.inc | |
parent | 5abedf89d15719fb5e2ba394363ad85264ac2f58 (diff) |
Miranda API update
mRadio:refactoring
git-svn-id: http://svn.miranda-ng.org/main/trunk@8000 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/mRadio/i_service.inc')
-rw-r--r-- | plugins/mRadio/i_service.inc | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/mRadio/i_service.inc b/plugins/mRadio/i_service.inc index 05072dfd94..fbc644711e 100644 --- a/plugins/mRadio/i_service.inc +++ b/plugins/mRadio/i_service.inc @@ -13,8 +13,8 @@ begin result:=PF4_NOCUSTOMAUTH or PF4_AVATARS;
PFLAG_UNIQUEIDTEXT:
result:=int_ptr(Translate('Radio station URL'));
-// PFLAG_UNIQUEIDSETTING:
-// result:=int_ptr(optStationURL)
+ PFLAG_UNIQUEIDSETTING:
+ result:=int_ptr(optStationURL)
else
result:=0;
end
@@ -53,7 +53,7 @@ begin end;
if StrPosW(buf,'%radio_active%')<>nil then
begin
- StrReplaceW(buf,'%radio_active%',ActiveURLw);
+ StrReplaceW(buf,'%radio_active%',ActiveURL);
end;
if StrPosW(buf,'%radio_genre%')<>nil then // saved as String
begin
@@ -99,7 +99,7 @@ begin if (ccs^.hContact<>0) and (PluginStatus=ID_STATUS_ONLINE) and
(DBReadWord(ccs^.hContact,PluginName,optStatus,ID_STATUS_OFFLINE)=ID_STATUS_ONLINE) then
begin
- mir_forkthread(@GetAwayMsgProc,pointer(ccs^.hContact));
+ {CloseHandle}(mir_forkthread(@GetAwayMsgProc,pointer(ccs^.hContact)));
result:=AckHandle;
end
else
@@ -134,18 +134,14 @@ begin if wParam=PluginStatus then
exit;
- mFreeMem(proxy);
PluginStatus:=ID_STATUS_OFFLINE;
if wParam<>ID_STATUS_OFFLINE then
begin
- if MyInitBASS<>0 then
+// if MyInitBASS then
begin
PluginStatus:=ID_STATUS_ONLINE;
- proxy:=GetProxy(hNetLib);
- BASS_SetConfigPtr(BASS_CONFIG_NET_PROXY,proxy);
-
if (ActiveContact<>0) and (AuConnect<>0) then
CallService(MS_RADIO_COMMAND,MRC_PLAY,ActiveContact);
end;
@@ -153,13 +149,13 @@ begin else //offline
begin
CallService(MS_RADIO_COMMAND,MRC_STOP,0);
-// StopStation;
end;
SetStatus(0,ID_STATUS_OFFLINE);
ProtoBroadcastAck(PluginName,0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,OldStatus,PluginStatus);
end;
+// really, can be replaced by helper function. this one more effective
function CreateProtoService(serviceName:PAnsiChar;pFunc:pointer):THANDLE;
var
temp:array [0..MAXMODULELABELLENGTH-1] of AnsiChar;
|