📄 mmstypes.h
字号:
*/
char *serverMessageId;
/*! [O] Allow reply charging.
* This value can only be used with MMS standard version 1.1 and higher.
*/
MmsReplyCharging replyCharging;
/*! [O] Deadline for reply charging.
* This value can only be used with MMS standard version 1.1 and higher.
*/
MmsTime replyChargingDeadline;
/*! [O] Deadline for reply charging.
* This value can only be used with MMS standard version 1.1 and higher.
*/
char *replyChargingId;
/*! [O] Allowed size for a reply charging.
* This value can only be used with MMS standard version 1.1 and higher.
*/
MmsReplyChargingSize replyChargingSize;
/*! [O] Address information about which clients that previously has
* sent a message.
* This value can only be used with MMS standard version 1.1 and higher.
* This field is only used when retrieving a message, NOT used when sending.
*/
MmsPrevSentBy *previouslySentBy;
/*! [O] Date information about when clients has previously
* sent a message.
* This value can only be used with MMS standard version 1.1 and higher.
* This field is only used when retrieving a message, NOT used when sending.
*/
MmsPrevSentDate *previouslySentDate;
/*! [O] The originator requested that the content of the MM should not be
* distributed further.
* This value can only be used with MMS standard version 1.2 and higher.
* This field is only used when retrieving a message, NOT used when sending.
*/
MmsDistributionIndicator distributionIndicator;
} MmsHeader;
/*! \struct MmsNotification
* \brief This structure represents the header values received in an
* M-Notification.ind message. Further, this struct is
* used for reading a notification message.
*/
typedef struct
{
/*! The sender address. */
MmsAddress from;
/*! The subject of the MMS message */
MmsEncodedText subject;
/*! [O] Indicates if the sender requests a Delivery Report. */
MmsDeliveryReport deliveryReport;
/*! Class of the message. */
MmsMessageClass msgClass;
/*! The length of the message to fetch. */
UINT32 length;
/*! Time when the message is removed from the server. */
MmsTime expiryTime;
/*! [O] Allow reply charging.
* This value can only be used with MMS standard version 1.1 and greater
*/
MmsReplyCharging replyCharging;
/*! [O] Deadline for reply charging.
* This value can only be used with MMS standard version 1.1 and greater
*/
MmsTime replyChargingDeadline;
/*! [O] Deadline for reply charging.
* This value can only be used with MMS standard version 1.1 and greater
*/
char *replyChargingId;
/*! [O] Allowed size for a reply charging.
* This value can only be used with MMS standard version 1.1 and greater
*/
MmsReplyChargingSize replyChargingSize;
/*! Defines the location of the message */
char *contentLocation;
/*! Time when the MMS Client received the notification */
MmsTimeSec timeStamp;
/*! Priority of the MMS message
* This value can only be used with MMS standard version 1.2 and greater
*/
MmsPriority priority;
/*! Message originator request for further distribution.
* This value can only be used with MMS standard version 1.2 and greater
*/
MmsDistributionIndicator distributionIndicator;
/*! More detailed description of the message.
* This value can only be used with MMS standard version 1.2 and greater
*/
MmsElementDescriptor *elementDescriptor;
} MmsNotification;
/*! \struct MmsForward
* \brief A struct containing possible header fields.
* All optional field must be set to 0 or NULL when not used.
*
* Creation of MMS Forward :
* Optional fields are marked with [O]
* and mandatory fields marked with [M] (i.e. must be set)
*/
typedef struct
{
/*! [O] Arrival time of the message at the MMSProxy-Relay.
* The MMS Proxy-Relay will generate this field if not supplied. */
MmsTimeSec date;
/*! [M] Address of the message sender. */
MmsAddress from;
/*! [O] Address of the recipient. At least one of the addresses
* (To, cc, bcc) MUST be present. If not used it must be set to NULL. */
MmsAddressList *to;
/*! [O] See To field. */
MmsAddressList *cc;
/*! [O] See To field. */
MmsAddressList *bcc;
/*! [O] Time until the message is removed from the server,
* not set equals max time.
*/
MmsTime expiryTime;
/*! [O] Time the message should be delivered, not set equals immediate. */
MmsTime deliveryTime;
/*! [O] Request for a Delivery Report. */
MmsDeliveryReport deliveryReport;
/*! [O] Request for a Read Reply. */
MmsReadReply readReply;
} MmsForward;
/*! \struct MmsReadOrigInd
* \brief A struct containing possible header fields for a Read Orig Ind PDU.
*/
typedef struct
{
/*! [M] Address of the message sender. */
MmsAddress from;
/*! [M] Arrival time of the message at the MMSProxy-Relay.
* The MMS Proxy-Relay will generate this field if not supplied. */
MmsTimeSec date;
/*! [M] Read-Status of the message. */
MmsReadStatus readStatus;
/*! [M] Message-Id of the message at the MMS Proxy-Relay. */
char *serverMessageId;
} MmsReadOrigInd;
/*! \enum MmsEntryHeaderValueType All valid entry header types.
* This is a part of the message bodys different entries.
* Explicit assignments according to [WAP-203-WSP, Appendix A Table 39]. */
typedef enum
{
MMS_SHORT_CUT_SHIFT_DELIMITER, /*!< Value is in shortCutShiftDelimiter */
MMS_APPLICATION_HEADER, /*!< Type and value is in applicationHeader */
MMS_WELL_KNOWN_CONTENT_BASE = 0x0A, /*!< Value is in wellKnownFieldName */
MMS_WELL_KNOWN_CONTENT_ENCODING = 0x0B, /*!< Value is in wellKnownFieldName */
MMS_WELL_KNOWN_CONTENT_LANGUAGE = 0x0C, /*!< Value is in wellKnownFieldName */
MMS_WELL_KNOWN_CONTENT_LENGTH = 0x0D, /*!< Value is in wellKnownFieldName */
MMS_WELL_KNOWN_CONTENT_LOCATION = 0x0E, /*!< Value is in wellKnownFieldName */
MMS_WELL_KNOWN_CONTENT_MD5 = 0x0F, /*!< Value is in wellKnownFieldName */
MMS_WELL_KNOWN_CONTENT_RANGE = 0x10, /*!< Value is in wellKnownFieldName */
MMS_WELL_KNOWN_CONTENT_TYPE = 0x11, /*!< Value is in wellKnownFieldName */
MMS_WELL_KNOWN_CONTENT_DISPOSITION = 0x2E, /*!< Value is in wellKnownFieldName */
MMS_WELL_KNOWN_CONTENT_ID = 0x40, /*!< Value is in wellKnownFieldName */
MMS_SHIFT_DELIMITER = 0x7f /*!< Value is in shiftDelimiter */
} MmsEntryHeaderValueType;
/*! \struct MmsApplicationHeaderData
* \brief Contains one entry header type and its value.
* This is a part of the message bodys different entries.
* WSP Application Header according to [WAP-203-WSP, 8.4.2.6]:
* Application-header = Token-text Application-specific-value
* Token-text is a WSP Header Field Name stored in 'name'.
* Application-specific-value is a WSP Header Field Value stored in
* 'value'.
*/
typedef struct
{
unsigned char *name; /*!< Application-header name */
unsigned char *value; /*!< Null terminated text string */
} MmsApplicationHeaderData;
/*! \enum MmsContentDispositionType
* \brief Content disposition types [WAP-203-WSP, 8.4.2.53 Disposition].
* Extensions to the MMS standard v1.1 supported in parsing only:
* Inline [WAP-230-WSP, 8.4.2.53]
*/
typedef enum
{
MMS_DISPOSITION_FORM_DATA = 128,
MMS_DISPOSITION_ATTACHMENT = 129,
MMS_DISPOSITION_INLINE = 130
} MmsContentDispositionType;
/*! \struct MmsContentDisposition
* \brief A WSP Header Field Value according to
* [WAP-203-WSP, 8.4.2.53 Content-disposition-value].
*/
typedef struct
{
UINT32 valueLength; /*!< Length of succeeding data. */
MmsContentDispositionType dispositionType; /*!< Type of disposition. */
MmsAllParams *params; /*!< Parameters to the Content-Disposition. */
} MmsContentDisposition;
/*! \struct MmsEntryHeader
* \brief The types and values of the MMS message body's entry headers.
* Linked list of WSP Headers [WAP-203-WSP, 8.4.2.6]
*/
typedef struct MmsAllEntryHeaders
{
/*! Info about which union type to use depending on if the WSP Header is a
* Well-known-header, an Application-header or a Shift-sequence
* [WAP-203-WSP, 8.4.2.6]. Holds the WSP Header Field Name for
* Application-header or Well-known-header (in the last case it holds the
* Well-known-field-name).
*/
MmsEntryHeaderValueType headerType;
union
{
/*! Value of a shift delimiter [WAP-203-WSP, 8.4.2.6] */
unsigned char shiftDelimiter;
/*! Type of short cut shift delimiter [WAP-203-WSP, 8.4.2.6] */
unsigned char shortCutShiftDelimiter;
/*! Value of a well known field name.
* A WSP Header Field Value according to
* [WAP-203-WSP, 8.4.2.6 Wap-value]
*/
unsigned char *wellKnownFieldName;
/*! Name and value of an Application-header. [WAP-203-WSP, 8.4.2.6] */
MmsApplicationHeaderData applicationHeader;
/*! A WSP Header Field Value according to
* [WAP-203-WSP, 8.4.2.53 Content-disposition-value].
*/
MmsContentDisposition contentDisposition;
} value;
/*! Next entry header for a body part, NULL if there is no more headers. */
struct MmsAllEntryHeaders *next;
} MmsEntryHeader;
/*! \struct MmsBodyInfoList
* \brief A List with information about the parts of a body.
*/
typedef struct MmsBodyInfoStruct
{
MmsContentType *contentType; /*!< The content type information. */
MmsEntryHeader *entryHeader; /*!< The entry header information. */
UINT32 number; /*!< Which part in the body. */
UINT32 size; /*!< Total size of the body part. */
/*! Number of sub parts for the current multipart. 0 if not a multipart */
UINT32 numOfEntries;
/*! DRM id for the bodypart, if 0 then it is not DRM protected.
* Used when MMS_EXTERNAL_DRM_ID_GENERATION is defined. This field is
* not ifdef:ed so the structure is consistent for different builds. */
UINT32 localDrmId;
/*! Pointer to the next body info element in the list, NULL if last */
struct MmsBodyInfoStruct *next;
} MmsBodyInfoList;
/*!
* \enum MmsBodyPartStorage Information about how a message part is stored in
* the structure,
*/
typedef enum
{
/*! The body part is delivered through a buffer. */
MMS_BODY_PART_AS_BUFFER,
/*! The body part is delivered through a file. A file reference is
* supplied as data.
*/
MMS_BODY_PART_AS_FILE
} MmsBodyPartStorage;
/*!
* \struct MmsFileReference
* \brief Information about a file. Used to uniquely identify a file, e.g. when
* MmsBodyPartStorage is MMS_BODY_PART_AS_FILE.
*/
typedef struct
{
char category; /*!< The file's category, e.g. M, F or L */
UINT32 id; /*!< The file's unique ID */
} MmsFileReference;
/*!
* \enum MmsBodyPartTarget Information about where the bodypart will be added.
*/
typedef enum
{
/*! The bodypart is added to a multipart message. */
MMS_MULTIPART_MESSAGE,
/*! The bodypart is added to a multipart entry file */
MMS_MULTIPART_ENTRY,
/*! The bodypart is added to a plain message (NOT a multipart).
*/
MMS_PLAIN_MESSAGE
} MmsBodyPartTarget;
/*!
* \struct MmsBodyPart
* \brief Contains information and data for a bodypart.
*/
typedef struct
{
/*! Describes how the body part is stored. */
MmsBodyPartStorage storageType;
/*! Size of the buffer (mandatory) or the file (optional). */
UINT32 dataSize;
union
{
/*! A buffer containing the body part. */
unsigned char *buffer;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -