nn::cec::CTR::MessageBox::WriteMessage Member Function

Syntax

nn::Result WriteMessage(
     const Message & cecMessage,
     const CecBoxType boxType,
     MessageId & messageIdOut,
     bool withWriteBoxInfo
);

Arguments

Name Description
in cecMessage An object of the Message class.
in boxType Inbox/outbox specification.
out messageIdOut Returns the MessageID that is assigned during the write.
in withWriteBoxInfo Updates to the internal message list are skipped when false is specified. The list is updated when the CommitMessageBox or CloseMessageBox function is called.

Return Values

nn::Result

Value Description
ResultSuccess Process succeeded.
ResultNotAuthorized The box has not been opened.
ResultMessTooLarge The message is too large.
ResultBoxSizeFull The box's capacity has been exceeded.
ResultBoxMessNumFull The maximum number of boxes has been exceeded.
ResultInvalidCombination The transmission count and propagation count have both been set equal to a value of 2 or greater.
ResultNotAgreeEula The user has not agreed to the EULA or the icon file was not configured.
ResultParentalControlCec Not allowed by Parental Controls.
ResultStateBusy Unable to access because the daemon is busy.
A value other than the above. Failed.

Description

Writes a message to the system save region.

The message cannot be written if its size is larger than 100 KB or if writing it would exceed the box's maximum storage capacity or maximum number of messages. After writing, the written data is committed after CloseMessageBox or CommitMessageBox are called.

If you set withWriteBoxInfo equal to false, updates to the internal message list are skipped. This allows you to shorten the amount of time taken to write multiple consecutive messages. Note that the GetMessageBoxXXX functions are unable to get accurate information if the list has not been updated.
When the function writes the message, it checks the EULA agreement version, and if the icon file is not configured, the function returns ResultNotAgreeEula.
You must initialize the FS library before calling this function because this function uses the FS library to check the EULA.


CONFIDENTIAL