ifc_omserviceeditor.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. #ifndef NULLSOFT_WINAMP_OMSERVICE_EDITOR_INTERFACE_HEADER
  2. #define NULLSOFT_WINAMP_OMSERVICE_EDITOR_INTERFACE_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. // {D0EC78E6-3115-4171-BD99-C500CC66DDAC}
  7. static const GUID IFC_OmServiceEditor =
  8. { 0xd0ec78e6, 0x3115, 0x4171, { 0xbd, 0x99, 0xc5, 0x0, 0xcc, 0x66, 0xdd, 0xac } };
  9. #include <bfc/dispatch.h>
  10. class __declspec(novtable) ifc_omserviceeditor : public Dispatchable
  11. {
  12. public:
  13. typedef enum
  14. {
  15. modifiedName = 0x00000001,
  16. modifiedUrl = 0x00000002,
  17. modifiedIcon = 0x00000004,
  18. modifiedRating = 0x00000008,
  19. modifiedVersion = 0x00000010,
  20. modifiedFlags = 0x00000020,
  21. modifiedDescription = 0x00000040,
  22. modifiedAuthorFirst = 0x00000080,
  23. modifiedAuthorLast = 0x00000100,
  24. modifiedUpdated = 0x00000200,
  25. modifiedPublished = 0x00000400,
  26. modifiedThumbnail = 0x00000800,
  27. modifiedScreenshot = 0x00001000,
  28. modifiedGeneration = 0x00002000,
  29. } ModifiedFlags;
  30. protected:
  31. ifc_omserviceeditor() {}
  32. ~ifc_omserviceeditor() {}
  33. public:
  34. HRESULT SetName(const wchar_t *name, BOOL utf8);
  35. HRESULT SetUrl(const wchar_t *url, BOOL utf8);
  36. HRESULT SetIcon(const wchar_t *imagePath, BOOL utf8);
  37. HRESULT SetRating(unsigned int rating);
  38. HRESULT SetVersion(unsigned int version);
  39. HRESULT SetFlags(unsigned int flags, unsigned int flagMask);
  40. HRESULT SetDescription(const wchar_t *description, BOOL utf8);
  41. HRESULT SetAuthorFirst(const wchar_t *authorName, BOOL utf8);
  42. HRESULT SetAuthorLast(const wchar_t *authorName, BOOL utf8);
  43. HRESULT SetUpdated(const wchar_t *date, BOOL utf8);
  44. HRESULT SetPublished(const wchar_t *date, BOOL utf8);
  45. HRESULT SetThumbnail(const wchar_t *imagePath, BOOL utf8);
  46. HRESULT SetScreenshot(const wchar_t *imagePath, BOOL utf8);
  47. HRESULT SetGeneration(unsigned int generation);
  48. HRESULT SetModified(unsigned int modifiedFlag, unsigned int modifiedMask);
  49. HRESULT GetModified(unsigned int *modifiedFlags);
  50. HRESULT BeginUpdate();
  51. HRESULT EndUpdate();
  52. public:
  53. DISPATCH_CODES
  54. {
  55. API_SETNAME = 10,
  56. API_SETURL = 20,
  57. API_SETICON = 30,
  58. API_SETRATING = 40,
  59. API_SETVERSION = 50,
  60. API_SETFLAGS = 60,
  61. API_SETDESCRIPTION = 70,
  62. API_SETAUTHORFIRST = 80,
  63. API_SETAUTHORLAST = 90,
  64. API_SETUPDATED = 100,
  65. API_SETPUBLISHED = 110,
  66. API_SETTHUMBNAIL = 120,
  67. API_SETSCREENSHOT = 130,
  68. API_SETGENERATION = 140,
  69. API_SETMODIFIED = 400,
  70. API_GETMODIFIED = 410,
  71. API_BEGINUPDATE = 420,
  72. API_ENDUPDATE = 430,
  73. };
  74. };
  75. inline HRESULT ifc_omserviceeditor::SetName(const wchar_t *name, BOOL utf8)
  76. {
  77. return _call(API_SETNAME, (HRESULT)E_NOTIMPL, name, utf8);
  78. }
  79. inline HRESULT ifc_omserviceeditor::SetUrl(const wchar_t *url, BOOL utf8)
  80. {
  81. return _call(API_SETURL, (HRESULT)E_NOTIMPL, url, utf8);
  82. }
  83. inline HRESULT ifc_omserviceeditor::SetIcon(const wchar_t *imagePath, BOOL utf8)
  84. {
  85. return _call(API_SETICON, (HRESULT)E_NOTIMPL, imagePath, utf8);
  86. }
  87. inline HRESULT ifc_omserviceeditor::SetRating(unsigned int rating)
  88. {
  89. return _call(API_SETRATING, (HRESULT)E_NOTIMPL, rating);
  90. }
  91. inline HRESULT ifc_omserviceeditor::SetVersion(unsigned int version)
  92. {
  93. return _call(API_SETVERSION, (HRESULT)E_NOTIMPL, version);
  94. }
  95. inline HRESULT ifc_omserviceeditor::SetFlags(unsigned int flags, unsigned int flagMask)
  96. {
  97. return _call(API_SETFLAGS, (HRESULT)E_NOTIMPL, flags, flagMask);
  98. }
  99. inline HRESULT ifc_omserviceeditor::SetDescription(const wchar_t *description, BOOL utf8)
  100. {
  101. return _call(API_SETDESCRIPTION, (HRESULT)E_NOTIMPL, description, utf8);
  102. }
  103. inline HRESULT ifc_omserviceeditor::SetAuthorFirst(const wchar_t *authorName, BOOL utf8)
  104. {
  105. return _call(API_SETAUTHORFIRST, (HRESULT)E_NOTIMPL, authorName, utf8);
  106. }
  107. inline HRESULT ifc_omserviceeditor::SetAuthorLast(const wchar_t *authorName, BOOL utf8)
  108. {
  109. return _call(API_SETAUTHORLAST, (HRESULT)E_NOTIMPL, authorName, utf8);
  110. }
  111. inline HRESULT ifc_omserviceeditor::SetUpdated(const wchar_t *date, BOOL utf8)
  112. {
  113. return _call(API_SETUPDATED, (HRESULT)E_NOTIMPL, date, utf8);
  114. }
  115. inline HRESULT ifc_omserviceeditor::SetPublished(const wchar_t *date, BOOL utf8)
  116. {
  117. return _call(API_SETPUBLISHED, (HRESULT)E_NOTIMPL, date, utf8);
  118. }
  119. inline HRESULT ifc_omserviceeditor::SetThumbnail(const wchar_t *imagePath, BOOL utf8)
  120. {
  121. return _call(API_SETTHUMBNAIL, (HRESULT)E_NOTIMPL, imagePath, utf8);
  122. }
  123. inline HRESULT ifc_omserviceeditor::SetScreenshot(const wchar_t *imagePath, BOOL utf8)
  124. {
  125. return _call(API_SETSCREENSHOT, (HRESULT)E_NOTIMPL, imagePath, utf8);
  126. }
  127. inline HRESULT ifc_omserviceeditor::SetModified(unsigned int modifiedFlag, unsigned int modifiedMask)
  128. {
  129. return _call(API_SETMODIFIED, (HRESULT)E_NOTIMPL, modifiedFlag, modifiedMask);
  130. }
  131. inline HRESULT ifc_omserviceeditor::GetModified(unsigned int *modifiedFlags)
  132. {
  133. return _call(API_GETMODIFIED, (HRESULT)E_NOTIMPL, modifiedFlags);
  134. }
  135. inline HRESULT ifc_omserviceeditor::BeginUpdate()
  136. {
  137. return _call(API_BEGINUPDATE, (HRESULT)E_NOTIMPL);
  138. }
  139. inline HRESULT ifc_omserviceeditor::EndUpdate()
  140. {
  141. return _call(API_ENDUPDATE, (HRESULT)E_NOTIMPL);
  142. }
  143. inline HRESULT ifc_omserviceeditor::SetGeneration(unsigned int generation)
  144. {
  145. return _call(API_SETGENERATION, (HRESULT)E_NOTIMPL, generation);
  146. }
  147. #endif //NULLSOFT_WINAMP_OMSERVICE_EDITOR_INTERFACE_HEADER