Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: util/mach/mach_message_util.h

Issue 755313004: Pass Mach message trailers to server handler functions (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « util/mach/mach_message_server.cc ('k') | util/mach/mach_message_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 30 matching lines...) Expand all
41 //! \param[inout] out_header The reply message to operate on. \a out_header will 41 //! \param[inout] out_header The reply message to operate on. \a out_header will
42 //! be treated as a `mig_reply_error_t*` and its `RetCode` field will be 42 //! be treated as a `mig_reply_error_t*` and its `RetCode` field will be
43 //! set. This argument is accepted as a `mach_msg_header_t*` instead of a 43 //! set. This argument is accepted as a `mach_msg_header_t*` instead of a
44 //! `mig_reply_error_t*` because that is the type that callers are expected 44 //! `mig_reply_error_t*` because that is the type that callers are expected
45 //! to possess in the C API. 45 //! to possess in the C API.
46 //! \param[in] error The error code to store in \a out_header. 46 //! \param[in] error The error code to store in \a out_header.
47 //! 47 //!
48 //! \sa PrepareMIGReplyFromRequest() 48 //! \sa PrepareMIGReplyFromRequest()
49 void SetMIGReplyError(mach_msg_header_t* out_header, kern_return_t error); 49 void SetMIGReplyError(mach_msg_header_t* out_header, kern_return_t error);
50 50
51 //! \brief Returns a Mach message trailer for a message that has been received.
52 //!
53 //! This function must only be called on Mach messages that have been received
54 //! via the Mach messaging interface, such as `mach_msg()`. Messages constructed
55 //! for sending do not contain trailers.
56 //!
57 //! \param[in] header A pointer to a received Mach message.
58 //!
59 //! \return A pointer to the trailer following the received Mach message’s body.
60 //! The contents of the trailer depend on the options provided to
61 //! `mach_msg()` or a similar function when the message was received.
62 const mach_msg_trailer_t* MachMessageTrailerFromHeader(
63 const mach_msg_header_t* header);
64
51 } // namespace crashpad 65 } // namespace crashpad
52 66
53 #endif // CRASHPAD_UTIL_MACH_MACH_MESSAGE_UTIL_H_ 67 #endif // CRASHPAD_UTIL_MACH_MACH_MESSAGE_UTIL_H_
OLDNEW
« no previous file with comments | « util/mach/mach_message_server.cc ('k') | util/mach/mach_message_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698