📄 mmstypes.h
字号:
/*! The file where the body part is stored. */
MmsFileReference file;
} data; /*!< Contains either the buffer or a file reference to the data. */
} MmsBodyPart;
/*!
* \struct MmsMessageInfo
* \brief Contains information about a message and body.
*/
typedef struct
{
/*! Total number of message parts in a message body. */
UINT32 numOfMsgInfo;
/*! Size of the header. */
UINT32 headerSize;
/*! Number of sub parts for entire multipart message. 0 if not a multipart */
UINT32 numOfEntries;
/*! List with all content types in a message body */
MmsBodyInfoList *list;
} MmsMessageInfo;
/*! \struct MmsSetBodyParams
* \brief A struct containing information about the body
* part. All parameters are used when adding a body part, hence
* none should be left unset.
*/
typedef struct
{
MmsMsgId msgId; /*!< The message to append to */
MmsEntryHeader *entryHeader; /*!< Entry headers. NULL if none. */
MmsContentType contentType; /*!< The content type information */
MmsBodyPartTarget targetType; /*!< The type of message the part is added to */
MmsBodyPart bodyPart; /*!< The body data */
} MmsSetBodyParams;
/*! \union MmsMessagePart
* \brief A Multimedia Message can be of three different types.
* This union contains the data returned as a
* response to MMSa_getMessage.
*/
typedef union
{
MmsNotification notification; /*!< The returned data contains a notification. */
MmsHeader header; /*!< The returned data contains a header. */
MmsMessageInfo messageInfo; /*!< The returned data contains a message info. */
} MmsMessagePart;
/*! MmsRequestId A unique ID for all active GET/POST requests towards MIC */
typedef int MmsRequestId;
/*! \enum MmsMsgType Possible message types, see also #MmsMessagePart */
typedef enum
{
MMS_MSG_HEADER, /*!< The header part of a Multimedia Message */
MMS_MSG_NOTIFICATION, /*!< The Notification Message */
MMS_MSG_INFO /*!< Message information */
} MmsMsgType;
/*! \enum MmsNotificationType Possible notification types */
typedef enum
{
/*! A normal notification indicating a Multimedia Message. Can only be sent
* if delayed retrieval is active.
*/
MMS_NOTIFICATION_NORMAL,
/*! A notification indicating that a Multimedia Message is retrieved and
* stored in a folder. Can only be sent if immediate retrieval is active.
*/
MMS_NOTIFICATION_MESSAGE,
/*! A notification indicating that a Read Report is received.
*/
MMS_NOTIFICATION_READ,
/*! A notification indicating that a Delivery Report is received.
*/
MMS_NOTIFICATION_DELIVERED
} MmsNotificationType;
/*! \enum MmsNotificationReason Reason why a notification is received */
typedef enum
{
/*! The notification is received the normal way.
*/
MMS_NOTIFICATION_REASON_NORMAL,
/*! The notification is received because the immediate retrieval operation
* was cancelled by the user (requires #MMS_CFG_IMMEDIATE_RETRIEVAL to be
* set to TRUE).
*/
MMS_NOTIFICATION_REASON_CANCELLED_BY_USER,
/*! The notification is received because the immediate retrieval conditions
* where not fulfilled (requires #MMS_CFG_IMMEDIATE_RETRIEVAL to be set
* to TRUE).
*/
MMS_NOTIFICATION_REASON_CONDITION_NOT_FULFILLED,
/*! The notification is received because the immediate retrieval operation
* failed (requires #MMS_CFG_IMMEDIATE_RETRIEVAL to be set to TRUE).
*/
MMS_NOTIFICATION_REASON_DOWNLOAD_FAILED,
/*! The notification is received because the message size exceeded the
* remaining persistent storage (requires #MMS_CFG_IMMEDIATE_RETRIEVAL
* to be set to TRUE).
*/
MMS_NOTIFICATION_REASON_FULL_PERSISTENT_STORAGE,
/*! The notification is received because the message size exceeded the
* maximum allowed download size (requires #MMS_CFG_IMMEDIATE_RETRIEVAL
* to be set to TRUE).
*/
MMS_NOTIFICATION_REASON_MAX_DOWNLOAD_SIZE_EXCEEDED
} MmsNotificationReason;
/*! \enum MmsResult Result values sent from the MMS Client. */
typedef enum
{
/* The result codes in this enum shall be held in alphabetic order,
* except OK that shall be the first and hence has value equal to 0.
*/
/*! The operation is successful and finished. */
MMS_RESULT_OK,
/*! Too many consective calls to a connector function has been made without
* waiting for the outcome of the previous calls.
*/
MMS_RESULT_BUSY,
/*! A requested body part was not found */
MMS_RESULT_BODY_PART_NOT_FOUND,
/*! An MMSc_sendMessage or MMSc_retrieveMessage operation is cancelled
* by a MMSc_cancel. */
MMS_RESULT_CANCELLED_BY_USER,
/*! Communication error: Bad gateway. */
MMS_RESULT_COMM_BAD_GATEWAY,
/*! Communication error: Entity too large. */
MMS_RESULT_COMM_ENTITY_TOO_LARGE,
/*! Communication error: Unknown communication error. */
MMS_RESULT_COMM_FAILED,
/*! Communication error: File or message not found. */
MMS_RESULT_COMM_FILE_NOT_FOUND,
/*! Communication error: Communication not allowed, service or method denied. */
MMS_RESULT_COMM_FORBIDDEN,
/*! Communication error: PDU did not contain expected tag. */
MMS_RESULT_COMM_HEADER_TAG,
/*! Communication error: An illegal or badly formatted PDU was received. */
MMS_RESULT_COMM_ILLEGAL_PDU,
/*! Communication error: Method not allowed, e.g. POST not allowed. */
MMS_RESULT_COMM_METHOD_NOT_ALLOWED,
/*! Communication error: Authentication required. */
MMS_RESULT_COMM_PROXY_AUTHENTICATION_REQUIRED,
/*! Communication error: Unknown server error. */
MMS_RESULT_COMM_SERVER_ERROR,
/*! Communication error: Wrong communication status. */
MMS_RESULT_COMM_STATUS,
/*! Communication error: Operation timed out. No contact with server. */
MMS_RESULT_COMM_TIMEOUT,
/*! Communication error: Unexpected transaction ID. */
MMS_RESULT_COMM_TRANSACTION_ID,
/*! Communication error: HTTP Unauthorized. */
MMS_RESULT_COMM_UNAUTHORIZED,
/*! Communication error: Service unavailable or not supported. */
MMS_RESULT_COMM_UNAVAILABLE,
/*! Communication error: Unexpected message received. */
MMS_RESULT_COMM_UNEXPECTED_MESSAGE,
/*! Communication error: Unsupported media type or content. */
MMS_RESULT_COMM_UNSUPPORTED_MEDIA_TYPE,
/*! Communication error: Unsupported version. */
MMS_RESULT_COMM_UNSUPPORTED_VERSION,
/*! Communication error: URI is too large. */
MMS_RESULT_COMM_URI_TOO_LARGE,
/*! A message for a not supported MMS version is received */
MMS_RESULT_COMM_WRONG_MMS_VERSION,
/*! Error, configuration is not correct. */
MMS_RESULT_CONFIG_ERROR,
/*! Error, index file is corrupt or does not exist. */
MMS_RESULT_INDEX_FILE_ERROR,
/*! A configuration variable could not be set to the specified value. */
MMS_RESULT_CONFIG_ILLEGAL_VALUE,
/*! A configuration variable was not found */
MMS_RESULT_CONFIG_VARIABLE_NOT_FOUND,
/*! An unknown error has occurred. No further information can be given. */
MMS_RESULT_ERROR,
/*! The file is not found. */
MMS_RESULT_FILE_NOT_FOUND,
/*! Error reading file. */
MMS_RESULT_FILE_READ_ERROR,
/*! Error creating backup file. */
MMS_RESULT_FILE_BACKUP_ERROR,
/*! The folder is not found. */
MMS_RESULT_FOLDER_NOT_FOUND,
/*! Not enough persistent storage for the requested operation. */
MMS_RESULT_INSUFFICIENT_PERSISTENT_STORAGE,
/*! Not enough memory for the requested operation. */
MMS_RESULT_INSUFFICIENT_MEMORY,
/*! The message is corrupt. */
MMS_RESULT_MESSAGE_CORRUPT,
/*! The message was empty. */
MMS_RESULT_MESSAGE_EMPTY,
/*! The message with the specified message ID could not be found. */
MMS_RESULT_MESSAGE_ID_NOT_FOUND,
/*! No report should be sent to this message. */
MMS_RESULT_NO_REPORT,
/*! The recipient address is not set in message. */
MMS_RESULT_RECIPIENT_ADDRESS_NOT_SET,
/*! The MMS Client has encountered an unrecoverable application error.
* The MMS Client shall be stopped and restarted by the TDA.
*/
MMS_RESULT_RESTART_NEEDED,
/*! The MMS Client has been stopped due to an internal error. */
MMS_RESULT_STOPPED,
/*! The URI is not valid. */
MMS_RESULT_URI_NOT_VALID,
/*! One of the fields To, Cc, Bcc fields is invalid */
MMS_RESULT_INVALID_ADDRESS,
/*! Content type is invalid */
MMS_RESULT_INVALID_CONTENT_TYPE,
/*! Invalid or not existing content location */
MMS_RESULT_INVALID_CONTENT_LOCATION,
/*! Invalid or not existing content id */
MMS_RESULT_INVALID_CONTENT_ID,
/*! Invalid or not existing application header field */
MMS_RESULT_INVALID_APPLICATION_HEADER,
/*! The total size of the Mms header is invalid */
MMS_RESULT_INVALID_HEADER_SIZE,
/*! Subject field is invalid */
MMS_RESULT_INVALID_SUBJECT,
/*! Message Class field is invalid */
MMS_RESULT_INVALID_MSG_CLASS,
/*! Expiry Time field is invalid */
MMS_RESULT_INVALID_EXPIRY_TIME,
/*! The storage type is invalid */
MMS_RESULT_INVALID_STORAGE_TYPE,
/*! Error when creating send header */
MMS_RESULT_ERROR_CREATING_SEND_HEADER,
/*! Error when creating forward header */
MMS_RESULT_ERROR_CREATING_FORWARD,
/*! Communication error: The address could not be resolved. */
MMS_RESULT_COMM_ADDRESS_UNRESOLVED,
/*! Communication error: The operation (e.g. Reply Charging) had limitations
* that was violated in the request. */
MMS_RESULT_COMM_LIMITATIONS_NOT_MET,
/*! Error when creating read report pdu */
MMS_RESULT_ERROR_CREATING_READ_REPORT,
/*! Reply Charging Deadline field is invalid */
MMS_RESULT_INVALID_REPLY_CHARGING_DEADLINE,
/*! Communication error: The MMS Proxy-Relay did not recognize one PDU
* that the MMS Client sent. This is probably due to a misconfiguration
* of the MMS Proxy-Relay version. */
MMS_RESULT_COMM_PROXY_VERSION,
/*! The MMS version number is invalid for the requsted operation. */
MMS_RESULT_INVALID_VERSION,
/*! The report file is full, no more information about requested
* read or delivery reports could be stored. To empty this file
* use the connector function */
MMS_RESULT_REPORT_FILE_IS_FULL,
/*! During a retrieval operation, the downloaded message was larger than
* the configuration variable MMS_CFG_MAX_DOWNLOAD_SIZE.
*/
MMS_RESULT_MAX_DOWNLOAD_SIZE_EXCEEDED,
/*! The index file is full, no more messages can be stored. The user must
* delete messages. The maximum number of messages are set with the
* configuration definition #CMN_MAX_NO_OF_MESSAGES in cmnconf.h. */
MMS_RESULT_INDEX_FILE_FULL,
/*! Communication error: There is no network connection available. */
MMS_RESULT_COMM_NETWORK_UNAVAILABLE,
/*! More messages exists than what could be performed in the requested
* operation (e.g. deleteFolder). */
MMS_RESULT_MORE_MESSAGES_EXISTS
} MmsResult;
/*! \enum MmsClientStatus
* \brief Holds all kinds of status events that the MMS Client wish to inform
* the MMS Application about. Used as parameter to MMSa_status. Definitions
* must be unique within 32 bytes.
*/
typedef enum
{
/*! The MMS Client has started an immediate retrieval of a message. */
MMS_CLIENT_STATUS_IMMEDIATE_RETRIEVAL,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -