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.

264 lines
28 KiB

  1. ��// This schema is intended to be introduced into any namespace
  2. // in which aliases will be defined.
  3. #pragma Namespace("\\\\.\\root")
  4. instance of __Namespace
  5. {
  6. Name = "Cli";
  7. };
  8. #pragma Namespace("\\\\.\\root\\cli")
  9. [Description( "Instances of the CliQualifier class represent qualifiers that influence "
  10. "the handling of the associatied object. These qualifiers are drawn from the "
  11. "qualifiers on the underlying WMI object and should be handled the same way. "
  12. "For example ValueMap should be treated as a constraint on the values that "
  13. "may used with the Set verb on a property. The MaxLen qualifier should be "
  14. "treated as a constraint on the number of characters that can be provided "
  15. "on a Set.")]
  16. class MSFT_CliQualifier
  17. {
  18. [Description( "The name of the qualifier - this must be unique within the set "
  19. "of qualifiers for the object the qualifier applies to")]
  20. STRING Name;
  21. [Description( "The value for the qualifier. Note that the WMI convention "
  22. "will be strictly followed and qualifiers present without a value will not "
  23. "have any entries in this property. For example the Write qualifier is commonly "
  24. "used without a value and the presence of the qualifier is taken as indicating "
  25. "that the property is writable - its value is irrelevant.")]
  26. STRING QualifierValue[];
  27. };
  28. [Description( "Instances of the CliParam class define verb parameters. Each verb "
  29. "has a (possibly empty) list of parameters accepted by the verb. The CliParam "
  30. "instance defines the name of the paramater, the default value for the parameter, "
  31. "the type of the parameter and whetehr the parameter is optional or not.")]
  32. class MSFT_CliParam
  33. {
  34. [Description( "The default string defines the default value used for the parameter "
  35. "if the user choose not to supply any actual value.")]
  36. STRING Default;
  37. [Description( "The Description property provides description of the parameter")]
  38. String Description;
  39. [Description( "The Optional boolean indicates that the parameter may be omotted.")]
  40. BOOLEAN Optional;
  41. [Description( "The ParaId string is the formal name for the parameter.")]
  42. STRING ParaId;
  43. [Description( "The qualifiers applicable to this Parameter")]
  44. MSFT_CliQualifier Qualifiers[];
  45. [Description( "The Type string defines the format expected for any value supplied "
  46. "for this parameter.")]
  47. STRING Type;
  48. };
  49. [Description( "Instances of the CliVerb class represent behavior available through "
  50. "the alias. The Name property defines the actual function to be invoked when "
  51. "the verb is used in a command. The function may be either a fiixed list of "
  52. "system defined standard functions such as CALL. Or the function may be a "
  53. "method by on the Target of the alias. The verb has both a Descriptions property "
  54. "providing a description of what the verb does and a Usages property providing "
  55. "a description of how the verb should be called.")]
  56. class MSFT_CliVerb
  57. {
  58. [Description( "The Derivation string represents the name of the method the verb "
  59. "is based on or the name of a standard verb (for example the standard verb "
  60. "'CALL').")]
  61. STRING Derivation;
  62. [Description( "The Description property provides the description of the verb")]
  63. String Description;
  64. [Description( "The Name string provides the name for the verb.")]
  65. STRING Name;
  66. [Description( "The Parameters array provides an array of objects that describe "
  67. "the parameters accepted by the verb.")]
  68. MSFT_CliParam Parameters[];
  69. [Description( "The qualifiers applicable to this Verb")]
  70. MSFT_CliQualifier Qualifiers[];
  71. [Description( "The VerbType property identifies the type of "
  72. "the verb. If the VerbType property has the value 2 "
  73. "(CommandLine), the verb is executed by invocation of the "
  74. "command line utility named in the Derivation property. If "
  75. "no Parameters are provided as a part of the verb "
  76. "definition, at invocation time the text up to the next "
  77. "carriage return should be passed to the utility named in "
  78. "the Derivation property. If any Parameters are provided "
  79. "as a part of the verb definition - the parameter "
  80. "definitions should be used in checking actual parameters "
  81. "provided at invocation time."),
  82. Values{"Class Method", "Standard", "CommandLine"}]
  83. uint32 VerbType;
  84. [Description( "The Usages array provides the text that defines "
  85. "how the verb should be used.")]
  86. String Usage;
  87. };
  88. [Description( "Instances of the CliProperty class describe values that will be "
  89. "used in a Format. Each property has a name, description "
  90. "and a Derivation. Note any formatting strategies such as truncation length "
  91. "or formatting strategies for numeric values will be defined in the stylesheet "
  92. "defined for the format containing the property.")]
  93. class MSFT_CliProperty
  94. {
  95. [Description( "The Derivation string provides an expression that will be used "
  96. "by the commandline utility to derive the value for the property. The derivation "
  97. "must be either the name of a property defined by the Alias' WMIObject or "
  98. "a Command Line command such as 'w System Get Name'.")]
  99. STRING Derivation;
  100. [Description( "The Description property provides a description of the property")]
  101. String Description;
  102. [Description( "The Name string provides the name of the property to be displayed.")]
  103. STRING Name;
  104. [Description( "The qualifiers applicable to this Property")]
  105. MSFT_CliQualifier Qualifiers[];
  106. };
  107. [Description( "Instances of the CliFormat class represent a display strategy for "
  108. "the alias. The display strategy consists of a list of properties to be displayed "
  109. "together with aformat (represented by an XSL style sheet) to be used indisplaying "
  110. "them")]
  111. class MSFT_CliFormat
  112. {
  113. [Description( "The Format string provides the location of an XSL file that can "
  114. "be used to format the output from the category.")]
  115. STRING Format;
  116. [Description( "The Name string corresponds to the format used with the SHOW command. "
  117. "The format name may be one of the system defined formats(FULL, BRIEF, INSTANCE) "
  118. "or may be an arbitrary user-defined format.")]
  119. STRING Name;
  120. [Description( "The Properties arrays is the list of properties to be shown for "
  121. "this Format.")]
  122. MSFT_CliProperty Properties[];
  123. };
  124. [Description( "The CliConnection class defines parameters to be used with the owning "
  125. "alias when establishing the connection to the namespace on which the Alias "
  126. "will operate. If one of the connection properties is not specified it should "
  127. "default to the current value for that property for the utility session.")]
  128. class MSFT_CliConnection
  129. {
  130. [Description( "Optional. If the strAuthority parameter begins with the string "
  131. "'kerberos:', Kerberos authentication is used and this parameter should contain "
  132. "a Kerberos principal name. If the strAuthority parameter contains any other "
  133. "value, NTLM authentication is used and this parameter should contain an NTLM "
  134. "domain name. If you leave this parameter blank the operating system negotiates "
  135. "with DCOM to determine whether NTLM or Kerberos authentication is used. This "
  136. "parameter should only be used with connections to remote WMI servers. If "
  137. "you attempt to set the authority for a local WMI connection, the connection "
  138. "attempt fails. For more information see Using Kerberos or NTLM Authentication "
  139. "with the Scripting API in the WMI SDK help file for more information. ")]
  140. STRING Authority;
  141. [Description( "Optional. String that specifies the localization code. If you want "
  142. "to use the current locale, leave it blank. If not blank, this parameter must "
  143. "be a string that indicates the desired locale in which information should "
  144. "be retrieved. For Microsoft locale identifiers, the format of the string "
  145. "is 'MS_xxxx', where xxxx is a string in hexadecimal form that indicates the "
  146. "LCID. For example, American English would appear as 'MS_409'")]
  147. STRING Locale;
  148. [Description( "Optional. String that specifies the namespace to which you log "
  149. "on. For example, to log on to the root\\default namespace, use 'root\\default'. "
  150. "If you do not specify this parameter, it defaults to the namespace that has "
  151. "been configured as the default namespace for scripting. For more information "
  152. "on the default value for this parameter, see WMI SDK help entries on Object "
  153. "Creation and Monikers.")]
  154. STRING NameSpace;
  155. [Description( "Optional. String that specifies the password to use when attempting "
  156. "to connect. Leave it blank to use the password of the current logged-on user. "
  157. "The Password parameter should only be used with connections to remote WMI "
  158. "servers. If you attempt to specify Password for a local WMI connection, the "
  159. "connection attempt fails. ")]
  160. STRING Password;
  161. [Description( "Optional. For access to a remote computer using DCOM, this parameter "
  162. "specifies the computer name. One example is 'myserver'. If you do not provide "
  163. "this parameter, the call defaults to the local computer.")]
  164. STRING Server;
  165. [Description( "Optional. String that specifies the user name to use while attempting "
  166. "to connect. This can be in the form of a user name or Domain\\Username. Leave "
  167. "it blank to use the current logged-on user name. The strUser parameter should "
  168. "only be used with connections to remote WMI servers. If you attempt to specify "
  169. "strUser for a local WMI connection, the connection attempt fails.")]
  170. STRING User;
  171. };
  172. [Description( "Instances of the CliAlias class represent aliases. These are used "
  173. "by the WMI command utility as a mechanism for restructuring the capabilities "
  174. "provided by the WMI schema. The restructuring is done by roles. The roles "
  175. "are represented by namespaces. CliAlias instances are organized into role "
  176. "oriented namespaces in such a way that the aliases required by a specific "
  177. "operational role will all be found together. For example all the printer "
  178. "management aliases will be found in the \\\\.\\root\\ops\\printer namespace. "
  179. "Each alias consists of a list of Formats and verbs. The formats provide various "
  180. "display strategies for the Alias (for example FULL or BRIEF). The verbs represent "
  181. "behavior that is available through the Alias (for example RESET in the context "
  182. "of a printer). Each format consists of a list of properties. The Alias itself "
  183. "is related to the schema through the Target property that contains a WQL "
  184. "query or a valid path (which may be just a class name) that defines the instance "
  185. "or set of instances the alias applies to. ")]
  186. class MSFT_CliAlias
  187. {
  188. [Description( "The Connection object defines parameters required when connecting "
  189. "to WMI")]
  190. MSFT_CliConnection Connection;
  191. [Description( "The Description property provides a description of the alias")]
  192. String Description;
  193. [Description( "The elements of the Formats array define lists of properties to "
  194. "be shown for this alias. This is a list of lists indexed by the format name "
  195. "(for example FULL, BRIEF, INSTANCE or a user defined qualifier).")]
  196. MSFT_CliFormat Formats[];
  197. [Description( "The FriendlyName string provides the name for the alias. The name "
  198. "will be unique in the context of the namespace in which the alias is defined. "
  199. "Note CLASS, QUERY, PATH and RESTORE cannot be used as alias names as they "
  200. "appear in the same location in the syntax."), key: DisableOverride ToInstance
  201. ToSubclass]
  202. STRING FriendlyName;
  203. [Description( "The PWhere property defines a from/where clause (i.e. a WQL query "
  204. "without the Select clause). The query string may contain substitution parameters "
  205. "(tokens preceded by a '#' mark) indicating where values may be substituted "
  206. "into the query string. The parameter values are taken from the tokens immediately "
  207. "after the alias if the token cannot be resolved to a switch or verb - this "
  208. "allows for example a command such as 'w KillProcess 154' where the PWhere "
  209. "value for the KillProcess alias would be 'From Win32_process Where ProcessId "
  210. "= #ProcId'")]
  211. STRING PWhere;
  212. [Description( "The qualifiers applicable to this Alias")]
  213. MSFT_CliQualifier Qualifiers[];
  214. [Description( "The Target string defines the object to be operated on through "
  215. "the Alias. The string may be a simple class name or a WQL query. If the "
  216. "Target property is empty only verbs based on commandline utilities "
  217. "may be used by the alias")]
  218. STRING Target;
  219. [Description( "The Verbs array is the list of verbs supported for this alias.")]
  220. MSFT_CliVerb Verbs[];
  221. };
  222. [association, Description( "The CliSeeAlso association provides a relationship "
  223. "between an alias and related aliases that may be used as a part of the same "
  224. "role.")]
  225. class MSFT_CliSeeAlso
  226. {
  227. [Description( "The Descriptions property provides a description of how the See"
  228. "AlsoAlias relates to the original")]
  229. String Description;
  230. [key]
  231. MSFT_CliAlias ref Original;
  232. [key]
  233. MSFT_CliAlias ref Related;
  234. };
  235. [Abstract, Description("A translatetable entry defines a mapping between "
  236. "one value or set of values and another value.")]
  237. class MSFT_CliTranslateTableEntry
  238. {
  239. [Description("The FromValue property defines a value or set of values that is "
  240. "to be translated. If the value is a set the syntax <value1>-<value2> should be "
  241. "used. This will be interpreted as meaning any value in collating sequence order "
  242. "between and including value1 and value2. If the character \"-\" is to be "
  243. "included it should be escaped with a \\ character")]
  244. string FromValue;
  245. [Description("The ToValue property defines the value to be substituted for the "
  246. "value recognised by the FromValue property.")]
  247. string ToValue;
  248. };
  249. class MSFT_CliTranslateTable
  250. {
  251. [key, Description("The Name property provides a unique identifier for the table. "
  252. "This identifier may be referenced in the Translate switch.")]
  253. string Name;
  254. [Description("The Tbl property provides an array of translate table entries that "
  255. "define the translations to be performed for this translate table.")]
  256. MSFT_CliTranslateTableEntry Tbl[];
  257. };