waservicefactory.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. // ----------------------------------------------------------------------------
  2. // Generated by InterfaceFactory [Wed May 07 00:57:16 2003]
  3. //
  4. // File : waservicefactory.h
  5. // Class : waServiceFactory
  6. // class layer : Dispatchable Interface
  7. // ----------------------------------------------------------------------------
  8. #ifndef __WASERVICEFACTORY_H
  9. #define __WASERVICEFACTORY_H
  10. #include "../../bfc/dispatch.h"
  11. #include "../../bfc/nsguid.h"
  12. #include "api_service.h"
  13. // ----------------------------------------------------------------------------
  14. class NOVTABLE waServiceFactory: public Dispatchable {
  15. protected:
  16. waServiceFactory() throw() {}
  17. ~waServiceFactory() throw() {}
  18. protected:
  19. public:
  20. FOURCC getServiceType();
  21. const char *getServiceName();
  22. GUID getGuid();
  23. void *getInterface(int global_lock = TRUE);
  24. int supportNonLockingGetInterface();
  25. int releaseInterface(void *ifc);
  26. const wchar_t *getTestString();
  27. int serviceNotify(int msg, intptr_t param1 = 0, intptr_t param2 = 0);
  28. protected:
  29. enum {
  30. WASERVICEFACTORY_GETSERVICETYPE = 100,
  31. WASERVICEFACTORY_GETSERVICENAME = 200,
  32. WASERVICEFACTORY_GETGUID = 210,
  33. WASERVICEFACTORY_GETINTERFACE = 300,
  34. WASERVICEFACTORY_SUPPORTNONLOCKINGGETINTERFACE = 301,
  35. WASERVICEFACTORY_RELEASEINTERFACE = 310,
  36. WASERVICEFACTORY_GETTESTSTRING = 500,
  37. WASERVICEFACTORY_SERVICENOTIFY = 600,
  38. };
  39. };
  40. // ----------------------------------------------------------------------------
  41. inline FOURCC waServiceFactory::getServiceType() {
  42. FOURCC __retval = _call(WASERVICEFACTORY_GETSERVICETYPE, (FOURCC)NULL);
  43. return __retval;
  44. }
  45. inline const char *waServiceFactory::getServiceName() {
  46. const char *__retval = _call(WASERVICEFACTORY_GETSERVICENAME, (const char *)0);
  47. return __retval;
  48. }
  49. inline GUID waServiceFactory::getGuid() {
  50. GUID __retval = _call(WASERVICEFACTORY_GETGUID, INVALID_GUID);
  51. return __retval;
  52. }
  53. inline void *waServiceFactory::getInterface(int global_lock) {
  54. void *__retval = _call(WASERVICEFACTORY_GETINTERFACE, (void *)NULL, global_lock);
  55. #if 0 // unused in Winamp 5
  56. // -- generated code - edit in waservicefactoryi.h
  57. // support old code that always locks even when global_lock==FALSE
  58. if (!global_lock && __retval != NULL && !supportNonLockingGetInterface())
  59. WASABI_API_SVC->service_unlock(__retval);
  60. #endif
  61. return __retval;
  62. }
  63. inline int waServiceFactory::supportNonLockingGetInterface() {
  64. int __retval = _call(WASERVICEFACTORY_SUPPORTNONLOCKINGGETINTERFACE, (int)0);
  65. return __retval;
  66. }
  67. inline int waServiceFactory::releaseInterface(void *ifc) {
  68. int __retval = _call(WASERVICEFACTORY_RELEASEINTERFACE, (int)0, ifc);
  69. return __retval;
  70. }
  71. inline const wchar_t *waServiceFactory::getTestString() {
  72. return _call(WASERVICEFACTORY_GETTESTSTRING, (const wchar_t *)0);
  73. }
  74. inline int waServiceFactory::serviceNotify(int msg, intptr_t param1, intptr_t param2) {
  75. int __retval = _call(WASERVICEFACTORY_SERVICENOTIFY, (int)0, msg, param1, param2);
  76. return __retval;
  77. }
  78. // ----------------------------------------------------------------------------
  79. #endif // __WASERVICEFACTORY_H