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

📄 capimms.h

📁 彩信MMS的全部代码
💻 H
📖 第 1 页 / 共 3 页
字号:

/*!
 * Type: Request Connector
 *
 * Related Adapter: #MMSa_getMessageIdListResponse
 *
 * This function gets a list of message IDs in the specified folder or in 
 * all folders.
 *
 * \param folder Folder from which to get the message IDs. If the request 
 *        is for all folders, MMS_ALL_FOLDERS must be used. 
 * \param startPos Position in the list from which to start.
 * \param maxIds The maximum number of IDs to get when starting from startPos.
 *****************************************************************************/
void MMSc_getMessageIdList(MmsFolderType folder, UINT32 startPos, 
    UINT32 maxIds);

/*!
 * Type: Request Connector
 *
 * Related Adapter: #MMSa_getMessageMetadataResponse
 *
 * Get the application metadata (four bits) of the message.
 *
 * \param msgId A unique identity for a multimedia message.
 *****************************************************************************/
void MMSc_getMessageMetadata(MmsMsgId msgId);

/*!
 * Type: Request Connector
 *
 * Related Adapter: #MMSa_getMessageReadResponse
 *
 * Get the read flag for a message
 *
 * \param msgId A unique identity for a multimedia message.
 *****************************************************************************/
void MMSc_getMessageRead(MmsMsgId msgId);

/*!
 * Type: Request Connector
 *
 * Related Adapter: #MMSa_getNumberOfMessagesResponse
 *
 * This function gets the number of messages in one or all folders.
 *
 * \param folder The folder in which to count the number of messages. If the 
 *      request is for all folders, MMS_ALL_FOLDERS must be used. 
 *****************************************************************************/
void MMSc_getNumberOfMessages(MmsFolderType folder);

/*!
 * Type: Request Connector
 *
 * Related Adapter: #MMSa_http, #MMSa_httpRequestDataResponse
 *
 * A WSP/HTTP POST operation initiated with #MMSa_http is divided into multiple 
 * data chunks. The WAP stack has handled the first or previous data chunks 
 * and uses this connector function to request more data.
 *
 * \param requestId     Request ID for the corrsponding WSP/HTTP operation
 *****************************************************************************/
void MMSc_httpRequestData(MmsRequestId requestId);

/*!
 * Type: Answer Connector
 *
 * Related Adapter: #MMSa_http
 *
 * This connector function handles data returned from a WSP/HTTP operation 
 * (POST/GET).
 *
 * A WAP stack outside the MMS Client is used to handle WSP/HTTP operations 
 * with the adapter function #MMSa_http. When the WAP stack returnins data, 
 * this connector function must be used.
 *
 * \param requestId     Request ID for the corresponding WSP/HTTP operation
 * \param headers       WSP/HTTP headers, e.g. 
 *                      "Content-type:text/plain\nNext...".
 *                      This data is copied by the MMS Client if needed after 
 *                      the connector function returns..
 * \param data          Data received as a result of the WSP/HTTP operation. 
 *                      This data is copied by the MMS Client if needed after 
 *                      the connector function returns..
 * \param dataLen       The length in bytes of the received data. Note, that 
 *                      this length must be smaller then defined value of 
 *                      MMS_MAX_CHUNK_SIZE.
 * \param moreData      TRUE if there is more data to receive, otherwise FALSE.
 * \param errorNo       Error number if an error occurred. Any error response 
 *                      from the MMSC or the WAP stack must be translated to 
 *                      an appropriate MMS_RESULT, for example 
 *                      'HTTP 404 Not found' must be translated to 
 *                      MMS_RESULT_COMM_FILE_NOT_FOUND and 'HTTP 200 OK' must 
 *                      be translated to MMS_RESULT_OK.
 *****************************************************************************/
void MMSc_httpResponse(MmsRequestId requestId, const char *headers, void *data,
    int dataLen, CMN_BOOL moreData, MmsResult errorNo);

/*!
 * Type: Answer Connector
 *
 * Related Adapter: #MMSa_httpSessionStart
 *
 * This connector function indicates that the WSP/HTTP session is started and 
 * communication can take place.
 *
 * \param errorNo The result of the Session Start operation
 *****************************************************************************/
void MMSc_httpSessionStartResponse(MmsResult errorNo);

/*!
 * Type: Answer Connector
 *
 * Related Adapter: #MMSa_httpSessionStop
 *
 * This connector function indicates that the WSP/HTTP session is stopped and 
 * no further communication can take place.
 *
 * \param errorNo The result of the Session Stop operation
 *****************************************************************************/
void MMSc_httpSessionStopResponse(MmsResult errorNo);

/*!
 * Type: Request Connector
 *
 * Related Adapter: #MMSa_importMessagesResponse
 *
 * This function imports messages from a special file category to a folder. 
 * When called, every file from a special category is read and imported to
 * a folder as long as the message is correct.
 *
 * \param toFolder The folder that the messages shall be imported to. 
 *        NOTE! MMS_ALL_FOLDERS is not a vaild value in this operation.
 *****************************************************************************/
void MMSc_importMessages(MmsFolderType toFolder);

