The Winamp Remote Control suite
a remote control client and plugin for Winamp 2.x, 5.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
waint.h File Reference
#include "windows.h"
#include <iosfwd>

Go to the source code of this file.

Enumerations

enum  WAPlaybackStatus { WA_NOT_PLAYING, WA_PLAYING, WA_UNUSED, WA_PAUSED }
enum  WinampCommand {
  IPC_GETVERSION = 0, IPC_PLAYFILE = 100, IPC_DELETE = 101, IPC_STARTPLAY = 102,
  IPC_CHDIR = 103, IPC_ISPLAYING = 104, IPC_GETOUTPUTTIME = 105, IPC_JUMPTOTIME = 106,
  IPC_WRITEPLAYLIST = 120, IPC_SETPLAYLISTPOS = 121, IPC_SETVOLUME = 122, IPC_SETPANNING = 123,
  IPC_GETLISTLENGTH = 124, IPC_GETLISTPOS = 125, IPC_GETINFO = 126, IPC_GETEQDATA = 127,
  IPC_SETEQDATA = 128, IPC_GETPLAYLISTFILE = 211, IPC_GETPLAYLISTTITLE = 212, IPC_GETSHUFFLEOPTION = 250,
  IPC_GETREPEATOPTION = 251, IPC_SETSHUFFLEOPTION = 252, IPC_SETREPEATOPTION = 253, WINAMP_FILE_QUIT = 40001,
  WINAMP_OPTIONS_PREFS = 40012, WINAMP_OPTIONS_AOT = 40019, WINAMP_FILE_REPEAT = 40022, WINAMP_FILE_SHUFFLE = 40023,
  WINAMP_HIGH_PRIORITY = 40025, WINAMP_FILE_PLAY = 40029, WINAMP_OPTIONS_EQ = 40036, WINAMP_HELP_ABOUT = 40041,
  WINAMP_OPTIONS_PLEDIT = 40040, WINAMP_VOLUMEUP = 40058, WINAMP_VOLUMEDOWN = 40059, WINAMP_FFWD5S = 40060,
  WINAMP_REW5S = 40061
}
enum  WinampButtons {
  WINAMP_BUTTON1 = 40044, WINAMP_BUTTON2 = 40045, WINAMP_BUTTON3 = 40046, WINAMP_BUTTON4 = 40047,
  WINAMP_BUTTON5 = 40048, WINAMP_BUTTON1_SHIFT = 40144, WINAMP_BUTTON2_SHIFT = 40145, WINAMP_BUTTON3_SHIFT = 40146,
  WINAMP_BUTTON4_SHIFT = 40147, WINAMP_BUTTON5_SHIFT = 40148, WINAMP_BUTTON1_CTRL = 40154, WINAMP_BUTTON2_CTRL = 40155,
  WINAMP_BUTTON3_CTRL = 40156, WINAMP_BUTTON4_CTRL = 40157, WINAMP_BUTTON5_CTRL = 40158
}
enum  WinampCommandButtons {
  WINAMP_PREVIOUS = WINAMP_BUTTON1, WINAMP_PLAYENTRY = WINAMP_BUTTON2, WINAMP_PAUSE = WINAMP_BUTTON3, WINAMP_STOP = WINAMP_BUTTON4,
  WINAMP_NEXT = WINAMP_BUTTON5, WINAMP_BACK5S = WINAMP_BUTTON1_SHIFT, WINAMP_OPENFILE = WINAMP_BUTTON2_SHIFT, WINAMP_STOPFADE = WINAMP_BUTTON4_SHIFT,
  WINAMP_FORWARD5S = WINAMP_BUTTON5_SHIFT, WINAMP_STARTOFPLAYLIST = WINAMP_BUTTON1_CTRL, WINAMP_OPENLOCATION = WINAMP_BUTTON2_CTRL, WINAMP_STOPAFTERCURRENT = WINAMP_BUTTON4_CTRL,
  WINAMP_ENDOFPLAYLIST = WINAMP_BUTTON5_CTRL
}
enum  WinampPlaylistOptions {
  IDC_SORT_FILENAME = 40166, IDC_SORT_FILETITLE = 40167, IDC_SORT_ENTIREFILENAME = 40168, IDC_SELECTALL = 40169,
  IDC_SELECTNONE = 40170, IDC_SELECTINV = 40171
}
enum  WinampEQOptions {
  IDM_EQ_LOADPRE = 40172, IDM_EQ_LOADMP3 = 40173, IDM_EQ_LOADDEFAULT = 40174, IDM_EQ_SAVEPRE = 40175,
  IDM_EQ_SAVEMP3 = 40176, IDM_EQ_SAVEDEFAULT = 40177, IDM_EQ_DELPRE = 40178, IDM_EQ_DELMP3 = 40180
}
enum  WinampJumpOptions {
  WINAMP_JUMP = 40193, WINAMP_JUMPFILE = 40194, WINAMP_JUMP10FWD = 40195, WINAMP_JUMP10BACK = 40197,
  WINAMP_PREVSONG = 40198
}

