⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mmstypes.h

📁 彩信MMS的全部代码
💻 H
📖 第 1 页 / 共 5 页
字号:
     *  Default value for this variable is taken from the configuration 
     *  definition #MMS_DEFAULT_POST_RETRY.
     */
    MMS_CFG_POST_RETRY,

    /*! Defines the number of retry attempts before a GET operation is 
     *  considered to have failed.
     *
     *  Default value for this variable is taken from the configuration 
     *  definition #MMS_DEFAULT_GET_RETRY.
     */
    MMS_CFG_GET_RETRY,

    /*! Total number of configuration variables of type int for the MMS client. */
    MMS_CFG_TOTAL_INT
} MmsConfigInt;

/*! \enum MmsConfigStr MMS Client Configuration variables of type "string" that
 *  is possible to set from the TDA during run-time. */
typedef enum
{
    /*! A FROM address is needed if #MMS_CFG_FROM_ADDRESS_INSERT_TYPE 
     *  has the value ADDRESS_PRESENT. This variable contains the FROM address.
     */
    MMS_CFG_FROM_ADDRESS,

    /*! If immediate retrieval is active, only messages originating from any 
     *  of the MMS Proxy-Relays listed in this variable are immediately 
     *  retrieved. The list consists of one or more host names separated 
     *  with a vertical bar, "|"=0x7c, for example 
     *  mmsc.domain.com|mmsc.teleca.se. 
     *  Possible values: a list of host names or NULL.
     */
    MMS_CFG_IMMEDIATE_RETRIEVAL_SERVER,

    /*! When sending (POST) messages, this path on the MMS Proxy-Relay is used.
     *  This variable must be given a valid value before any messages can be 
     *  sent or retrieved.
     *
     *  Default value for this variable is taken from the configuration 
     *  definition #MMS_POST_URI.
     */
    MMS_CFG_POST_URI,

    /*! MMS Proxy-Relay to use to POST messages to. The MMS Proxy-Relay can be 
     *  specified in the form of an IP 4 address, for example "127.0.0.1".
     *  
     *  When sending messages to an MMS Proxy-Relay, the address is built up 
     *  as MMS_CFG_SCHEME + MMS_CFG_PROXY_RELAY + ":" + MMS_CFG_PORT + 
     *  MMS_CFG_POST_URI. 
     *
     *  With the default values as specified in this table, messages will be 
     *  sent to "http://localhost:80/mms/proxyRelay.exe".
     *
     *  This variable must be given a valid value before any messages can be 
     *  sent or retrieved.
     *
     *  Default value for this variable is taken from the configuration 
     *  definition #MMS_PROXY_RELAY.
     */
    MMS_CFG_PROXY_RELAY,

    /*! As part of the FROM address is a name. If 
     *  #MMS_CFG_FROM_ADDRESS_INSERT_TYPE has the value ADDRESS_PRESENT, this 
     *  variable contains the name.
     */
    MMS_CFG_FROM_NAME,
    
    /*! Lead in text for Read Report. E.g. "Your message"
     */
    MMS_CFG_TEXT_YOUR_MSG,
    
    /*! Label for the From address. Used in Read Reports.
     */
    MMS_CFG_TEXT_FROM,
    
    /*! Label for the To address. Used in Read Reports.
     */
    MMS_CFG_TEXT_TO,
    
    /*! Text to put before subject in Read Reports. E.g. "Read:"
     */
    MMS_CFG_TEXT_READ,
    
    /*! Label for the Message Id field. Used in Read Reports.
     */
    MMS_CFG_TEXT_MSGID,
    
    /*! Label for the Sent (date) field. Used in Read Reports.
     */
    MMS_CFG_TEXT_SENT,
    
    /*! Lead-out text for Read Reports. Will be followed by a date. 
        E.g. "was read " ( +date). Date should NOT be included.
     */
    MMS_CFG_TEXT_WAS_READ,

    /*! If immediate retrieval is active, and the message class is a 
     *  text string. This string value is then used for validate if the message 
     *  shall be immediate retrieved.
     *  Possible values: class name (e.g. myclass) or NULL
     */
    MMS_CFG_CLASS_STRING, 
    
    /*! Label for Subject. Used in Read Reports.
     */
    MMS_CFG_TEXT_SUBJECT,
    
    /*! Defines the scheme that the MMS Client will use towards the MMS 
     *  Proxy-Relay in all HTTP POST attempts. 
     *
     *  Default value for this variable is taken from the configuration 
     *  definition #MMS_DEFAULT_SCHEME.
     */
    MMS_CFG_SCHEME,

    /*! Defines the name of the MMS Client as presented to the MMSC in the HTTP 
     *  header User-Agent. If a value is set, this value will be appended to 
     *  the HTTP header User-Agent for all GET and POST operations. 
     *  Not all MMSCs need this HTTP header. 
     *
     *  Default value for this variable is taken from the configuration 
     *  definition #MMS_DEFAULT_USER_AGENT.
     */
    MMS_CFG_CLIENT_USER_AGENT,

    /*! This variable together with the #MMS_CFG_STANDARD_NOTIFICATION_URI 
     *  variable can be used to enable a feature that some MMSCs are using to
     *  decrease the amount of data that is sent in a notification. By using 
     *  this feature the X-Mms-Content-location of the M-Notification.ind can
     *  be derived from the X-Mms-Transaction-ID.
     *  
     *  The feature is not within the OMA MMS standard.
     *  
     *  IF the #MMS_CFG_STANDARD_NOTIFICATION_URI variable is set to FALSE
     *      AND the X-Mms-Content-Location in the M-Notification.ind is '0'
     *  THEN is the X-Mms-Content-Location built up of this variable 
     *  (MMS_CFG_GET_URI) and the X-Mms-Transaction-ID from the 
     *  M-Notification.ind. 
     *
     *  An example: if #MMS_CFG_STANDARD_NOTIFICATION_URI is FALSE, the 
     *  X-Mms-Content-Location in M-Notification.ind is '0', 
     *  X-Mms-Transaction-ID is '1234567' and 
     *  #MMS_CFG_GET_URI is 'http://mmsc.companyX.com/servlets/mms?message-id='
     *  then the MMS Client will try to retrieve the MMS Message from the URI
     *  'http://mmsc.companyX.com/servlets/mms?message-id=1234567'
     *
     *  Default value for this variable is taken from configuration definition:
     *  #MMS_DEFAULT_GET_URI.
     */
    MMS_CFG_GET_URI,

    /*! Defines additional HTTP headers that can be appended to every POST and
     *  GET operation towards the MMSC. If a value is set, it will be appended
     *  as a HTTP header for all GET and POST operations. 
     *
     *  These additional HTTP headers can be used for example for the X-MSISDN
     *  header that some MMSCs need. Other MMSCs instead need the HTTP header
     *  X-NOKIA-MSISDN or an equivalent header to identify the handset. 
     *
     *  So this configuration variable can for example have values like:
     *      "X-MSISDN:+46701234567"
     *      "X-NOKIA-MSISDN:+46701234567"
     *      "X-YOUR_COMPANY_NAME-MDN:1234567890"
     *      "X-MY-HEADER-1:xyz\nX-MY-HEADER-2:abc\nX-MY-HEADER-3:def"
     */
    MMS_CFG_CLIENT_HTTP_HEADER,

    /*! Total number of configuration variables of type string for the 
     *  MMS client
     */
    MMS_CFG_TOTAL_STR
} MmsConfigStr;

/*! \struct MmsEncodedText 
 *  \brief Contains an encoded text and its charset. Different
 *         fields in an MMS header can have this type. 
 */
typedef struct
{
    CmnCharset  charset;    /*!< Well-known character set as defined by IANA */
    char        *text;      /*!< Text buffer, must be NULL terminated */
} MmsEncodedText;

/*! \enum MmsFolderType MMS Messages are stored in different folders. This enum
 *  contains the different types of folders available. The values MUST NOT be
 * larger than what can be stored in an UINT16.
 */
typedef enum
{
    MMS_INBOX,                            /*!< Incoming messages */
    MMS_OUTBOX,                           /*!< Outgoing messages */
    MMS_SENT,                             /*!< Successfully sent messages */
    MMS_DRAFTS,                           /*!< Messages during work */
    MMS_NOTIFY,                           /*!< Notifications */
    MMS_USER_DEFINED_FOLDER_OFFSET = 100, /*!< Offset to user defined folders*/
    MMS_ALL_FOLDERS = 0x7fff              /*!< Messages in all folders */
} MmsFolderType;

/*! \enum MmsFromType The "From Address" can either be supplied by the 
 *  application or the server can be asked to insert it. MmsFromType lists the 
 *  different values that can be used.
 */
typedef enum
{
    MMS_FROM_ADDRESS_PRESENT = 128, /*!< The address is added by the client */
    MMS_FROM_INSERT_ADDRESS  = 129  /*!< The address is added by the server */
} MmsFromType;

