OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | |
2 // | |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | |
4 // you may not use this file except in compliance with the License. | |
5 // You may obtain a copy of the License at | |
6 // | |
7 // http://www.apache.org/licenses/LICENSE-2.0 | |
8 // | |
9 // Unless required by applicable law or agreed to in writing, software | |
10 // distributed under the License is distributed on an "AS IS" BASIS, | |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 // See the License for the specific language governing permissions and | |
13 // limitations under the License. | |
14 | |
15 #ifndef CRASHPAD_UTIL_MAC_MAC_UTIL_H_ | |
16 #define CRASHPAD_UTIL_MAC_MAC_UTIL_H_ | |
17 | |
18 #include <string> | |
19 | |
20 namespace crashpad { | |
21 | |
22 //! \brief Returns the version of the running operating system. | |
23 //! | |
24 //! \return The minor version of the operating system, such as `9` for Mac OS X | |
25 //! 10.9.2. | |
26 //! | |
27 //! \note This is similar to the base::mac::IsOS*() family of functions, but | |
Mark Mentovai
2014/08/14 19:45:26
bpoop is completely compatible with 10.5 except fo
| |
28 //! is provided for situations where the caller needs to obtain version | |
29 //! information beyond what is provided by Chromium’s base, or for when the | |
30 //! caller needs the actual minor version value. | |
31 int MacOSXMinorVersion(); | |
32 | |
33 //! \brief Returns the version of the running operating system. | |
Robert Sesek
2014/08/15 21:31:54
Can I leave any of these NULL if I don't need the
Mark Mentovai
2014/08/16 05:30:48
rsesek wrote:
| |
34 //! | |
35 //! \param[out] major The major version of the operating system, such as `10` | |
36 //! for Mac OS X 10.9.2. | |
37 //! \param[out] minor The major version of the operating system, such as `9` for | |
38 //! Mac OS X 10.9.2. | |
39 //! \param[out] bugfix The bugfix version of the operating system, such as `2` | |
40 //! for Mac OS X 10.9.2. | |
41 //! \param[out] build The operating system’s build string, such as "13C64" for | |
42 //! Mac OS X 10.9.2. | |
43 //! \param[out] server `true` for a Mac OS X Server installation, `false` | |
44 //! otherwise (for a desktop/laptop, client, or workstation system). | |
45 //! \param[out] version_string A string representing the full operating system | |
46 //! version, such as `"Mac OS X 10.9.2 (13C64)"`. | |
47 //! | |
48 //! \return `true` on success, `false` on failure, with an error message logged. | |
49 //! A failure is considered to have occurred if any element could not be | |
50 //! determined. When this happens, their values will be untouched, but other | |
51 //! values that could be determined will still be set properly. | |
52 bool MacOSXVersion(int* major, | |
53 int* minor, | |
54 int* bugfix, | |
55 std::string* build, | |
56 bool* server, | |
57 std::string* version_string); | |
58 | |
59 //! \brief Returns the model name and board ID of the running system. | |
60 //! | |
61 //! \param[out] model The system’s model name. A mid-2012 15" MacBook Pro would | |
62 //! report “MacBookPro10,1”. | |
63 //! \param[out] board_id The system’s board ID. A mid-2012 15" MacBook Pro would | |
64 //! report “Mac-C3EC7CD22292981F”. | |
65 //! | |
66 //! If a value cannot be determined, its string is cleared. | |
67 void MacModelAndBoard(std::string* model, std::string* board_id); | |
68 | |
69 } // namespace crashpad | |
70 | |
71 #endif // CRASHPAD_UTIL_MAC_MAC_UTIL_H_ | |
OLD | NEW |