📄 mmstypes.h
字号:
/*
* Copyright (C) Obigo AB, 2002-2005.
* All rights reserved.
*
* This software is covered by the license agreement between
* the end user and Obigo AB, and may be
* used and copied only in accordance with the terms of the
* said agreement.
*
* Obigo AB assumes no responsibility or
* liability for any errors or inaccuracies in this software,
* or any consequential, incidental or indirect damage arising
* out of the use of the software.
*
*/
/******************************************************************************
* File: $Workfile: mmstypes.h $
* Revision: $Revision: \main\338 $
*****************************************************************************/
/*! \file mmstypes.h
* \brief Data types and definitions used in the MMS client.
*/
#ifndef _MMSTYPES_H
#define _MMSTYPES_H
/*--- Definitions/Declarations ---*/
/*! \enum MmsVersion MMS Standard that the MMS Client understand.
* Is defined as <Major version>.<Minor version>.
* The major version is coded in 3 high/most significant bits and the minor
* version in the 4 lower/least significant bits.
* Example: 0x10 = X001.0000 = 1.0 and 0x12 = X001.0010 = 1.2.
*/
typedef enum
{
MMS_VERSION_PREVIOUS_MAJOR = 0x0F,
MMS_VERSION_10 = 0x10,
MMS_VERSION_11 = 0x11,
MMS_VERSION_12 = 0x12,
MMS_VERSION_NEXT_MAJOR = 0x20
} MmsVersion;
/*! Content type of MMS messages as seen by the WSP/HTTP layer. */
#define MMS_CONTENT_TYPE_STRING "application/vnd.wap.mms-message"
/*! Content type of DRM messages */
#define MMS_CONTENT_TYPE_DRM_MESSAGE "application/vnd.oma.drm.message"
#define MMS_CONTENT_TYPE_DRM_CONTENT "application/vnd.oma.drm.content"
#define MMS_CONTENT_TYPE_DRM_RIGHTS_XML "application/vnd.oma.drm.rights.xml"
#define MMS_CONTENT_TYPE_DRM_RIGHTS_WBXML "application/vnd.oma.drm.rights.wbxml"
/*! Denotes all message ID and is used in operations on all messages at the
* same time. */
#define MMS_ALL_MESSAGES 0
/*! \enum MmsSaveFile Indicates if both the index file and the backup file
* should be saved when calling #MMSc_indexTableSave. */
typedef enum
{
MMS_SAVE_BOTH_FILES = 0,
MMS_SAVE_INDEX_ONLY = 1,
MMS_SAVE_BACKUP_ONLY = 2
} MmsSaveFile;
/*! New immediate retrieval operations will not be started or queued. */
#define MMS_IMMEDIATE_RETRIEVAL_PAUSED 0xffffffff
/*! Define for the SMIL media type as a string that can be used in
* content type.
*/
#define MMS_MEDIA_TYPE_STRING_SMIL "application/smil"
/*! Define for the AMR (sound) media type as a string
* that can be used in content type.
*/
#define MMS_MEDIA_TYPE_STRING_AMR "audio/AMR"
/*! Used when colors for root-layout and text are not set. */
#define SMIL_COLOR_NOT_USED 0xFF000000
/*--- Types ---*/
/*! MmsMsgId A unique message identity for a message in the MMS Client. This
* identity is used for all operations on a message. */
typedef UINT32 MmsMsgId;
/*! \enum MmsReadStatus Indicates if the recepient has read the MM or deleted
* it without reading it.
*/
typedef enum
{
MMS_READ_STATUS_READ = 128,
MMS_READ_STATUS_DELETED_WITHOUT_BEING_READ = 129
} MmsReadStatus;
/*! \enum MmsAddressType This definition contains all types that an address
* in the MMS Client can have. */
typedef enum
{
MMS_ADDRESS_UNKNOWN, /*!< Unknown type of address, e.g. /TYPE=xyz */
MMS_ADDRESS_PLMN, /*!< PLMN type of address, e.g. +467055566622 */
MMS_ADDRESS_EMAIL, /*!< E-Mail type of address, e.g. foo@bar.com */
MMS_ADDRESS_IPV4 /*!< IPv4 type of address, e.g. 192.168.0.1 */
} MmsAddressType;
/*! \enum MmsConfigInt MMS Client Configuration variables of type "integer" that
* is possible to set from the TDA during run-time. */
typedef enum
{
/*! Describes if the user or the MMS Proxy-Relay supplies the FROM address
* for a message, see #MmsFromType for possible values.
*/
MMS_CFG_FROM_ADDRESS_INSERT_TYPE,
/*! Used to set IMMEDIATE or DELAYED retrieval.
* When activating IMMEDIATE retrieval,
* a number of criteras for messages automatically retrieved can be set.
* - Anonymous sender allowed/disallowed.
* - Message class: Personal, Advertisement, Information, Auto and text.
* - Server address (URI) allowed.
*
* Possible values:
* FALSE - Delayed retrieval.
* TRUE - Immediate retrieval or automatic reject
* MMS_IMMEDIATE_RETRIEVAL_PAUSED - No new immediate retrievals will
* be queued or started. Ongoing and already queued immediate
* retrievals will be finished. Incoming notifications will be
* either stored for delayed retrieval (if
* MMS_CFG_TREAT_AS_DELAYED_RETRIEVAL is set to TRUE) or
* automatically rejected.
*/
MMS_CFG_IMMEDIATE_RETRIEVAL,
/*! Port on the MMS Proxy-Relay to use when sending (POST) messages.
* This variable is the only way of specifying the port and it must be
* given a valid value before any messages can be sent or retrieved.
*
* If a port should not be inserted in the address, the PORT should be
* set to 0. If the address for posting data should be for example
* http://mmsc.teleca.se:8080/post/, set the port to 8080. If the address
* for posting data should be for example http://mmsc.teleca.se/post/,
* set the port to 0.
*/
MMS_CFG_PORT,
/*! Shows if delivery reports shall be sent for messages retrieved, see
* #MmsDeliveryReport for possible values.
*/
MMS_CFG_DELIVERY_REPORT,
/*! Type of FROM address, for possible values see #MmsAddressType */
MMS_CFG_FROM_ADDRESS_TYPE,
/*! Maximum size of message to download from the server.
* Used if #MMS_CFG_IMMEDIATE_DELIVERY is set to TRUE.
*
* Possible values:
* Lower - immediate retrieval of message.
* Higher - An acknowledge with reject flag is sent to the server
*/
MMS_CFG_MAX_SIZE_OF_MSG,
/*! Accept immediate retrieval of message with Message Class Personal.
* Used if #MMS_CFG_IMMEDIATE_DELIVERY is set to TRUE.
*
* Possible values:
* TRUE - accept
* FALSE - do not accept
*/
MMS_CFG_CLASS_PERSONAL,
/*! Accept immediate retreival of message with message class Advertisement
* Used if #MMS_CFG_IMMEDIATE_DELIVERY is set to TRUE.
*
* Possible values:
* TRUE - accept
* FALSE - do not accept
*/
MMS_CFG_CLASS_ADVERTISEMENT,
/*! Accept immediate retreival of message with message class Informational
* Used if #MMS_CFG_IMMEDIATE_DELIVERY is set to TRUE.
*
* Possible values:
* TRUE - accept
* FALSE - do not accept
*/
MMS_CFG_CLASS_INFORMATIONAL,
/*! Accept immediate retreival of message with message class Auto
* Used if #MMS_CFG_IMMEDIATE_DELIVERY is set to TRUE.
*
* Possible values:
* TRUE - accept
* FALSE - do not accept
*/
MMS_CFG_CLASS_AUTO,
/*! Accept messages Anonymous sender allowed/disallowed
* Used if #MMS_CFG_IMMEDIATE_DELIVERY is set to TRUE.
* Possible values:
* TRUE - accept anonymous sender
* FALSE - do not accept anonymous sender
*/
MMS_CFG_ANONYMOUS_SENDER,
/*! Configures the MMS Client to disconnect from its network connection
* when all ongoing operations are finished and the connection has been
* idle for MMS_DISCONNECT_ON_IDLE_TIMEOUT seconds.
*
* Default value for this variable is taken from the configuration
* definition #MMS_DISCONNECT_ON_IDLE
*
* Possible values:
* TRUE - disconnect.
* FALSE - no disconnect.
*/
MMS_CFG_DISCONNECT_ON_IDLE,
/*! This is a non-standard extension to the OMA MMS Standard.
* This define determines if M-NotifyResp is sent when a notification is
* received via SMS. The M-NotifyResp is instead considered sent during
* the SMS delivery.
*
* Default value for this variable is taken from configuration definition:
* #MMS_NO_SMS_NOTIFY_RESP.
*
* Possible values:
* FALSE - to be OMA MMS standard compliant.
* TRUE - to be able to use non-standard MMS Proxy-Relays.
*/
MMS_CFG_NO_SMS_NOTIFY_RESP,
/*! When immediate retrieval is activated and the message does not match
* the immediate retrieval criterias, the messege can either be rejected
* or be treated as delayed retrieval. This configuration sets this option.
*
* Possible values:
* FALSE - The message is rejected.
* TRUE - The message is treated as delayed retrieval.
*/
MMS_CFG_TREAT_AS_DELAYED_RETRIEVAL,
/*! MMS Version that the selected Proxy-Relay (see #MMS_CFG_PROXY_RELAY)
* supports.
* Default value for this variable is taken from configuration definition:
* #MMS_DEFAULT_PROXY_RELAY_VERSION.
*/
MMS_CFG_PROXY_RELAY_VERSION,
/*! Used during message retrieval and limits the maximum size for a
* message. If this limit is reached during delayed retrieval, the
* download is stopped and #MMS_RESULT_MAX_DOWNLOAD_SIZE_EXCEEDED is
* returned in the call to #MMSa_retrieveMessageResponse. If this limit
* is reached during immediate retrieval, the download is stopped and
* #MMS_RESULT_MAX_DOWNLOAD_SIZE_EXCEEDED is returned in the call to
* #MMSa_notificationReceived.
*/
MMS_CFG_MAX_DOWNLOAD_SIZE,
/*! When a multimedia message is retrieved, the submission date is given as
* part of the M-Retrieve.conf PDU. If this variable is set to TRUE, the
* reception date to the MMS Client will be shown instead to the
* applicationwhen. Default value for this variable is take from the
* configuration definition #MMS_DEFAULT_USE_RECEPTION_DATE.
*/
MMS_CFG_USE_RECEPTION_DATE,
/*! This variable determines if the X-Mms-Content-Location in the
* M-Notification.ind is in the format according to the OMA MMS standard
* or if the X-Mms-Content-Location is supposed to be derived from the
* X-Mms-Transaction-ID and the #MMS_CFG_GET_URI whenever the
* X-Mms-Content-Location is '0'.
*
* Default value for this variable is taken from configuration definition:
* #MMS_DEFAULT_STANDARD_NOTIFICATION_URI.
*
* Possible values:
* TRUE - to be OMA MMS standard compliant.
* FALSE - to be able to use the non-standard MMS Notifications.
*/
MMS_CFG_STANDARD_NOTIFICATION_URI,
/*! The MMS Client includes a limited DRM parser, but if you use an
* external DRM parser (of your own choise) the MMS Client passes all the
* responsibility for DRM handling to the MMS Application.
*
* Possible values:
* FALSE - The internal DRM parser will be used (default).
* TRUE - Leave DRM parsing to an external module.
*/
MMS_CFG_EXTERNAL_DRM_PARSER,
/*! This variable determines if the M-NotifyResp.ind is sent according to
* the OMA MMS standard or if an extra M-NotifyResp.ind can be sent.
*
* The OMA MMS standard states that for delayed retrieval an
* M-NotifyResp.ind with X-Mms_Status set to Deferred should be sent.
* If this variable is set to TRUE, an extra M-NotifyResp.ind with
* X-Mms_Status set to Rejected is sent if the user removes the original
* M-Notification.ind.
*
* Default value for this variable is taken from the configuration
* definition #MMS_DEFAULT_EXTRA_NOTIFY_RESP.
*
* Possible values:
* FALSE - to be OMA MMS standard compliant.
* TRUE - to be able to use the non-standard MMS Notifications.
*/
MMS_CFG_EXTRA_NOTIFY_RESP,
/*! Determines the format of an MMS 1.0 Read Report.
*
* Default value for this variable is taken from the configuration
* definition #MMS_DEFAULT_READ_REPORT_MULTIPART_MIXED.
*
* Possible values:
* TRUE - MMS 1.0 Read Reports are sent as multipart/mixed
* FALSE - MMS 1.0 Read Reports are sent as text/plain
*/
MMS_CFG_READ_REPORT_MULTIPART_MIXED,
/*! Defines the maximum number of attempts an immediate retrieval operation
* will be retried before it is considered failed. The immediate retrieval
* operation is only retried if the X-Mms-Retrieve-Status has a transient
* error.
*
* Default value for this variable is taken from the configuration
* definition #MMS_DEFAULT_IMM_RET_RETRY_ATTEMPTS.
*/
MMS_CFG_IMM_RET_RETRY_ATTEMPTS,
/*! Defines the timeout between two consecutive retry attempts for an
* immediate retrieval operation when one has failed with a transient
* X-Mms-Retrieve-Status.
*
* Time is given in tenth of seconds, e.g. a value of 150 means 15
* seconds.
*
* Default value for this variable is taken from the configuration
* definition #MMS_DEFAULT_IMM_RET_RETRY_TIMEOUT.
*/
MMS_CFG_IMM_RET_RETRY_TIMEOUT,
/*! Defines the number of retry attempts before a POST operation is
* considered to have failed.
*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -