| OLD | NEW |
| 1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with 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 | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 //! handle the request and populate the reply. | 146 //! handle the request and populate the reply. |
| 147 //! \param[in] receive_port The port on which to receive the request message. | 147 //! \param[in] receive_port The port on which to receive the request message. |
| 148 //! \param[in] options Options suitable for mach_msg. For the defaults, use | 148 //! \param[in] options Options suitable for mach_msg. For the defaults, use |
| 149 //! `MACH_MSG_OPTION_NONE`. `MACH_RCV_LARGE` when specified here is | 149 //! `MACH_MSG_OPTION_NONE`. `MACH_RCV_LARGE` when specified here is |
| 150 //! ignored. Set \a receive_large to #kReceiveLargeResize instead. | 150 //! ignored. Set \a receive_large to #kReceiveLargeResize instead. |
| 151 //! \param[in] persistent Chooses between one-shot and persistent operation. | 151 //! \param[in] persistent Chooses between one-shot and persistent operation. |
| 152 //! \param[in] receive_large Determines the behavior upon encountering a | 152 //! \param[in] receive_large Determines the behavior upon encountering a |
| 153 //! message larger than the receive buffer’s size. | 153 //! message larger than the receive buffer’s size. |
| 154 //! \param[in] timeout_ms The maximum duration that this entire function will | 154 //! \param[in] timeout_ms The maximum duration that this entire function will |
| 155 //! run, in milliseconds. This may be #kMachMessageTimeoutNonblocking or | 155 //! run, in milliseconds. This may be #kMachMessageTimeoutNonblocking or |
| 156 //! #kMachMessageTimeoutWaitIndefinitely. When \a persistent is `true`, | 156 //! #kMachMessageTimeoutWaitIndefinitely. When \a persistent is |
| 157 //! the timeout applies to the overall duration of this function, not to | 157 //! #kPersistent, the timeout applies to the overall duration of this |
| 158 //! any individual `mach_msg()` call. | 158 //! function, not to any individual `mach_msg()` call. |
| 159 //! | 159 //! |
| 160 //! \return On success, `KERN_SUCCESS` (when \a persistent is `false`) or | 160 //! \return On success, `KERN_SUCCESS` (when \a persistent is #kOneShot) or |
| 161 //! `MACH_RCV_TIMED_OUT` (when \a persistent is `true` and \a timeout_ms | 161 //! `MACH_RCV_TIMED_OUT` (when \a persistent is #kOneShot and \a |
| 162 //! is not #kMachMessageTimeoutWaitIndefinitely). This function has no | 162 //! timeout_ms is not #kMachMessageTimeoutWaitIndefinitely). This function |
| 163 //! successful return value when \a persistent is `true` and \a timeout_ms | 163 //! has no successful return value when \a persistent is #kPersistent and |
| 164 //! is #kMachMessageTimeoutWaitIndefinitely. On failure, returns a value | 164 //! \a timeout_ms is #kMachMessageTimeoutWaitIndefinitely. On failure, |
| 165 //! identifying the nature of the error. | 165 //! returns a value identifying the nature of the error. |
| 166 static mach_msg_return_t Run(Interface* interface, | 166 static mach_msg_return_t Run(Interface* interface, |
| 167 mach_port_t receive_port, | 167 mach_port_t receive_port, |
| 168 mach_msg_options_t options, | 168 mach_msg_options_t options, |
| 169 Persistent persistent, | 169 Persistent persistent, |
| 170 ReceiveLarge receive_large, | 170 ReceiveLarge receive_large, |
| 171 mach_msg_timeout_t timeout_ms); | 171 mach_msg_timeout_t timeout_ms); |
| 172 | 172 |
| 173 private: | 173 private: |
| 174 DISALLOW_IMPLICIT_CONSTRUCTORS(MachMessageServer); | 174 DISALLOW_IMPLICIT_CONSTRUCTORS(MachMessageServer); |
| 175 }; | 175 }; |
| 176 | 176 |
| 177 } // namespace crashpad | 177 } // namespace crashpad |
| 178 | 178 |
| 179 #endif // CRASHPAD_UTIL_MACH_MACH_MESSAGE_SERVER_H_ | 179 #endif // CRASHPAD_UTIL_MACH_MACH_MESSAGE_SERVER_H_ |
| OLD | NEW |