/*! \enum MmsHttpRequestType Type of HTTP request the MMS Client can use. */
typedef enum
{
    MMS_HTTP_GET,                   
    MMS_HTTP_POST                   
} MmsHttpRequestType;

/*! \struct MmsAddress 
 *  \brief An MMS address corresponds to the fields in this struct. 
 */
typedef struct
{
    MmsEncodedText name;        /*!< Display name (e.g. Bill L鲻f, TSS) */
    char *address;              /*!< Address (e.g. bill.loof@tss.teleca.se) */
    MmsAddressType addrType;    /*!< Address Type (PLMN or EMAIL) */
} MmsAddress;

/*! \struct MmsAddressList
 *  \brief When more than one address is supplied for a field, e.g. several
 *         recipients in "To" field, the MmsAddressList contains all addresses. 
 */
typedef struct MmsAddressListStruct 
{
    /*! Address for current element */
    MmsAddress current;                 
    
    /*! Next address list element or NULL if last element */
    struct MmsAddressListStruct *next;  
} MmsAddressList;

/*! \enum MmsKnownMediaType Contains the media-type values that the MMS Client 
 *  supports.
 *
 * REMEMBER: These names, as well as every othe name MUST be unique within the
 * first 31 characters due to customer compiler limitations.
 *
 * The v at the line following this is at position 31.
 *  1234567890123456789012345678901234567890
 *           1         2         3
 *                                |
 *                                v
 */
