summaryrefslogtreecommitdiff
path: root/watrack_mpd/main.c
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2009-11-18 03:09:47 +0200
committerGluzskiy Alexandr <sss123next@list.ru>2009-11-18 03:09:47 +0200
commit95f46008d2884934fb3186291fceb34f11bf5f0e (patch)
treed7d19a95500f96fdc890e55d540990bd2b4c307e /watrack_mpd/main.c
parent647648108393008bfa96987d44628b99c602abf0 (diff)
modified: commonheaders.h
modified: constants.h new file: globals.h modified: init.c modified: main.c modified: main.h modified: utilities.c new file: utilities.h modified: watrack_mpd.vcproj
Diffstat (limited to 'watrack_mpd/main.c')
-rwxr-xr-xwatrack_mpd/main.c22
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)
+{
+}