JMMSProtocols.h
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:13k
源码类别:

MTK

开发平台:

C/C++

  1. /*****************************************************************************
  2. *  Copyright Statement:
  3. *  --------------------
  4. *  This software is protected by Copyright and the information contained
  5. *  herein is confidential. The software may not be copied and the information
  6. *  contained herein may not be used or disclosed except with the written
  7. *  permission of MediaTek Inc. (C) 2002
  8. *
  9. *****************************************************************************/
  10. /*****************************************************************************
  11.  *
  12.  * Filename:
  13.  * ---------
  14.  *  JMMSSent.h
  15.  *
  16.  * Project:
  17.  * --------
  18.  *  MAUI
  19.  *
  20.  * Description:
  21.  * ------------
  22.  * This file contans the enums,constants,structures, function prototypes used in
  23.  * jmms_sent.c
  24.  *
  25.  * Author:
  26.  * -------
  27.  * -------
  28.  *
  29.  *============================================================================
  30.  *             HISTORY
  31.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  32.  *------------------------------------------------------------------------------
  33.  * removed!
  34.  *
  35.  * removed!
  36.  * removed!
  37.  * removed!
  38.  *
  39.  * removed!
  40.  * removed!
  41.  * removed!
  42.  *
  43.  * removed!
  44.  * removed!
  45.  * removed!
  46.  *
  47.  * removed!
  48.  * removed!
  49.  * removed!
  50.  *
  51.  * removed!
  52.  * removed!
  53.  * removed!
  54.  *
  55.  * removed!
  56.  * removed!
  57.  * removed!
  58.  *
  59.  * removed!
  60.  * removed!
  61.  * removed!
  62.  *
  63.  * removed!
  64.  * removed!
  65.  * removed!
  66.  *
  67.  *------------------------------------------------------------------------------
  68.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  69.  *============================================================================
  70.  ****************************************************************************/
  71. #ifndef __MMI_JMMSPROTCOLS_H
  72. #define __MMI_JMMSPROTCOLS_H
  73. #include "MMI_features.h"
  74. #include "PixtelDataTypes.h"
  75. // #include "MessagingDataTypes.h"
  76. #include "ddl.h"
  77. #include "jcal.h"
  78. #include "jcalnet.h"
  79. #include "jdi_wspdatatype.h"
  80. //#include "jdi_transport.h"
  81. //#include "transport.h"
  82. //#include <jdi_miscutils.h>
  83. //#include <jdi_communicator.h>
  84. /* 
  85.  * Define
  86.  */
  87. // #define MMI_JMMS_JAVA_MMS_SUPPORT
  88. #define MAX_NUMBER_OF_EVENTS_IN_MMS_QUEUE 150
  89. #define E_MSG_TYPE_IDLE_SCREEN_POP_UP 100
  90. /* 
  91.  * Typedef 
  92.  */
  93. typedef enum
  94. {
  95.     E_FROM_URL_CALLBACK = 0x01,
  96.     E_FROM_ERROR_CALLBACK
  97. } mmi_jmms_retry_calling_function;
  98. /* PMT VIKAS START 20060401 */
  99. typedef enum
  100. {
  101.     MMS_STATUS_OFF = 0,
  102.     MMS_STATUS_NEW_MESSAGE,
  103.     MMS_STATUS_BUSY,
  104.     MMS_STATUS_FULL
  105. } mmi_jmms_status_icon_type;
  106. /* PMT VIKAS END 20060401 */
  107. /* 
  108.  * Extern Global Variable
  109.  */
  110. /* 
  111.  * Extern Global Function
  112.  */
  113. /*  */
  114. extern void mmi_jmms_ui_events_hdlr(JC_EVENT_DATA *pEventData);
  115. /* /for test */
  116. extern void mmi_jmms_push_ind_callback(void *pCommArg, COMM_PUSH_IND *pPushContentInd);
  117. extern JC_RETCODE mmi_jmms_init_protocol(void);
  118. /* void mmi_jmms_url_ind_callback (jmms_context_struct *jmms_context, COMM_FETCH_URL_IND_RESP   *pURLInd); */
  119. extern JC_RETCODE mmi_jmms_url_ind_callback(jmms_context_struct *jmms_context, COMM_FETCH_URL_IND_RESP *pURLInd);
  120. /* void mmi_jmms_header_ind_callback(jmms_context_struct *jmms_context,COMM_HEADER_INDICATION   *pCommHeaderInd); */
  121. extern JC_RETCODE mmi_jmms_header_ind_callback(
  122.                     jmms_context_struct *jmms_context,
  123.                     COMM_HEADER_INDICATION *pCommHeaderInd);
  124. extern void mmi_jmms_progress_ind_callback(
  125.                 jmms_context_struct *jmms_context,
  126.                 JC_UINT32 uiReferenceID,
  127.                 COMM_PROGRESS_IND *pProgressInd);
  128. /* void mmi_jmms_create_new_mms_pdu(void); */
  129. extern void mmi_jmms_create_mms_queue(void);
  130. extern void mmi_jmms_error_ind_callback(
  131.                 jmms_context_struct *jmms_context,
  132.                 JC_UINT32 uiReferenceID,
  133.                 JC_RETCODE eRetCode);
  134. /* JC_RETCODE mmi_jmms_set_profile ( COMM_HANDLE hCommHandle); */
  135. extern JC_RETCODE mmi_jmms_set_profile(void);
  136. extern void mmi_jmms_get_ip_address(U8 *ip_address, U8 *proxy_ip);
  137. extern void mmi_jmms_free_mms_pdu_memory(jmms_context_struct *jmms_context);
  138. extern JC_RETCODE mmi_jmms_create_and_send_new_mms(
  139.                     U16 message_setting,
  140.                     jmms_context_struct *jmms_context,
  141.                     MMI_BOOL is_create_for_send);
  142. extern JC_RETCODE mmi_jmms_send_mms(
  143.                     MSG_HANDLE hMsgHandle,
  144.                     U16 comm_state,
  145.                     JC_BOOLEAN bIsStream,
  146.                     U8 retry_counter,
  147.                     JC_BOOLEAN bIsAsynch);
  148. extern JC_RETCODE mmi_jmms_send_synchronous_mms(
  149.             MSG_HANDLE hMsgHandle,
  150.             U16 comm_state,
  151.             JC_BOOLEAN bIsStream,
  152.             U8 retry_counter, 
  153.             JC_BOOLEAN bIsAsynch,U32* unique_id_p);
  154. extern S8 *mmi_jmms_get_to_addresses(void);
  155. extern S8 *mmi_jmms_get_cc_addresses(void);
  156. extern S8 *mmi_jmms_get_bcc_addresses(void);
  157. extern void mmi_jmms_deinit_mms_context(jmms_context_struct *jmms_context);
  158. extern void mmi_jmms_update_mmsc_url_version(S8 *mmsc_url_used, S8 *mmsc_version);
  159. extern void mmi_jmms_entry_communication_progress_screen(void);
  160. extern void mmi_jmms_cancel_mms_sending(void);
  161. extern void mmi_jmms_end_comm(void);
  162. extern void mmi_jmms_comm_stop_callback(
  163.                 jmms_context_struct *jmms_context,
  164.                 JC_UINT32 uiReferenceID,
  165.                 JC_RETCODE eRetCode);
  166. extern JC_RETCODE mmi_jmms_add_pending_mms_info_node(U16 msg_index, U8 msg_type, S8 *content_location);
  167. extern void mmi_jmms_show_new_mms_pop_up(void);
  168. extern JC_RETCODE mmi_jmms_add_pending_mms_delivery_report_node(U8 status, S8 *to_address, JC_UINT32 date);
  169. extern JC_RETCODE mmi_jmms_add_pending_mms_read_report_node(U8 status, S8 *from_address, JC_UINT32 date);
  170. /* JC_RETCODE mmi_jmms_retry_communication(jmms_context_struct *jmms_context,U16         calling_function,JC_RETCODE error_code); */
  171. extern JC_RETCODE mmi_jmms_retry_communication(
  172.                     jmms_context_struct *jmms_context,
  173.                     U16 calling_function,
  174.                     JC_UINT32 uiReferenceID,
  175.                     JC_RETCODE error_code);
  176. extern JC_RETCODE mmi_jmms_set_mmsc_version(void);
  177. extern JC_RETCODE mmi_jmms_read_callback(
  178.                     void *pStream,
  179.                     JC_INT32 uiOffset,
  180.                     JC_UINT32 uiSize,
  181.                     JC_UINT8 *pBuffer,
  182.                     JC_UINT32 *pSizeRead);
  183. extern JC_RETCODE mmi_jmms_write_callback(void *pStream, JC_UINT8 *pBuffer, JC_UINT32 uiSize);
  184. extern JC_RETCODE mmi_jmms_handle_notification_ack_response(
  185.                     jmms_context_struct *jmms_context,
  186.                     COMM_FETCH_URL_IND_RESP *pURLInd,
  187.                     CONTENT_DATA *Content);
  188. extern JC_RETCODE mmi_jmms_handle_read_report_pdu_response(
  189.                     jmms_context_struct *jmms_context,
  190.                     COMM_FETCH_URL_IND_RESP *pURLInd,
  191.                     CONTENT_DATA *Content);
  192. extern JC_RETCODE mmi_jmms_handle_read_report_mms_response(
  193.                     jmms_context_struct *jmms_context,
  194.                     COMM_FETCH_URL_IND_RESP *pURLInd,
  195.                     CONTENT_DATA *Content);
  196. extern JC_RETCODE mmi_jmms_handle_immediate_downlaod_response(
  197.                     jmms_context_struct *jmms_context,
  198.                     COMM_FETCH_URL_IND_RESP *pURLInd,
  199.                     CONTENT_DATA *Content);
  200. extern JC_RETCODE mmi_jmms_handle_deffered_downlaod_response(
  201.                     jmms_context_struct *jmms_context,
  202.                     COMM_FETCH_URL_IND_RESP *pURLInd,
  203.                     CONTENT_DATA *Content);
  204. extern JC_RETCODE mmi_jmms_handle_new_mms_send_response(
  205.                     jmms_context_struct *jmms_context,
  206.                     COMM_FETCH_URL_IND_RESP *pURLInd,
  207.                     CONTENT_DATA *Content);
  208. extern jmms_communication_state_node *mmi_jmms_get_comm_state(
  209.                                         jmms_context_struct *jmms_context,
  210.                                         JC_UINT32 uiReferenceID);
  211. //JC_RETCODE mmi_jmms_add_comm_node(jmms_context_struct *jmms_context,JC_UINT32 uiReferenceID,U16 comm_state);
  212. //JC_RETCODE mmi_jmms_add_comm_node(jmms_context_struct *jmms_context,JC_UINT32 uiReferenceID,U16 comm_state,JC_CHAR *file_name_for_send);
  213. extern JC_RETCODE mmi_jmms_add_comm_node(
  214.                     jmms_context_struct *jmms_context,
  215.                     JC_UINT32 uiReferenceID,
  216.                     U16 comm_state,
  217.                     JC_CHAR *file_name_for_send,
  218.                     JC_UINT32 msg_index,
  219.                     U8 retry_counter,
  220.                     S8 *content_location);
  221. extern JC_RETCODE mmi_jmms_update_comm_node(
  222.                     jmms_context_struct *jmms_context,
  223.                     JC_UINT32 new_uiReferenceID,
  224.                     JC_UINT32 old_uiReferenceID,
  225.                     U8 retry_counter);
  226. extern void mmi_jmms_free_comm_node(jmms_context_struct *jmms_context, JC_UINT32 uiReferenceID);
  227. extern void mmi_jmms_handle_error_in_communication(
  228.                 jmms_context_struct *jmms_context,
  229.                 U16 calling_function,
  230.                 jmms_communication_state_node *comm_node,
  231.                 JC_RETCODE error_code);
  232. extern JC_RETCODE mmi_jmms_handle_url_repsonse(
  233.                     jmms_context_struct *jmms_context,
  234.                     COMM_FETCH_URL_IND_RESP *pURLInd,
  235.                     CONTENT_DATA Content);
  236. extern void mmi_jmms_handle_read_report(MESSAGE_RETRIEVAL *pMsgRetrieval);
  237. extern void mmi_jmms_free_message_header(void);
  238. extern JC_RETCODE mmi_jmms_save_mms(
  239.                     S8 *folder_name,
  240.                     MSG_HANDLE hMsgHandle,
  241.                     MMI_BOOL is_store_update,
  242.                     JC_UINT32 msg_index,
  243.                     error_callback err_cb);
  244. extern void mmi_jmms_save_mms_async_callback(JC_RETCODE eRet);
  245. extern void mmi_jmms_handle_error_string(JC_RETCODE error_code, U16 communication_state);
  246. extern JC_RETCODE mmi_jmms_send_and_store_mms(
  247.                     S8 *folder_name,
  248.                     MSG_HANDLE hMsgHandle,
  249.                     jmms_communication_state_node *comm_node);
  250. extern JC_RETCODE mmi_jmms_resend_mms(jmms_communication_state_node *comm_node, U8 retry_counter);
  251. /* PMT VIKAS START 20060401 */
  252. extern void mmi_jmms_update_status_icon_indicator(void);
  253. extern void mmi_jmms_set_mms_downloading_busy(void);
  254. extern void mmi_jmms_reset_mms_downloading_busy(void);
  255. extern U8 mmi_jmms_is_download_busy(void);
  256. extern void mmi_jmms_show_mms_status_icon(mmi_jmms_status_icon_type status);
  257. extern void mmi_jmms_free_pending_node_if_present(U32 msg_index);
  258. //PMT HIMANSHU START 20060425
  259. //MMI_BOOL mmi_jmms_is_msg_open(S8 *fname,U32 msg_index);
  260. extern MMI_BOOL mmi_jmms_is_msg_open(S8 *fname, U32 msgId, U32 msg_index);
  261. /* PMT HIMANSHU END 20060425 */
  262. extern void mmi_jmms_check_for_idle_screen(void);
  263. extern void mmi_jmms_handle_pop_up_for_interupt(U16 strid);
  264. extern void mmi_jmms_entry_general_pop_screen_in_case_interupt(void);
  265. extern void mmi_jmms_end_key_downlaod_sucess_pop_screen(void);
  266. extern void mmi_jmms_back_msg_download_sucess(void);
  267. extern void mmi_jmms_remove_memory_full_node_if_present(void);
  268. extern void mmi_jmms_add_memory_full_node_if_not_already(void);
  269. extern void mmi_jmms_comm_time_hdlr(void);
  270. extern void mmi_jmms_retry_for_error_in_comm(mmi_jmms_temp_event_struct *pEventData);
  271. extern S8 *mmi_jmms_get_em_mms_version(void);
  272. extern void mmi_jmms_send_mms_async_callback(JC_RETCODE eRet);
  273. extern void mmi_jmms_free_comm_node_list(void);
  274. extern void mmi_jmms_cancel_comm_in_usb_mode(void);
  275. S32 mmi_jmms_is_immediate_retrival_underway(void);
  276. /******************************************************************************
  277.  Written By : Raj Kumar Gupta
  278.  Date       : 09 June 2006
  279.  *****************************************************************************/
  280. extern void mmi_jmms_send_drafts_sent_callback(JC_RETCODE eRet);
  281. extern void mmi_jmms_create_and_send_new_mms_async_callback(JC_RETCODE eRet);
  282. extern void mmi_jmms_handle_new_mms_send_response_asynch_callback(JC_RETCODE eRet);
  283. extern JC_RETCODE mmi_jmms_update_pending_downloads(JC_UINT32 msg_index);
  284. void mmi_jmms_stop_download_busy(void);
  285. /* PMT VIKAS END 20060401 */
  286. #ifdef MMI_JMMS_JAVA_MMS_SUPPORT
  287. /* void mmi_jmms_jsr_mms_send_response(jmms_context_struct *jmms_context,COMM_FETCH_URL_IND_RESP        *pURLInd); */
  288. extern JC_RETCODE mmi_jmms_jsr_mms_send_response(
  289.                     jmms_context_struct *jmms_context,
  290.                     COMM_FETCH_URL_IND_RESP *pURLInd,
  291.                     CONTENT_DATA Content);
  292. #endif /* MMI_JMMS_JAVA_MMS_SUPPORT */ 
  293. #endif /* __MMI_JMMSPROTCOLS_H */