diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-04-05 19:34:10 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-04-05 19:34:10 +0300 |
commit | ba8a1e987607141bb1925818a47c15560eb4c746 (patch) | |
tree | c506c34e907b1a21e0faf24369427e9a55809583 | |
parent | 1c8abfb6cad8291dc58c1e1d1953ad69975573a2 (diff) |
dos2unix
-rwxr-xr-x | commonheaders.h | 86 | ||||
-rwxr-xr-x | constants.h | 8 | ||||
-rwxr-xr-x | globals.h | 22 | ||||
-rwxr-xr-x | init.c | 228 | ||||
-rw-r--r-- | m_music.h | 710 | ||||
-rwxr-xr-x | main.c | 860 | ||||
-rwxr-xr-x | main.h | 52 | ||||
-rwxr-xr-x | options.c | 184 | ||||
-rwxr-xr-x | resource.h | 64 | ||||
-rwxr-xr-x | utilities.c | 252 | ||||
-rwxr-xr-x | utilities.h | 12 | ||||
-rwxr-xr-x | watrack_mpd.rc | 224 | ||||
-rwxr-xr-x | watrack_mpd.sln | 46 | ||||
-rwxr-xr-x | watrack_mpd.vcproj | 1344 |
14 files changed, 2046 insertions, 2046 deletions
diff --git a/commonheaders.h b/commonheaders.h index 0099561..85eb73a 100755 --- a/commonheaders.h +++ b/commonheaders.h @@ -1,43 +1,43 @@ -// Copyright © 2008 sss, chaos.persei
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#ifndef COMMONHEADERS_H
-#define COMMONHEADERS_H
-#include <windows.h>
-#include <tchar.h>
-#include <malloc.h>
-#include <time.h>
-
-
-#define MIRANDA_VER 0x0800
-#include <newpluginapi.h>
-#include <m_netlib.h>
-//#include <m_clist.h>
-//#include <m_skin.h>
-#include <m_database.h>
-//#include <m_protosvc.h>
-//#include <m_protocols.h>
-//#include <m_system.h>
-#include <m_options.h>
-#include <m_langpack.h>
-
-#include "resource.h"
-
-#include "constants.h"
-#include "globals.h"
-#include "main.h"
-#include "m_music.h"
-#include "utilities.h"
-#endif
+// Copyright © 2008 sss, chaos.persei +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +#ifndef COMMONHEADERS_H +#define COMMONHEADERS_H +#include <windows.h> +#include <tchar.h> +#include <malloc.h> +#include <time.h> + + +#define MIRANDA_VER 0x0800 +#include <newpluginapi.h> +#include <m_netlib.h> +//#include <m_clist.h> +//#include <m_skin.h> +#include <m_database.h> +//#include <m_protosvc.h> +//#include <m_protocols.h> +//#include <m_system.h> +#include <m_options.h> +#include <m_langpack.h> + +#include "resource.h" + +#include "constants.h" +#include "globals.h" +#include "main.h" +#include "m_music.h" +#include "utilities.h" +#endif diff --git a/constants.h b/constants.h index dfa9a3c..2ac58a4 100755 --- a/constants.h +++ b/constants.h @@ -1,4 +1,4 @@ -#ifndef CONSTANTS_H
-#define CONSTANTS_H
-#define szModuleName "Watrack_MPD"
-#endif
+#ifndef CONSTANTS_H +#define CONSTANTS_H +#define szModuleName "Watrack_MPD" +#endif @@ -1,11 +1,11 @@ -#ifndef GLOBALS_H
-#define GLOBALS_H
-HANDLE ghNetlibUser;
-HANDLE ghConnection;
-HANDLE ghPacketReciever;
-BOOL bWatrackService;
-TCHAR *gbHost, *gbPassword;
-WORD gbPort;
-BOOL Connected;
-int gbState;
-#endif
+#ifndef GLOBALS_H +#define GLOBALS_H +HANDLE ghNetlibUser; +HANDLE ghConnection; +HANDLE ghPacketReciever; +BOOL bWatrackService; +TCHAR *gbHost, *gbPassword; +WORD gbPort; +BOOL Connected; +int gbState; +#endif @@ -1,115 +1,115 @@ -// Copyright © 2009 sss
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-#include "commonheaders.h"
-
-
-#define PLUGIN_NAME "Watrack_MPD"
-
-HINSTANCE hInst;
-PLUGINLINK *pluginLink;
-BOOL bWatrackService = FALSE;
-static int OnModulesLoaded(WPARAM wParam,LPARAM lParam);
-extern char *date();
-extern int WaMpdOptInit(WPARAM wParam,LPARAM lParam);
-
-
-PLUGININFOEX pluginInfo={
- sizeof(PLUGININFOEX),
- 0,
- PLUGIN_MAKE_VERSION(0,0,0,4),
- "Music Player Daemon support for watrack",
- "sss, others..",
- "sss123next@list.ru",
- "© 2009 sss, others...",
- "http://sss.chaoslab.ru:81/tracker/mim_plugs/",
- 1, //unicode
- 0, //doesn't replace anything built-in
- { 0x692e87d0, 0x6c71, 0x4cdc, { 0x9e, 0x36, 0x2b, 0x2d, 0x69, 0xfb, 0xdc, 0x4c } }
-
-};
-
-BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
-{
- hInst=hinstDLL;
- return TRUE;
-}
-
-__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
-{
- {
- static char plugname[52];
- strcpy(plugname, PLUGIN_NAME" [");
- strcat(plugname, date());
- strcat(plugname, " ");
- strcat(plugname, __TIME__);
- strcat(plugname, "]");
- pluginInfo.shortName = plugname;
- }
- return &pluginInfo;
-}
-
-static const MUUID interfaces[] = {MIID_SERVICEMODE, MIID_LAST};
-__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
-{
- return interfaces;
-}
-
-int __declspec(dllexport) Load(PLUGINLINK *link)
-{
- pluginLink=link;
- HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- mir_getMMI(&mmi);
- mir_getUTFI(&utfi);
- return 0;
-}
-
-void InitVars()
-{
- gbPort = DBGetContactSettingWord(NULL, szModuleName, "Port", 6600);
- gbPassword = (TCHAR*)malloc(64*sizeof(TCHAR));
- gbHost = (TCHAR*)malloc(128*sizeof(TCHAR));
- gbHost = UniGetContactSettingUtf(NULL, szModuleName, "Server", _T("127.0.0.1"));
- gbPassword = UniGetContactSettingUtf(NULL, szModuleName, "Password", _T(""));
-}
-
-
-extern void RegisterPlayer();
-static int OnModulesLoaded(WPARAM wParam,LPARAM lParam)
-{
- HANDLE hHookOptionInit;
- NETLIBUSER nlu = {0};
- nlu.cbSize = sizeof(nlu);
- nlu.flags = (NUF_OUTGOING | NUF_HTTPCONNS);
- nlu.szDescriptiveName = "Watrack MPD connection";
- nlu.szSettingsModule = PLUGIN_NAME;
- ghNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
- InitVars();
- hHookOptionInit = HookEvent(ME_OPT_INITIALISE, WaMpdOptInit);
- if (ServiceExists("WATrack/Player"))
- bWatrackService = TRUE;
- RegisterPlayer();
-
- return 0;
-}
-
-
-int __declspec(dllexport) Unload(void)
-{
- free(gbHost);
- free(gbPassword);
- return 0;
+// Copyright © 2009 sss +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#include "commonheaders.h" + + +#define PLUGIN_NAME "Watrack_MPD" + +HINSTANCE hInst; +PLUGINLINK *pluginLink; +BOOL bWatrackService = FALSE; +static int OnModulesLoaded(WPARAM wParam,LPARAM lParam); +extern char *date(); +extern int WaMpdOptInit(WPARAM wParam,LPARAM lParam); + + +PLUGININFOEX pluginInfo={ + sizeof(PLUGININFOEX), + 0, + PLUGIN_MAKE_VERSION(0,0,0,4), + "Music Player Daemon support for watrack", + "sss, others..", + "sss123next@list.ru", + "© 2009 sss, others...", + "http://sss.chaoslab.ru:81/tracker/mim_plugs/", + 1, //unicode + 0, //doesn't replace anything built-in + { 0x692e87d0, 0x6c71, 0x4cdc, { 0x9e, 0x36, 0x2b, 0x2d, 0x69, 0xfb, 0xdc, 0x4c } } + +}; + +BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) +{ + hInst=hinstDLL; + return TRUE; +} + +__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +{ + { + static char plugname[52]; + strcpy(plugname, PLUGIN_NAME" ["); + strcat(plugname, date()); + strcat(plugname, " "); + strcat(plugname, __TIME__); + strcat(plugname, "]"); + pluginInfo.shortName = plugname; + } + return &pluginInfo; +} + +static const MUUID interfaces[] = {MIID_SERVICEMODE, MIID_LAST}; +__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) +{ + return interfaces; +} + +int __declspec(dllexport) Load(PLUGINLINK *link) +{ + pluginLink=link; + HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); + mir_getMMI(&mmi); + mir_getUTFI(&utfi); + return 0; +} + +void InitVars() +{ + gbPort = DBGetContactSettingWord(NULL, szModuleName, "Port", 6600); + gbPassword = (TCHAR*)malloc(64*sizeof(TCHAR)); + gbHost = (TCHAR*)malloc(128*sizeof(TCHAR)); + gbHost = UniGetContactSettingUtf(NULL, szModuleName, "Server", _T("127.0.0.1")); + gbPassword = UniGetContactSettingUtf(NULL, szModuleName, "Password", _T("")); +} + + +extern void RegisterPlayer(); +static int OnModulesLoaded(WPARAM wParam,LPARAM lParam) +{ + HANDLE hHookOptionInit; + NETLIBUSER nlu = {0}; + nlu.cbSize = sizeof(nlu); + nlu.flags = (NUF_OUTGOING | NUF_HTTPCONNS); + nlu.szDescriptiveName = "Watrack MPD connection"; + nlu.szSettingsModule = PLUGIN_NAME; + ghNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu); + InitVars(); + hHookOptionInit = HookEvent(ME_OPT_INITIALISE, WaMpdOptInit); + if (ServiceExists("WATrack/Player")) + bWatrackService = TRUE; + RegisterPlayer(); + + return 0; +} + + +int __declspec(dllexport) Unload(void) +{ + free(gbHost); + free(gbPassword); + return 0; }
\ No newline at end of file @@ -1,355 +1,355 @@ -#ifndef M_MUSIC
-#define M_MUSIC
-
-#define MIID_WATRACK {0xfc6c81f4, 0x837e, 0x4430, {0x96, 0x01, 0xa0, 0xaa, 0x43, 0x17, 0x7a, 0xe3}}
-
-typedef struct tSongInfoA {
- char *artist;
- char *title;
- char *album;
- char *genre;
- char *comment;
- char *year;
- char *mfile; // media file
- int kbps;
- int khz;
- int channels;
- int track;
- int total; // music length
- int time; // elapsed time
- char *wndtext; // window title
- char *player; // player name
- int plyver; // player version
- HANDLE icon; // player icon
- int fsize; // media file size
- int vbr;
- int status; // player status: 0 - stopped; 1 - playing; 2 - paused
- HWND plwnd; // player window
- // video part
- int codec;
- int width;
- int height;
- int fps;
- __int64 date;
- char *txtver;
- char *lyric;
- char *cover;
- int volume;
- char *url;
-} SONGINFOA, *LPSONGINFOA;
-
-typedef struct tSongInfo {
- wchar_t *artist;
- wchar_t *title;
- wchar_t *album;
- wchar_t *genre;
- wchar_t *comment;
- wchar_t *year;
- wchar_t *mfile; // media file
- int kbps;
- int khz;
- int channels;
- int track;
- int total; // music length
- int time; // elapsed time
- wchar_t *wndtext; // window title
- wchar_t *player; // player name
- int plyver; // player version
- HANDLE icon; // player icon
- int fsize; // media file size
- int vbr;
- int status; // player status: 0 - stopped; 1 - playing; 2 - paused
- HWND plwnd; // player window
- // video part
- int codec;
- int width;
- int height;
- int fps;
- __int64 date;
- wchar_t *txtver;
- // not implemented yet
- wchar_t *lyric;
- wchar_t *cover;
- int volume;
- wchar_t *url;
-} SONGINFO, *LPSONGINFO;
-
-#if defined(_UNICODE)
- #define WAT_INF_TCHAR WAT_INF_UNICODE
- #define SongInfoT tSongInfo
-#else
- #define WAT_INF_TCHAR WAT_INF_ANSI
- #define SongInfoT tSongInfoA
-#endif
-
- // result codes
-#define WAT_RES_UNKNOWN -2
-#define WAT_RES_NOTFOUND -1
-#define WAT_RES_ERROR WAT_RES_NOTFOUND
-#define WAT_RES_OK 0
-#define WAT_RES_ENABLED WAT_RES_OK
-#define WAT_RES_DISABLED 1
- // internal
-#define WAT_RES_NEWFILE 3
-
-#define WAT_PLS_NORMAL WAT_RES_OK
-#define WAT_PLS_NOMUSIC WAT_RES_DISABLED
-#define WAT_PLS_NOTFOUND WAT_RES_NOTFOUND
-
-#define WAT_INF_UNICODE 0
-#define WAT_INF_ANSI 1
-#define WAT_INF_UTF8 2
-#define WAT_INF_CHANGES 0x100
-
-/*
- wParam : WAT_INF_* constant
- lParam : pointer to LPSONGINGO (Unicode) or LPSONGINFOA (ANSI/UTF8)
- Affects: Fill structure by currently played music info
- returns: WAT_PLS_* constant
- note: pointer will be point to global SONGINFO structure of plugin
- warning: Non-Unicode data filled only by request
- if lParam=0 only internal SongInfo structure will be filled
- Example:
- LPSONGINFO p;
- PluginLink->CallService(MS_WAT_GETMUSICINFO,0,(DWORD)&p);
-*/
-
-#define MS_WAT_GETMUSICINFO "WATrack/GetMusicInfo"
-
-/*
- wParam:0
- lParam : pointer to pSongInfo (Unicode)
- Affects: Fill structure by info from file named in SongInfo.mfile
- returns: 0, if success
- note: fields, which values can't be obtained, leaves old values.
- you must free given strings by miranda mmi.free
-*/
-#define MS_WAT_GETFILEINFO "WATrack/GetFileInfo"
-
-/*
- wParam: encoding (WAT_INF_* consts, 0 = WAT_INF_UNICODE)
- lParam: codepage (0 = ANSI)
- Returns Global unicode SongInfo pointer or tranlated to Ansi/UTF8 structure
-*/
-#define MS_WAT_RETURNGLOBAL "WATrack/GetMainStructure"
-
-#define WAT_CTRL_PREV 1
-#define WAT_CTRL_PLAY 2
-#define WAT_CTRL_PAUSE 3
-#define WAT_CTRL_STOP 4
-#define WAT_CTRL_NEXT 5
-#define WAT_CTRL_VOLDN 6
-#define WAT_CTRL_VOLUP 7
-#define WAT_CTRL_SEEK 8 // lParam is new position (sec)
-/*
- wParam: button code (WAT_CTRL_* const)
- lParam: 0, or value (see WAT_CTRL_* const comments)
- Affects: emulate player button pressing
- returns: 0 if unsuccesful
-*/
-#define MS_WAT_PRESSBUTTON "WATrack/PressButton"
-
-/*
- Get user's Music Info
-*/
-#define MS_WAT_GETCONTACTINFO = "WATrack/GetContactInfo"
-
-// ------------ Plugin/player status ------------
-
-/*
- wParam: 1 - switch off plugin
- 0 - switch on plugin
- -1 - switch plugin status
- 2 - get plugin version
- other - get plugin status
- lParam: 0
- Affects: Switch plugin status to enabled or disabled
- returns: version, old plugin status, 0, if was enabled
-*/
-
-#define MS_WAT_PLUGINSTATUS "WATrack/PluginStatus"
-
-#define ME_WAT_MODULELOADED "WATrack/ModuleLoaded"
-
-#define WAT_EVENT_PLAYERSTATUS 1 // 0-normal; 1-no music (possibly stopped); 2-not found
-#define WAT_EVENT_NEWTRACK 2
-#define WAT_EVENT_PLUGINSTATUS 3 // 0-enabled; 1-dis.temporary; 2-dis.permanent
-#define WAT_EVENT_NEWPLAYER 4 //
-#define WAT_EVENT_NEWTEMPLATE 5 // TM_* constant
-
-/*
- Plugin or player status changed:
- wParam: type of event (see above)
- lParam: value
-*/
-#define ME_WAT_NEWSTATUS "WATrack/NewStatus"
-
-// ---------- Popup module ------------
-
-/*
- wParam: not used
- lParam: not used
- Affects: Show popup or Info window with current music information
- note: Only Info window will be showed if Popup plugin disabled
-*/
-
-#define MS_WAT_SHOWMUSICINFO "WATrack/ShowMusicInfo"
-
-// --------- Statistic (report) module -------------
-
-/*
- wParam: pointer to log file name or NULL
- lParam: pointer to report file name or NULL
- Affects: Create report from log and run it (if option is set)
- returns: 0 if unsuccesful
- note: if wParam or lParam is a NULL then file names from options are used
-*/
-#define MS_WAT_MAKEREPORT "WATrack/MakeReport"
-
-/*
- wParam, lParam - not used
- Affects: pack statistic file
-*/
-#define MS_WAT_PACKLOG = "WATrack/PackLog"
-
-/*
- wParam: not used
- lParam: pointer to SongInfo
-*/
-#define MS_WAT_ADDTOLOG = "WATrack/AddToLog"
-
-// ----------- Formats and players -----------
-
-// media file status
-
-#define WAT_MES_STOPPED 0
-#define WAT_MES_PLAYING 1
-#define WAT_MES_PAUSED 2
-#define WAT_MES_UNKNOWN -1
-
-#define WAT_ACT_REGISTER 1
-#define WAT_ACT_UNREGISTER 2
-#define WAT_ACT_DISABLE 3
-#define WAT_ACT_ENABLE 4
-#define WAT_ACT_GETSTATUS 5 // not found/enabled/disabled
-#define WAT_ACT_SETACTIVE 6
-#define WAT_ACT_REPLACE 0x10000 // can be combined with WAT_REGISTERFORMAT
-
- // flags
-#define WAT_OPT_DISABLED 0x00000001 // format registered but disabled
-#define WAT_OPT_ONLYONE 0x00000002 // format can't be overwriten
-#define WAT_OPT_PLAYERINFO 0x00000004 // song info from player
-#define WAT_OPT_WINAMPAPI 0x00000008 // Winamp API support
-#define WAT_OPT_CHECKTIME 0x00000010 // check file time for changes
-#define WAT_OPT_VIDEO 0x00000020 // only for format registering used
-#define WAT_OPT_LAST 0x00000040 // (internal)
-#define WAT_OPT_FIRST 0x00000080 // (internal)
-#define WAT_OPT_TEMPLATE 0x00000100 // (internal)
-#define WAT_OPT_IMPLANTANT 0x00000200 // use process implantation
-#define WAT_OPT_HASURL 0x00000400 // (player registration) URL field present
-#define WAT_OPT_CHANGES 0x00000800 // obtain only chaged values
- // (volume, status, window text, elapsed time)
-#define WAT_OPT_APPCOMMAND 0x00001000 // Special (multimedia) key support
-#define WAT_OPT_CHECKALL 0x00002000 // Check all players
-#define WAT_OPT_KEEPOLD 0x00004000 // Keep Old opened file
-#define WAT_OPT_MULTITHREAD 0x00008000 // Use multithread scan
-#define WAT_OPT_SINGLEINST 0x00010000 // Single player instance
-
-
-typedef BOOL (__cdecl *LPREADFORMATPROC)(LPSONGINFO Info);
-
-typedef struct tMusicFormat {
- LPREADFORMATPROC proc;
- char ext[8];
- int flags;
-} MUSICFORMAT, *LPMUSICFORMAT;
-
-/*
- wParam: action
- lParam: pointer to MUSICFORMAT if wParam = WAT_ACT_REGISTER,
- else - pointer to extension string (ANSI)
- returns: see result codes
-*/
-
-#define MS_WAT_FORMAT "WATrack/Format"
-
-/*
- wParam - pointer to SONGINFO structure (plwind field must be initialized)
- lParam - flags
-*/
-
-#define MS_WAT_WINAMPINFO "WATrack/WinampInfo"
-
-/*
- wParam: window
- lParam: LoWord - command; HiWord - value
-*/
-
-#define MS_WAT_WINAMPCOMMAND "WATrack/WinampCommand"
-
-int tInitProc();
-int tDeInitProc();
-int tStatusProc();
-
-typedef int (__cdecl *LPINITPROC)();
-typedef int (__cdecl *LPDEINITPROC)();
-typedef int (__cdecl *LPSTATUSPROC)(HWND wnd);
-typedef wchar_t (__cdecl *LPNAMEPROC)(HWND wnd, int flags);
-typedef HWND (__cdecl *LPCHECKPROC)(HWND wnd, int flags);
-typedef int (__cdecl *LPGETSTATUSPROC) (HWND wnd);
-typedef int (__cdecl *LPINFOPROC)(LPSONGINFO Info, int flags);
-typedef int (__cdecl *LPCOMMANDPROC)(HWND wnd, int command, int value);
-
-typedef struct tPlayerCell {
- char *Desc;
- int flags;
- HICON Icon; // can be 0. for registration only
- LPINITPROC Init;
- LPDEINITPROC DeInit;
- LPCHECKPROC Check; // check player
- LPGETSTATUSPROC GetStatus;
- LPNAMEPROC GetName; // can be NULL. get media filename
- LPINFOPROC GetInfo; // can be NULL. get info from player
- LPCOMMANDPROC Command; // can be NULL. send command to player
- char *URL; // only if WAT_OPT_HASURL flag present
- wchar_t *Notes;
-} PLAYERCELL, *LPPLAYERCELL;
-
-/*
- wParam: action
- lParam: pointer to PLAYERCELL if wParam = WAT_ACT_REGISTER,
- else - pointer to player description string (ANSI)
- returns: player window handle or value>0 if found
- note: If you use GetName or GetInfo field, please, do not return empty
- filename even when mediafile is remote!
-*/
-
-#define MS_WAT_PLAYER "WATrack/Player"
-
-// --------- Templates ----------
-
-/*
- wParam: not used
- lParam: Unicode template
- returns: New Unicode (replaced) string
-*/
-#define MS_WAT_REPLACETEXT "WATrack/ReplaceText"
-
-/*
- event types for History
- Blob structure for EVENTTYPE_WAT_ANSWER:
- Uniciode artist#0title#0album#0answer
-*/
-#define EVENTTYPE_WAT_REQUEST 9601
-#define EVENTTYPE_WAT_ANSWER 9602
-#define EVENTTYPE_WAT_ERROR 9603
-#define EVENTTYPE_WAT_MESSAGE 9604
-
-/*
- wParam: 0 or parent window
- lParam: 0
- note: Shows Macro help window with edit aliases ability
-*/
-#define MS_WAT_MACROHELP "WATrack/MacroHelp"
-
-#endif
+#ifndef M_MUSIC +#define M_MUSIC + +#define MIID_WATRACK {0xfc6c81f4, 0x837e, 0x4430, {0x96, 0x01, 0xa0, 0xaa, 0x43, 0x17, 0x7a, 0xe3}} + +typedef struct tSongInfoA { + char *artist; + char *title; + char *album; + char *genre; + char *comment; + char *year; + char *mfile; // media file + int kbps; + int khz; + int channels; + int track; + int total; // music length + int time; // elapsed time + char *wndtext; // window title + char *player; // player name + int plyver; // player version + HANDLE icon; // player icon + int fsize; // media file size + int vbr; + int status; // player status: 0 - stopped; 1 - playing; 2 - paused + HWND plwnd; // player window + // video part + int codec; + int width; + int height; + int fps; + __int64 date; + char *txtver; + char *lyric; + char *cover; + int volume; + char *url; +} SONGINFOA, *LPSONGINFOA; + +typedef struct tSongInfo { + wchar_t *artist; + wchar_t *title; + wchar_t *album; + wchar_t *genre; + wchar_t *comment; + wchar_t *year; + wchar_t *mfile; // media file + int kbps; + int khz; + int channels; + int track; + int total; // music length + int time; // elapsed time + wchar_t *wndtext; // window title + wchar_t *player; // player name + int plyver; // player version + HANDLE icon; // player icon + int fsize; // media file size + int vbr; + int status; // player status: 0 - stopped; 1 - playing; 2 - paused + HWND plwnd; // player window + // video part + int codec; + int width; + int height; + int fps; + __int64 date; + wchar_t *txtver; + // not implemented yet + wchar_t *lyric; + wchar_t *cover; + int volume; + wchar_t *url; +} SONGINFO, *LPSONGINFO; + +#if defined(_UNICODE) + #define WAT_INF_TCHAR WAT_INF_UNICODE + #define SongInfoT tSongInfo +#else + #define WAT_INF_TCHAR WAT_INF_ANSI + #define SongInfoT tSongInfoA +#endif + + // result codes +#define WAT_RES_UNKNOWN -2 +#define WAT_RES_NOTFOUND -1 +#define WAT_RES_ERROR WAT_RES_NOTFOUND +#define WAT_RES_OK 0 +#define WAT_RES_ENABLED WAT_RES_OK +#define WAT_RES_DISABLED 1 + // internal +#define WAT_RES_NEWFILE 3 + +#define WAT_PLS_NORMAL WAT_RES_OK +#define WAT_PLS_NOMUSIC WAT_RES_DISABLED +#define WAT_PLS_NOTFOUND WAT_RES_NOTFOUND + +#define WAT_INF_UNICODE 0 +#define WAT_INF_ANSI 1 +#define WAT_INF_UTF8 2 +#define WAT_INF_CHANGES 0x100 + +/* + wParam : WAT_INF_* constant + lParam : pointer to LPSONGINGO (Unicode) or LPSONGINFOA (ANSI/UTF8) + Affects: Fill structure by currently played music info + returns: WAT_PLS_* constant + note: pointer will be point to global SONGINFO structure of plugin + warning: Non-Unicode data filled only by request + if lParam=0 only internal SongInfo structure will be filled + Example: + LPSONGINFO p; + PluginLink->CallService(MS_WAT_GETMUSICINFO,0,(DWORD)&p); +*/ + +#define MS_WAT_GETMUSICINFO "WATrack/GetMusicInfo" + +/* + wParam:0 + lParam : pointer to pSongInfo (Unicode) + Affects: Fill structure by info from file named in SongInfo.mfile + returns: 0, if success + note: fields, which values can't be obtained, leaves old values. + you must free given strings by miranda mmi.free +*/ +#define MS_WAT_GETFILEINFO "WATrack/GetFileInfo" + +/* + wParam: encoding (WAT_INF_* consts, 0 = WAT_INF_UNICODE) + lParam: codepage (0 = ANSI) + Returns Global unicode SongInfo pointer or tranlated to Ansi/UTF8 structure +*/ +#define MS_WAT_RETURNGLOBAL "WATrack/GetMainStructure" + +#define WAT_CTRL_PREV 1 +#define WAT_CTRL_PLAY 2 +#define WAT_CTRL_PAUSE 3 +#define WAT_CTRL_STOP 4 +#define WAT_CTRL_NEXT 5 +#define WAT_CTRL_VOLDN 6 +#define WAT_CTRL_VOLUP 7 +#define WAT_CTRL_SEEK 8 // lParam is new position (sec) +/* + wParam: button code (WAT_CTRL_* const) + lParam: 0, or value (see WAT_CTRL_* const comments) + Affects: emulate player button pressing + returns: 0 if unsuccesful +*/ +#define MS_WAT_PRESSBUTTON "WATrack/PressButton" + +/* + Get user's Music Info +*/ +#define MS_WAT_GETCONTACTINFO = "WATrack/GetContactInfo" + +// ------------ Plugin/player status ------------ + +/* + wParam: 1 - switch off plugin + 0 - switch on plugin + -1 - switch plugin status + 2 - get plugin version + other - get plugin status + lParam: 0 + Affects: Switch plugin status to enabled or disabled + returns: version, old plugin status, 0, if was enabled +*/ + +#define MS_WAT_PLUGINSTATUS "WATrack/PluginStatus" + +#define ME_WAT_MODULELOADED "WATrack/ModuleLoaded" + +#define WAT_EVENT_PLAYERSTATUS 1 // 0-normal; 1-no music (possibly stopped); 2-not found +#define WAT_EVENT_NEWTRACK 2 +#define WAT_EVENT_PLUGINSTATUS 3 // 0-enabled; 1-dis.temporary; 2-dis.permanent +#define WAT_EVENT_NEWPLAYER 4 // +#define WAT_EVENT_NEWTEMPLATE 5 // TM_* constant + +/* + Plugin or player status changed: + wParam: type of event (see above) + lParam: value +*/ +#define ME_WAT_NEWSTATUS "WATrack/NewStatus" + +// ---------- Popup module ------------ + +/* + wParam: not used + lParam: not used + Affects: Show popup or Info window with current music information + note: Only Info window will be showed if Popup plugin disabled +*/ + +#define MS_WAT_SHOWMUSICINFO "WATrack/ShowMusicInfo" + +// --------- Statistic (report) module ------------- + +/* + wParam: pointer to log file name or NULL + lParam: pointer to report file name or NULL + Affects: Create report from log and run it (if option is set) + returns: 0 if unsuccesful + note: if wParam or lParam is a NULL then file names from options are used +*/ +#define MS_WAT_MAKEREPORT "WATrack/MakeReport" + +/* + wParam, lParam - not used + Affects: pack statistic file +*/ +#define MS_WAT_PACKLOG = "WATrack/PackLog" + +/* + wParam: not used + lParam: pointer to SongInfo +*/ +#define MS_WAT_ADDTOLOG = "WATrack/AddToLog" + +// ----------- Formats and players ----------- + +// media file status + +#define WAT_MES_STOPPED 0 +#define WAT_MES_PLAYING 1 +#define WAT_MES_PAUSED 2 +#define WAT_MES_UNKNOWN -1 + +#define WAT_ACT_REGISTER 1 +#define WAT_ACT_UNREGISTER 2 +#define WAT_ACT_DISABLE 3 +#define WAT_ACT_ENABLE 4 +#define WAT_ACT_GETSTATUS 5 // not found/enabled/disabled +#define WAT_ACT_SETACTIVE 6 +#define WAT_ACT_REPLACE 0x10000 // can be combined with WAT_REGISTERFORMAT + + // flags +#define WAT_OPT_DISABLED 0x00000001 // format registered but disabled +#define WAT_OPT_ONLYONE 0x00000002 // format can't be overwriten +#define WAT_OPT_PLAYERINFO 0x00000004 // song info from player +#define WAT_OPT_WINAMPAPI 0x00000008 // Winamp API support +#define WAT_OPT_CHECKTIME 0x00000010 // check file time for changes +#define WAT_OPT_VIDEO 0x00000020 // only for format registering used +#define WAT_OPT_LAST 0x00000040 // (internal) +#define WAT_OPT_FIRST 0x00000080 // (internal) +#define WAT_OPT_TEMPLATE 0x00000100 // (internal) +#define WAT_OPT_IMPLANTANT 0x00000200 // use process implantation +#define WAT_OPT_HASURL 0x00000400 // (player registration) URL field present +#define WAT_OPT_CHANGES 0x00000800 // obtain only chaged values + // (volume, status, window text, elapsed time) +#define WAT_OPT_APPCOMMAND 0x00001000 // Special (multimedia) key support +#define WAT_OPT_CHECKALL 0x00002000 // Check all players +#define WAT_OPT_KEEPOLD 0x00004000 // Keep Old opened file +#define WAT_OPT_MULTITHREAD 0x00008000 // Use multithread scan +#define WAT_OPT_SINGLEINST 0x00010000 // Single player instance + + +typedef BOOL (__cdecl *LPREADFORMATPROC)(LPSONGINFO Info); + +typedef struct tMusicFormat { + LPREADFORMATPROC proc; + char ext[8]; + int flags; +} MUSICFORMAT, *LPMUSICFORMAT; + +/* + wParam: action + lParam: pointer to MUSICFORMAT if wParam = WAT_ACT_REGISTER, + else - pointer to extension string (ANSI) + returns: see result codes +*/ + +#define MS_WAT_FORMAT "WATrack/Format" + +/* + wParam - pointer to SONGINFO structure (plwind field must be initialized) + lParam - flags +*/ + +#define MS_WAT_WINAMPINFO "WATrack/WinampInfo" + +/* + wParam: window + lParam: LoWord - command; HiWord - value +*/ + +#define MS_WAT_WINAMPCOMMAND "WATrack/WinampCommand" + +int tInitProc(); +int tDeInitProc(); +int tStatusProc(); + +typedef int (__cdecl *LPINITPROC)(); +typedef int (__cdecl *LPDEINITPROC)(); +typedef int (__cdecl *LPSTATUSPROC)(HWND wnd); +typedef wchar_t (__cdecl *LPNAMEPROC)(HWND wnd, int flags); +typedef HWND (__cdecl *LPCHECKPROC)(HWND wnd, int flags); +typedef int (__cdecl *LPGETSTATUSPROC) (HWND wnd); +typedef int (__cdecl *LPINFOPROC)(LPSONGINFO Info, int flags); +typedef int (__cdecl *LPCOMMANDPROC)(HWND wnd, int command, int value); + +typedef struct tPlayerCell { + char *Desc; + int flags; + HICON Icon; // can be 0. for registration only + LPINITPROC Init; + LPDEINITPROC DeInit; + LPCHECKPROC Check; // check player + LPGETSTATUSPROC GetStatus; + LPNAMEPROC GetName; // can be NULL. get media filename + LPINFOPROC GetInfo; // can be NULL. get info from player + LPCOMMANDPROC Command; // can be NULL. send command to player + char *URL; // only if WAT_OPT_HASURL flag present + wchar_t *Notes; +} PLAYERCELL, *LPPLAYERCELL; + +/* + wParam: action + lParam: pointer to PLAYERCELL if wParam = WAT_ACT_REGISTER, + else - pointer to player description string (ANSI) + returns: player window handle or value>0 if found + note: If you use GetName or GetInfo field, please, do not return empty + filename even when mediafile is remote! +*/ + +#define MS_WAT_PLAYER "WATrack/Player" + +// --------- Templates ---------- + +/* + wParam: not used + lParam: Unicode template + returns: New Unicode (replaced) string +*/ +#define MS_WAT_REPLACETEXT "WATrack/ReplaceText" + +/* + event types for History + Blob structure for EVENTTYPE_WAT_ANSWER: + Uniciode artist#0title#0album#0answer +*/ +#define EVENTTYPE_WAT_REQUEST 9601 +#define EVENTTYPE_WAT_ANSWER 9602 +#define EVENTTYPE_WAT_ERROR 9603 +#define EVENTTYPE_WAT_MESSAGE 9604 + +/* + wParam: 0 or parent window + lParam: 0 + note: Shows Macro help window with edit aliases ability +*/ +#define MS_WAT_MACROHELP "WATrack/MacroHelp" + +#endif @@ -1,430 +1,430 @@ -// Copyright © 2008 sss, chaos.persei
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-
-
-#include "commonheaders.h"
-
-void Start();
-int Parser();
-
-LPINITPROC Init()
-{
- Start();
- return 0;
-}
-void Stop();
-LPDEINITPROC DeInit()
-{
- Stop();
- return 0;
-}
-LPCHECKPROC CheckPlayer(HWND wnd, int flags)
-{
- if(!ghConnection)
- {
- Start();
- return 0;
- }
- if(Parser())
- return (LPCHECKPROC)WAT_MES_STOPPED;
- if(Connected)
- return (LPCHECKPROC)WAT_MES_PLAYING;
- return 0;
-}
-LPGETSTATUSPROC GetStatus()
-{
- if(!ghConnection)
- {
- Start();
- return 0;
- }
- if(Parser())
- return (LPGETSTATUSPROC)-1;
- return (LPGETSTATUSPROC)(gbState);
-}
-LPNAMEPROC GetFileName(HWND wnd, int flags)
-{
- if(!ghConnection)
- {
- Start();
- return 0;
- }
- return 0;
-}
-SONGINFO SongInfo = {0};
-
-LPINFOPROC GetPlayerInfo(LPSONGINFO info, int flags)
-{
- if(!ghConnection)
- {
- Start();
- return 0;
- }
- if(Parser())
- return (LPINFOPROC)-1;
-/*
-
- info->channels = SongInfo.channels;
- info->codec = SongInfo.codec;
- info->comment = SongInfo.comment;
- info->cover = SongInfo.cover;
- info->date = SongInfo.date;
- info->fps = SongInfo.fps;
- info->fsize = SongInfo.fsize;
-
- info->icon = SongInfo.icon;
- info->kbps = SongInfo.kbps;
- info->khz = SongInfo.khz;
- info->lyric = SongInfo.lyric;
- info->mfile = SongInfo.mfile;
- info->player = SongInfo.player;
- info->plyver = SongInfo.plyver;
- info->status = SongInfo.status;
- info->time = SongInfo.time;
- info->title = SongInfo.title;
- info->total = SongInfo.total;
- info->track = SongInfo.track;*/
- info->total = SongInfo.total;
- info->time = SongInfo.time;
- info->mfile = SongInfo.mfile;
- info->txtver = SongInfo.txtver;
- info->title = SongInfo.title;
- info->artist = SongInfo.artist;
- info->genre = SongInfo.genre;
- info->album = SongInfo.album;
- info->year = SongInfo.year;
- info->kbps = SongInfo.kbps;
- info->track = SongInfo.track;
- info->khz = SongInfo.khz;
- info->volume = SongInfo.volume;
-/* info->url = SongInfo.url; //??
- info->vbr = SongInfo.vbr;
- info->volume = SongInfo.volume;
- */
- return 0;
-}
-LPCOMMANDPROC SendCommand(HWND wnd, int command, int value)
-{
- switch (command)
- {
- case WAT_CTRL_PREV:
- Netlib_Send(ghConnection, "previous\n", strlen("previous\n"), 0);
- break;
- case WAT_CTRL_PLAY: //add resuming support
- if(gbState != WAT_MES_PAUSED)
- Netlib_Send(ghConnection, "play\n", strlen("play\n"), 0);
- else
- Netlib_Send(ghConnection, "pause 0\n", strlen("pause 0\n"), 0);
- break;
- case WAT_CTRL_PAUSE:
- Netlib_Send(ghConnection, "pause 1\n", strlen("pause 1\n"), 0);
- break;
- case WAT_CTRL_STOP:
- Netlib_Send(ghConnection, "stop\n", strlen("stop\n"), 0);
- break;
- case WAT_CTRL_NEXT:
- Netlib_Send(ghConnection, "next\n", strlen("next\n"), 0);
- break;
- case WAT_CTRL_VOLDN:
- break;
- case WAT_CTRL_VOLUP:
- break;
- case WAT_CTRL_SEEK:
- break;
- default:
- break;
- }
- return 0;
-}
-
-
-void RegisterPlayer()
-{
- if(!bWatrackService)
- return;
- {
- PLAYERCELL player = {0};
- player.Desc = "Music Player Daemon";
- player.Check = (LPCHECKPROC)CheckPlayer;
- player.Init = (LPINITPROC)Init;
- player.DeInit = (LPDEINITPROC)DeInit;
- player.GetStatus = (LPGETSTATUSPROC)GetStatus;
- player.Command = (LPCOMMANDPROC)SendCommand;
- player.flags = (WAT_OPT_HASURL|WAT_OPT_SINGLEINST|WAT_OPT_PLAYERINFO);
- player.GetName = (LPNAMEPROC)GetFileName;
- player.GetInfo = (LPINFOPROC)GetPlayerInfo;
-// player.Icon = //TODO:implement icon support
- player.Notes = _T("mpd is a nice music player for *nix which have not any gui, just daemon.\nuses very small amount of ram, cpu.");
- player.URL = "http://www.musicpd.org";
- CallService(MS_WAT_PLAYER, (WPARAM)WAT_ACT_REGISTER, (LPARAM)&player);
- }
-}
-void ReStart();
-int Parser()
-{
- static NETLIBPACKETRECVER nlpr = {0};
- char *ptr;
- char tmp[256];
- int i;
- char *buf;
- static char ver[16];
- nlpr.cbSize = sizeof(nlpr);
- nlpr.dwTimeout = 5;
- if(!ghConnection)
- {
- Start();
- }
- if(ghConnection)
- {
- int recvResult;
-/* do
- {
- recvResult = CallService(MS_NETLIB_GETMOREPACKETS,(WPARAM)ghPacketReciever, (LPARAM)&nlpr);
- if(recvResult == SOCKET_ERROR)
- {
- ReStart();
- return 1;
- }
- }
- while(recvResult > 0);*/
- if(!Connected)
- {
- char tmp[128];
- char *tmp2 = mir_t2a(gbPassword);
- recvResult = CallService(MS_NETLIB_GETMOREPACKETS,(WPARAM)ghPacketReciever, (LPARAM)&nlpr);
- if(recvResult == SOCKET_ERROR)
- {
- ReStart();
- return 1;
- }
- if(strlen(tmp2) > 2)
- {
- strcpy(tmp, "password ");
- strcat(tmp, tmp2);
- strcat(tmp, "\n");
- Netlib_Send(ghConnection, tmp, strlen(tmp), 0);
- recvResult = CallService(MS_NETLIB_GETMOREPACKETS,(WPARAM)ghPacketReciever, (LPARAM)&nlpr);
- if(recvResult == SOCKET_ERROR)
- {
- ReStart();
- return 1;
- }
- }
- mir_free(tmp2);
- }
- Netlib_Send(ghConnection, "status\n", strlen("status\n"), 0);
- recvResult = CallService(MS_NETLIB_GETMOREPACKETS,(WPARAM)ghPacketReciever, (LPARAM)&nlpr);
- if(recvResult == SOCKET_ERROR)
- {
- ReStart();
- return 1;
- }
- Netlib_Send(ghConnection, "currentsong\n", strlen("currentsong\n"), 0);
- recvResult = CallService(MS_NETLIB_GETMOREPACKETS,(WPARAM)ghPacketReciever, (LPARAM)&nlpr);
- if(recvResult == SOCKET_ERROR)
- {
- ReStart();
- return 1;
- }
- nlpr.bytesUsed = nlpr.bytesAvailable;
- }
- buf = nlpr.buffer;
- if(ptr = strstr(buf, "MPD"))
- {
- Connected = TRUE;
- ptr = &ptr[4];
- for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++)
- tmp[i] = ptr[i];
- tmp[i] = '\0';
- strcpy(ver, tmp);
- SongInfo.txtver = (TCHAR*)mir_utf8decodeW(tmp);
- }
- else
- SongInfo.txtver = (TCHAR*)mir_utf8decodeW(ver);
- if(ptr = strstr(buf, "file:"))
- {
- ptr = &ptr[6];
- for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++)
- tmp[i] = ptr[i];
- tmp[i] = '\0';
- SongInfo.mfile = (TCHAR*)mir_utf8decodeW(tmp);
- }
- else
- SongInfo.mfile = _T("");
- if(ptr = strstr(buf, "Time:"))
- {
- ptr = &ptr[6];
- for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++)
- tmp[i] = ptr[i];
- tmp[i] = '\0';
- SongInfo.total = atoi(tmp);
- }
- else if(!SongInfo.total)
- SongInfo.total = 0;
- if(ptr = strstr(buf, "time:"))
- {
- ptr = &ptr[6];
- for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++)
- tmp[i] = ptr[i];
- tmp[i] = '\0';
- SongInfo.time = atoi(tmp);
- }
- else if(!SongInfo.time)
- SongInfo.time = 0;
- if(ptr = strstr(buf, "Title:"))
- {
- ptr = &ptr[7];
- for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++)
- tmp[i] = ptr[i];
- tmp[i] = '\0';
- SongInfo.title = (TCHAR*)mir_utf8decodeW(tmp);
- }
- else
- SongInfo.title = _T("Unknown track");
- if(ptr = strstr(buf, "Artist:"))
- {
- ptr = &ptr[8];
- for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++)
- tmp[i] = ptr[i];
- tmp[i] = '\0';
- SongInfo.artist = (TCHAR*)mir_utf8decodeW(tmp);
- }
- else
- SongInfo.artist = _T("Unknown artist");
- if(ptr = strstr(buf, "Genre:"))
- {
- ptr = &ptr[7];
- for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++)
- tmp[i] = ptr[i];
- tmp[i] = '\0';
- SongInfo.genre = (TCHAR*)mir_utf8decodeW(tmp);
- }
- else
- SongInfo.genre = _T("Unknown genre");
- if(ptr = strstr(buf, "Album:"))
- {
- ptr = &ptr[7];
- for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++)
- tmp[i] = ptr[i];
- tmp[i] = '\0';
- SongInfo.album = (TCHAR*)mir_utf8decodeW(tmp);
- }
- else
- SongInfo.album = _T("Unknown album");
- if(ptr = strstr(buf, "Date:"))
- {
- ptr = &ptr[6];
- for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++)
- tmp[i] = ptr[i];
- tmp[i] = '\0';
- SongInfo.year = (TCHAR*)mir_utf8decodeW(tmp);
- }
- else
- SongInfo.year = _T("Unknown year");
- if(ptr = strstr(buf, "volume:"))
- {
- ptr = &ptr[8];
- for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++)
- tmp[i] = ptr[i];
- tmp[i] = '\0';
- SongInfo.volume = atoi(tmp);
- }
- else if(!SongInfo.volume)
- SongInfo.volume = 0;
- if(ptr = strstr(buf, "audio:"))
- {
- ptr = &ptr[7];
- for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++)
- tmp[i] = ptr[i];
- tmp[i] = '\0';
- SongInfo.khz = atoi(tmp);
- }
- else if(!SongInfo.khz)
- SongInfo.khz = 0;
- if(ptr = strstr(buf, "bitrate:"))
- {
- ptr = &ptr[9];
- for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++)
- tmp[i] = ptr[i];
- tmp[i] = '\0';
- SongInfo.kbps = atoi(tmp);
- }
- else if(!SongInfo.kbps)
- SongInfo.kbps = 0;
-
- if(ptr = strstr(buf, "Track:"))
- {
- ptr = &ptr[7];
- for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++)
- tmp[i] = ptr[i];
- tmp[i] = '\0';
- SongInfo.track = atoi(tmp);
- }
- else if(!SongInfo.track)
- SongInfo.track = 0;
- if(ptr = strstr(buf, "state:"))
- {
- ptr = &ptr[7];
- for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++)
- tmp[i] = ptr[i];
- tmp[i] = '\0';
- if(strstr(tmp, "play"))
- gbState = WAT_MES_PLAYING;
- if(strstr(tmp, "pause"))
- gbState = WAT_MES_PAUSED;
- if(strstr(tmp, "stop"))
- gbState = WAT_MES_STOPPED;
- }
- else if(!gbState)
- gbState = WAT_MES_UNKNOWN;
- return 0;
-}
-
-
-void Start()
-{
- NETLIBOPENCONNECTION nloc = {0};
- char *tmp = (char*)mir_u2a(gbHost);
- nloc.cbSize = sizeof(nloc);
- nloc.szHost = tmp;
- nloc.timeout = 5;
- nloc.wPort = gbPort;
- Connected = FALSE;
- ghConnection = NetLib_CreateConnection(ghNetlibUser, &nloc);
- if(ghConnection)
- ghPacketReciever = (HANDLE)CallService(MS_NETLIB_CREATEPACKETRECVER,(WPARAM)ghConnection,2048);
-}
-void Stop()
-{
- if(ghPacketReciever)
- Netlib_CloseHandle(ghPacketReciever);
- if(ghConnection)
- Netlib_CloseHandle(ghConnection);
- if(ghNetlibUser && (ghNetlibUser != INVALID_HANDLE_VALUE))
- CallService(MS_NETLIB_SHUTDOWN,(WPARAM)ghNetlibUser,0);
-}
-void ReStart()
-{
- if(ghPacketReciever)
- Netlib_CloseHandle(ghPacketReciever);
- if(ghConnection)
- Netlib_CloseHandle(ghConnection);
- Sleep(500);
- Start();
-}
-
+// Copyright © 2008 sss, chaos.persei +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + + + +#include "commonheaders.h" + +void Start(); +int Parser(); + +LPINITPROC Init() +{ + Start(); + return 0; +} +void Stop(); +LPDEINITPROC DeInit() +{ + Stop(); + return 0; +} +LPCHECKPROC CheckPlayer(HWND wnd, int flags) +{ + if(!ghConnection) + { + Start(); + return 0; + } + if(Parser()) + return (LPCHECKPROC)WAT_MES_STOPPED; + if(Connected) + return (LPCHECKPROC)WAT_MES_PLAYING; + return 0; +} +LPGETSTATUSPROC GetStatus() +{ + if(!ghConnection) + { + Start(); + return 0; + } + if(Parser()) + return (LPGETSTATUSPROC)-1; + return (LPGETSTATUSPROC)(gbState); +} +LPNAMEPROC GetFileName(HWND wnd, int flags) +{ + if(!ghConnection) + { + Start(); + return 0; + } + return 0; +} +SONGINFO SongInfo = {0}; + +LPINFOPROC GetPlayerInfo(LPSONGINFO info, int flags) +{ + if(!ghConnection) + { + Start(); + return 0; + } + if(Parser()) + return (LPINFOPROC)-1; +/* + + info->channels = SongInfo.channels; + info->codec = SongInfo.codec; + info->comment = SongInfo.comment; + info->cover = SongInfo.cover; + info->date = SongInfo.date; + info->fps = SongInfo.fps; + info->fsize = SongInfo.fsize; + + info->icon = SongInfo.icon; + info->kbps = SongInfo.kbps; + info->khz = SongInfo.khz; + info->lyric = SongInfo.lyric; + info->mfile = SongInfo.mfile; + info->player = SongInfo.player; + info->plyver = SongInfo.plyver; + info->status = SongInfo.status; + info->time = SongInfo.time; + info->title = SongInfo.title; + info->total = SongInfo.total; + info->track = SongInfo.track;*/ + info->total = SongInfo.total; + info->time = SongInfo.time; + info->mfile = SongInfo.mfile; + info->txtver = SongInfo.txtver; + info->title = SongInfo.title; + info->artist = SongInfo.artist; + info->genre = SongInfo.genre; + info->album = SongInfo.album; + info->year = SongInfo.year; + info->kbps = SongInfo.kbps; + info->track = SongInfo.track; + info->khz = SongInfo.khz; + info->volume = SongInfo.volume; +/* info->url = SongInfo.url; //?? + info->vbr = SongInfo.vbr; + info->volume = SongInfo.volume; + */ + return 0; +} +LPCOMMANDPROC SendCommand(HWND wnd, int command, int value) +{ + switch (command) + { + case WAT_CTRL_PREV: + Netlib_Send(ghConnection, "previous\n", strlen("previous\n"), 0); + break; + case WAT_CTRL_PLAY: //add resuming support + if(gbState != WAT_MES_PAUSED) + Netlib_Send(ghConnection, "play\n", strlen("play\n"), 0); + else + Netlib_Send(ghConnection, "pause 0\n", strlen("pause 0\n"), 0); + break; + case WAT_CTRL_PAUSE: + Netlib_Send(ghConnection, "pause 1\n", strlen("pause 1\n"), 0); + break; + case WAT_CTRL_STOP: + Netlib_Send(ghConnection, "stop\n", strlen("stop\n"), 0); + break; + case WAT_CTRL_NEXT: + Netlib_Send(ghConnection, "next\n", strlen("next\n"), 0); + break; + case WAT_CTRL_VOLDN: + break; + case WAT_CTRL_VOLUP: + break; + case WAT_CTRL_SEEK: + break; + default: + break; + } + return 0; +} + + +void RegisterPlayer() +{ + if(!bWatrackService) + return; + { + PLAYERCELL player = {0}; + player.Desc = "Music Player Daemon"; + player.Check = (LPCHECKPROC)CheckPlayer; + player.Init = (LPINITPROC)Init; + player.DeInit = (LPDEINITPROC)DeInit; + player.GetStatus = (LPGETSTATUSPROC)GetStatus; + player.Command = (LPCOMMANDPROC)SendCommand; + player.flags = (WAT_OPT_HASURL|WAT_OPT_SINGLEINST|WAT_OPT_PLAYERINFO); + player.GetName = (LPNAMEPROC)GetFileName; + player.GetInfo = (LPINFOPROC)GetPlayerInfo; +// player.Icon = //TODO:implement icon support + player.Notes = _T("mpd is a nice music player for *nix which have not any gui, just daemon.\nuses very small amount of ram, cpu."); + player.URL = "http://www.musicpd.org"; + CallService(MS_WAT_PLAYER, (WPARAM)WAT_ACT_REGISTER, (LPARAM)&player); + } +} +void ReStart(); +int Parser() +{ + static NETLIBPACKETRECVER nlpr = {0}; + char *ptr; + char tmp[256]; + int i; + char *buf; + static char ver[16]; + nlpr.cbSize = sizeof(nlpr); + nlpr.dwTimeout = 5; + if(!ghConnection) + { + Start(); + } + if(ghConnection) + { + int recvResult; +/* do + { + recvResult = CallService(MS_NETLIB_GETMOREPACKETS,(WPARAM)ghPacketReciever, (LPARAM)&nlpr); + if(recvResult == SOCKET_ERROR) + { + ReStart(); + return 1; + } + } + while(recvResult > 0);*/ + if(!Connected) + { + char tmp[128]; + char *tmp2 = mir_t2a(gbPassword); + recvResult = CallService(MS_NETLIB_GETMOREPACKETS,(WPARAM)ghPacketReciever, (LPARAM)&nlpr); + if(recvResult == SOCKET_ERROR) + { + ReStart(); + return 1; + } + if(strlen(tmp2) > 2) + { + strcpy(tmp, "password "); + strcat(tmp, tmp2); + strcat(tmp, "\n"); + Netlib_Send(ghConnection, tmp, strlen(tmp), 0); + recvResult = CallService(MS_NETLIB_GETMOREPACKETS,(WPARAM)ghPacketReciever, (LPARAM)&nlpr); + if(recvResult == SOCKET_ERROR) + { + ReStart(); + return 1; + } + } + mir_free(tmp2); + } + Netlib_Send(ghConnection, "status\n", strlen("status\n"), 0); + recvResult = CallService(MS_NETLIB_GETMOREPACKETS,(WPARAM)ghPacketReciever, (LPARAM)&nlpr); + if(recvResult == SOCKET_ERROR) + { + ReStart(); + return 1; + } + Netlib_Send(ghConnection, "currentsong\n", strlen("currentsong\n"), 0); + recvResult = CallService(MS_NETLIB_GETMOREPACKETS,(WPARAM)ghPacketReciever, (LPARAM)&nlpr); + if(recvResult == SOCKET_ERROR) + { + ReStart(); + return 1; + } + nlpr.bytesUsed = nlpr.bytesAvailable; + } + buf = nlpr.buffer; + if(ptr = strstr(buf, "MPD")) + { + Connected = TRUE; + ptr = &ptr[4]; + for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++) + tmp[i] = ptr[i]; + tmp[i] = '\0'; + strcpy(ver, tmp); + SongInfo.txtver = (TCHAR*)mir_utf8decodeW(tmp); + } + else + SongInfo.txtver = (TCHAR*)mir_utf8decodeW(ver); + if(ptr = strstr(buf, "file:")) + { + ptr = &ptr[6]; + for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++) + tmp[i] = ptr[i]; + tmp[i] = '\0'; + SongInfo.mfile = (TCHAR*)mir_utf8decodeW(tmp); + } + else + SongInfo.mfile = _T(""); + if(ptr = strstr(buf, "Time:")) + { + ptr = &ptr[6]; + for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++) + tmp[i] = ptr[i]; + tmp[i] = '\0'; + SongInfo.total = atoi(tmp); + } + else if(!SongInfo.total) + SongInfo.total = 0; + if(ptr = strstr(buf, "time:")) + { + ptr = &ptr[6]; + for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++) + tmp[i] = ptr[i]; + tmp[i] = '\0'; + SongInfo.time = atoi(tmp); + } + else if(!SongInfo.time) + SongInfo.time = 0; + if(ptr = strstr(buf, "Title:")) + { + ptr = &ptr[7]; + for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++) + tmp[i] = ptr[i]; + tmp[i] = '\0'; + SongInfo.title = (TCHAR*)mir_utf8decodeW(tmp); + } + else + SongInfo.title = _T("Unknown track"); + if(ptr = strstr(buf, "Artist:")) + { + ptr = &ptr[8]; + for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++) + tmp[i] = ptr[i]; + tmp[i] = '\0'; + SongInfo.artist = (TCHAR*)mir_utf8decodeW(tmp); + } + else + SongInfo.artist = _T("Unknown artist"); + if(ptr = strstr(buf, "Genre:")) + { + ptr = &ptr[7]; + for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++) + tmp[i] = ptr[i]; + tmp[i] = '\0'; + SongInfo.genre = (TCHAR*)mir_utf8decodeW(tmp); + } + else + SongInfo.genre = _T("Unknown genre"); + if(ptr = strstr(buf, "Album:")) + { + ptr = &ptr[7]; + for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++) + tmp[i] = ptr[i]; + tmp[i] = '\0'; + SongInfo.album = (TCHAR*)mir_utf8decodeW(tmp); + } + else + SongInfo.album = _T("Unknown album"); + if(ptr = strstr(buf, "Date:")) + { + ptr = &ptr[6]; + for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++) + tmp[i] = ptr[i]; + tmp[i] = '\0'; + SongInfo.year = (TCHAR*)mir_utf8decodeW(tmp); + } + else + SongInfo.year = _T("Unknown year"); + if(ptr = strstr(buf, "volume:")) + { + ptr = &ptr[8]; + for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++) + tmp[i] = ptr[i]; + tmp[i] = '\0'; + SongInfo.volume = atoi(tmp); + } + else if(!SongInfo.volume) + SongInfo.volume = 0; + if(ptr = strstr(buf, "audio:")) + { + ptr = &ptr[7]; + for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++) + tmp[i] = ptr[i]; + tmp[i] = '\0'; + SongInfo.khz = atoi(tmp); + } + else if(!SongInfo.khz) + SongInfo.khz = 0; + if(ptr = strstr(buf, "bitrate:")) + { + ptr = &ptr[9]; + for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++) + tmp[i] = ptr[i]; + tmp[i] = '\0'; + SongInfo.kbps = atoi(tmp); + } + else if(!SongInfo.kbps) + SongInfo.kbps = 0; + + if(ptr = strstr(buf, "Track:")) + { + ptr = &ptr[7]; + for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++) + tmp[i] = ptr[i]; + tmp[i] = '\0'; + SongInfo.track = atoi(tmp); + } + else if(!SongInfo.track) + SongInfo.track = 0; + if(ptr = strstr(buf, "state:")) + { + ptr = &ptr[7]; + for(i = 0; ((ptr[i] != '\n') && (ptr[i] != '\0')); i++) + tmp[i] = ptr[i]; + tmp[i] = '\0'; + if(strstr(tmp, "play")) + gbState = WAT_MES_PLAYING; + if(strstr(tmp, "pause")) + gbState = WAT_MES_PAUSED; + if(strstr(tmp, "stop")) + gbState = WAT_MES_STOPPED; + } + else if(!gbState) + gbState = WAT_MES_UNKNOWN; + return 0; +} + + +void Start() +{ + NETLIBOPENCONNECTION nloc = {0}; + char *tmp = (char*)mir_u2a(gbHost); + nloc.cbSize = sizeof(nloc); + nloc.szHost = tmp; + nloc.timeout = 5; + nloc.wPort = gbPort; + Connected = FALSE; + ghConnection = NetLib_CreateConnection(ghNetlibUser, &nloc); + if(ghConnection) + ghPacketReciever = (HANDLE)CallService(MS_NETLIB_CREATEPACKETRECVER,(WPARAM)ghConnection,2048); +} +void Stop() +{ + if(ghPacketReciever) + Netlib_CloseHandle(ghPacketReciever); + if(ghConnection) + Netlib_CloseHandle(ghConnection); + if(ghNetlibUser && (ghNetlibUser != INVALID_HANDLE_VALUE)) + CallService(MS_NETLIB_SHUTDOWN,(WPARAM)ghNetlibUser,0); +} +void ReStart() +{ + if(ghPacketReciever) + Netlib_CloseHandle(ghPacketReciever); + if(ghConnection) + Netlib_CloseHandle(ghConnection); + Sleep(500); + Start(); +} + @@ -1,26 +1,26 @@ -// Copyright © 2008 sss, chaos.persei
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#ifndef MAIN_H
-#define MAIN_H
-
-//TCHAR* __stdcall UniGetContactSettingUtf(HANDLE hContact, const char *szModule,const char* szSetting, TCHAR* szDef);
-struct MM_INTERFACE mmi;
-struct UTF8_INTERFACE utfi;
-//const TCHAR *stristr( const TCHAR *str, const TCHAR *substr);
-
-#endif
-
-
+// Copyright © 2008 sss, chaos.persei +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +#ifndef MAIN_H +#define MAIN_H + +//TCHAR* __stdcall UniGetContactSettingUtf(HANDLE hContact, const char *szModule,const char* szSetting, TCHAR* szDef); +struct MM_INTERFACE mmi; +struct UTF8_INTERFACE utfi; +//const TCHAR *stristr( const TCHAR *str, const TCHAR *substr); + +#endif + + @@ -1,92 +1,92 @@ -// Copyright © 2008 sss, chaos.persei
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-#include "commonheaders.h"
-#include <uxtheme.h>
-
-HINSTANCE hInst;
-
-static BOOL CALLBACK DlgProcWaMpdOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-
-int WaMpdOptInit(WPARAM wParam,LPARAM lParam)
-{
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.cbSize = sizeof(odp);
- odp.hInstance = hInst;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_WA_MPD);
- odp.pszTitle = "Winamp Track";
- odp.pszGroup = "Plugins";
- odp.pszTab = "Watrack MPD";
- odp.flags=ODPF_BOLDGROUPS;
- odp.pfnDlgProc = DlgProcWaMpdOpts;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
- return 0;
-}
-
-
-static BOOL CALLBACK DlgProcWaMpdOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwndDlg);
- SetDlgItemInt(hwndDlg, IDC_PORT, DBGetContactSettingWord(NULL, szModuleName, "Port", 6600), FALSE);
- SetDlgItemText(hwndDlg, IDC_SERVER, UniGetContactSettingUtf(NULL, szModuleName, "Server", _T("127.0.0.1")));
- SetDlgItemText(hwndDlg, IDC_PASSWORD, UniGetContactSettingUtf(NULL, szModuleName, "Password", _T("")));
- return TRUE;
- }
-
-
- case WM_COMMAND:
- {
- switch (LOWORD(wParam))
- {
-
- }
-
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
- }
-
- case WM_NOTIFY:
- {
- switch (((LPNMHDR)lParam)->code)
- {
-
- case PSN_APPLY:
- {
- TCHAR szText[128];
- DBWriteContactSettingWord(NULL, szModuleName, "Port", (WORD)GetDlgItemInt(hwndDlg, IDC_PORT, NULL, FALSE));
- gbPort = (WORD)GetDlgItemInt(hwndDlg, IDC_PORT, NULL, FALSE);
- GetDlgItemText(hwndDlg, IDC_SERVER, szText, sizeof(szText));
- DBWriteContactSettingTString(NULL, szModuleName, "Server", szText);
- _tcscpy(gbHost, szText);
- GetDlgItemText(hwndDlg, IDC_PASSWORD, szText, sizeof(szText));
- DBWriteContactSettingTString(NULL, szModuleName, "Password", szText);
- _tcscpy(gbPassword, szText);
- return TRUE;
- }
- }
- }
- break;
- }
-
- return FALSE;
-}
-
-
-
+// Copyright © 2008 sss, chaos.persei +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#include "commonheaders.h" +#include <uxtheme.h> + +HINSTANCE hInst; + +static BOOL CALLBACK DlgProcWaMpdOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); + +int WaMpdOptInit(WPARAM wParam,LPARAM lParam) +{ + OPTIONSDIALOGPAGE odp = { 0 }; + odp.cbSize = sizeof(odp); + odp.hInstance = hInst; + odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_WA_MPD); + odp.pszTitle = "Winamp Track"; + odp.pszGroup = "Plugins"; + odp.pszTab = "Watrack MPD"; + odp.flags=ODPF_BOLDGROUPS; + odp.pfnDlgProc = DlgProcWaMpdOpts; + CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp); + return 0; +} + + +static BOOL CALLBACK DlgProcWaMpdOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch (msg) + { + case WM_INITDIALOG: + { + TranslateDialogDefault(hwndDlg); + SetDlgItemInt(hwndDlg, IDC_PORT, DBGetContactSettingWord(NULL, szModuleName, "Port", 6600), FALSE); + SetDlgItemText(hwndDlg, IDC_SERVER, UniGetContactSettingUtf(NULL, szModuleName, "Server", _T("127.0.0.1"))); + SetDlgItemText(hwndDlg, IDC_PASSWORD, UniGetContactSettingUtf(NULL, szModuleName, "Password", _T(""))); + return TRUE; + } + + + case WM_COMMAND: + { + switch (LOWORD(wParam)) + { + + } + + SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); + break; + } + + case WM_NOTIFY: + { + switch (((LPNMHDR)lParam)->code) + { + + case PSN_APPLY: + { + TCHAR szText[128]; + DBWriteContactSettingWord(NULL, szModuleName, "Port", (WORD)GetDlgItemInt(hwndDlg, IDC_PORT, NULL, FALSE)); + gbPort = (WORD)GetDlgItemInt(hwndDlg, IDC_PORT, NULL, FALSE); + GetDlgItemText(hwndDlg, IDC_SERVER, szText, sizeof(szText)); + DBWriteContactSettingTString(NULL, szModuleName, "Server", szText); + _tcscpy(gbHost, szText); + GetDlgItemText(hwndDlg, IDC_PASSWORD, szText, sizeof(szText)); + DBWriteContactSettingTString(NULL, szModuleName, "Password", szText); + _tcscpy(gbPassword, szText); + return TRUE; + } + } + } + break; + } + + return FALSE; +} + + + @@ -1,32 +1,32 @@ -//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by watrack_mpd.rc
-//
-#define IDD_OPT_DOS 104
-#define IDD_OPT_WA_MPD 104
-#define IDC_FOR_ONLINE 1003
-#define IDC_MSG_NUMBER 1004
-#define IDC_MSG_TEXT 1005
-#define IDC_MSG_RATE 1006
-#define IDC_ENABLE_CUSTOM_MESSAGE 1007
-#define IDC_FOR_ONLINE2 1008
-#define IDC_CLIENT_BASED 1008
-#define IDC_MESSAGE_SIZE 1009
-#define IDC_MSG_SIZE 1009
-#define IDC_MSG_SIZE2 1010
-#define IDC_CHAR_COUNT 1010
-#define IDC_SERVER 1011
-#define IDC_PORT 1012
-#define IDC_EDIT3 1013
-#define IDC_PASSWORD 1013
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 101
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1016
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
+//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by watrack_mpd.rc +// +#define IDD_OPT_DOS 104 +#define IDD_OPT_WA_MPD 104 +#define IDC_FOR_ONLINE 1003 +#define IDC_MSG_NUMBER 1004 +#define IDC_MSG_TEXT 1005 +#define IDC_MSG_RATE 1006 +#define IDC_ENABLE_CUSTOM_MESSAGE 1007 +#define IDC_FOR_ONLINE2 1008 +#define IDC_CLIENT_BASED 1008 +#define IDC_MESSAGE_SIZE 1009 +#define IDC_MSG_SIZE 1009 +#define IDC_MSG_SIZE2 1010 +#define IDC_CHAR_COUNT 1010 +#define IDC_SERVER 1011 +#define IDC_PORT 1012 +#define IDC_EDIT3 1013 +#define IDC_PASSWORD 1013 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1016 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/utilities.c b/utilities.c index 5ef17bd..444a6d2 100755 --- a/utilities.c +++ b/utilities.c @@ -1,126 +1,126 @@ -// Copyright © 2008 sss, chaos.persei
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-#include "commonheaders.h"
-
-/*HANDLE CreateThreadEx(pThreadFuncEx AFunc, void* arg, DWORD* pThreadID)
-{
- FORK_THREADEX_PARAMS params;
- DWORD dwThreadId;
- HANDLE hThread;
-
- params.pFunc = AFunc;
- params.arg = arg;
- params.iStackSize = 0;
- params.threadID = &dwThreadId;
- hThread = (HANDLE)CallService(MS_SYSTEM_FORK_THREAD_EX, 0, (LPARAM)¶ms);
- if (pThreadID)
- *pThreadID = dwThreadId;
-
- return hThread;
-}*/
-
-TCHAR* __stdcall UniGetContactSettingUtf(HANDLE hContact, const char *szModule,const char* szSetting, TCHAR* szDef)
-{
- DBVARIANT dbv = {DBVT_DELETED};
- TCHAR* szRes;
- if (DBGetContactSettingTString(hContact, szModule, szSetting, &dbv))
- return _tcsdup(szDef);
- if(dbv.pszVal)
- szRes = _tcsdup(dbv.ptszVal);
- DBFreeVariant(&dbv);
- return szRes;
-}
-
-// case-insensitive _tcsstr
-/*#define NEWTSTR_ALLOCA(A) (A==NULL)?NULL:_tcscpy((TCHAR*)alloca(sizeof(TCHAR)*(_tcslen(A)+1)),A)
-const TCHAR *stristr( const TCHAR *str, const TCHAR *substr)
-{
- TCHAR *p;
- TCHAR *str_up = NEWTSTR_ALLOCA(str);
- TCHAR *substr_up = NEWTSTR_ALLOCA(substr);
-
- CharUpperBuff(str_up, lstrlen(str_up));
- CharUpperBuff(substr_up, lstrlen(substr_up));
-
- p = _tcsstr(str_up, substr_up);
- return p ? (str + (p - str_up)) : NULL;
-}*/
-
-char *date()
-{
- static char d[11];
- char *tmp = __DATE__, m[4], mn[3] = "01";
- m[0]=tmp[0];
- m[1]=tmp[1];
- m[2]=tmp[2];
- if(strstr(m,"Jan"))
- strcpy(mn,"01");
- else if(strstr(m,"Feb"))
- strcpy(mn,"02");
- else if(strstr(m,"Mar"))
- strcpy(mn,"03");
- else if(strstr(m,"Apr"))
- strcpy(mn,"04");
- else if(strstr(m,"May"))
- strcpy(mn,"05");
- else if(strstr(m,"Jun"))
- strcpy(mn,"06");
- else if(strstr(m,"Jul"))
- strcpy(mn,"07");
- else if(strstr(m,"Aug"))
- strcpy(mn,"08");
- else if(strstr(m,"Sep"))
- strcpy(mn,"09");
- else if(strstr(m,"Oct"))
- strcpy(mn,"10");
- else if(strstr(m,"Nov"))
- strcpy(mn,"11");
- else if(strstr(m,"Dec"))
- strcpy(mn,"12");
- d[0]=tmp[7];
- d[1]=tmp[8];
- d[2]=tmp[9];
- d[3]=tmp[10];
- d[4]='.';
- d[5]=mn[0];
- d[6]=mn[1];
- d[7]='.';
- if (tmp[4] == ' ')
- d[8] = '0';
- else
- d[8]=tmp[4];
- d[9]=tmp[5];
- return d;
-}
-HANDLE NetLib_CreateConnection(HANDLE hUser, NETLIBOPENCONNECTION* nloc) //from icq )
-{
- HANDLE hConnection;
-
- nloc->cbSize = sizeof(NETLIBOPENCONNECTION);
- nloc->flags |= NLOCF_V2;
-
- hConnection = (HANDLE)CallService(MS_NETLIB_OPENCONNECTION, (WPARAM)hUser, (LPARAM)nloc);
- if (!hConnection && (GetLastError() == 87))
- { // this ensures, an old Miranda will be able to connect also
- nloc->cbSize = NETLIBOPENCONNECTION_V1_SIZE;
- hConnection = (HANDLE)CallService(MS_NETLIB_OPENCONNECTION, (WPARAM)hConnection, (LPARAM)nloc);
- }
- return hConnection;
-}
-
-
+// Copyright © 2008 sss, chaos.persei +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#include "commonheaders.h" + +/*HANDLE CreateThreadEx(pThreadFuncEx AFunc, void* arg, DWORD* pThreadID) +{ + FORK_THREADEX_PARAMS params; + DWORD dwThreadId; + HANDLE hThread; + + params.pFunc = AFunc; + params.arg = arg; + params.iStackSize = 0; + params.threadID = &dwThreadId; + hThread = (HANDLE)CallService(MS_SYSTEM_FORK_THREAD_EX, 0, (LPARAM)¶ms); + if (pThreadID) + *pThreadID = dwThreadId; + + return hThread; +}*/ + +TCHAR* __stdcall UniGetContactSettingUtf(HANDLE hContact, const char *szModule,const char* szSetting, TCHAR* szDef) +{ + DBVARIANT dbv = {DBVT_DELETED}; + TCHAR* szRes; + if (DBGetContactSettingTString(hContact, szModule, szSetting, &dbv)) + return _tcsdup(szDef); + if(dbv.pszVal) + szRes = _tcsdup(dbv.ptszVal); + DBFreeVariant(&dbv); + return szRes; +} + +// case-insensitive _tcsstr +/*#define NEWTSTR_ALLOCA(A) (A==NULL)?NULL:_tcscpy((TCHAR*)alloca(sizeof(TCHAR)*(_tcslen(A)+1)),A) +const TCHAR *stristr( const TCHAR *str, const TCHAR *substr) +{ + TCHAR *p; + TCHAR *str_up = NEWTSTR_ALLOCA(str); + TCHAR *substr_up = NEWTSTR_ALLOCA(substr); + + CharUpperBuff(str_up, lstrlen(str_up)); + CharUpperBuff(substr_up, lstrlen(substr_up)); + + p = _tcsstr(str_up, substr_up); + return p ? (str + (p - str_up)) : NULL; +}*/ + +char *date() +{ + static char d[11]; + char *tmp = __DATE__, m[4], mn[3] = "01"; + m[0]=tmp[0]; + m[1]=tmp[1]; + m[2]=tmp[2]; + if(strstr(m,"Jan")) + strcpy(mn,"01"); + else if(strstr(m,"Feb")) + strcpy(mn,"02"); + else if(strstr(m,"Mar")) + strcpy(mn,"03"); + else if(strstr(m,"Apr")) + strcpy(mn,"04"); + else if(strstr(m,"May")) + strcpy(mn,"05"); + else if(strstr(m,"Jun")) + strcpy(mn,"06"); + else if(strstr(m,"Jul")) + strcpy(mn,"07"); + else if(strstr(m,"Aug")) + strcpy(mn,"08"); + else if(strstr(m,"Sep")) + strcpy(mn,"09"); + else if(strstr(m,"Oct")) + strcpy(mn,"10"); + else if(strstr(m,"Nov")) + strcpy(mn,"11"); + else if(strstr(m,"Dec")) + strcpy(mn,"12"); + d[0]=tmp[7]; + d[1]=tmp[8]; + d[2]=tmp[9]; + d[3]=tmp[10]; + d[4]='.'; + d[5]=mn[0]; + d[6]=mn[1]; + d[7]='.'; + if (tmp[4] == ' ') + d[8] = '0'; + else + d[8]=tmp[4]; + d[9]=tmp[5]; + return d; +} +HANDLE NetLib_CreateConnection(HANDLE hUser, NETLIBOPENCONNECTION* nloc) //from icq ) +{ + HANDLE hConnection; + + nloc->cbSize = sizeof(NETLIBOPENCONNECTION); + nloc->flags |= NLOCF_V2; + + hConnection = (HANDLE)CallService(MS_NETLIB_OPENCONNECTION, (WPARAM)hUser, (LPARAM)nloc); + if (!hConnection && (GetLastError() == 87)) + { // this ensures, an old Miranda will be able to connect also + nloc->cbSize = NETLIBOPENCONNECTION_V1_SIZE; + hConnection = (HANDLE)CallService(MS_NETLIB_OPENCONNECTION, (WPARAM)hConnection, (LPARAM)nloc); + } + return hConnection; +} + + diff --git a/utilities.h b/utilities.h index 44fef30..8cef30f 100755 --- a/utilities.h +++ b/utilities.h @@ -1,6 +1,6 @@ -#ifndef UTILITIES_H
-#define UTILITIES_H
-HANDLE NetLib_CreateConnection(HANDLE hUser, NETLIBOPENCONNECTION* nloc);
-HANDLE CreateThreadEx(pThreadFuncEx AFunc, void* arg, DWORD* pThreadID);
-TCHAR* __stdcall UniGetContactSettingUtf(HANDLE hContact, const char *szModule,const char* szSetting, TCHAR* szDef);
-#endif
+#ifndef UTILITIES_H +#define UTILITIES_H +HANDLE NetLib_CreateConnection(HANDLE hUser, NETLIBOPENCONNECTION* nloc); +HANDLE CreateThreadEx(pThreadFuncEx AFunc, void* arg, DWORD* pThreadID); +TCHAR* __stdcall UniGetContactSettingUtf(HANDLE hContact, const char *szModule,const char* szSetting, TCHAR* szDef); +#endif diff --git a/watrack_mpd.rc b/watrack_mpd.rc index 30544f1..791d2d0 100755 --- a/watrack_mpd.rc +++ b/watrack_mpd.rc @@ -1,112 +1,112 @@ -// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Russian resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
-#ifdef _WIN32
-LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
-#pragma code_page(1251)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-#endif // Russian resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_OPT_WA_MPD DIALOGEX 0, 0, 268, 214
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-FONT 8, "MS Shell Dlg", 400, 0, 0x0
-BEGIN
- EDITTEXT IDC_SERVER,71,18,72,14,ES_AUTOHSCROLL
- EDITTEXT IDC_PORT,72,38,72,14,ES_AUTOHSCROLL
- EDITTEXT IDC_PASSWORD,71,58,73,14,ES_PASSWORD | ES_AUTOHSCROLL
- LTEXT "MPD Host",IDC_STATIC,7,20,32,8
- LTEXT "Port",IDC_STATIC,7,42,14,8
- LTEXT "Password",IDC_STATIC,7,63,32,8
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_OPT_WA_MPD, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 261
- TOPMARGIN, 7
- BOTTOMMARGIN, 207
- END
-END
-#endif // APSTUDIO_INVOKED
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Russian resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) +#ifdef _WIN32 +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT +#pragma code_page(1251) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // Russian resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_OPT_WA_MPD DIALOGEX 0, 0, 268, 214 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x0 +BEGIN + EDITTEXT IDC_SERVER,71,18,72,14,ES_AUTOHSCROLL + EDITTEXT IDC_PORT,72,38,72,14,ES_AUTOHSCROLL + EDITTEXT IDC_PASSWORD,71,58,73,14,ES_PASSWORD | ES_AUTOHSCROLL + LTEXT "MPD Host",IDC_STATIC,7,20,32,8 + LTEXT "Port",IDC_STATIC,7,42,14,8 + LTEXT "Password",IDC_STATIC,7,63,32,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_OPT_WA_MPD, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 261 + TOPMARGIN, 7 + BOTTOMMARGIN, 207 + END +END +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/watrack_mpd.sln b/watrack_mpd.sln index 253230d..339bab0 100755 --- a/watrack_mpd.sln +++ b/watrack_mpd.sln @@ -1,23 +1,23 @@ -
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "watrack_mpd", "watrack_mpd.vcproj", "{F29D0C8D-141A-43CF-86B2-34A04653F8D4}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release Unicode (static)|Win32 = Release Unicode (static)|Win32
- Release Unicode|Win32 = Release Unicode|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|Win32.ActiveCfg = Debug|Win32
- {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|Win32.Build.0 = Debug|Win32
- {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release Unicode (static)|Win32.ActiveCfg = Release Unicode (static)|Win32
- {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release Unicode (static)|Win32.Build.0 = Release Unicode (static)|Win32
- {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
- {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "watrack_mpd", "watrack_mpd.vcproj", "{F29D0C8D-141A-43CF-86B2-34A04653F8D4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release Unicode (static)|Win32 = Release Unicode (static)|Win32 + Release Unicode|Win32 = Release Unicode|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|Win32.Build.0 = Debug|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release Unicode (static)|Win32.ActiveCfg = Release Unicode (static)|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release Unicode (static)|Win32.Build.0 = Release Unicode (static)|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release Unicode|Win32.Build.0 = Release Unicode|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/watrack_mpd.vcproj b/watrack_mpd.vcproj index c700a01..19e4d49 100755 --- a/watrack_mpd.vcproj +++ b/watrack_mpd.vcproj @@ -1,672 +1,672 @@ -<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="watrack_mpd"
- ProjectGUID="{F29D0C8D-141A-43CF-86B2-34A04653F8D4}"
- RootNamespace="watrack_mpd"
- TargetFrameworkVersion="0"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release Unicode|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Release Unicode/testplug.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- InlineFunctionExpansion="1"
- FavorSizeOrSpeed="2"
- OmitFramePointers="true"
- WholeProgramOptimization="true"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;FULL_BUILD"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- EnableEnhancedInstructionSet="1"
- FloatingPointModel="0"
- PrecompiledHeaderFile=".\Release Unicode/testplug.pch"
- AssemblerListingLocation=".\Release Unicode/"
- ObjectFile=".\Release Unicode/"
- ProgramDataBaseFileName=".\Release Unicode/"
- WarningLevel="3"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="2057"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- GenerateDebugInformation="true"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- LinkTimeCodeGeneration="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- ImportLibrary=".\Release Unicode/testplug.lib"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\Release Unicode/testplug.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory=".\Debug"
- IntermediateDirectory=".\Debug"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="_DEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Debug/testplug.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;TESTPLUG_EXPORTS;_CRT_SECURE_NO_WARNINGS;FULL_BUILD"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- PrecompiledHeaderFile=".\Debug/testplug.pch"
- AssemblerListingLocation=".\Debug/"
- ObjectFile=".\Debug/"
- ProgramDataBaseFileName=".\Debug/"
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="2057"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- ImportLibrary=".\Debug/testplug.lib"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\Debug/testplug.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release Unicode (static)|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Release Unicode (static)/testplug.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="1"
- InlineFunctionExpansion="1"
- FavorSizeOrSpeed="2"
- OmitFramePointers="true"
- WholeProgramOptimization="true"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;FULL_BUILD"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- EnableEnhancedInstructionSet="1"
- FloatingPointModel="0"
- PrecompiledHeaderFile=".\Release Unicode (static)/testplug.pch"
- AssemblerListingLocation=".\Release Unicode (static)/"
- ObjectFile=".\Release Unicode (static)/"
- ProgramDataBaseFileName=".\Release Unicode (static)/"
- WarningLevel="3"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="2057"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- GenerateDebugInformation="false"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- LinkTimeCodeGeneration="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- ImportLibrary=".\Release Unicode (static)/testplug.lib"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\Release Unicode (static)/testplug.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release Unicode (service only)(static)|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Release Unicode (static)/testplug.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- InlineFunctionExpansion="1"
- FavorSizeOrSpeed="2"
- OmitFramePointers="true"
- WholeProgramOptimization="true"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- EnableEnhancedInstructionSet="1"
- FloatingPointModel="0"
- PrecompiledHeaderFile=".\Release Unicode (static)/testplug.pch"
- AssemblerListingLocation=".\Release Unicode (static)/"
- ObjectFile=".\Release Unicode (static)/"
- ProgramDataBaseFileName=".\Release Unicode (static)/"
- WarningLevel="3"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="2057"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- GenerateDebugInformation="true"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- LinkTimeCodeGeneration="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- ImportLibrary=".\Release Unicode (static)/testplug.lib"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\Release Unicode (static)/testplug.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release Unicode (service only)|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Release Unicode (static)/testplug.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- InlineFunctionExpansion="1"
- FavorSizeOrSpeed="2"
- OmitFramePointers="true"
- WholeProgramOptimization="true"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- EnableEnhancedInstructionSet="1"
- FloatingPointModel="0"
- PrecompiledHeaderFile=".\Release Unicode (static)/testplug.pch"
- AssemblerListingLocation=".\Release Unicode (static)/"
- ObjectFile=".\Release Unicode (static)/"
- ProgramDataBaseFileName=".\Release Unicode (static)/"
- WarningLevel="3"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="2057"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- GenerateDebugInformation="true"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- LinkTimeCodeGeneration="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- ImportLibrary=".\Release Unicode (static)/testplug.lib"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\Release Unicode (static)/testplug.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug(service)|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="_DEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Debug/testplug.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;TESTPLUG_EXPORTS;_CRT_SECURE_NO_WARNINGS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- PrecompiledHeaderFile=".\Debug/testplug.pch"
- AssemblerListingLocation=".\Debug/"
- ObjectFile=".\Debug/"
- ProgramDataBaseFileName=".\Debug/"
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="2057"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- GenerateDebugInformation="true"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- ImportLibrary=".\Debug/testplug.lib"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\Debug/testplug.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath=".\init.c"
- >
- </File>
- <File
- RelativePath=".\main.c"
- >
- </File>
- <File
- RelativePath=".\options.c"
- >
- </File>
- <File
- RelativePath=".\utilities.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath=".\commonheaders.h"
- >
- </File>
- <File
- RelativePath=".\constants.h"
- >
- </File>
- <File
- RelativePath=".\globals.h"
- >
- </File>
- <File
- RelativePath=".\m_music.h"
- >
- </File>
- <File
- RelativePath=".\main.h"
- >
- </File>
- <File
- RelativePath=".\resource.h"
- >
- </File>
- <File
- RelativePath=".\utilities.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
- >
- <File
- RelativePath=".\watrack_mpd.rc"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="windows-1251"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="watrack_mpd" + ProjectGUID="{F29D0C8D-141A-43CF-86B2-34A04653F8D4}" + RootNamespace="watrack_mpd" + TargetFrameworkVersion="0" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Release Unicode|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release Unicode/testplug.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + InlineFunctionExpansion="1" + FavorSizeOrSpeed="2" + OmitFramePointers="true" + WholeProgramOptimization="true" + AdditionalIncludeDirectories="../../include" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;FULL_BUILD" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + EnableEnhancedInstructionSet="1" + FloatingPointModel="0" + PrecompiledHeaderFile=".\Release Unicode/testplug.pch" + AssemblerListingLocation=".\Release Unicode/" + ObjectFile=".\Release Unicode/" + ProgramDataBaseFileName=".\Release Unicode/" + WarningLevel="3" + SuppressStartupBanner="true" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="2057" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + LinkIncremental="1" + SuppressStartupBanner="true" + GenerateDebugInformation="true" + OptimizeReferences="2" + EnableCOMDATFolding="2" + LinkTimeCodeGeneration="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + ImportLibrary=".\Release Unicode/testplug.lib" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile=".\Release Unicode/testplug.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Debug/testplug.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="../../include" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;TESTPLUG_EXPORTS;_CRT_SECURE_NO_WARNINGS;FULL_BUILD" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + PrecompiledHeaderFile=".\Debug/testplug.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="2057" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + LinkIncremental="2" + SuppressStartupBanner="true" + GenerateDebugInformation="true" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + ImportLibrary=".\Debug/testplug.lib" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile=".\Debug/testplug.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release Unicode (static)|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release Unicode (static)/testplug.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="1" + InlineFunctionExpansion="1" + FavorSizeOrSpeed="2" + OmitFramePointers="true" + WholeProgramOptimization="true" + AdditionalIncludeDirectories="../../include" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;FULL_BUILD" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + EnableEnhancedInstructionSet="1" + FloatingPointModel="0" + PrecompiledHeaderFile=".\Release Unicode (static)/testplug.pch" + AssemblerListingLocation=".\Release Unicode (static)/" + ObjectFile=".\Release Unicode (static)/" + ProgramDataBaseFileName=".\Release Unicode (static)/" + WarningLevel="3" + SuppressStartupBanner="true" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="2057" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + LinkIncremental="1" + SuppressStartupBanner="true" + GenerateDebugInformation="false" + OptimizeReferences="2" + EnableCOMDATFolding="2" + LinkTimeCodeGeneration="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + ImportLibrary=".\Release Unicode (static)/testplug.lib" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile=".\Release Unicode (static)/testplug.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release Unicode (service only)(static)|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release Unicode (static)/testplug.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + InlineFunctionExpansion="1" + FavorSizeOrSpeed="2" + OmitFramePointers="true" + WholeProgramOptimization="true" + AdditionalIncludeDirectories="../../include" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + EnableEnhancedInstructionSet="1" + FloatingPointModel="0" + PrecompiledHeaderFile=".\Release Unicode (static)/testplug.pch" + AssemblerListingLocation=".\Release Unicode (static)/" + ObjectFile=".\Release Unicode (static)/" + ProgramDataBaseFileName=".\Release Unicode (static)/" + WarningLevel="3" + SuppressStartupBanner="true" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="2057" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + LinkIncremental="1" + SuppressStartupBanner="true" + GenerateDebugInformation="true" + OptimizeReferences="2" + EnableCOMDATFolding="2" + LinkTimeCodeGeneration="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + ImportLibrary=".\Release Unicode (static)/testplug.lib" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile=".\Release Unicode (static)/testplug.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release Unicode (service only)|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release Unicode (static)/testplug.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + InlineFunctionExpansion="1" + FavorSizeOrSpeed="2" + OmitFramePointers="true" + WholeProgramOptimization="true" + AdditionalIncludeDirectories="../../include" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + EnableEnhancedInstructionSet="1" + FloatingPointModel="0" + PrecompiledHeaderFile=".\Release Unicode (static)/testplug.pch" + AssemblerListingLocation=".\Release Unicode (static)/" + ObjectFile=".\Release Unicode (static)/" + ProgramDataBaseFileName=".\Release Unicode (static)/" + WarningLevel="3" + SuppressStartupBanner="true" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="2057" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + LinkIncremental="1" + SuppressStartupBanner="true" + GenerateDebugInformation="true" + OptimizeReferences="2" + EnableCOMDATFolding="2" + LinkTimeCodeGeneration="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + ImportLibrary=".\Release Unicode (static)/testplug.lib" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile=".\Release Unicode (static)/testplug.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug(service)|Win32" + OutputDirectory="$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Debug/testplug.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="../../include" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;TESTPLUG_EXPORTS;_CRT_SECURE_NO_WARNINGS" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + PrecompiledHeaderFile=".\Debug/testplug.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="2057" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + LinkIncremental="2" + SuppressStartupBanner="true" + GenerateDebugInformation="true" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + ImportLibrary=".\Debug/testplug.lib" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + SuppressStartupBanner="true" + OutputFile=".\Debug/testplug.bsc" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + <File + RelativePath=".\init.c" + > + </File> + <File + RelativePath=".\main.c" + > + </File> + <File + RelativePath=".\options.c" + > + </File> + <File + RelativePath=".\utilities.c" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl" + > + <File + RelativePath=".\commonheaders.h" + > + </File> + <File + RelativePath=".\constants.h" + > + </File> + <File + RelativePath=".\globals.h" + > + </File> + <File + RelativePath=".\m_music.h" + > + </File> + <File + RelativePath=".\main.h" + > + </File> + <File + RelativePath=".\resource.h" + > + </File> + <File + RelativePath=".\utilities.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + <File + RelativePath=".\watrack_mpd.rc" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> |