- Install to ~/.local/bin/winamp-mpris - Use ~/.local/state/winamp-mpris/bridge.log for logging - Use $XDG_RUNTIME_DIR/winamp-mpris.pid for PID management - Add detailed user notification for 401 Unauthorized errors - Add install.sh for automated, standard-compliant setup - Include Winamp Web Interface source code and installer in repository
62 lines
2.0 KiB
C
62 lines
2.0 KiB
C
|
|
// Winamp actions
|
|
#define WA_PREV 101
|
|
#define WA_PLAY 102
|
|
#define WA_PAUSE 103
|
|
#define WA_STOP 104
|
|
#define WA_NEXT 105
|
|
|
|
#define RES_OK 201
|
|
#define RES_AUTH 202
|
|
#define RES_NOTFOUND 205
|
|
#define RES_BADREQUEST 206
|
|
#define RES_UNKNOWN 203
|
|
#define RES_FAIL 204
|
|
|
|
#define TIMER_ID 30
|
|
|
|
|
|
// config.cpp
|
|
void NewConfig();
|
|
BOOL CALLBACK ConfigServerWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
BOOL CALLBACK ConfigSystrayWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
BOOL CALLBACK ConfigAuthWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
BOOL CALLBACK ConfigAboutWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
BOOL CALLBACK ConfigWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam);
|
|
void config_write();
|
|
void config_read();
|
|
BOOL CALLBACK VolumeWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam);
|
|
|
|
|
|
|
|
// connection.cpp
|
|
bool StartWinSock();
|
|
void prints(SOCKET socket, char * string);
|
|
void printsi(SOCKET socket,int number);
|
|
bool MakeRequest(char * host, int port, char * url, bool verbose, bool auth, bool gettitle);
|
|
int WASend(char * command);
|
|
void ToBase64(char * instr, char * outstr);
|
|
int GetResponse(SOCKET socket, bool gettitle);
|
|
char * GetAString(char* chptr, char* text);
|
|
char * SkipHeader(char * chptr);
|
|
char * GetALine(char * chptr, char * text);
|
|
bool StrComp(char * string1, char * string2);
|
|
char ToLowerCase(char c);
|
|
|
|
// main.cpp
|
|
int APIENTRY WinMain(HINSTANCE hInstance,
|
|
HINSTANCE hPrevInstance,
|
|
LPSTR lpCmdLine,
|
|
int nCmdShow);
|
|
|
|
void SendDefaultAction();
|
|
int GetIconID();
|
|
LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
int systray_modify(HWND hwnd, UINT uID, HICON hIcon, LPSTR lpszTip);
|
|
int systray_add(HWND hwnd, UINT uID, HICON hIcon, LPSTR lpszTip);
|
|
int systray_del(HWND hwnd, UINT uID);
|
|
|
|
|
|
// title.cpp
|
|
DWORD WINAPI TitleThread(LPVOID param);
|