diff options
Diffstat (limited to 'watrack_mpd/main.c')
-rwxr-xr-x | watrack_mpd/main.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/watrack_mpd/main.c b/watrack_mpd/main.c index 2040ca3..108db8b 100755 --- a/watrack_mpd/main.c +++ b/watrack_mpd/main.c @@ -41,6 +41,7 @@ LPCOMMANDPROC SendCommand(HWND wnd, int command, int value) {
}
+
void RegisterPlayer()
{
struct tPlayerCell player;
@@ -58,3 +59,24 @@ void RegisterPlayer() player.URL = "http:// ?";
CallService(MS_WAT_PLAYER, (WPARAM)0, (LPARAM)&player);
}
+
+DWORD __stdcall Reciever(LPVOID lp)
+{
+ NETLIBOPENCONNECTION nloc;
+ nloc.cbSize = sizeof(NETLIBOPENCONNECTION);
+ nloc.flags = 0;
+ nloc.szHost = (char*)mir_u2a(UniGetContactSettingUtf(NULL, szModuleName, "Host", _T("127.0.0.1")));
+ nloc.wPort = DBGetContactSettingWord(NULL, szModuleName, "Port", 6600);
+ NetLib_CreateConnection(ghNetlibUser, &nloc);
+ ghPacketReciever = CreatePacketReciever();
+
+ return 0;
+}
+int Start(WPARAM wParam,LPARAM lParam)
+{
+ DWORD pid;
+ ghRecieverThread = CreateThreadEx((pThreadFuncEx)Reciever, (HANDLE)wParam, &pid);
+}
+int Stop(WPARAM wParam,LPARAM lParam)
+{
+}
|