Avi Drissman | e4622aa | 2022-09-08 20:36:06 | [diff] [blame] | 1 | // Copyright 2011 The Chromium Authors |
[email protected] | bcff05a | 2010-04-14 01:46:43 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
Avi Drissman | 412e7b7 | 2023-08-15 00:33:44 | [diff] [blame] | 5 | #ifndef BASE_FILE_VERSION_INFO_APPLE_H_ |
6 | #define BASE_FILE_VERSION_INFO_APPLE_H_ | ||||
7 | |||||
tapted | 05d4a5b | 2015-05-04 07:20:12 | [diff] [blame] | 8 | #include <CoreFoundation/CoreFoundation.h> |
Avi Drissman | 6fdbaf08 | 2023-06-07 19:35:09 | [diff] [blame] | 9 | |
[email protected] | bcff05a | 2010-04-14 01:46:43 | [diff] [blame] | 10 | #include <string> |
11 | |||||
Peter Kasting | 134ef9af | 2024-12-28 02:30:09 | [diff] [blame] | 12 | #include "base/file_version_info.h" |
13 | |||||
[email protected] | bcff05a | 2010-04-14 01:46:43 | [diff] [blame] | 14 | @class NSBundle; |
[email protected] | bcff05a | 2010-04-14 01:46:43 | [diff] [blame] | 15 | |
Avi Drissman | 412e7b7 | 2023-08-15 00:33:44 | [diff] [blame] | 16 | class FileVersionInfoApple : public FileVersionInfo { |
[email protected] | bcff05a | 2010-04-14 01:46:43 | [diff] [blame] | 17 | public: |
Avi Drissman | 412e7b7 | 2023-08-15 00:33:44 | [diff] [blame] | 18 | explicit FileVersionInfoApple(NSBundle* bundle); |
19 | FileVersionInfoApple(const FileVersionInfoApple&) = delete; | ||||
20 | FileVersionInfoApple& operator=(const FileVersionInfoApple&) = delete; | ||||
21 | ~FileVersionInfoApple() override; | ||||
[email protected] | bcff05a | 2010-04-14 01:46:43 | [diff] [blame] | 22 | |
23 | // Accessors to the different version properties. | ||||
24 | // Returns an empty string if the property is not found. | ||||
Jan Wilken Dörrie | 85285b0 | 2021-03-11 23:38:47 | [diff] [blame] | 25 | std::u16string company_name() override; |
26 | std::u16string company_short_name() override; | ||||
27 | std::u16string product_name() override; | ||||
28 | std::u16string product_short_name() override; | ||||
29 | std::u16string internal_name() override; | ||||
30 | std::u16string product_version() override; | ||||
31 | std::u16string special_build() override; | ||||
32 | std::u16string original_filename() override; | ||||
33 | std::u16string file_description() override; | ||||
34 | std::u16string file_version() override; | ||||
[email protected] | bcff05a | 2010-04-14 01:46:43 | [diff] [blame] | 35 | |
36 | private: | ||||
Jan Wilken Dörrie | 85285b0 | 2021-03-11 23:38:47 | [diff] [blame] | 37 | // Returns a std::u16string value for a property name. |
[email protected] | 7c1e303 | 2010-12-20 18:40:42 | [diff] [blame] | 38 | // Returns the empty string if the property does not exist. |
Jan Wilken Dörrie | 85285b0 | 2021-03-11 23:38:47 | [diff] [blame] | 39 | std::u16string GetString16Value(CFStringRef name); |
[email protected] | 7c1e303 | 2010-12-20 18:40:42 | [diff] [blame] | 40 | |
Avi Drissman | 6fdbaf08 | 2023-06-07 19:35:09 | [diff] [blame] | 41 | NSBundle* __strong bundle_; |
[email protected] | bcff05a | 2010-04-14 01:46:43 | [diff] [blame] | 42 | }; |
43 | |||||
Avi Drissman | 412e7b7 | 2023-08-15 00:33:44 | [diff] [blame] | 44 | #endif // BASE_FILE_VERSION_INFO_APPLE_H_ |