Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Unified Diff: tpm_init.h

Issue 3048029: Initial version of tpm_init, a library for taking ownership of the TPM. (Closed) Base URL: ssh://git@chromiumos-git/tpm_init.git
Patch Set: Minor fix to the error code check from TakeOwnership. Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tpm.cc ('k') | tpm_init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « tpm.cc ('k') | tpm_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698