#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: The size is calculated in Base64 encoding regardless of the main text or attached binary. In addition, NWC24CommitMsg may succeed even when NWC24_ERR_FULL is returned because the estimate is slightly larger than the size once 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 space available.
NWC24_ERR_FULL: sufficient space not available.
NWC24_ERR_LIB_NOT_OPENED: the library is not open.
NWC24_ERR_INVALID_VALUE: A value other than NWC24_SEND_BOX or NWC24_RECV_BOX has been specified in mboxId.
NWC24_ERR_FILE_*: error related to internal file operations.
NWC24_ERR_VER_MISMATCH: message box version error.
2007/11/16 Initial version.
CONFIDENTIAL