1 // Copyright 2013 The Chromium 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 #ifndef CHROMEOS_CRYPTOHOME_CRYPTOHOME_UTIL_H_ 6 #define CHROMEOS_CRYPTOHOME_CRYPTOHOME_UTIL_H_ 7 8 #include <string> 9 10 #include "chromeos/chromeos_export.h" 11 12 namespace chromeos { 13 14 // Wrappers of the D-Bus method calls for working with Tpm. 15 namespace cryptohome_util { 16 17 // Returns whether Tpm is presented and enabled. 18 CHROMEOS_EXPORT bool TpmIsEnabled(); 19 20 // Returns whether device has already been owned. 21 CHROMEOS_EXPORT bool TpmIsOwned(); 22 23 // Returns whether device is being owned (Tpm password is generating). 24 CHROMEOS_EXPORT bool TpmIsBeingOwned(); 25 26 CHROMEOS_EXPORT bool InstallAttributesGet(const std::string& name, 27 std::string* value); 28 CHROMEOS_EXPORT bool InstallAttributesSet(const std::string& name, 29 const std::string& value); 30 CHROMEOS_EXPORT bool InstallAttributesFinalize(); 31 CHROMEOS_EXPORT bool InstallAttributesIsInvalid(); 32 CHROMEOS_EXPORT bool InstallAttributesIsFirstInstall(); 33 34 } // namespace cryptohome_util 35 } // namespace chromeos 36 37 #endif // CHROMEOS_CRYPTOHOME_CRYPTOHOME_UTIL_H_ 38