| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMEOS_SYSTEM_VERSION_LOADER_H_ | 5 #ifndef CHROMEOS_SYSTEM_VERSION_LOADER_H_ |
| 6 #define CHROMEOS_SYSTEM_VERSION_LOADER_H_ | 6 #define CHROMEOS_SYSTEM_VERSION_LOADER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chromeos/chromeos_export.h" | 10 #include "chromeos/chromeos_export.h" |
| 11 | 11 |
| 12 namespace chromeos { | 12 namespace chromeos { |
| 13 namespace version_loader { | 13 namespace version_loader { |
| 14 | 14 |
| 15 enum VersionFormat { | 15 enum VersionFormat { |
| 16 VERSION_SHORT, | 16 VERSION_SHORT, |
| 17 VERSION_SHORT_WITH_DATE, | 17 VERSION_SHORT_WITH_DATE, |
| 18 VERSION_FULL, | 18 VERSION_FULL, |
| 19 }; | 19 }; |
| 20 | 20 |
| 21 // Gets the version. | 21 // Gets the version. |
| 22 // If |full_version| is true version string with extra info is extracted, | 22 // If |full_version| is true version string with extra info is extracted, |
| 23 // otherwise it's in short format x.x.xx.x. | 23 // otherwise it's in short format x.x.xx.x. |
| 24 // Must be run on a blocking thread pool. | 24 // May block. |
| 25 CHROMEOS_EXPORT std::string GetVersion(VersionFormat format); | 25 CHROMEOS_EXPORT std::string GetVersion(VersionFormat format); |
| 26 | 26 |
| 27 // Gets the ARC version. | 27 // Gets the ARC version. |
| 28 // Must be run on a blocking thread pool. | 28 // May block. |
| 29 CHROMEOS_EXPORT std::string GetARCVersion(); | 29 CHROMEOS_EXPORT std::string GetARCVersion(); |
| 30 | 30 |
| 31 // Gets the firmware info. | 31 // Gets the firmware info. |
| 32 // Must be run on a blocking thread pool. | 32 // May block. |
| 33 CHROMEOS_EXPORT std::string GetFirmware(); | 33 CHROMEOS_EXPORT std::string GetFirmware(); |
| 34 | 34 |
| 35 // Extracts the firmware from the file. | 35 // Extracts the firmware from the file. |
| 36 CHROMEOS_EXPORT std::string ParseFirmware(const std::string& contents); | 36 CHROMEOS_EXPORT std::string ParseFirmware(const std::string& contents); |
| 37 | 37 |
| 38 } // namespace version_loader | 38 } // namespace version_loader |
| 39 } // namespace chromeos | 39 } // namespace chromeos |
| 40 | 40 |
| 41 #endif // CHROMEOS_SYSTEM_VERSION_LOADER_H_ | 41 #endif // CHROMEOS_SYSTEM_VERSION_LOADER_H_ |
| OLD | NEW |