Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

336 lines
9.6 KiB

  1. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Contains CD Options Interface
  4. //
  5. // Copyright (c) Microsoft Corporation 1998
  6. //
  7. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  8. #ifndef _CDOPT_PUBLICINTEFACES_
  9. #define _CDOPT_PUBLICINTEFACES_
  10. #include "objbase.h"
  11. #include "mmsystem.h"
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. const CLSID CLSID_CDOpt = {0xE5927147,0x521E,0x11D1,{0x9B,0x97,0x00,0xC0,0x4F,0xA3,0xB6,0x10}};
  16. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  17. //
  18. // Interface Definitions
  19. //
  20. // Defines the GUIDs / IIDs for this project:
  21. //
  22. // IID_IMMFWNotifySink, IMMComponent, IMMComponentAutomation
  23. //
  24. // These are the three interfaces for Framework / Component communications.
  25. // All other interfaces should be private to the specific project.
  26. //
  27. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  28. #define lCDOPTIIDFirst 0xb2cd5bbd
  29. #define DEFINE_CDOPTIID(name, x) DEFINE_GUID(name, lCDOPTIIDFirst + x, 0x5221,0x11d1,0x9b,0x97,0x0,0xc0,0x4f,0xa3,0xb6,0xc)
  30. DEFINE_CDOPTIID(IID_ICDOpt, 0);
  31. DEFINE_CDOPTIID(IID_ICDData, 1);
  32. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  33. //
  34. // CDOptions Interface Typedefs
  35. //
  36. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  37. typedef interface ICDOpt ICDOpt;
  38. typedef ICDOpt* LPCDOPT;
  39. typedef interface ICDData ICDData;
  40. typedef ICDData* LPCDDATA;
  41. #ifndef LPUNKNOWN
  42. typedef IUnknown* LPUNKNOWN;
  43. #endif
  44. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  45. //
  46. // CDOPTIONS common defines
  47. //
  48. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  49. enum CDDISP_MODES
  50. {
  51. CDDISP_CDTIME = 0x0001,
  52. CDDISP_CDREMAIN = 0x0002,
  53. CDDISP_TRACKTIME = 0x0004,
  54. CDDISP_TRACKREMAIN = 0x0008,
  55. };
  56. enum CDOPT_PAGE
  57. {
  58. CDOPT_PAGE_PLAY = 0x0000,
  59. CDOPT_PAGE_TITLE = 0x0001,
  60. CDOPT_PAGE_PLAYLIST = 0x0002,
  61. };
  62. #define CDTITLE_NODISC (0)
  63. #define CDSTR (128)
  64. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  65. //
  66. // CDOptions common typedefs
  67. //
  68. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  69. struct CDOPTIONS;
  70. struct CDTITLE;
  71. typedef DWORD (CALLBACK FAR * LPFNCDDOWNLOAD)(CDTITLE *pTitle, LPARAM lParam, HWND hwnd);
  72. typedef void (CALLBACK FAR * LPFNCDOPTIONS)(CDOPTIONS *pCDOpts);
  73. typedef struct CDUNIT
  74. {
  75. TCHAR szDriver[MAX_PATH];
  76. TCHAR szDeviceDesc[MAX_PATH];
  77. TCHAR szDriveName[MAX_PATH];
  78. TCHAR szMixerName[MAXPNAMELEN];
  79. TCHAR szVolName[MIXER_LONG_NAME_CHARS];
  80. TCHAR szNetQuery[2048];
  81. DWORD dwMixID;
  82. DWORD dwDestID;
  83. DWORD dwVolID;
  84. DWORD dwMuteID;
  85. DWORD dwTitleID;
  86. DWORD dwNumTracks;
  87. BOOL fSelected;
  88. BOOL fDefaultDrive;
  89. BOOL fDownLoading;
  90. BOOL fChanged;
  91. CDUNIT *pNext;
  92. } CDUNIT, *LPCDUNIT;
  93. typedef struct CDPROVIDER
  94. {
  95. TCHAR szProviderURL[MAX_PATH];
  96. TCHAR szProviderName[MAX_PATH];
  97. TCHAR szProviderHome[MAX_PATH];
  98. TCHAR szProviderLogo[MAX_PATH];
  99. TCHAR szProviderUpload[MAX_PATH];
  100. BOOL fTimedOut;
  101. CDPROVIDER *pNext;
  102. } CDPROVIDER, *LPCDPROVIDER;
  103. typedef struct CDOPTDATA
  104. {
  105. BYTE fDispMode;
  106. BOOL fStartPlay;
  107. BOOL fExitStop;
  108. BOOL fTopMost;
  109. BOOL fTrayEnabled;
  110. BOOL fDownloadEnabled;
  111. BOOL fDownloadPrompt;
  112. BOOL fBatchEnabled;
  113. BOOL fByArtist;
  114. DWORD dwPlayMode;
  115. DWORD dwIntroTime;
  116. DWORD dwWindowX;
  117. DWORD dwWindowY;
  118. DWORD dwViewMode;
  119. } CDOPTDATA, *LPCDOPTDATA;
  120. typedef struct CDMENU
  121. {
  122. TCHAR szMenuText[CDSTR];
  123. TCHAR *szMenuQuery;
  124. } CDMENU, *LPCDMENU;
  125. typedef struct CDTRACK
  126. {
  127. TCHAR szName[CDSTR];
  128. } CDTRACK, *LPCDTRACK;
  129. typedef struct CDTITLE
  130. {
  131. DWORD dwTitleID;
  132. DWORD dwNumTracks;
  133. BOOL fDownLoading;
  134. LPCDTRACK pTrackTable;
  135. DWORD dwNumPlay;
  136. LPWORD pPlayList;
  137. DWORD dwNumMenus;
  138. LPCDMENU pMenuTable;
  139. TCHAR szTitle[CDSTR];
  140. TCHAR szArtist[CDSTR];
  141. TCHAR szLabel[CDSTR];
  142. TCHAR szDate[CDSTR];
  143. TCHAR szCopyright[CDSTR];
  144. TCHAR *szTitleQuery;
  145. BOOL dwLockCnt;
  146. BOOL fLoaded;
  147. BOOL fChanged;
  148. BOOL fDriveExpanded;
  149. BOOL fAlbumExpanded;
  150. BOOL fArtistExpanded;
  151. BOOL fRemove;
  152. CDTITLE * pNext;
  153. }CDTITLE, *LPCDTITLE;
  154. typedef struct CDOPTIONS
  155. {
  156. LPCDOPTDATA pCDData;
  157. LPCDPROVIDER pProviderList;
  158. LPCDPROVIDER pCurrentProvider;
  159. LPCDPROVIDER pDefaultProvider;
  160. LPCDUNIT pCDUnitList;
  161. DWORD dwBatchedTitles;
  162. LPFNCDDOWNLOAD pfnDownloadTitle;
  163. LPFNCDOPTIONS pfnOptionsCallback;
  164. LPARAM lParam;
  165. UINT_PTR pReserved;
  166. } CDOPTIONS, *LPCDOPTIONS;
  167. typedef struct CDBATCH
  168. {
  169. DWORD dwTitleID;
  170. DWORD dwNumTracks;
  171. TCHAR *szTitleQuery;
  172. BOOL fRemove;
  173. BOOL fFresh;
  174. CDBATCH *pNext;
  175. } CDBATCH, *LPCDBATCH;
  176. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  177. //
  178. // CDOptions Interface Definitions
  179. //
  180. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
  181. #undef INTERFACE
  182. #define INTERFACE ICDOpt
  183. DECLARE_INTERFACE_(ICDOpt, IUnknown)
  184. {
  185. //--- IUnknown methods---
  186. STDMETHOD (QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
  187. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  188. STDMETHOD_(ULONG,Release) (THIS) PURE;
  189. //--- ICDOpt methods---
  190. STDMETHOD_(LPCDOPTIONS,GetCDOpts) (THIS) PURE;
  191. STDMETHOD (CreateProviderList) (THIS_ LPCDPROVIDER *ppProviderList) PURE;
  192. STDMETHOD_(void, DestroyProviderList) (THIS_ LPCDPROVIDER *ppProviderList) PURE;
  193. STDMETHOD_(void, UpdateRegistry) (THIS) PURE;
  194. STDMETHOD (OptionsDialog) (THIS_ HWND hWnd,
  195. LPCDDATA pCDData,
  196. CDOPT_PAGE nStartPage) PURE;
  197. STDMETHOD_(BOOL,VerifyProvider) (THIS_ LPCDPROVIDER pCDProvider,
  198. TCHAR *szCertKey) PURE;
  199. STDMETHOD (CreateProviderKey) (THIS_ LPCDPROVIDER pCDProvider,
  200. TCHAR *szCertKey,
  201. UINT cBytes) PURE;
  202. STDMETHOD_(void,DownLoadCompletion) (THIS_ DWORD dwNumIDs,
  203. LPDWORD pdwIDs) PURE;
  204. STDMETHOD_(void,DiscChanged) (THIS_ LPCDUNIT pCDUnit) PURE;
  205. STDMETHOD_(void,MMDeviceChanged) (THIS) PURE;
  206. };
  207. #undef INTERFACE
  208. #define INTERFACE ICDData
  209. DECLARE_INTERFACE_(ICDData, IUnknown)
  210. {
  211. //--- IUnknown methods---
  212. STDMETHOD (QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
  213. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  214. STDMETHOD_(ULONG,Release) (THIS) PURE;
  215. //--- ICDOpt methods---
  216. STDMETHOD (Initialize) (THIS_ HWND hWnd) PURE;
  217. STDMETHOD (CheckDatabase) (THIS_ HWND hWnd) PURE;
  218. STDMETHOD_(BOOL, QueryTitle) (THIS_ DWORD dwTitleID) PURE;
  219. STDMETHOD (LockTitle) (THIS_ LPCDTITLE *ppCDTitle,
  220. DWORD dwTitleID) PURE;
  221. STDMETHOD (CreateTitle) (THIS_ LPCDTITLE *ppCDTitle,
  222. DWORD dwTitleID,
  223. DWORD dwNumTracks,
  224. DWORD dwNumMenus) PURE;
  225. STDMETHOD (SetTitleQuery) (THIS_ LPCDTITLE pCDTitle,
  226. TCHAR *szTitleQuery) PURE;
  227. STDMETHOD (SetMenuQuery) (THIS_ LPCDMENU pCDMenu,
  228. TCHAR *szMenuQuery) PURE;
  229. STDMETHOD_(void,UnlockTitle) (THIS_ LPCDTITLE pCDTitle,
  230. BOOL fPresist) PURE;
  231. STDMETHOD (LoadTitles) (THIS_ HWND hWnd) PURE;
  232. STDMETHOD (PersistTitles) (THIS) PURE;
  233. STDMETHOD (UnloadTitles) (THIS) PURE;
  234. STDMETHOD_(LPCDTITLE,GetTitleList) (THIS) PURE;
  235. // -- Batch methods
  236. STDMETHOD_(BOOL, QueryBatch) (THIS_ DWORD dwTitleID) PURE;
  237. STDMETHOD_(DWORD, GetNumBatched) (THIS) PURE;
  238. STDMETHOD (LoadBatch) (THIS_ HWND hWnd,
  239. LPCDBATCH *ppCDBatchList) PURE;
  240. STDMETHOD (UnloadBatch) (THIS_ LPCDBATCH pCDBatchList) PURE;
  241. STDMETHOD (DumpBatch) (THIS) PURE;
  242. STDMETHOD (AddToBatch) (THIS_ DWORD dwTitleID,
  243. TCHAR *szTitleQuery,
  244. DWORD dwNumTracks) PURE;
  245. };
  246. #ifdef __cplusplus
  247. };
  248. #endif
  249. #endif //_CDOPT_PUBLICINTEFACES_