summaryrefslogtreecommitdiff
path: root/plugins/!NotAdopted/WinterSpeak/general/multimedia/winamp_2/winamp_2.h
blob: 372d1e38d9a7377d1c6e9fc5205688be5cf75714 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef guard_general_multimedia_winamp_2_winamp_2_h
#define guard_general_multimedia_winamp_2_winamp_2_h
//==============================================================================
// General Code, © 2002 Ryan Winter
//==============================================================================

#include <windows.h>

class Winamp2
{
  public:
    Winamp2();
    ~Winamp2();

    enum PlayState
    {
        PlayState_Unknown,
        PlayState_Stopped,
        PlayState_Playing,
        PlayState_Paused,
    };

	//--------------------------------------------------------------------------
	// Description : play/pause/stop the current song
	//--------------------------------------------------------------------------
    void play();
    void stop();
    void pause();

	//--------------------------------------------------------------------------
	// Description : restore winamp to its previoud play state
    // Return      : the play state winamp has been restored to
	//--------------------------------------------------------------------------
    PlayState restoreState();

  private:
	//--------------------------------------------------------------------------
	// Description : get the handle to the winamp application
    // Parameters  : handle - where to place the handle
    // Returns     : true - the handle was found
    //               false - the handle wasn't found
	//--------------------------------------------------------------------------
    bool getHandle(HWND &handle);

	//--------------------------------------------------------------------------
	// Description : get the current state of the winamp application
	//--------------------------------------------------------------------------
    PlayState getState();

    PlayState m_state;    
};

//==============================================================================
//
//  Summary     : Control Winamp 2.x
//
//  Description : Allows remote control over numberous winamp 2.x setting
//                including volume, play, pause, stop etc.
//
//==============================================================================

#endif