OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2006-2008 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 BASE_FILE_VERSION_INFO_MAC_H_ |
| 6 #define BASE_FILE_VERSION_INFO_MAC_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/file_version_info.h" |
| 12 #include "base/scoped_ptr.h" |
| 13 |
| 14 #ifdef __OBJC__ |
| 15 @class NSBundle; |
| 16 #else |
| 17 class NSBundle; |
| 18 #endif |
| 19 |
| 20 class FilePath; |
| 21 |
| 22 // Provides a way to access the version information for a file. |
| 23 // This is the information you access when you select a file in the Windows |
| 24 // explorer, right-click select Properties, then click the Version tab. |
| 25 |
| 26 class FileVersionInfoMac : public FileVersionInfo { |
| 27 public: |
| 28 explicit FileVersionInfoMac(NSBundle *bundle); |
| 29 ~FileVersionInfoMac(); |
| 30 |
| 31 // Accessors to the different version properties. |
| 32 // Returns an empty string if the property is not found. |
| 33 virtual std::wstring company_name(); |
| 34 virtual std::wstring company_short_name(); |
| 35 virtual std::wstring product_name(); |
| 36 virtual std::wstring product_short_name(); |
| 37 virtual std::wstring internal_name(); |
| 38 virtual std::wstring product_version(); |
| 39 virtual std::wstring private_build(); |
| 40 virtual std::wstring special_build(); |
| 41 virtual std::wstring comments(); |
| 42 virtual std::wstring original_filename(); |
| 43 virtual std::wstring file_description(); |
| 44 virtual std::wstring file_version(); |
| 45 virtual std::wstring legal_copyright(); |
| 46 virtual std::wstring legal_trademarks(); |
| 47 virtual std::wstring last_change(); |
| 48 virtual bool is_official_build(); |
| 49 |
| 50 private: |
| 51 // Lets you access other properties not covered above. |
| 52 bool GetValue(const wchar_t* name, std::wstring* value); |
| 53 |
| 54 // Similar to GetValue but returns a wstring (empty string if the property |
| 55 // does not exist). |
| 56 std::wstring GetStringValue(const wchar_t* name); |
| 57 |
| 58 NSBundle *bundle_; |
| 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(FileVersionInfoMac); |
| 61 }; |
| 62 |
| 63 #endif // BASE_FILE_VERSION_INFO_MAC_H_ |
OLD | NEW |