/*!
 * Type: Request Connector
 *
 * Related Adapter: #MMSa_moveMessageResponse
 *
 * This function moves a message between folders. A message that is indicated 
 * by a message ID is moved from its current folder to the new folder that is 
 * given as a parameter.
 *
 * \param msgId A unique identity for a multimedia message.
 * \param toFolder The folder that the message shall be moved to. 
 *        NOTE! MMS_ALL_FOLDERS is not a vaild value in this operation.
 *****************************************************************************/
void MMSc_moveMessage(MmsMsgId msgId, MmsFolderType toFolder);

/*!
 * Type: Answer Connector
 *
 * Related Adapter: None.
 *
 * A Push PDU is received by the WAP stack. 
 *
 * \param time Time in seconds since 1-1-1970. It will be assigned to the 
 *      notification timeStamp that will be used later, e.g. in the
 *      #MmsNotification structure and in #MMSa_getMessageIdListResponse
 * \param isSmsBearer TRUE if SMS is the bearer of the PUSH, otherwise FALSE.
 * \param size Size of the data that follows.
 * \param pdu Data received in the PUSH. 
 *****************************************************************************/
void MMSc_push( MmsTimeSec time, CMN_BOOL isSmsBearer, unsigned long size, void *pdu);

/*!
 * Type: Request Connector
 *
 * Related Adapter: None.
 *
 * An ongoing retrieve operation on a multimedia message is cancelled by this 
 * function. Only one retrieve operation can be executed at a time, so either 
 * an ongoing immediate retrieval operation or the last call to 
 * #MMSc_retrieveMessage is cancelled. 
 *
 * \param notifId The identity of a notification.
 *****************************************************************************/
void MMSc_retrieveCancel(MmsMsgId notifId);

/*!
 * Type: Request Connector
 *
 * Related Adapter: #MMSa_retrieveMessageResponse
 *
 * A multimedia message is retrieved from the MMS Proxy-Relay and is stored in 
 * the Inbox.
 *
 * \param notifId The identity of a notification.
 *****************************************************************************/
void MMSc_retrieveMessage(MmsMsgId notifId);

/*!
 * Type: Request Connector
 *
 * Related Adapter: None.
 *
 * When this function is called, the MMS client executes one 'tick' (or 
 * actually one state change in the internal state machines). This function 
 * is only called if #MMSc_wantsToRun has returned TRUE.
 *
 *****************************************************************************/
void MMSc_run(void);

/*!
 * Type: Request Connector
 *
 * Related Adapter: None.
 *
 * Cancels an ongoing Send operation for a message.
 *
 * An ongoing Send operation on a multimedia message is cancelled.
 * Only one type of operation can be executed at a time, so the last call
 * to #MMSc_sendMessage for the given message ID is terminated.
 *
 * \param msgId The unique identity for a multimedia message.
 *****************************************************************************/
void MMSc_sendCancel(MmsMsgId msgId);

/*!
 * Type: Request Connector
 *
 * Related Adapter: #MMSa_sendMessageResponse
 *
 * This function sends a Multimedia Message. The Multimedia Message must be
 * created and stored in one of the folders before this function can be called. 
 *
 * \param msgId A unique identity for a multimedia message.
 *****************************************************************************/
void MMSc_sendMessage(MmsMsgId msgId);

/*!
 * Type: Request Connector
 *
 * Related Adapter: #MMSa_sendReadReportResponse
 *
 * Sends a Read Report for a Multimedia Message. The MMS Application has 
 * detected that a Multimedia Message contains a Read Report flag and has
 * decided that a Read Report will be sent. When calling this function, 
 * all data needed will be collected an the Read Report will be sent.
 *
 * \param msgId A unique identity for a multimedia message.
 * \param readStatus Status of the message to send read report on.
 *****************************************************************************/
void MMSc_sendReadReport(MmsMsgId msgId, MmsReadStatus readStatus);

/*!
 * Type: Request Connector
 *
 * Related Adapter: #MMSa_setConfigIntResponse
 *
 * This function sets a new value for a configuration variable of integer type.
 *
 * \param key The variable whose value that will be changed.
 * \param value The value to set the variable to.
 *****************************************************************************/
void MMSc_setConfigInt(MmsConfigInt key, UINT32 value);

/*!
 * Type: Request Connector
 *
 * Related Adapter: #MMSa_setConfigStrResponse
 *
 * This function setsa new value for a configuration variable of UTF-8 type.
 *
 * \param key The variable whose value that will be changed.
 * \param value The value to set the variable to.
 *****************************************************************************/
void MMSc_setConfigStr(MmsConfigStr key, char *value);

/*!
 * Type: Request Connector
 *
 * Related Adapter: #MMSa_setMessageBodyResponse
 *
 * A new body part or attachment is appended to the message 
 *
 * \param bodyPart The body part and all parameters. See declaration
 *        of #MmsSetBodyParams.
 *****************************************************************************/
void MMSc_setMessageBody( MmsSetBodyParams bodyPart);

/*!
 * Type: Request Connector
 *
 * Related Adapter: #MMSa_setMessageDateResponse
 *
 * Set the date for a message.
 *
 * \param msgId A unique identity for a multimedia message.

⌨️ 快捷键说明

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