class HLCPPIncomingMessage
Defined at line 102 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
An incoming FIDL transactional message.
A FIDL transactional message has two parts: the |bytes| and the |handles|. The |bytes| are
divided into a header (of type fidl_message_header_t) and a body, which follows the header.
A HLCPPIncomingMessage object does not own the storage for the message parts.
Public Methods
void HLCPPIncomingMessage ()
Creates a message without any storage.
Defined at line 79 of file ../../sdk/lib/fidl/hlcpp/message.cc
void HLCPPIncomingMessage (BytePart bytes, HandleInfoPart handles)
Creates a message whose storage is backed by |bytes| and |handles|.
The constructed |Message| object does not take ownership of the given
storage, although does take ownership of zircon handles contained withing
handles.
Defined at line 81 of file ../../sdk/lib/fidl/hlcpp/message.cc
void HLCPPIncomingMessage (HLCPPIncomingMessage && other)
Defined at line 86 of file ../../sdk/lib/fidl/hlcpp/message.cc
HLCPPIncomingMessage & operator= (HLCPPIncomingMessage && other)
Defined at line 89 of file ../../sdk/lib/fidl/hlcpp/message.cc
zx_status_t Decode (const fidl_type_t * type, const char ** error_msg_out)
Decodes the transactional message in-place.
The transactional message must previously have been in an encoded state, for example, either by
being read from a zx_channel_t or having been encoded using the |Encode| method.
Defined at line 95 of file ../../sdk/lib/fidl/hlcpp/message.cc
zx_status_t Read (zx_handle_t channel, uint32_t flags)
Read a transactional message from the given channel.
The bytes read from the channel are stored in |bytes()| and the handles read from the channel
are stored in |handles()|. Existing data in these buffers is overwritten.
Defined at line 102 of file ../../sdk/lib/fidl/hlcpp/message.cc
void HLCPPIncomingMessage (const HLCPPIncomingMessage & other)
Defined at line 114 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
HLCPPIncomingMessage & operator= (const HLCPPIncomingMessage & other)
Defined at line 115 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
const fidl_message_header_t & header ()
The header at the start of the message.
Defined at line 121 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
void ClearHandlesUnsafe ()
Stop tracking the handles in stored in handles(), without closing them.
Typically, these handles will be extracted during decode or the
message's destructor, so this function will be unnecessary. However,
for clients of ulib/fidl which decode message manually, this function
is necessary to prevent extracted handles from being closed.
Defined at line 123 of file ../../sdk/lib/fidl/hlcpp/message.cc
fidl_message_header_t & header ()
Defined at line 124 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
zx_txid_t txid ()
The transaction ID in the message header.
Defined at line 129 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
void set_txid (zx_txid_t txid)
Defined at line 130 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
uint64_t ordinal ()
The ordinal in the message header.
Defined at line 133 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
bool is_supported_version ()
Whether this message is in a supported version of the wire format.
Defined at line 136 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
bool is_flexible ()
Returns true if this message is requesting the message be treated as a flexible method.
Defined at line 139 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
const HLCPPIncomingBody & body_view ()
The message body that follows the header.
Defined at line 144 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
HLCPPIncomingBody & body_view ()
Defined at line 145 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
bool has_only_header ()
Is this a message containing only a header?
Defined at line 148 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
template <typename T>
T * GetBodyViewAs ()
The message payload that follows the header interpreted as the given type.
Defined at line 152 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
const BytePart & bytes ()
The storage for the bytes of the transactional message.
Defined at line 157 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
template <typename T>
T * GetBytesAs ()
The message bytes interpreted as the given type.
Defined at line 161 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
void set_bytes (BytePart bytes)
Defined at line 165 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
void resize_bytes (uint32_t num_bytes)
Defined at line 169 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
HandleInfoPart & handles ()
The storage for the handles of the transactional message.
When the message is encoded, the handle values are stored in this part of the message. When the
message is decoded, this part of the message is empty and the handle values are stored in the
|bytes()|.
Defined at line 179 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h
const HandleInfoPart & handles ()
Defined at line 180 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h