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.

226 lines
6.6 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. _INTERFACE.H
  5. History:
  6. --*/
  7. #pragma once
  8. struct LOCRESOURCEFILEINFO
  9. {
  10. CFile *pFile; // Res32 file
  11. LangId idLang; // Language of the file
  12. };
  13. typedef LOCRESOURCEFILEINFO *LPLOCRESOURCEFILEINFO;
  14. struct SProjectInfo
  15. {
  16. CLString m_strProjPath;
  17. LangId m_lSource;
  18. LangId m_lTarget;
  19. };
  20. DECLARE_INTERFACE_(ILocExtensionResource, IUnknown)
  21. {
  22. //
  23. // IUnknown standard Interface
  24. //
  25. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR*ppvObj) PURE;
  26. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  27. STDMETHOD_(ULONG, Release)(THIS) PURE;
  28. //
  29. // Standard Debugging interfaces
  30. //
  31. STDMETHOD_(void, AssertValidInterface)(THIS) CONST_METHOD PURE;
  32. enum ResourceEvent
  33. {
  34. reNewFile,
  35. reUserCancel,
  36. reMakeSrcResFailed // RAID: LS42 bug 250 fixed by MikeL (Added)
  37. };
  38. STDMETHOD_(void, GetOperationInfo)(CLString &strContext,
  39. COutputTabs::OutputTabs &) CONST_METHOD PURE;
  40. STDMETHOD(Start)(THIS_ CReport *, const SProjectInfo &) PURE;
  41. STDMETHOD(Stop)(THIS_ CReport *) PURE;
  42. STDMETHOD(OnEvent)(THIS_ ResourceEvent event, const CLocVariant &var,
  43. CReport *pReporter) PURE;
  44. STDMETHOD(Analyze)(THIS_
  45. const LOCRESOURCEFILEINFO &SourceFileInfo,
  46. const LOCRESOURCEFILEINFO &pTargetFileInfo,
  47. const CDBIDArray &aDBID,
  48. CReport *pReporter,
  49. const CLString &strContext,
  50. BOOL &fModifiedTarget) PURE;
  51. STDMETHOD_(void, SetProjName)(const CLString & strProjName) PURE;
  52. STDMETHOD_(BOOL, InitReports)() PURE;
  53. };
  54. interface __declspec(uuid("{9F9D180F-6F38-11d0-98FD-00C04FC2C6D8}"))
  55. ILocExtensionResource;
  56. interface ILocTransFields;
  57. DECLARE_INTERFACE_(ILocExtensionTranslation, IUnknown)
  58. {
  59. //
  60. // IUnknown standard Interface
  61. //
  62. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR*ppvObj) PURE;
  63. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  64. STDMETHOD_(ULONG, Release)(THIS) PURE;
  65. //
  66. // Standard Debugging interfaces
  67. //
  68. STDMETHOD_(void, AssertValidInterface)(THIS) CONST_METHOD PURE;
  69. enum TranslationEvent
  70. {
  71. teNewFile,
  72. teUserCancel,
  73. };
  74. enum StartLocation
  75. {
  76. slProjectTree,
  77. slTranslationWindow
  78. };
  79. STDMETHOD_(BOOL, IsReadOnly)() CONST_METHOD PURE;
  80. STDMETHOD_(void, GetOperationInfo)(CLString &strContext,
  81. COutputTabs::OutputTabs &) CONST_METHOD PURE;
  82. STDMETHOD(Start)(THIS_ StartLocation slStart,
  83. CReport *, const SProjectInfo &) PURE;
  84. STDMETHOD(Stop)(THIS_ CReport *) PURE;
  85. STDMETHOD(OnEvent)(THIS_ TranslationEvent event,
  86. const CLocVariant &var, CReport *pReport) PURE;
  87. STDMETHOD(ProcessRow)(THIS_ ILocTransFields *pITransFields,
  88. CReport *, const CLString &strContext) PURE;
  89. };
  90. interface __declspec(uuid("{C35F8B61-FE4D-11d0-A5A1-00C04FC2C6D8}"))
  91. ILocExtensionTranslation;
  92. DECLARE_INTERFACE_(ILocTransFields, IUnknown)
  93. {
  94. //
  95. // IUnknown standard Interface
  96. //
  97. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR*ppvObj) PURE;
  98. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  99. STDMETHOD_(ULONG, Release)(THIS) PURE;
  100. //
  101. // Standard Debugging interfaces
  102. //
  103. STDMETHOD_(void, AssertValidInterface)(THIS) CONST_METHOD PURE;
  104. enum PreferredGoto
  105. {
  106. pgDefault,
  107. pgProjWindow,
  108. pgTransTable,
  109. pgVisEditor
  110. };
  111. //
  112. // Properties
  113. STDMETHOD_(CGoto *, GetGoto)(PreferredGoto pg = pgDefault) CONST_METHOD PURE;
  114. STDMETHOD_(void, GetFullItemName)(CPascalString &) CONST_METHOD PURE;
  115. STDMETHOD_(void, GetFullFileName)(CPascalString &) CONST_METHOD PURE;
  116. STDMETHOD_(BOOL, HasString)() CONST_METHOD PURE;
  117. STDMETHOD_(BOOL, HasBinary)() CONST_METHOD PURE;
  118. STDMETHOD_(BOOL, IsStringLocked)() CONST_METHOD PURE;
  119. STDMETHOD(GetCustomFieldValues)(UINT, CPasStringArray &)
  120. CONST_METHOD PURE;
  121. //
  122. // Data retrieval methods
  123. STDMETHOD_(void, GetUniqueID)(CLocUniqueId &) CONST_METHOD PURE;
  124. STDMETHOD_(void, GetSourceString)(CLocString &) CONST_METHOD PURE;
  125. STDMETHOD_(void, GetTargetString)(CLocString &) CONST_METHOD PURE;
  126. STDMETHOD_(void, GetPreviousSource)(CLocString &) CONST_METHOD PURE;
  127. STDMETHOD_(void, GetInstructions)(CPascalString &) CONST_METHOD PURE;
  128. STDMETHOD_(void, GetTermNote)(CPascalString &) CONST_METHOD PURE;
  129. STDMETHOD_(void, GetTextStatus)(CLS::LocStatus &) CONST_METHOD PURE;
  130. STDMETHOD_(void, GetBinaryStatus)(CLS::LocStatus &) CONST_METHOD PURE;
  131. STDMETHOD_(void, GetStringType)(CST::StringType &) CONST_METHOD PURE;
  132. STDMETHOD_(void, GetApprovalState)(CAS::ApprovalState &) CONST_METHOD PURE;
  133. STDMETHOD_(void, GetTranslationOrigin)(CTO::TranslationOrigin &)
  134. CONST_METHOD PURE;
  135. STDMETHOD_(void, GetSourceLock)(BOOL &) CONST_METHOD PURE;
  136. STDMETHOD_(void, GetTgtLockedToSource)(BOOL &) CONST_METHOD PURE;
  137. STDMETHOD_(void, GetUserLock)(BOOL &) CONST_METHOD PURE;
  138. STDMETHOD_(void, GetAutoApproved)(CAA::AutoApproved & aa) CONST_METHOD PURE;
  139. STDMETHOD_(void, GetParserId)(ParserId &) CONST_METHOD PURE;
  140. STDMETHOD_(void, GetLastUpdatedBy)(CPascalString &) CONST_METHOD PURE;
  141. STDMETHOD_(void, GetLastUpdateTime)(COleDateTime &) CONST_METHOD PURE;
  142. STDMETHOD_(void, GetSourceBinary)(CLocBinary *&) PURE;
  143. STDMETHOD_(void, GetTargetBinary)(CLocBinary *&) PURE;
  144. STDMETHOD_(void, GetInstrAttn)(BOOL &) CONST_METHOD PURE;
  145. STDMETHOD_(void, GetConfidenceLevel)(LONG &) CONST_METHOD PURE;
  146. STDMETHOD(GetCustomFieldValue)(UINT, CPascalString &) CONST_METHOD PURE;
  147. //
  148. // Danger! Use these, and you can totally destroy user data
  149. // MAKE SURE YOU KNOW WHAT YOU ARE DOING!
  150. STDMETHOD(BeginEdit)() PURE;
  151. STDMETHOD(EndEdit)(BOOL fCommit) PURE;
  152. //
  153. // NOTE! Set methods implement 'business logic' - changing an item may
  154. // lead to several other changes - for example, changing the target
  155. // string may change the localization status.
  156. STDMETHOD(SetCustomFieldValue)(const UINT, const CPascalString &) PURE;
  157. STDMETHOD(SetInstructions)(const CPascalString &) PURE;
  158. STDMETHOD(SetTermNote)(const CPascalString &) PURE;
  159. STDMETHOD(SetStringType)(const CST::StringType) PURE;
  160. STDMETHOD(SetTranslationOrigin)(const CTO::TranslationOrigin) PURE;
  161. STDMETHOD(SetTextStatus)(const CLS::LocStatus) PURE;
  162. STDMETHOD(SetApprovalState)(const CAS::ApprovalState) PURE;
  163. STDMETHOD(SetTargetString)(const CLocString &) PURE;
  164. STDMETHOD(SetTgtLockedToSource)(BOOL) PURE;
  165. STDMETHOD(SetUserLock)(BOOL) PURE;
  166. STDMETHOD(SetAutoApproved)(const CAA::AutoApproved aa) PURE;
  167. STDMETHOD(SetInstrAttn)(BOOL) PURE;
  168. STDMETHOD(RevertString)() PURE;
  169. STDMETHOD(SetTargetBinary)(const CLocBinary *) PURE;
  170. STDMETHOD(SetBinaryStatus)(const CLS::LocStatus) PURE;
  171. };
  172. interface __declspec(uuid("{42C5D1E7-FE50-11d0-A5A1-00C04FC2C6D8}"))
  173. ILocTransFields;