summaryrefslogtreecommitdiff
path: root/plugins/ExternalAPI/m_music.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ExternalAPI/m_music.h')
-rw-r--r--plugins/ExternalAPI/m_music.h213
1 files changed, 112 insertions, 101 deletions
diff --git a/plugins/ExternalAPI/m_music.h b/plugins/ExternalAPI/m_music.h
index f89dae99a0..24aacf22a9 100644
--- a/plugins/ExternalAPI/m_music.h
+++ b/plugins/ExternalAPI/m_music.h
@@ -4,73 +4,75 @@
#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
- DWORD kbps;
- DWORD khz;
- DWORD channels;
- DWORD track;
- DWORD total; // music length
- DWORD time; // elapsed time
- CHAR* wndtext; // window title
- CHAR* player; // player name
- DWORD plyver; // player version
- HANDLE icon; // player icon
- DWORD fsize; // media file size
- DWORD vbr;
- int status; // WAT_MES_* const
- HWND plwnd; // player window
- // video part
- DWORD codec;
- DWORD width;
- DWORD height;
- DWORD fps;
- __int64 date;
- CHAR* txtver;
- CHAR* lyric;
- CHAR* cover;
- DWORD volume;
- CHAR* url; // player homepage
+ CHAR* artist;
+ CHAR* title;
+ CHAR* album;
+ CHAR* genre;
+ CHAR* comment;
+ CHAR* year;
+ CHAR* mfile; // media file
+ DWORD kbps;
+ DWORD khz;
+ DWORD channels;
+ DWORD track;
+ DWORD total; // music length
+ DWORD time; // elapsed time
+ CHAR* wndtext; // window title
+ CHAR* player; // player name
+ DWORD plyver; // player version
+ HICON icon; // player icon
+ DWORD fsize; // media file size
+ DWORD vbr;
+ int status; // WAT_MES_* const
+ HWND plwnd; // player window
+ // video part
+ DWORD codec;
+ DWORD width;
+ DWORD height;
+ DWORD fps;
+ __int64 date;
+ CHAR* txtver;
+ CHAR* lyric;
+ CHAR* cover;
+ DWORD volume;
+ CHAR* url; // player homepage
+ HWND winampwnd; // player window
} SONGINFOA, *LPSONGINFOA;
typedef struct tSongInfo {
- WCHAR* artist;
- WCHAR* title;
- WCHAR* album;
- WCHAR* genre;
- WCHAR* comment;
- WCHAR* year;
- WCHAR* mfile; // media file
- DWORD kbps;
- DWORD khz;
- DWORD channels;
- DWORD track;
- DWORD total; // music length
- DWORD time; // elapsed time
- WCHAR* wndtext; // window title
- WCHAR* player; // player name
- DWORD* plyver; // player version
- HANDLE icon; // player icon
- DWORD fsize; // media file size
- DWORD vbr;
- int status; // WAT_MES_* const
- HWND plwnd; // player window
- // video part
- DWORD codec;
- DWORD width;
- DWORD height;
- DWORD fps;
- __int64 date;
- WCHAR* txtver;
- WCHAR* lyric;
- WCHAR* cover; // cover path
- DWORD volume;
- WCHAR* url; // player homepage
+ WCHAR* artist;
+ WCHAR* title;
+ WCHAR* album;
+ WCHAR* genre;
+ WCHAR* comment;
+ WCHAR* year;
+ WCHAR* mfile; // media file
+ DWORD kbps;
+ DWORD khz;
+ DWORD channels;
+ DWORD track;
+ DWORD total; // music length
+ DWORD time; // elapsed time
+ WCHAR* wndtext; // window title
+ WCHAR* player; // player name
+ DWORD plyver; // player version
+ HICON icon; // player icon
+ DWORD fsize; // media file size
+ DWORD vbr;
+ int status; // WAT_MES_* const
+ HWND plwnd; // player window
+ // video part
+ DWORD codec;
+ DWORD width;
+ DWORD height;
+ DWORD fps;
+ __int64 date;
+ WCHAR* txtver;
+ WCHAR* lyric;
+ WCHAR* cover;
+ DWORD volume;
+ WCHAR* url; // player homepage
+ HWND winampwnd; // player window
} SONGINFO, *LPSONGINFO;
#if defined(_UNICODE)
@@ -79,7 +81,7 @@ typedef struct tSongInfo {
#else
#define WAT_INF_TCHAR WAT_INF_ANSI
#define SongInfoT tSongInfoA
-#endif
+#endif
// result codes
#define WAT_RES_UNKNOWN -2
@@ -92,11 +94,6 @@ typedef struct tSongInfo {
#define WAT_RES_NEWFILE 3
#define WAT_RES_NEWPLAYER 4
-// result for MS_WAT_GETMUSICINFO service
-#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
@@ -106,13 +103,13 @@ typedef struct tSongInfo {
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
+ returns: WAT_RES_* 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);
+ PluginLink->CallService(MS_WAT_GETMUSICINFO,0,(LPARAM)&p);
*/
#define MS_WAT_GETMUSICINFO "WATrack/GetMusicInfo"
@@ -122,7 +119,7 @@ typedef struct tSongInfo {
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 mir_free
+ you must free given strings by miranda mmi.free
*/
#define MS_WAT_GETFILEINFO "WATrack/GetFileInfo"
@@ -229,12 +226,13 @@ typedef struct tSongInfo {
// ----------- Formats and players -----------
-// media file status
+// player status
-#define WAT_MES_STOPPED 0
-#define WAT_MES_PLAYING 1
-#define WAT_MES_PAUSED 2
-#define WAT_MES_UNKNOWN -1
+#define WAT_PLS_NOTFOUUND 0
+#define WAT_PLS_PLAYING 1
+#define WAT_PLS_PAUSED 2
+#define WAT_PLS_STOPPED 3
+#define WAT_PLS_UNKNOWN 4
#define WAT_ACT_REGISTER 1
#define WAT_ACT_UNREGISTER 2
@@ -261,9 +259,11 @@ typedef struct tSongInfo {
#define WAT_OPT_APPCOMMAND 0x01000 // Special (multimedia) key support
#define WAT_OPT_CHECKALL 0x02000 // Check all players
#define WAT_OPT_KEEPOLD 0x04000 // Keep Old opened file
-#define WAT_OPT_MULTITHREAD 0x08000 // Use multithread scan
+//#define WAT_OPT_MULTITHREAD 0x08000 // Use multithread scan
#define WAT_OPT_SINGLEINST 0x10000 // Single player instance
#define WAT_OPT_PLAYERDATA 0x20000 // (internal) to obtain player data
+#define WAT_OPT_CONTAINER 0x40000 // [formats] format is container (need to check full)
+#define WAT_OPT_UNKNOWNFMT 0x80000 // [formats] check unknown (not disabled) formats (info from player)
typedef BOOL (__cdecl *LPREADFORMATPROC)(LPSONGINFO Info);
@@ -304,18 +304,18 @@ typedef int (__cdecl *LPINFOPROC) (LPSONGINFO Info, int flags);
typedef int (__cdecl *LPCOMMANDPROC)(HWND wnd, int command, int value);
typedef struct tPlayerCell {
- CHAR* Desc; // Short player name
- UINT flags;
- HICON Icon; // can be 0. for registration only
- LPINITPROC Init; // LPINITPROC; can be NULL. initialize any data
- LPDEINITPROC DeInit; // LPDEINITPROC; can be NULL. finalize player processing
- LPCHECKPROC Check; // check player
- LPSTATUSPROC GetStatus; // tStatusProc; can be NULL. get player status
- 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* Notes; // any tips, notes etc for this player
+ CHAR* Desc; // Short player name
+ UINT flags;
+ HICON Icon; // can be 0. for registration only
+ LPINITPROC Init; // LPINITPROC; can be NULL. initialize any data
+ LPDEINITPROC DeInit; // LPDEINITPROC; can be NULL. finalize player processing
+ LPCHECKPROC Check; // check player
+ LPSTATUSPROC GetStatus; // tStatusProc; can be NULL. get player status
+ 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* Notes; // any tips, notes etc for this player
} PLAYERCELL, *LPPLAYERCELL;
/*
@@ -328,6 +328,17 @@ typedef struct tPlayerCell {
*/
#define MS_WAT_PLAYER "WATrack/Player"
+// --------- MyShows.ru ---------
+
+/*
+ Toggle MyShows scrobbling status
+ wParam,lParam=0
+ Returns: previous state
+*/
+#define MS_WAT_MYSHOWS "WATrack/MyShows"
+
+#define MS_WAT_MYSHOWSINFO "WATrack/MyShowsInfo"
+
// --------- Last FM ---------
/*
@@ -343,16 +354,16 @@ typedef struct tPlayerCell {
lParam: int language (first 2 bytes - 2-letters language code)
*/
typedef struct tLastFMInfo {
- UINT request; // 0 - artist, 1 - album, 2 - track
- WCHAR* artist; // artist
- WCHAR* album; // album or similar artists for Artist info request
- WCHAR* title; // track title
- WCHAR* tags; // tags
- WCHAR* info; // artist bio or wiki article
- WCHAR* image; // photo/cover link
- WCHAR* similar;
- WCHAR* release;
- UINT trknum;
+ UINT request; // 0 - artist, 1 - album, 2 - track
+ WCHAR* artist; // artist
+ WCHAR* album; // album or similar artists for Artist info request
+ WCHAR* title; // track title
+ WCHAR* tags; // tags
+ WCHAR* info; // artist bio or wiki article
+ WCHAR* image; // photo/cover link
+ WCHAR* similar;
+ WCHAR* release;
+ UINT trknum;
}PLASTFMINFO, *LPLASTFMINFO;
#define MS_WAT_LASTFMINFO "WATrack/LastFMInfo"