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_MACH_BOOTSTRAP_H_ | |
16 #define CRASHPAD_UTIL_MACH_BOOTSTRAP_H_ | |
17 | |
18 #include <mach/mach.h> | |
19 | |
20 #include <string> | |
21 | |
22 namespace crashpad { | |
23 | |
24 //! \brief Calls `bootstrap_check_in()` to check in with the bootstrap server. | |
25 //! | |
26 //! \param[in] bp The bootstrap server to check in with. | |
27 //! \param[in] service_name The name of the service to check in. | |
28 //! \param[out] service_port The receive right for the checked-in service. | |
29 //! | |
30 //! \return `BOOTSTRAP_SUCCESS` on success, with \a service_port set | |
31 //! appropriately. Otherwise, any error that might be returned by | |
32 //! `bootstrap_check_in()`. | |
33 //! | |
34 //! This function is a wrapper around `bootstrap_check_in()`, checking in with | |
35 //! the bootstrap server at \a bp. It exists primarily for compatibility with | |
36 //! Mac OS X 10.5, where it is not possible to call `bootstrap_check_in()` for a | |
37 //! \a service_name that has not already been registered with the bootstrap | |
38 //! server using `bootstrap_register()`. `bootstrap_register()` was deprecated | |
39 //! in Mac OS X 10.5. | |
40 kern_return_t BootstrapCheckIn(mach_port_t bp, | |
41 const std::string& service_name, | |
42 mach_port_t* service_port); | |
43 | |
44 } // namespace crashpad | |
45 | |
46 #endif // CRASHPAD_UTIL_MACH_MACH_MESSAGE_SERVER_H_ | |
OLD | NEW |