Tizen Native API
4.0
|
The MMS API provides functions to manage attachments and subject of the MMS message.
#include <messages.h>
The MMS API provides the following functionalities:
This API is related with the following features:
Functions | |
int | messages_mms_set_subject (messages_message_h msg, const char *subject) |
Sets the subject of the message. | |
int | messages_mms_get_subject (messages_message_h msg, char **subject) |
Gets the subject of the message. | |
int | messages_mms_add_attachment (messages_message_h msg, messages_media_type_e type, const char *path) |
Adds the attachment to the MMS message. | |
int | messages_mms_get_attachment (messages_message_h msg, int index, messages_media_type_e *type, char **path) |
Gets the file path of the attachment with the specified index. | |
int | messages_mms_get_attachment_count (messages_message_h msg, int *count) |
Gets the attachment with the specified index. | |
int | messages_mms_remove_all_attachments (messages_message_h msg) |
Removes all attachments to the MMS message. |
int messages_mms_add_attachment | ( | messages_message_h | msg, |
messages_media_type_e | type, | ||
const char * | path | ||
) |
Adds the attachment to the MMS message.
[in] | msg | The message handle |
[in] | type | The attachment type |
[in] | path | The file path to attach The maximum length of path is 1024 |
0
on success, otherwise a negative error value MESSAGES_ERROR_NONE | Successful |
MESSAGES_ERROR_INVALID_PARAMETER | Invalid parameter |
MESSAGES_ERROR_OUT_OF_MEMORY | Out of memory |
MESSAGES_ERROR_NOT_SUPPORTED | Not supported |
int messages_mms_get_attachment | ( | messages_message_h | msg, |
int | index, | ||
messages_media_type_e * | type, | ||
char ** | path | ||
) |
Gets the file path of the attachment with the specified index.
[in] | msg | The message handle |
[in] | index | The zero-based index of the attachment |
[out] | type | The attachment type |
[out] | path | The file path to attach |
0
on success, otherwise a negative error value MESSAGES_ERROR_NONE | Successful |
MESSAGES_ERROR_INVALID_PARAMETER | Invalid parameter |
MESSAGES_ERROR_OUT_OF_MEMORY | Out of memory |
MESSAGES_ERROR_NOT_SUPPORTED | Not supported |
int messages_mms_get_attachment_count | ( | messages_message_h | msg, |
int * | count | ||
) |
Gets the attachment with the specified index.
[in] | msg | The message handle |
[out] | count | The total number of attachments |
0
on success, otherwise a negative error value MESSAGES_ERROR_NONE | Successful |
MESSAGES_ERROR_INVALID_PARAMETER | Invalid parameter |
MESSAGES_ERROR_NOT_SUPPORTED | Not supported |
int messages_mms_get_subject | ( | messages_message_h | msg, |
char ** | subject | ||
) |
Gets the subject of the message.
[in] | msg | The message handle |
[out] | subject | The subject of the message |
0
on success, otherwise a negative error value MESSAGES_ERROR_NONE | Successful |
MESSAGES_ERROR_INVALID_PARAMETER | Invalid parameter |
MESSAGES_ERROR_OUT_OF_MEMORY | Out of memory |
MESSAGES_ERROR_NOT_SUPPORTED | Not supported |
Removes all attachments to the MMS message.
[in] | msg | The message handle |
0
on success, otherwise a negative error value MESSAGES_ERROR_NONE | Successful |
MESSAGES_ERROR_INVALID_PARAMETER | Invalid parameter |
MESSAGES_ERROR_NOT_SUPPORTED | Not supported |
int messages_mms_set_subject | ( | messages_message_h | msg, |
const char * | subject | ||
) |
Sets the subject of the message.
[in] | msg | The message handle |
[in] | subject | The subject of the message The maximum length of subject is 120 |
0
on success, otherwise a negative error value MESSAGES_ERROR_NONE | Successful |
MESSAGES_ERROR_INVALID_PARAMETER | Invalid parameter |
MESSAGES_ERROR_NOT_SUPPORTED | Not supported |