OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // TpmInit - public interface class for initializing the TPM |
| 6 |
| 7 #include <base/scoped_ptr.h> |
| 8 #include <base/platform_thread.h> |
| 9 #include <chromeos/utility.h> |
| 10 |
| 11 #ifndef TPM_INIT_TPM_INIT_H_ |
| 12 #define TPM_INIT_TPM_INIT_H_ |
| 13 |
| 14 namespace tpm_init { |
| 15 |
| 16 class TpmInitTask; |
| 17 |
| 18 class TpmInit { |
| 19 public: |
| 20 |
| 21 // Default constructor |
| 22 TpmInit(); |
| 23 |
| 24 virtual ~TpmInit(); |
| 25 |
| 26 // Starts asynchronous initialization of the TPM |
| 27 virtual bool StartInitializeTpm(); |
| 28 |
| 29 // Returns true if the TPM is initialized and ready for use |
| 30 virtual bool IsTpmReady(); |
| 31 |
| 32 // Returns true if the TPM is enabled |
| 33 virtual bool IsTpmEnabled(); |
| 34 |
| 35 // Gets the TPM password if the TPM initialization took ownership |
| 36 // |
| 37 // Parameters |
| 38 // password (OUT) - The owner password used for the TPM |
| 39 virtual bool GetTpmPassword(chromeos::Blob* password); |
| 40 |
| 41 // Returns the number of milliseconds it took to initialize the TPM |
| 42 virtual long GetInitializationMillis(); |
| 43 |
| 44 private: |
| 45 // The background task for initializing the TPM, implemented as a |
| 46 // PlatformThread::Delegate |
| 47 scoped_ptr<TpmInitTask> tpm_init_; |
| 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(TpmInit); |
| 50 }; |
| 51 |
| 52 } // namespace tpm_init |
| 53 |
| 54 #endif // TPM_INIT_TPM_INIT_H_ |
OLD | NEW |