#include <revolution/nwc24.h>
NWC24Err NWC24SetMsgAttached(
NWC24MsgObj* obj,
const char* data,
u32 size,
NWC24MIMEType type
);
Attaches binary data to the message. A maximum of two pieces of data can be attached to a single message. To perform multiple binary attachments, NWC24SetMsgAttached() must be called as many times as needed.
The amount of binary data that can be attached depends on the size of the document, but the maximum total size is 148,912 bytes. The type of the binary data is a separate factor that also limits the size.
The buffer given by the data argument is not freed until NWC24CommitMsg() is called and creation of the message is complete.
obj |
Pointer to the message object to be set. | ||||||||
data |
Pointer to the binary data to be attached. | ||||||||
size |
The size of binary data specified by dataUpper limit: 148,912 bytes (when the two are taken together) |
||||||||
type |
Binary data type.
Note: Operations are not guaranteed if you specify any values defined in NWC24MIMEType other than those described above.
|
NWC24_OK: Normal termination.
NWC24_ERR_PROTECTED: Cannot change message object.
NWC24_ERR_NULL: The data argument is a null pointer, or size is zero.
NWC24_ERR_FULL: The limit has been reached already for attached binary data.
NWC24_ERR_OVERFLOW: The binary data size has exceeded the attachable limit.
NWC24_ERR_INVALID_VALUE: Invalid binary data type specified for type.NWC24_ERR_NOT_SUPPORTED: Data format is not supported.
2007/11/21 Changed descriptions to match the current implementation.
2007/07/26 Changed descriptions to match the current implementation.
2007/07/12 Added a description of size restrictions.
2007/05/03 Added a note about the values that can be specified for type.
2006/11/13 Added a description of buffer handling.
2006/10/06 Incorporated name changes for binary data types.
2006/08/01 Initial version.
CONFIDENTIAL