#include <revolution/nwc24.h>
NWC24Err NWC24CheckMsgBoxSpace( NWC24MsgBoxId mboxId, u32 numMsgs, u32 size );
Determines in advance whether there is space enough to store the message in the specified message box when creating a message.
When attempting to store numMsgs messages with a total size of size to the specified message box, the function returns NWC24_OK if there is enough room to store the messages or NWC24_ERR_FULL if the messages cannot be stored, either because there are too many messages or their volume is too great.
This function can be used to check the available space in the outbox as well as the inbox. (There is no risk of not being able to store messages in the inbox, because older items are deleted to make room.)
Note: Whether the main text or attached binary is being measured, the size is calculated in Base64 encoding. In addition, NWC24CommitMsg may succeed even when NWC24_ERR_FULL is returned because the estimate is slightly larger than the size once it is actually stored in the message box file.
mboxId |
Message box type (NWC24_SEND_BOX/NWC24_RECV_BOX)
|
numMsgs |
Number of messages to be stored. |
size |
Total size for the message text and attached binary to be stored. |
NWC24_OK: Sufficient free space. NWC24_ERR_FULL: Insufficient free space. NWC24_ERR_LIB_NOT_OPENED: The library has not been opened. NWC24_ERR_INVALID_VALUE: A value other than NWC24_SEND_BOX or NWC24_RECV_BOX has been specified in mboxId. NWC24_ERR_FILE_*: Internal file operation error. NWC24_ERR_INTERNAL_VF: VF error caused by an internal function call. NWC24_ERR_VER_MISMATCH: Message box version error.
2008/01/17 Added return values that had been omitted.
2007/11/16 Initial version.
CONFIDENTIAL