📄 aapimms.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: aapimms.h $
* Revision: $Revision: \main\149 $
*****************************************************************************/
/*! \file aapimms.h
* \brief The adapter functions from the MMS Client
*
* Adapter functions from the MMS client to the Target Device Application.
* For every adapter function, the following data are listed:
* - A brief one line description of the function
* - A longer description of the function
* - The type of the function. It can be either:
* -# Answer Adapter: The MMS Application has requested a service, via a
* Service Connector, from the MMS client. The result is returned in
* this adapter.
* -# Service Adapter: The MMS client requestes a service from the MMS
* Application via this adapter. The result will be returned in an
* Answer Connector.
* - The name of the corresponding connector function
* - The parameters for the function
*/
#ifndef _AAPIMMS_H
#define _AAPIMMS_H
#ifndef _MMSCONF_H /* Check so mmsconf.h is included before this file */
#error You must #include mmsconf.h before this file.
#error The file mmsconf.h contains configuration data for all other MMS files.
#error Please change the .c file that stopped from compiling because you came
#error here so that it includes mmsconf.h before this file.
#endif /* _MMSCONF_H */
/*--- Definitions/Declarations ---*/
/*--- Types ---*/
/* The following two definitions are used to hide, to some extent, the
* Character Conversion dependencies towards MIC. */
/*! Type for the MIC character conversion. */
#define MMS_CHAR_CONV_TYPE codecvt_convert_t
/*! Type for the MIC character conversion functions. */
#define MMS_CHAR_CONV_FUNC_FIND codecvt_find_function
/*--- Constants ---*/
/*--- Forwards ---*/
/*--- Externs ---*/
/*--- Macros ---*/
#ifdef MMS_LOG_EXTERNAL
/*! Macro enabling external logging */
#define MMS_LOG_E(x) CMNa_log x
#else
/*! Macro disabling external logging */
#define MMS_LOG_E(x)
#endif
#ifdef MMS_LOG_INTERNAL
/*! Macro enabling internal logging */
#define MMS_LOG_I(x) CMNa_log x
#else
/*! Macro disabling internal logging */
#define MMS_LOG_I(x)
#endif
/*--- Prototypes ---*/
/*!
* Type: Answer Adapter
*
* Related Connector: #MMSc_createMessage
*
* The operation ordered in the connector function #MMSc_createMessage is
* finished. This adapter function indicates the outcome of that operation
* and returns the additional data that is needed or requested.
*
* \param result The result of the operation.
* \param msgId A unique identity for a multimedia message.
*****************************************************************************/
void MMSa_createMessageResponse(MmsResult result, MmsMsgId msgId);
/*!
* Type: Answer Adapter
*
* Related Connector: #MMSc_createMultiPartEntry
*
* The operation ordered in the connector function #MMSc_createMultiPartEntry
* is finished. This adapter function indicates the outcome of that operation
* and returns additional data that is needed or requested.
*
* \param result The result of the #MMSc_createMessage operation.
* \param msgId A unique identity for a new multimedia message.
*****************************************************************************/
void MMSa_createMultiPartEntryResponse(MmsResult result, MmsMsgId msgId);
/*!
* Type: Answer Adapter
*
* Related Connector: #MMSc_createMessageDone
*
* Returns the result of the #MMSc_createMessageDone operation.
*
* The operation ordered in the connector function #MMSc_createMessageDone is
* finished. This adapter indicates the outcome of that operation and returns
* additional data that is needed or requested.
*
* \param result The result of the #MMSc_createMessageDone operation.
* \param size The size in bytes of the multimedia message.
*****************************************************************************/
void MMSa_createMessageDoneResponse(MmsResult result, unsigned long size);
/*!
* Type: Answer Adapter
*
* Related Connector: #MMSc_deleteFolder
*
* The operation ordered in the connector function #MMSc_deleteFolder is
* finished. This adapter indicates the outcome of that operation and returns
* additional data that is needed or requested.
*
* \param result The result of the #MMSc_deleteFolder operation.
*****************************************************************************/
void MMSa_deleteFolderResponse(MmsResult result);
/*!
* Type: Answer Adapter
*
* Related Connector: #MMSc_deleteMessage
*
* The operation ordered in the connector function #MMSc_deleteMessage is
* finished. This adapter indicates the outcome of that operation and returns
* additional data that is needed or requested.
*
* \param result The result of the #MMSc_deleteMessage operation.
*****************************************************************************/
void MMSa_deleteMessageResponse(MmsResult result);
/*!
* Type: Answer Adapter
*
* Related Connector: #MMSc_deleteMessageIdList
*
* The operation ordered in the connector function #MMSc_deleteMessageIdList is
* finished. This adapter indicates the outcome of that operation and returns
* additional data that is needed or requested.
*
* \param result The result of the #MMSc_deleteMessageIdList operation.
*****************************************************************************/
void MMSa_deleteMessageIdListResponse(MmsResult result);
/*!
* Type: Answer Adapter
*
* Related Connector: #MMSc_deleteTemporaryFiles
*
* The operation ordered in the connector function #MMSc_deleteTemporaryFiles
* is finished. This adaptor indicates the outcome of that operation and
* returns additional data that is needed or requested.
*
* \param result The result of the #MMSc_deleteTemporaryFiles operation.
*****************************************************************************/
void MMSa_deleteTemporaryFilesResponse(MmsResult result);
/*!
* Type: Service Adapter
*
* Related Connector: None.
*
* A delivery report, which was requested in a message previously sent by this
* MMS Application, is received. Information about this is sent to the MMS
* Application.
*
* \param serverMsgId The unique reference (assigned by the MMS Proxy-Relay)
* to the message. This data must be copied if needed
* after the adapter function returns.
* \param to The recipent address. This data must be copied if
* needed after the adapter function returns.
* \param date Date and time when the message was handled.
* \param status Status of the message.
* \param origMsgId MsgId to the message that originated this delivery
* report. If no msgId could be found is 0 returned.
*****************************************************************************/
void MMSa_deliveryReportReceived(char *serverMsgId, MmsAddress *to,
MmsTimeSec date, MmsStatus status, MmsMsgId origMsgId);
/*!
* Type: Service Adapter
*
* Related Connector: None
*
* An error not reported through any other adapter function has occurred in
* the MMS Client. A typical example can be that no more persistent storage
* is available.
*
* \param result The error or event that has occurred.
*****************************************************************************/
void MMSa_error(MmsResult result);
/*!
* Type: Answer Adapter
*
* Related Connector: #MMSc_forwardReq
*
* The operation ordered in the connector function #MMSc_forwardReq is
* finished. This adapter indicates the outcome of that operation.
*
* \param result The result of the #MMSc_forwardReq operation.
* \param notifId The id of the notification.
* \param responseStatus Status value eventually returned from the MMSC, or 0
* \param responseText Status text eventually returned from the MMSC, or NULL
*****************************************************************************/
void MMSa_forwardReqResponse(MmsResult result, MmsMsgId notifId,
MmsResponseStatus responseStatus, MmsEncodedText *responseText);
/*!
* Type: Answer Adapter
*
* Related Connector: #MMSc_getBodyPart
*
* The operation ordered in the connector function #MMSc_getBodyPart is
* finished. This adapter indicates the outcome of that operation and returns
* additional data that is needed or requested.
*
* \param result The result of the #MMSc_getBodyPart operation.
* \param bodyPart This data must be copied if needed after the adapter
* function returns. If data is supplied as file reference, the MMS
* Application is responsible for deleting the file when it's not needed
* any more.
* \param msgId The identity of the mesage where the body part that is
* fetched belongs.
* \param number The number of the body part to fetch
*****************************************************************************/
void MMSa_getBodyPartResponse(MmsResult result, MmsBodyPart *bodyPart,
UINT32 msgId, UINT32 number);
#ifdef MMS_STANDARD_INTERFACE
/*!
* Type: Answer Adapter
*
* Related Connector: #MMSc_getConfigInt
*
* The operation ordered in the connector function #MMSc_getConfigInt is
* finished. This adapter indicates the outcome of that operation and returns
* additional data that is needed or requested.
*
* This function is only available if MMS_STANDARD_INTERFACE is defined.
*
* \param result The result of the #MMSc_getConfigInt operation.
* \param key The variable who's value is returned.
* \param value The current value of the variable.
*****************************************************************************/
void MMSa_getConfigIntResponse(MmsResult result, MmsConfigInt key,
UINT32 value);
#endif /* MMS_STANDARD_INTERFACE */
#ifdef MMS_STANDARD_INTERFACE
/*!
* Type: Answer Adapter
*
* Related Connector: #MMSc_getConfigStr
*
* The operation ordered in the connector function #MMSc_getConfigStr is
* finished. This adapter indicates the outcome of that operation and returns
* additional data that is needed or requested.
*
* This function is only available if #MMS_STANDARD_INTERFACE is defined.
*
* \param result The result of the #MMSc_getConfigStr operation.
* \param key The variable whose value is returned.
* \param value The current value of the variable. This data must be copied if
* needed after the adapter function returns.
*****************************************************************************/
void MMSa_getConfigStrResponse(MmsResult result, MmsConfigStr key, char *value);
#endif /* MMS_STANDARD_INTERFACE */
#ifdef MMS_EXTERNAL_DRM_ID_GENERATION
/*!
* Type: Service Adapter
*
* Related Connector: #MMSc_getDrmIdResponse.
*
* This adapter is used by the MMS Client to request unique IDs to assign to
* the different bodyparts of an MMS message. These IDs will be found when a
* bodypart is fetched with a call to MMSc_getBodyPart.
*
* This function is only available if #MMS_EXTERNAL_DRM_ID_GENERATION is
* defined.
*
* \param msgId The message id.
* \param bodyBuf The drm bodypart buffer, NULL if data is stored in a file.
* \param dataLen The length of the buffer.
* \param dataStart Start of data if data > MMS_MAX_CHUNK_SIZE.
* \param drmType bodypart content type.
* \param contFinish Value should be returned in call to #MMSc_getDrmIdResponse.
*
*****************************************************************************/
void MMSa_getDrmId( MmsMsgId msgId, unsigned char *bodyBuf,
UINT32 dataLen, UINT32 dataStart, UINT32 drmType, UINT32 contFinish);
#endif /* MMS_EXTERNAL_DRM_ID_GENERATION */
/*!
* Type: Answer Adapter
*
* Related Connector: #MMSc_getMessage
*
* The operation ordered in the connector function #MMSc_getMessage is
* finished. This adapter indicates the outcome of that operation and
* returns additional data that is needed or requested.
*
* \param result The result of the #MMSc_getMessage operation.
* \param msgType The type of message returned.
* \param msgPart This must be copied if the data is needed after the
* adapter function returns. If the MsgType is:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -