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
RPCExecutor.cpp File Reference
#include "RPCExecutor.h"
#include "RPCErrors.h"
#include "winampinterface.h"
#include "waint.h"
#include <sstream>

Go to the source code of this file.

Namespaces

namespace  WinampRemote
namespace  WinampRemote::Server

Macros

#define __try   try

Functions

void *__stdcall MIDL_user_allocate (size_t size)
void __stdcall MIDL_user_free (void *mem)
static void MainMessage (const char *msgString)
static void MainStatus (const char *msgString)
static
WinampRemote::Server::IWinampServer
winampServer ()
string queryLogFormat (const char *strSender, long command, long data)
string commandLogFormat (const char *strSender, long command, const char *strParam=NULL)
void WAMessageProc (unsigned char __RPC_FAR *pszString)
 simple probing function
void WAExecuteMessage (unsigned char __RPC_FAR *pszString, long command)
 execute winamp command
void WAExecuteMessageString (unsigned char __RPC_FAR *pszString, unsigned char __RPC_FAR *pszParam, long command)
 execute winamp command with string parameter
long WAIntegerResult (unsigned char __RPC_FAR *pszString, long command, long data)
 execute winamp function and return long integer result
long WAStringResult (unsigned char __RPC_FAR pszString[260], long command, long data)
 execute winamp function and return string result
void WAShutdown (void)
 Shutdown function - do not call.
void WASetStringList (unsigned char __RPC_FAR *pszString, byte __RPC_FAR Buffer[], unsigned long BufferLength, long command)
 sets a list in TStrings format with the command supplied
static void populateBuffer (BUFFER *pBuffer, std::string &buffer)
void WAGetStringList (unsigned char __RPC_FAR *pszString, BUFFER __RPC_FAR *pBuffer, long command)
 sets a list in TStrings format from the result of command supplied
void WAGetStringDataList (unsigned char __RPC_FAR *pszString, BUFFER __RPC_FAR *pBuffer, long stringcommand, long datacommand, long datadata)
 sets a list in TStrings format from the result of commands supplied

Macro Definition Documentation

#define __try   try

Definition at line 13 of file RPCExecutor.cpp.


Function Documentation

string commandLogFormat ( const char *  strSender,
long  command,
const char *  strParam = NULL 
)

Definition at line 207 of file RPCExecutor.cpp.

Referenced by WAExecuteMessage(), and WAExecuteMessageString().

static void MainMessage ( const char *  msgString)
inlinestatic
static void MainStatus ( const char *  msgString)
inlinestatic
void* __stdcall MIDL_user_allocate ( size_t  size)

Definition at line 30 of file RPCExecutor.cpp.

Referenced by populateBuffer().

void __stdcall MIDL_user_free ( void *  mem)
static void populateBuffer ( BUFFER pBuffer,
std::string &  buffer 
)
inlinestatic

Definition at line 358 of file RPCExecutor.cpp.

Referenced by WAGetStringDataList(), and WAGetStringList().

string queryLogFormat ( const char *  strSender,
long  command,
long  data 
)

Definition at line 197 of file RPCExecutor.cpp.

Referenced by WAIntegerResult(), and WAStringResult().

void WAExecuteMessage ( unsigned char __RPC_FAR *  pszString,
long  command 
)

execute winamp command

Parameters:
pszStringthe string
commandthe winamp command

Definition at line 241 of file RPCExecutor.cpp.

Referenced by ExecuteMessage(), SafeExecuteMessage(), and winamp_WAExecuteMessage().

void WAExecuteMessageString ( unsigned char __RPC_FAR *  pszString,
unsigned char __RPC_FAR *  pszParam,
long  command 
)

execute winamp command with string parameter

Parameters:
pszStringthe string
pszParamthe string parameter
commandthe winamp command

Definition at line 259 of file RPCExecutor.cpp.

Referenced by ExecuteStringMessage(), SafeExecuteStringMessage(), and winamp_WAExecuteMessageString().

void WAGetStringDataList ( unsigned char __RPC_FAR *  pszString,
BUFFER __RPC_FAR *  pBuffer,
long  stringcommand,
long  datacommand,
long  datadata 
)

sets a list in TStrings format from the result of commands supplied

Parameters:
pszStringthe string
pBufferthe text buffer
stringcommandthe string query query
datacommandthe data query
datadatathe data parameter

Definition at line 412 of file RPCExecutor.cpp.

Referenced by GetStringDataList(), and winamp_WAGetStringDataList().

void WAGetStringList ( unsigned char __RPC_FAR *  pszString,
BUFFER __RPC_FAR *  pBuffer,
long  command 
)

sets a list in TStrings format from the result of command supplied

Parameters:
pszStringthe string
pBufferthe text buffer
commandthe winamp command

Definition at line 379 of file RPCExecutor.cpp.

Referenced by GetStringList(), WinampRemote::Client::WinampClientBase::getStringList(), SafeGetStringList(), and winamp_WAGetStringList().

long WAIntegerResult ( unsigned char __RPC_FAR *  pszString,
long  command,
long  data 
)

execute winamp function and return long integer result

Parameters:
pszStringthe string
commandthe winamp command
dataa data parameter

Definition at line 277 of file RPCExecutor.cpp.

Referenced by IntegerResult(), SafeIntegerResult(), and winamp_WAIntegerResult().

void WAMessageProc ( unsigned char __RPC_FAR *  pszString)

simple probing function

Parameters:
pszStringthe string

Definition at line 225 of file RPCExecutor.cpp.

Referenced by SafeSendString(), SendString(), and winamp_WAMessageProc().

void WASetStringList ( unsigned char __RPC_FAR *  pszString,
byte __RPC_FAR  Buffer[],
unsigned long  BufferLength,
long  command 
)

sets a list in TStrings format with the command supplied

Parameters:
pszStringthe string
Bufferthe text buffer
BufferLengththe buffer length
commandthe winamp command

Definition at line 335 of file RPCExecutor.cpp.

Referenced by SafeSetStringList(), SetStringList(), WinampRemote::Client::WinampClientBase::setStringList(), and winamp_WASetStringList().

void WAShutdown ( void  )

Shutdown function - do not call.

Definition at line 318 of file RPCExecutor.cpp.

Referenced by Shutdown(), TfrmPluginMain::StopThread(), and winamp_WAShutdown().

long WAStringResult ( unsigned char __RPC_FAR  pszString[260],
long  command,
long  data 
)

execute winamp function and return string result

Parameters:
pszStringthe string
commandthe winamp command
dataa data parameter

Definition at line 297 of file RPCExecutor.cpp.

Referenced by SafeStringResult(), StringResult(), and winamp_WAStringResult().