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.

224 lines
6.8 KiB

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