Functions

std::ostream & operator<< (std::ostream &os, WAPlaybackStatus status)
std::ostream & operator<< (std::ostream &os, WinampCommand command)
HWND setWinampHwnd (HWND HWinamp)
void LocalExecuteCommand (HWND HWinamp, WinampCommand MessageToExecute)
void LocalExecuteStringCommand (HWND HWinamp, const char *CommandString, WinampCommand Command)
int LocalQueryInt (HWND HWinamp, WinampCommand Command, int Data)
char * LocalQueryString (HWND HWinamp, WinampCommand Command, int Data)
const char * LocalGetWinampVersion (HWND HWinamp)
const char * WinampCommandDesc (int Command)
const char * WinampVersionString (int version)

Enumeration Type Documentation

Enumerator:
WA_NOT_PLAYING 
WA_PLAYING 
WA_UNUSED 
WA_PAUSED 

Definition at line 12 of file waint.h.

Winamp button definitions

Enumerator:
WINAMP_BUTTON1 
WINAMP_BUTTON2 
WINAMP_BUTTON3 
WINAMP_BUTTON4 
WINAMP_BUTTON5 
WINAMP_BUTTON1_SHIFT 
WINAMP_BUTTON2_SHIFT 
WINAMP_BUTTON3_SHIFT 
WINAMP_BUTTON4_SHIFT 
WINAMP_BUTTON5_SHIFT 
WINAMP_BUTTON1_CTRL 
WINAMP_BUTTON2_CTRL 
WINAMP_BUTTON3_CTRL 
WINAMP_BUTTON4_CTRL 
WINAMP_BUTTON5_CTRL 

Definition at line 85 of file waint.h.

Winamp basic operations

Enumerator:
IPC_GETVERSION 
IPC_PLAYFILE 
IPC_DELETE 
IPC_STARTPLAY 
IPC_CHDIR 
IPC_ISPLAYING 
IPC_GETOUTPUTTIME 
IPC_JUMPTOTIME 
IPC_WRITEPLAYLIST 
IPC_SETPLAYLISTPOS 
IPC_SETVOLUME 
IPC_SETPANNING 
IPC_GETLISTLENGTH 
IPC_GETLISTPOS 
IPC_GETINFO 
IPC_GETEQDATA 
IPC_SETEQDATA 
IPC_GETPLAYLISTFILE 
IPC_GETPLAYLISTTITLE 
IPC_GETSHUFFLEOPTION 
IPC_GETREPEATOPTION 
IPC_SETSHUFFLEOPTION 
IPC_SETREPEATOPTION 
WINAMP_FILE_QUIT 
WINAMP_OPTIONS_PREFS 
WINAMP_OPTIONS_AOT 
WINAMP_FILE_REPEAT 
WINAMP_FILE_SHUFFLE 
WINAMP_HIGH_PRIORITY 
WINAMP_FILE_PLAY 
WINAMP_OPTIONS_EQ 
WINAMP_HELP_ABOUT 
WINAMP_OPTIONS_PLEDIT 
WINAMP_VOLUMEUP 
WINAMP_VOLUMEDOWN 
WINAMP_FFWD5S 
WINAMP_REW5S 

Definition at line 28 of file waint.h.

aliases for convenience...

Enumerator:
WINAMP_PREVIOUS 
WINAMP_PLAYENTRY 
WINAMP_PAUSE 
WINAMP_STOP 
WINAMP_NEXT 
WINAMP_BACK5S 
WINAMP_OPENFILE 
WINAMP_STOPFADE 
WINAMP_FORWARD5S 
WINAMP_STARTOFPLAYLIST 
WINAMP_OPENLOCATION 
WINAMP_STOPAFTERCURRENT 
WINAMP_ENDOFPLAYLIST 

