// Win32_TPM.mof : mof source for Win32_TPM
//
//
// This file will be processed by MOFCOMP utility to
// register the provider with the WMI repository
//

#pragma autorecover
#pragma namespace ("\\\\.\\root\\CIMV2")

instance of __Namespace
{
    Name = "Security";
};

#pragma namespace ("\\\\.\\root\\CIMV2\\Security")
[NamespaceSecuritySDDL("O:BAG:BAD:P(A;;CCDCLCSWRPWPRCWD;;;BA)(A;;CCDCRP;;;LS)(A;;CCDCRP;;;NS)S:(AU;SAFA;0x6001f;;;WD)")] 

instance of __Namespace
{
    Name = "MicrosoftTpm";
};


#pragma namespace ("\\\\.\\root\\CIMV2\\Security\\MicrosoftTpm")
[RequiresEncryption(TRUE)] 
instance of __systemSecurity { };

class Win32_ProviderEx : __Win32Provider
{
    [Description ( "Hosting Model, provides compatibility with Windows XP and Windows Server .NET. Do not override." ) , Override("HostingModel")]
    string HostingModel = "NetworkServiceHost";
    [Description("..."),Override("SecurityDescriptor")] 
    string SecurityDescriptor; 
    UInt32 version = 1;
} ;

instance of Win32_ProviderEx as $Win32_TpmProvider
{
    Name    = "Win32_TpmProvider";  //Name is the key property for __Provider objects.
                                    //vendor|provider|version is the suggested format
                                    //to prevent name collisions.

    ClsId   = "{E2E5A310-ECED-444F-81D7-ACCA6AC8A1A8}" ;    //provider GUID

    DefaultMachineName = NULL;    //NULL for local machine

    ClientLoadableCLSID = NULL;    //reserved

    ImpersonationLevel = 1;    //reserved

    InitializationReentrancy = 0;    //Set of flags that provide information about serialization:
                                     //0 = all initialization of this provider must be serialized
                                     //1 = all initializations of this provider in the same namespace must be serialized
                                     //2 = no initialization serialization is necessary

    InitializeAsAdminFirst = FALSE;    //Request to be fully initialized as "Admin" before 
										//initializations begin for users
    PerLocaleInitialization = FALSE;    //Indicates whether the provider is initialized for each 
                                        //locale if a user connects to the same namespace more 
                                        //than once using different locales.

    PerUserInitialization = TRUE;      //Indicates whether the provider is initialized once for each actual 
                                        //Windows NT/Windows 2000 NTLM user making requests of the provider. 
                                        //If set to FALSE, the provider is initialized once for all users

    Pure = TRUE;                        //A pure provider exists only to service requests from 
                                        //applications and WMI. Most providers are pure providers.
                                        //Non-pure providers transition to the role of client after they have 
                                        //finished servicing requests. 

    UnloadTimeout = NULL;               //Currently ignored
                                        //Use __CacheControl class in the root namespace to control provider unloading.
                                        //A string in the DMTF date/time format that specifies how long WMI 
                                        //allows the provider to remain idle before it is unloaded.
} ;    

instance of __InstanceProviderRegistration
{
    Provider = $Win32_TpmProvider;

    SupportsPut = "FALSE";     
    SupportsGet = "TRUE"; 
    SupportsDelete = "FALSE"; 
    SupportsEnumeration = "TRUE"; 
};

instance of __MethodProviderRegistration
{
    Provider = $Win32_TpmProvider;
};


//**************************************************************************
//* Class: Win32_Tpm
//**************************************************************************
[Singleton: DisableOverride ToInstance ToSubClass, dynamic: DisableOverride ToInstance, provider("Win32_TpmProvider"): ToInstance ToSubClass]
class Win32_Tpm
{
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] string SpecVersion;
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] string ManufacturerVersion;
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] string ManufacturerVersionInfo;
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 ManufacturerId;
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] string PhysicalPresenceVersionInfo;
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] boolean IsEnabled_InitialValue;
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] boolean IsOwned_InitialValue;
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] boolean IsActivated_InitialValue;

    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsEnabled([OUT] boolean IsEnabled);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsOwned([OUT] boolean IsOwned);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsActivated([OUT] boolean IsActivated);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsPhysicalClearDisabled([OUT] boolean IsPhysicalClearDisabled);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsOwnerClearDisabled([OUT] boolean IsOwnerClearDisabled);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsPhysicalPresenceHardwareEnabled([OUT] boolean IsPhysicalPresenceHardwareEnabled);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsOwnershipAllowed([OUT] boolean IsOwnershipAllowed);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsCommandPresent([IN] uint32 CommandOrdinal, [OUT] boolean IsCommandPresent);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 Enable([IN,optional] string OwnerAuth);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 Disable([IN,optional] string OwnerAuth);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsEndorsementKeyPairPresent([OUT] boolean IsEndorsementKeyPairPresent);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 CreateEndorsementKeyPair();
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 TakeOwnership([IN,optional] string OwnerAuth);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 Clear([IN,optional] string OwnerAuth);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsSrkAuthCompatible([OUT] boolean IsSrkAuthCompatible);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 ResetSrkAuth([IN,optional] string OwnerAuth);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 ChangeOwnerAuth([IN,optional] string OldOwnerAuth, [IN,optional] string NewOwnerAuth);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 SelfTest([OUT] uint8 SelfTestResult[]);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 ConvertToOwnerAuth([IN] string OwnerPassPhrase, [OUT] string OwnerAuth);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 SetPhysicalPresenceRequest([IN] uint32 Request, [IN,optional] uint32 RequestParameter);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 GetPhysicalPresenceRequest([OUT] uint32 Request);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 GetPhysicalPresenceTransition([OUT] uint32 Transition);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 GetPhysicalPresenceResponse([OUT] uint32 Request, [OUT] uint32 Response);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 AddBlockedCommand([IN] uint32 CommandOrdinal);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 RemoveBlockedCommand([IN] uint32 CommandOrdinal);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsCommandBlocked([IN] uint32 CommandOrdinal, [OUT] uint32 IsCommandBlocked);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 ResetAuthLockOut([IN,optional] string OwnerAuth);
    // Added in Windows 8
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsReady([OUT] boolean IsReady);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsReadyInformation([OUT] boolean IsReady, [OUT] uint32 Information);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsAutoProvisioningEnabled([OUT] boolean IsAutoProvisioningEnabled);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 EnableAutoProvisioning();
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 DisableAutoProvisioning([IN,optional] boolean OnlyForNextBoot);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 GetOwnerAuth([OUT] string OwnerAuth);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 Provision([IN] boolean ForceClear_Allowed, [IN] boolean PhysicalPresencePrompts_Allowed, [OUT] uint32 Information);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 ImportOwnerAuth([IN] string OwnerAuth);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 GetPhysicalPresenceConfirmationStatus([IN] uint32 Operation, [OUT] uint32 ConfirmationStatus);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 GetSrkPublicKeyModulus([OUT] uint8 SrkPublicKeyModulus[]);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 GetSrkADThumbprint([IN] uint8 SrkPublicKeyModulus[], [OUT] uint8 SrkADThumbprint[]);
    // Added in Windows 8.1
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 GetTcgLog([OUT] uint8 TcgLog[]);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsKeyAttestationCapable([OUT] uint32 TestResult);
    // Added in Windows 10
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 GetOwnerAuthForEscrow([OUT] uint32 OwnerAuthStatus, [OUT] string OwnerAuth);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 OwnerAuthEscrowed([IN] string OwnerAuth);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 GetOwnerAuthStatus([OUT] uint32 OwnerAuthStatus);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsFIPS([OUT] boolean IsFIPS);
    // Added in Windows 10 (TH2)
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 GetDictionaryAttackParameters([OUT] uint32 MaxTries, [OUT] uint32 RecoveryTime, [OUT] uint32 LockoutRecovery);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 GetCapLockoutInfo([OUT] uint32 LockoutCounter, [OUT] uint32 MaxTries);
    // Added in Windows 10 (RS2)
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] string ManufacturerIdTxt;
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] uint32 IsLockedOut([OUT] boolean IsLockedOut);
    [Description(""): ToInstance ToSubClass, Implemented: ToInstance ToSubClass] string ManufacturerVersionFull20;
};
