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.

122 lines
3.3 KiB

  1. //******************************************************************************
  2. //
  3. // SoftInfo.h: Software Utility classes
  4. //
  5. // Copyright (C) 1996-1997 by Microsoft Corporation.
  6. // All rights reserved.
  7. //
  8. //******************************************************************************
  9. #if !defined(ESPUTIL_SoftInfo_h_INCLUDED)
  10. #define ESPUTIL_SoftInfo_h_INCLUDED
  11. struct LTAPIENTRY SoftCol
  12. {
  13. // Unique string names for columns
  14. static const WCHAR * szIcon;
  15. static const WCHAR * szSource;
  16. static const WCHAR * szTarget;
  17. static const WCHAR * szPreviousSource;
  18. static const WCHAR * szInstructions;
  19. static const WCHAR * szInstrAtt;
  20. static const WCHAR * szNote;
  21. static const WCHAR * szResourceID;
  22. static const WCHAR * szTranslationStatus;
  23. static const WCHAR * szBinaryStatus;
  24. static const WCHAR * szOrigin;
  25. static const WCHAR * szCategory;
  26. static const WCHAR * szApproval;
  27. static const WCHAR * szLock;
  28. static const WCHAR * szSourceLock;
  29. static const WCHAR * szTransLock;
  30. static const WCHAR * szModifiedDate;
  31. static const WCHAR * szModifiedBy;
  32. static const WCHAR * szAutoApproved;
  33. static const WCHAR * szConfidenceLevel;
  34. static const WCHAR * szCustom1;
  35. static const WCHAR * szCustom2;
  36. static const WCHAR * szCustom3;
  37. static const WCHAR * szCustom4;
  38. static const WCHAR * szCustom5;
  39. static const WCHAR * szCustom6;
  40. static const WCHAR * szParserID;
  41. static const WCHAR * szSrcLen;
  42. static const WCHAR * szTgtLen;
  43. static const WCHAR * szSrcHotKey;
  44. static const WCHAR * szTgtHotKey;
  45. // Unique ID's for columns
  46. //
  47. // DO NOT 'INSERT' ITEMS. You will change the ID's and
  48. // mess people up.
  49. typedef enum
  50. {
  51. FLD_ICON,
  52. FLD_SOURCE_TERM,
  53. FLD_TARGET_TERM,
  54. FLD_PREVIOUS_SOURCE_TERM,
  55. FLD_INSTRUCTIONS,
  56. FLD_INSTR_ATT,
  57. FLD_GLOSSARY_NOTE,
  58. FLD_UNIQUE_ID,
  59. FLD_TRANSLATION_STATUS,
  60. FLD_BINARY_STATUS,
  61. FLD_TRANSLATION_ORIGIN,
  62. FLD_STRING_TYPE,
  63. FLD_APPROVAL_STATE,
  64. FLD_USR_LOCK,
  65. FLD_DEV_LOCK,
  66. FLD_TRANS_LOCK,
  67. FLD_MODIFIED_DATE,
  68. FLD_MODIFIED_BY,
  69. FLD_AUTO_APPROVED,
  70. FLD_CONFIDENCE_LEVEL,
  71. FLD_CUSTOM1,
  72. FLD_CUSTOM2,
  73. FLD_CUSTOM3,
  74. FLD_CUSTOM4,
  75. FLD_CUSTOM5,
  76. FLD_CUSTOM6,
  77. //
  78. // Add displayable columns here.
  79. FLD_PARSER_ID = 50,
  80. //
  81. // Add non-displayable, RESTBL required columns here
  82. FLD_SRC_LEN = 100,
  83. FLD_TGT_LEN,
  84. FLD_SRC_HK,
  85. FLD_TGT_HK,
  86. //
  87. // Add non-displayable, non-RESTBL columns here.
  88. FLD_COUNT = 30 // Make sure this is accurate!
  89. } FIELD;
  90. // RAID: LS42 Bug 46 fixed by MikeL
  91. // Functions to validate the value of the above
  92. // column types. All validate functions must pass
  93. // two parameters: 1-LPCTSTR. and 2-DWORD
  94. static BOOL ValidateDefault (LPCTSTR lpszNewText, DWORD dwNewNum);
  95. static BOOL ValidateConfidenceLevel (LPCTSTR lpszNewText, DWORD dwNewNum);
  96. // Exported functions
  97. static void GetSoftwareSchema(CTableSchema * & pSchema);
  98. static const CLString & GetDisplayName(FIELD col);
  99. static const CColumnDefinition * GetColumnDefinition(FIELD col);
  100. static int GetColumnCount();
  101. static int GetCustomColumnCount();
  102. static BOOL IsCustomColumn(FIELD col);
  103. // Implementation
  104. protected:
  105. static void BuildStringCategory(CTableSchema * pSchema);
  106. static void BuildApprovalState(CTableSchema * pSchema);
  107. };
  108. #endif // ESPUTIL_SoftInfo_h_INCLUDED