typedef enum
{
    /* Unknown */
    MMS_TYPE_ANY_ANY                            = 0x00,     

    /* Text */
    MMS_TYPE_TEXT_ANY                           = 0x01, 
    MMS_TYPE_TEXT_HTML                          = 0x02, 
    MMS_TYPE_TEXT_PLAIN                         = 0x03,
    MMS_TYPE_TEXT_X_HDML                        = 0x04,
    MMS_TYPE_TEXT_X_TTML                        = 0x05,
    MMS_TYPE_TEXT_X_VCALENDAR                   = 0x06,
    MMS_TYPE_TEXT_X_VCARD                       = 0x07,
    MMS_TYPE_TEXT_VND_WAP_WML                   = 0x08,
    MMS_TYPE_TEXT_VND_WAP_WMLSCRIPT             = 0x09,
    MMS_TYPE_TEXT_VND_WAP_CHANNEL               = 0x0A,

    /* Multipart */
    MMS_TYPE_MULTIPART_ANY                      = 0x0B,
    MMS_TYPE_MULTIPART_MIXED                    = 0x0C,
    MMS_TYPE_MULTIPART_FORM_DATA                = 0x0D,
    MMS_TYPE_MULTIPART_BYTERANGES               = 0x0E,
    MMS_TYPE_MULTIPART_ALTERNATIVE              = 0x0F,

    /* Application */
    MMS_TYPE_APP_ANY                            = 0x10,
    MMS_TYPE_APP_JAVA_VM                        = 0x11,
    MMS_TYPE_APP_X_WWW_FORM_URLENCODED          = 0x12,
    MMS_TYPE_APP_X_HDMLC                        = 0x13,
    MMS_TYPE_APP_VND_WAP_WMLC                   = 0x14,
    MMS_TYPE_APP_VND_WAP_WMLSCRIPTC             = 0x15,
    MMS_TYPE_APP_VND_WAP_CHANNELC               = 0x16,
    MMS_TYPE_APP_VND_WAP_UAPROF                 = 0x17,
    MMS_TYPE_APP_VND_WAP_WTLS_CA_CERTIFICATE    = 0x18,
    MMS_TYPE_APP_VND_WAP_WTLS_USER_CERTIFICATE  = 0x19,
    MMS_TYPE_APP_X_X509_CA_CERT                 = 0x1A,
    MMS_TYPE_APP_X_X509_USER_CERT               = 0x1B,

    /* Image */
    MMS_TYPE_IMAGE_ANY                          = 0x1C, 
    MMS_TYPE_IMAGE_GIF                          = 0x1D, 
    MMS_TYPE_IMAGE_JPEG                         = 0x1E,
    MMS_TYPE_IMAGE_TIFF                         = 0x1F, 
    MMS_TYPE_IMAGE_PNG                          = 0x20, 
    MMS_TYPE_IMAGE_VND_WAP_WBMP                 = 0x21,

    /* Application */
    MMS_VND_WAP_MULTIPART_ANY                   = 0x22, 
    MMS_VND_WAP_MULTIPART_MIXED                 = 0x23,
    MMS_TYPE_APP_VND_WAP_MPART_FORM_DATA        = 0x24,
    MMS_TYPE_APP_VND_WAP_MPART_BYTERANGES       = 0x25, 
    MMS_VND_WAP_MULTIPART_ALTERNATIVE           = 0x26, 
    MMS_TYPE_APP_XML                            = 0x27,

    /* Text */
    MMS_TYPE_TEXT_XML                           = 0x28,

    /* Application */
    MMS_TYPE_APP_VND_WAP_WBXML                  = 0x29,
    MMS_TYPE_APP_X_X968_CROSS_CERT              = 0x2A,
    MMS_TYPE_APP_X_X968_CA_CERT                 = 0x2B,
    MMS_TYPE_APP_X_X968_USER_CERT               = 0x2C,

    /* Text */
    MMS_TYPE_TEXT_VND_WAP_SI                    = 0x2D,

    /* Application */
    MMS_TYPE_APP_VND_WAP_SIC                    = 0x2E,

    /* Text */
    MMS_TYPE_TEXT_VND_WAP_SL                    = 0x2F,

    /* Application */
    MMS_TYPE_APP_VND_WAP_SLC                    = 0x30,

    /* Text */
    MMS_TYPE_TEXT_VND_WAP_CO                    = 0x31,

    /* Application */
    MMS_TYPE_APP_VND_WAP_COC                    = 0x32,
    MMS_VND_WAP_MULTIPART_RELATED               = 0x33, 
    MMS_TYPE_APP_VND_WAP_SIA                    = 0x34,

    /* Text */
    MMS_TYPE_TEXT_VND_WAP_CONNECTIVITY_XML      = 0x35,

    /* Application */
    MMS_TYPE_APP_VND_WAP_CONNECTIVITY_WBXML     = 0x36,
    MMS_TYPE_APP_PKCS7_MIME                     = 0x37,
    MMS_TYPE_APP_VND_WAP_HASHED_CERTIFICATE     = 0x38,
    MMS_TYPE_APP_VND_WAP_SIGNED_CERTIFICATE     = 0x39,
    MMS_TYPE_APP_VND_WAP_CERT_RESPONSE          = 0x3a,
    MMS_TYPE_APP_XHTML_XML                      = 0x3b,
    MMS_TYPE_APP_WML_XML                        = 0x3c,

    /* Text */
    MMS_TYPE_TEXT_CSS                           = 0x3d,
    
    /* Application */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -