| Index: tpm_init.h
|
| diff --git a/tpm_init.h b/tpm_init.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0dc1086d0a9d0fb4aeb4c8b9e8402aab21f35189
|
| --- /dev/null
|
| +++ b/tpm_init.h
|
| @@ -0,0 +1,54 @@
|
| +// Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// TpmInit - public interface class for initializing the TPM
|
| +
|
| +#include <base/scoped_ptr.h>
|
| +#include <base/platform_thread.h>
|
| +#include <chromeos/utility.h>
|
| +
|
| +#ifndef TPM_INIT_TPM_INIT_H_
|
| +#define TPM_INIT_TPM_INIT_H_
|
| +
|
| +namespace tpm_init {
|
| +
|
| +class TpmInitTask;
|
| +
|
| +class TpmInit {
|
| + public:
|
| +
|
| + // Default constructor
|
| + TpmInit();
|
| +
|
| + virtual ~TpmInit();
|
| +
|
| + // Starts asynchronous initialization of the TPM
|
| + virtual bool StartInitializeTpm();
|
| +
|
| + // Returns true if the TPM is initialized and ready for use
|
| + virtual bool IsTpmReady();
|
| +
|
| + // Returns true if the TPM is enabled
|
| + virtual bool IsTpmEnabled();
|
| +
|
| + // Gets the TPM password if the TPM initialization took ownership
|
| + //
|
| + // Parameters
|
| + // password (OUT) - The owner password used for the TPM
|
| + virtual bool GetTpmPassword(chromeos::Blob* password);
|
| +
|
| + // Returns the number of milliseconds it took to initialize the TPM
|
| + virtual long GetInitializationMillis();
|
| +
|
| + private:
|
| + // The background task for initializing the TPM, implemented as a
|
| + // PlatformThread::Delegate
|
| + scoped_ptr<TpmInitTask> tpm_init_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(TpmInit);
|
| +};
|
| +
|
| +} // namespace tpm_init
|
| +
|
| +#endif // TPM_INIT_TPM_INIT_H_
|
|
|