Leaked source code of windows server 2003
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.

161 lines
4.8 KiB

  1. #ifndef _CIFTCHAR_H_
  2. #define _CIFTCHAR_H_
  3. // inseng tchar wrappers
  4. // wrapper for ICifComponent
  5. class CCifComponent_t
  6. {
  7. private:
  8. ICifRWComponent * pCifRWComponent;
  9. public:
  10. CCifComponent_t(ICifRWComponent *);
  11. ~CCifComponent_t() {};
  12. STDMETHOD(GetID)(LPTSTR pszID, DWORD cchSize);
  13. STDMETHOD(GetGUID)(LPTSTR pszGUID, DWORD cchSize);
  14. STDMETHOD(GetDescription)(LPTSTR pszDesc, DWORD cchSize);
  15. STDMETHOD(GetDetails)(LPTSTR pszDetails, DWORD cchSize);
  16. STDMETHOD(GetUrl)(UINT uUrlNum, LPTSTR pszUrl, DWORD cchSize, LPDWORD pdwUrlFlags);
  17. STDMETHOD(GetCommand)(UINT uCmdNum, LPTSTR pszCmd, DWORD cchCmdSize, LPTSTR pszSwitches,
  18. DWORD cchSwitchSize, LPDWORD pdwType);
  19. STDMETHOD(GetVersion)(LPDWORD pdwVersion, LPDWORD pdwBuild);
  20. STDMETHOD_(DWORD, GetDownloadSize)();
  21. STDMETHOD(GetDependency)(UINT uDepNum, LPTSTR pszID, DWORD cchSize, TCHAR *pchType, LPDWORD pdwVer, LPDWORD pdwBuild);
  22. STDMETHOD_(DWORD, GetPlatform)();
  23. STDMETHOD(GetMode)(UINT uModeNum, LPTSTR pszModes, DWORD cchSize);
  24. STDMETHOD(GetGroup)(LPTSTR pszID, DWORD cchSize);
  25. STDMETHOD(IsUIVisible)();
  26. STDMETHOD(GetCustomData)(LPTSTR pszKey, LPTSTR pszData, DWORD cchSize);
  27. };
  28. // wrapper for ICifRWComponent
  29. class CCifRWComponent_t : public CCifComponent_t
  30. {
  31. private:
  32. ICifRWComponent * pCifRWComponent;
  33. public:
  34. CCifRWComponent_t(ICifRWComponent *);
  35. ~CCifRWComponent_t() {};
  36. STDMETHOD(SetGUID)(LPCTSTR pszGUID);
  37. STDMETHOD(SetDescription)(LPCTSTR pszDesc);
  38. STDMETHOD(SetCommand)(UINT uCmdNum, LPCTSTR pszCmd, LPCTSTR pszSwitches, DWORD dwType);
  39. STDMETHOD(SetVersion)(LPCTSTR pszVersion);
  40. STDMETHOD(SetUninstallKey)(LPCTSTR pszKey);
  41. STDMETHOD(SetInstalledSize)(DWORD dwWin, DWORD dwApp);
  42. STDMETHOD(SetDownloadSize)(DWORD);
  43. STDMETHOD(SetExtractSize)(DWORD);
  44. STDMETHOD(DeleteDependency)(LPCTSTR pszID, TCHAR chType);
  45. STDMETHOD(AddDependency)(LPCTSTR pszID, TCHAR chType);
  46. STDMETHOD(SetUIVisible)(BOOL);
  47. STDMETHOD(SetGroup)(LPCTSTR pszID);
  48. STDMETHOD(SetPlatform)(DWORD);
  49. STDMETHOD(SetPriority)(DWORD);
  50. STDMETHOD(SetReboot)(BOOL);
  51. STDMETHOD(SetUrl)(UINT uUrlNum, LPCTSTR pszUrl, DWORD dwUrlFlags);
  52. STDMETHOD(DeleteFromModes)(LPCTSTR pszMode);
  53. STDMETHOD(AddToMode)(LPCTSTR pszMode);
  54. STDMETHOD(SetModes)(LPCTSTR pszMode);
  55. STDMETHOD(CopyComponent)(LPCTSTR pszCifFile);
  56. STDMETHOD(AddToTreatAsOne)(LPCTSTR pszCompID);
  57. STDMETHOD(SetDetails)(LPCTSTR pszDesc);
  58. };
  59. // wrapper for ICifRWGroup
  60. class CCifRWGroup_t
  61. {
  62. private:
  63. ICifRWGroup * pCifRWGroup;
  64. public:
  65. CCifRWGroup_t(ICifRWGroup *);
  66. ~CCifRWGroup_t() {};
  67. STDMETHOD(GetDescription)(LPTSTR pszDesc, DWORD cchSize);
  68. STDMETHOD_(DWORD, GetPriority)();
  69. STDMETHOD(SetDescription)(LPCTSTR pszDesc);
  70. STDMETHOD(SetPriority)(DWORD);
  71. };
  72. // wrapper for ICifMode
  73. class CCifMode_t
  74. {
  75. private:
  76. ICifRWMode * pCifRWMode;
  77. public:
  78. CCifMode_t(ICifRWMode *);
  79. ~CCifMode_t() {};
  80. STDMETHOD(GetID)(LPTSTR pszID, DWORD cchSize);
  81. STDMETHOD(GetDescription)(LPTSTR pszDesc, DWORD cchSize);
  82. STDMETHOD(GetDetails)(LPTSTR pszDetails, DWORD cchSize);
  83. };
  84. // wrapper for ICifRWMode
  85. class CCifRWMode_t : public CCifMode_t
  86. {
  87. private:
  88. ICifRWMode * pCifRWMode;
  89. public:
  90. CCifRWMode_t(ICifRWMode *);
  91. ~CCifRWMode_t() {};
  92. STDMETHOD(SetDescription)(LPCTSTR pszDesc);
  93. STDMETHOD(SetDetails)(LPCTSTR pszDetails);
  94. };
  95. // wrapper for ICifFile
  96. class CCifFile_t
  97. {
  98. private:
  99. ICifRWFile * pCifRWFile;
  100. public:
  101. CCifFile_t(ICifRWFile *);
  102. ~CCifFile_t();
  103. STDMETHOD(EnumComponents)(IEnumCifComponents **, DWORD dwFilter, LPVOID pv);
  104. STDMETHOD(FindComponent)(LPCTSTR pszID, ICifComponent **p);
  105. STDMETHOD(EnumModes)(IEnumCifModes **, DWORD dwFilter, LPVOID pv);
  106. STDMETHOD(FindMode)(LPCTSTR pszID, ICifMode **p);
  107. STDMETHOD(GetDescription)(LPTSTR pszDesc, DWORD cchSize);
  108. };
  109. // wrapper for ICifRWFile
  110. class CCifRWFile_t : public CCifFile_t
  111. {
  112. private:
  113. ICifRWFile * pCifRWFile;
  114. public:
  115. CCifRWFile_t(ICifRWFile *);
  116. ~CCifRWFile_t() {}; // release will be taken care of by CCifFile_t destructor
  117. // ICifRWFile methods
  118. STDMETHOD(SetDescription)(LPCTSTR pszDesc);
  119. STDMETHOD(CreateComponent)(LPCTSTR pszID, ICifRWComponent **p);
  120. STDMETHOD(CreateGroup)(LPCTSTR pszID, ICifRWGroup **p);
  121. STDMETHOD(CreateMode)(LPCTSTR pszID, ICifRWMode **p);
  122. STDMETHOD(DeleteComponent)(LPCTSTR pszID);
  123. STDMETHOD(DeleteGroup)(LPCTSTR pszID);
  124. STDMETHOD(DeleteMode)(LPCTSTR pszID);
  125. STDMETHOD(Flush)();
  126. };
  127. HRESULT GetICifFileFromFile_t(CCifFile_t **, LPCTSTR pszCifFile);
  128. HRESULT GetICifRWFileFromFile_t(CCifRWFile_t **, LPCTSTR pszCifFile);
  129. #endif