nn::cec::CTR::MessageBox::ReadMessage Member Functionnn::Result ReadMessage( Message & cecMessage, void * buf, const size_t bufLen, const CecBoxType boxType, const MessageId & messageId );
| Name | Description | |
|---|---|---|
| out | cecMessage | Object of the Message class where the data should be loaded. |
| out | buf | Buffer that stores a Message binary array. |
| in | bufLen | Buffer size. |
| in | boxType | Inbox/outbox specification. |
| in | messageId | Specifies a MessageId. |
nn::Result| Value | Description |
|---|---|
ResultSuccess |
Process succeeded. |
ResultStateBusy |
Unable to access because the daemon is busy (BUSY state). This may succeed if you wait some time before accessing again. |
ResultNotAuthorized |
The box has not been opened. |
ResultInvalidArgument |
Could not read, because an incorrect argument was specified. |
| A value other than the above. | Failed. |
Reads a Message.
nn::Result result = ReadMessage();
if(result.IsFailure())
{
if(result == nn::cec::ResultNotAuthorized())
{
// Box is not open
// --> OpenMessageBox
}
else if(result == nn::cec::ResultStateBusy())
{
// Daemon is BUSY. This state will never normally occur, but it might be possible to succeed by retrying.
}
else if(result == nn::cec::ResultInvalidArgument() )
{
// Invalid parameter.
}
else
{
// Reading failed.
}
return result; // Failure
}
return result; // Success
CONFIDENTIAL