class HLCPPOutgoingMessage

Defined at line 286 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h

An outgoing 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 HLCPPOutgoingMessage object does not own the storage for the message parts.

Public Methods

void HLCPPOutgoingMessage ()

Creates a message without any storage.

Defined at line 161 of file ../../sdk/lib/fidl/hlcpp/message.cc

void HLCPPOutgoingMessage (BytePart bytes, HandleDispositionPart 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 163 of file ../../sdk/lib/fidl/hlcpp/message.cc

void HLCPPOutgoingMessage (HLCPPOutgoingMessage && other)

Defined at line 168 of file ../../sdk/lib/fidl/hlcpp/message.cc

HLCPPOutgoingMessage & operator= (HLCPPOutgoingMessage && other)

Defined at line 171 of file ../../sdk/lib/fidl/hlcpp/message.cc

zx_status_t Validate (const fidl_type_t * type, const char ** error_msg_out)

Validates the transactional message body in-place.

The message must already be in an encoded state, for example, either by

being read from a zx_channel_t or having been created in that state.

Does not modify the message.

Defined at line 177 of file ../../sdk/lib/fidl/hlcpp/message.cc

zx_status_t Write (zx_handle_t channel, uint32_t flags)

Writes a transactional message to the given channel.

The bytes stored in bytes() are written to the channel and the handles

stored in handles() are written to the channel.

If this method returns ZX_OK, handles() will be empty because they were

consumed by this operation.

Defined at line 188 of file ../../sdk/lib/fidl/hlcpp/message.cc

zx_status_t Call (zx_handle_t channel, uint32_t flags, zx_time_t deadline, HLCPPIncomingMessage * response)

Issues a synchronous send and receive transaction on the given channel.

The bytes stored in bytes() are written to the channel and the handles

stored in handles() are written to the channel. The bytes read from the

channel are stored in response->bytes() and the handles read from the

channel are stored in response->handles().

If this method returns ZX_OK, handles() will be empty because they were

consumed by this operation.

Defined at line 198 of file ../../sdk/lib/fidl/hlcpp/message.cc

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 222 of file ../../sdk/lib/fidl/hlcpp/message.cc

void HLCPPOutgoingMessage (const HLCPPOutgoingMessage & other)

Defined at line 298 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h

HLCPPOutgoingMessage & operator= (const HLCPPOutgoingMessage & other)

Defined at line 299 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 305 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h

fidl_message_header_t & header ()

Defined at line 308 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 313 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h

void set_txid (zx_txid_t txid)

Defined at line 314 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h

uint64_t ordinal ()

The ordinal in the message header.

Defined at line 317 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h

const HLCPPOutgoingBody & body_view ()

The message body that follows the header.

Defined at line 320 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 323 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 326 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h

void set_bytes (BytePart bytes)

Defined at line 328 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h

void resize_bytes (uint32_t num_bytes)

Defined at line 332 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h

HandleDispositionPart & handles ()

The storage for the handles of the 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 342 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h

const HandleDispositionPart & handles ()

Defined at line 343 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/message.h