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
|
// ----------------------------------------------------------------------------
// Generated by InterfaceFactory [Wed May 07 00:57:16 2003]
//
// File : waservicefactory.h
// Class : waServiceFactory
// class layer : Dispatchable Interface
// ----------------------------------------------------------------------------
#ifndef __WASERVICEFACTORY_H
#define __WASERVICEFACTORY_H
#include <bfc/dispatch.h>
#include <bfc/nsguid.h>
#include "api_service.h"
// ----------------------------------------------------------------------------
class NOVTABLE waServiceFactory : public Dispatchable
{
protected:
waServiceFactory() throw( ) {}
~waServiceFactory() {}
public:
FOURCC getServiceType();
const char *getServiceName();
GUID getGuid();
const wchar_t *getTestString();
void *getInterface( int global_lock = TRUE );
int releaseInterface( void *ifc );
int supportNonLockingGetInterface();
int serviceNotify( int msg, intptr_t param1 = 0, intptr_t param2 = 0 );
protected:
enum
{
WASERVICEFACTORY_GETSERVICETYPE = 100,
WASERVICEFACTORY_GETSERVICENAME = 200,
WASERVICEFACTORY_GETGUID = 210,
WASERVICEFACTORY_GETINTERFACE = 300,
WASERVICEFACTORY_SUPPORTNONLOCKINGGETINTERFACE = 301,
WASERVICEFACTORY_RELEASEINTERFACE = 310,
WASERVICEFACTORY_GETTESTSTRING = 500,
WASERVICEFACTORY_SERVICENOTIFY = 600,
};
};
// ----------------------------------------------------------------------------
inline FOURCC waServiceFactory::getServiceType()
{
FOURCC __retval = _call( WASERVICEFACTORY_GETSERVICETYPE, (FOURCC)NULL );
return __retval;
}
inline const char *waServiceFactory::getServiceName()
{
const char *__retval = _call( WASERVICEFACTORY_GETSERVICENAME, (const char *)0 );
return __retval;
}
inline GUID waServiceFactory::getGuid()
{
GUID __retval = _call( WASERVICEFACTORY_GETGUID, INVALID_GUID );
return __retval;
}
inline const wchar_t *waServiceFactory::getTestString()
{
return _call( WASERVICEFACTORY_GETTESTSTRING, (const wchar_t *)0 );
}
inline void *waServiceFactory::getInterface( int global_lock )
{
void *__retval = _call( WASERVICEFACTORY_GETINTERFACE, (void *)NULL, global_lock );
#if 0 // unused in Winamp 5
// -- generated code - edit in waservicefactoryi.h
// support old code that always locks even when global_lock==FALSE
if ( !global_lock && __retval != NULL && !supportNonLockingGetInterface() )
WASABI_API_SVC->service_unlock( __retval );
#endif
return __retval;
}
inline int waServiceFactory::releaseInterface( void *ifc )
{
int __retval = _call( WASERVICEFACTORY_RELEASEINTERFACE, (int)0, ifc );
return __retval;
}
inline int waServiceFactory::supportNonLockingGetInterface()
{
int __retval = _call( WASERVICEFACTORY_SUPPORTNONLOCKINGGETINTERFACE, (int)0 );
return __retval;
}
inline int waServiceFactory::serviceNotify( int msg, intptr_t param1, intptr_t param2 )
{
int __retval = _call( WASERVICEFACTORY_SERVICENOTIFY, (int)0, msg, param1, param2 );
return __retval;
}
// ----------------------------------------------------------------------------
#endif // __WASERVICEFACTORY_H
|