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

Syntax

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

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.

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.
ResultNoData No message body or icon has been set for the message.
ResultInvalidCombination The send count and propagation count have both been set equal to a value of 2 or greater.
ResultNotAgreeEula The EULA has not been agreed to, or no icon file (ICN file) is configured in the ROM.
ResultParentalControlCec Not allowed by Parental Controls.
ResultStateBusy Unable to access because the daemon is busy (BUSY state).
A value other than the above. Failed.

Description

Writes a message to the system save region.

The message cannot be written if it is larger than 100 KB (including data such as the header and icon) or if it would exceed the box's maximum storage capacity or maximum number of messages. Because NAND memory (the save region) uses a block size of 4 KB, for some message sizes it may be impossible to write up to the maximum storage capacity. After writing, the written data is committed when the CloseMessageBox or CommitMessageBox function is called.
When this function writes a message it checks the agreed EULA version. If no icon file (ICN file) is configured in the ROM, this function returns ResultNotAgreeEula in that situation also.
You must initialize the FS library before calling this function because the check uses FS library features.


CONFIDENTIAL