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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
#ifndef NULLSOFT_WINAMP_SETUP_SERVICE_HEADER
#define NULLSOFT_WINAMP_SETUP_SERVICE_HEADER
#include <bfc/dispatch.h>
#include "./ifc_setuppage.h"
#include "./ifc_setupjob.h"
#include <windows.h>
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
#ifdef __cplusplus
}
#endif // __cplusplus
class api_service;
typedef BOOL (__cdecl *Plugin_RegisterSetup)(HINSTANCE /*hInstance*/, api_service* /*serviceApi*/);
class __declspec(novtable) svc_setup : public Dispatchable
{
protected:
svc_setup(void) {};
~svc_setup(void) {};
public:
HRESULT InsertPage(ifc_setuppage *pPage, int* pIndex);
HRESULT RemovePage(int index);
HRESULT GetPageCount(int* pCount);
HRESULT GetPage(int index, ifc_setuppage **pPage);
HRESULT GetActiveIndex(int*pIndex);
HRESULT Start(HWND hwndWinamp);
HRESULT AddJob(ifc_setupjob *pJob);
HRESULT RemoveJob(ifc_setupjob *pJob);
HRESULT CreateStatusWnd(HWND *phwndStatus);
HRESULT Save(HWND hwndStatus);
HRESULT ExecJobs(HWND hwndStatus);
HRESULT GetWinampWnd(HWND *phwndWinamp); // this call will return S_OK only after setup->Start()
public:
DISPATCH_CODES
{
API_SETUP_INSERT_PAGE = 10,
API_SETUP_REMOVE_PAGE = 20,
API_SETUP_GET_PAGE_COUNT= 30,
API_SETUP_GET_PAGE= 40,
API_SETUP_GET_ACTIVE_INDEX = 50,
API_SETUP_START = 60,
API_SETUP_ADD_JOB = 70,
API_SETUP_REMOVE_JOB = 80,
API_SETUP_CREATE_STATUSWND = 90,
API_SETUP_SAVE = 100,
API_SETUP_EXECJOBS = 110,
API_SETUP_GETWINAMPWND = 120,
};
};
inline HRESULT svc_setup::InsertPage(ifc_setuppage *pPage, int* pIndex)
{
return _call(API_SETUP_INSERT_PAGE, E_NOTIMPL, pPage, pIndex);
}
inline HRESULT svc_setup::RemovePage(int index)
{
return _call(API_SETUP_REMOVE_PAGE, E_NOTIMPL, index);
}
inline HRESULT svc_setup::GetPageCount(int* pCount)
{
return _call(API_SETUP_GET_PAGE_COUNT, E_NOTIMPL, pCount);
}
inline HRESULT svc_setup::GetPage(int index, ifc_setuppage **pPage)
{
return _call(API_SETUP_GET_PAGE, E_NOTIMPL, index, pPage);
}
inline HRESULT svc_setup::GetActiveIndex(int*pIndex)
{
return _call(API_SETUP_GET_ACTIVE_INDEX, E_NOTIMPL, pIndex);
}
inline HRESULT svc_setup::Start(HWND hwndWinamp)
{
return _call(API_SETUP_START, E_NOTIMPL, hwndWinamp);
}
inline HRESULT svc_setup::AddJob(ifc_setupjob *pJob)
{
return _call(API_SETUP_ADD_JOB, E_NOTIMPL, pJob);
}
inline HRESULT svc_setup::RemoveJob(ifc_setupjob *pJob)
{
return _call(API_SETUP_REMOVE_JOB, E_NOTIMPL, pJob);
}
inline HRESULT svc_setup::CreateStatusWnd(HWND *phwndStatus)
{
return _call(API_SETUP_CREATE_STATUSWND, E_NOTIMPL, phwndStatus);
}
inline HRESULT svc_setup::Save(HWND hwndStatus)
{
return _call(API_SETUP_SAVE, E_NOTIMPL, hwndStatus);
}
inline HRESULT svc_setup::ExecJobs(HWND hwndStatus)
{
return _call(API_SETUP_EXECJOBS, E_NOTIMPL, hwndStatus);
}
inline HRESULT svc_setup::GetWinampWnd(HWND *phwndWinamp)
{
return _call(API_SETUP_GETWINAMPWND, E_NOTIMPL, phwndWinamp);
}
// {A7281DEB-9DA8-4ee9-93A8-2E0B8F5F1805}
static const GUID UID_SVC_SETUP = { 0xa7281deb, 0x9da8, 0x4ee9, { 0x93, 0xa8, 0x2e, 0xb, 0x8f, 0x5f, 0x18, 0x5 } };
#endif //NULLSOFT_WINAMP_SETUP_SERVICE_HEADER
|