blob: a1d59c22e46f3b8c8dbc1801bf6272e2fc8bc8fa [file] [log] [blame]
Avi Drissmane4622aa2022-09-08 20:36:061// Copyright 2011 The Chromium Authors
[email protected]bcff05a2010-04-14 01:46:432// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Avi Drissman412e7b72023-08-15 00:33:445#ifndef BASE_FILE_VERSION_INFO_APPLE_H_
6#define BASE_FILE_VERSION_INFO_APPLE_H_
7
tapted05d4a5b2015-05-04 07:20:128#include <CoreFoundation/CoreFoundation.h>
Avi Drissman6fdbaf082023-06-07 19:35:099
[email protected]bcff05a2010-04-14 01:46:4310#include <string>
11
Peter Kasting134ef9af2024-12-28 02:30:0912#include "base/file_version_info.h"
13
[email protected]bcff05a2010-04-14 01:46:4314@class NSBundle;
[email protected]bcff05a2010-04-14 01:46:4315
Avi Drissman412e7b72023-08-15 00:33:4416class FileVersionInfoApple : public FileVersionInfo {
[email protected]bcff05a2010-04-14 01:46:4317 public:
Avi Drissman412e7b72023-08-15 00:33:4418 explicit FileVersionInfoApple(NSBundle* bundle);
19 FileVersionInfoApple(const FileVersionInfoApple&) = delete;
20 FileVersionInfoApple& operator=(const FileVersionInfoApple&) = delete;
21 ~FileVersionInfoApple() override;
[email protected]bcff05a2010-04-14 01:46:4322
23 // Accessors to the different version properties.
24 // Returns an empty string if the property is not found.
Jan Wilken Dörrie85285b02021-03-11 23:38:4725 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]bcff05a2010-04-14 01:46:4335
36 private:
Jan Wilken Dörrie85285b02021-03-11 23:38:4737 // Returns a std::u16string value for a property name.
[email protected]7c1e3032010-12-20 18:40:4238 // Returns the empty string if the property does not exist.
Jan Wilken Dörrie85285b02021-03-11 23:38:4739 std::u16string GetString16Value(CFStringRef name);
[email protected]7c1e3032010-12-20 18:40:4240
Avi Drissman6fdbaf082023-06-07 19:35:0941 NSBundle* __strong bundle_;
[email protected]bcff05a2010-04-14 01:46:4342};
43
Avi Drissman412e7b72023-08-15 00:33:4444#endif // BASE_FILE_VERSION_INFO_APPLE_H_