Definition at line 106 of file waint.h.

Winamp directives for the Equaliser view

Enumerator:
IDM_EQ_LOADPRE 
IDM_EQ_LOADMP3 
IDM_EQ_LOADDEFAULT 
IDM_EQ_SAVEPRE 
IDM_EQ_SAVEMP3 
IDM_EQ_SAVEDEFAULT 
IDM_EQ_DELPRE 
IDM_EQ_DELMP3 

Definition at line 143 of file waint.h.

More advanced navigation directives

Enumerator:
WINAMP_JUMP 
WINAMP_JUMPFILE 
WINAMP_JUMP10FWD 
WINAMP_JUMP10BACK 
WINAMP_PREVSONG 

Definition at line 158 of file waint.h.

Winamp directives for the Playlist view

Enumerator:
IDC_SORT_FILENAME 
IDC_SORT_FILETITLE 
IDC_SORT_ENTIREFILENAME 
IDC_SELECTALL 
IDC_SELECTNONE 
IDC_SELECTINV 

Definition at line 130 of file waint.h.


Function Documentation

void LocalExecuteCommand ( HWND  HWinamp,
WinampCommand  MessageToExecute 
)

Executes the Winamp API message on the current target handle

Parameters:
HWinampwindow handle of the winamp instance
MessageToExecutewinamp command ID returns nothing

Definition at line 71 of file waint.cpp.

Referenced by WinampRemote::Server::WinampServer::ExecuteCommand().

void LocalExecuteStringCommand ( HWND  HWinamp,
const char *  CommandString,
WinampCommand  Command 
)

Executes the Winamp string based API command on the current target handle.

Parameters:
HWinampwindow handle of the winamp instance
CommandString- input parameter
Command- the winamp API command returns nothing

Definition at line 77 of file waint.cpp.

Referenced by WinampRemote::Server::WinampServer::ExecuteStringCommand().

const char* LocalGetWinampVersion ( HWND  HWinamp)

Utility function that returns the winamp version description string, according to the known formatting rules. Caters for new standard format Winamp versions and no version.

Parameters:
HWinampwindow handle of the winamp instance
Returns:
the string for the Winamp version

Definition at line 170 of file waint.cpp.

int LocalQueryInt ( HWND  HWinamp,
WinampCommand  Command,
int  Data 
)

Queries the Winamp API for an integer value.

Parameters:
HWinampwindow handle of the winamp instance
Command
Data- the winamp API command
Returns:
the result of the query

Definition at line 88 of file waint.cpp.

Referenced by LocalGetWinampVersion(), and WinampRemote::Server::WinampServer::QueryInt().

char* LocalQueryString ( HWND  HWinamp,
WinampCommand  Command,
int  Data 
)

Queries the Winamp API for a string value.

Parameters:
HWinampwindow handle of the winamp instance
Command
Data- the winamp API command
Returns:
in-process the pointer to the char data for the the result

Definition at line 94 of file waint.cpp.

Referenced by WinampRemote::Server::WinampServer::QueryString().

std::ostream& operator<< ( std::ostream &  os,
WAPlaybackStatus  status 
)
Parameters:
osthe output stream
statusthe playback status
Returns:
streams out the string representation

Definition at line 37 of file waint.cpp.

std::ostream& operator<< ( std::ostream &  os,
WinampCommand  command 
)
Parameters:
osthe output stream
commandthe command
Returns:
streams out the string representation

Definition at line 55 of file waint.cpp.

HWND setWinampHwnd ( HWND  HWinamp)

Sets the target handle for the message based API can come from a FindWindow, for example or from the in-process value returned

Parameters:
HWinamp
Returns:
prior value of the target handle
const char* WinampCommandDesc ( int  Command)

Utility function to name the Winamp commands.

Parameters:
Command
Returns:
the Winamp API command description constant

Definition at line 177 of file waint.cpp.

Referenced by operator<<().

const char* WinampVersionString ( int  version)

Utility function to name the Winamp version from the version number.

Parameters:
version
Returns:
the string for the Winamp version

Definition at line 122 of file waint.cpp.

Referenced by LocalGetWinampVersion(), main(), ServerTester::testServer(), and WinampRemote::Server::WinampServer::WinampVersion().