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

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) 2005
  8. *
  9. *  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  10. *  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  11. *  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
  12. *  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  13. *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  14. *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  15. *  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  16. *  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  17. *  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
  18. *  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
  19. *  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
  20. *  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
  21. *
  22. *  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
  23. *  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  24. *  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  25. *  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
  26. *  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
  27. *
  28. *  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
  29. *  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
  30. *  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
  31. *  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
  32. *  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
  33. *
  34. *****************************************************************************/
  35. /*****************************************************************************
  36.  *
  37.  * Filename:
  38.  * ---------
  39.  * PushInboxCommonAPIs.c
  40.  *
  41.  * Project:
  42.  * --------
  43.  *   MAUI
  44.  *
  45.  * Description:
  46.  * ------------
  47.  *   This file contains all JDI wrappers.
  48.  *
  49.  * Author:
  50.  * -------
  51.  * -------
  52.  *
  53.  *============================================================================
  54.  *             HISTORY
  55.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  56.  *------------------------------------------------------------------------------
  57.  * removed!
  58.  *
  59.  * removed!
  60.  * removed!
  61.  * removed!
  62.  *
  63.  * removed!
  64.  * removed!
  65.  * removed!
  66.  *
  67.  * removed!
  68.  * removed!
  69.  * removed!
  70.  *
  71.  *------------------------------------------------------------------------------
  72.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  73.  *============================================================================
  74.  ****************************************************************************/
  75. #ifndef _MMI_PUSHINBOXCOMMONAPI_C
  76. #define _MMI_PUSHINBOXCOMMONAPI_C
  77. #include "MMI_features.h"
  78. #if defined (JATAAYU_SUPPORT) && defined (WAP_SUPPORT)
  79. #include "PixtelDataTypes.h"
  80. #include "Unicodexdcl.h"
  81. #include "HistoryGprot.h"
  82. #include "GlobalDefs.h"
  83. #include "SettingProfile.h"
  84. #include "DebugInitDef.h"
  85. #include "CommonScreens.h"
  86. #include "EventsGprot.h"
  87. #include "wgui_inputs.h"
  88. #include "wgui_categories.h"
  89. #include "wgui_categories_inputs.h"
  90. #include "OrganizerDef.h"
  91. #include "DateTimeGprot.h"
  92. #include "TimerEvents.h"
  93. #include "wgui_categories_popup.h"
  94. #include "settingGprots.h"
  95. #include "wgui_status_icons.h"
  96. #include "NVRAMType.h"
  97. #include "NVRAMProt.h"
  98. #include "NVRAMEnum.h"
  99. #include "ddl.h"
  100. #include "jcal.h"
  101. #include "jdd_memapi.h"
  102. #include "browserlayout.h"
  103. #include "jdi_servicehandler.h"
  104. #include "jdi_browserinterface.h"
  105. #include "fsm.h"
  106. #include "IdleAppDef.h"
  107. #include "JBrowserMMIDefs.h"
  108. #include "JBrowserMMIProts.h"
  109. #include "JBrowserMMITypes.h"
  110. #include "JBrowserMMIGprots.h"
  111. #include "JPushInboxCommonAPIs.h"
  112. #define JDI_TO_MMI(ret_code) ret_code
  113. extern JC_BROWSER_CONTEXT pBrowserCtxt;
  114. /*****************************************************************************
  115.  * FUNCTION
  116.  *  mmi_brw_get_push_statistics
  117.  * DESCRIPTION
  118.  *  Function to get the count of total and unread messages
  119.  * INPUT PARAMETERS
  120.  *  void
  121.  * OUTPUT PARAMETERS
  122.  *  total_msg - total number of messages
  123.  *  unread_msg - count of unread messages
  124.  * RETURNS
  125.  *  0 i.e. JC_OK in case of sucess.
  126.  *  error-code in case of error
  127.  *****************************************************************************/
  128. U32 mmi_brw_get_push_statistics(U32 *total_msg, U32 *unread_msg)
  129. {
  130.     /*----------------------------------------------------------------*/
  131.     /* Local Variables                                                */
  132.     /*----------------------------------------------------------------*/
  133.     /*----------------------------------------------------------------*/
  134.     /* Code Body                                                      */
  135.     /*----------------------------------------------------------------*/
  136.     return JDI_TO_MMI(jdi_BrowserPushGetStatistics(pBrowserCtxt, total_msg, unread_msg));
  137. }
  138. /*****************************************************************************
  139.  * FUNCTION
  140.  *  mmi_brw_get_push_servicelist
  141.  * DESCRIPTION
  142.  *  Function to get pointer to list of push messages.
  143.  * INPUT PARAMETERS
  144.  *  void
  145.  * OUTPUT PARAMETERS
  146.  *  service_value_base - pointer to list of push messages.
  147.  * RETURNS
  148.  *  0 i.e. JC_OK in case of sucess.
  149.  *  error-code in case of error
  150.  *****************************************************************************/
  151. U32 mmi_brw_get_push_servicelist(SERVICE_VALUE **service_value_base)
  152. {
  153.     /*----------------------------------------------------------------*/
  154.     /* Local Variables                                                */
  155.     /*----------------------------------------------------------------*/
  156.     /*----------------------------------------------------------------*/
  157.     /* Code Body                                                      */
  158.     /*----------------------------------------------------------------*/
  159.     return JDI_TO_MMI(jdi_BrowserPushGetServiceList(pBrowserCtxt, service_value_base));
  160. }
  161. /*****************************************************************************
  162.  * FUNCTION
  163.  *  mmi_brw_delete_push_msg
  164.  * DESCRIPTION
  165.  *  Function to delete a push message.
  166.  * INPUT PARAMETERS
  167.  *  pos - index of push messages in jataayu list.
  168.  * OUTPUT PARAMETERS
  169.  *  void
  170.  * RETURNS
  171.  *  0 i.e. JC_OK in case of sucess.
  172.  *  error-code in case of error
  173.  *****************************************************************************/
  174. U32 mmi_brw_delete_push_msg(U32 pos)
  175. {
  176.     /*----------------------------------------------------------------*/
  177.     /* Local Variables                                                */
  178.     /*----------------------------------------------------------------*/
  179.     /*----------------------------------------------------------------*/
  180.     /* Code Body                                                      */
  181.     /*----------------------------------------------------------------*/
  182.     return JDI_TO_MMI(jdi_BrowserPushServiceDeleteEntry(pBrowserCtxt, pos));
  183. }
  184. /*****************************************************************************
  185.  * FUNCTION
  186.  *  mmi_brw_save_current_push_info
  187.  * DESCRIPTION
  188.  *  Function to save current push context.
  189.  * INPUT PARAMETERS
  190.  *  void
  191.  * OUTPUT PARAMETERS
  192.  *  void
  193.  * RETURNS
  194.  *  0 i.e. JC_OK in case of sucess.
  195.  *  error-code in case of error
  196.  *****************************************************************************/
  197. U32 mmi_brw_save_current_push_info(void)
  198. {
  199.     /*----------------------------------------------------------------*/
  200.     /* Local Variables                                                */
  201.     /*----------------------------------------------------------------*/
  202.     /*----------------------------------------------------------------*/
  203.     /* Code Body                                                      */
  204.     /*----------------------------------------------------------------*/
  205.     return JDI_TO_MMI(jdi_BrowserPushSaveCurrentInfo(pBrowserCtxt));
  206. }
  207. /*****************************************************************************
  208.  * FUNCTION
  209.  *  mmi_brw_set_read_status
  210.  * DESCRIPTION
  211.  *  Function to set read status of a push message.
  212.  * INPUT PARAMETERS
  213.  *  is_read - boolean value to set read status(1 for read, 0 for unread).
  214.  *  service_value_base - pointer to a node in jataayu list for which the
  215.  *  status is to be updated.
  216.  * OUTPUT PARAMETERS
  217.  *  void
  218.  * RETURNS
  219.  *  0 i.e. JC_OK in case of sucess.
  220.  *  error-code in case of error
  221.  *****************************************************************************/
  222. U32 mmi_brw_set_read_status(pBOOL is_read, SERVICE_VALUE *service_value_base)
  223. {
  224.     /*----------------------------------------------------------------*/
  225.     /* Local Variables                                                */
  226.     /*----------------------------------------------------------------*/
  227.     /*----------------------------------------------------------------*/
  228.     /* Code Body                                                      */
  229.     /*----------------------------------------------------------------*/
  230.     return JDI_TO_MMI(jdi_BrowserPushSetReadStatus(pBrowserCtxt, is_read, service_value_base));
  231. }
  232. /*****************************************************************************
  233.  * FUNCTION
  234.  *  mmi_brw_enable_push_Message
  235.  * DESCRIPTION
  236.  *  Function to enable or disable push message.
  237.  * INPUT PARAMETERS
  238.  *  is_enable_push - boolean value to enable or disable(1 for enable, 0 for disable).
  239.  *  push messages.
  240.  * OUTPUT PARAMETERS
  241.  *  void
  242.  * RETURNS
  243.  *  0 i.e. JC_OK in case of sucess.
  244.  *  error-code in case of error
  245.  *****************************************************************************/
  246. U32 mmi_brw_enable_push_Message(pBOOL is_enable_push)
  247. {
  248.     /*----------------------------------------------------------------*/
  249.     /* Local Variables                                                */
  250.     /*----------------------------------------------------------------*/
  251.     /*----------------------------------------------------------------*/
  252.     /* Code Body                                                      */
  253.     /*----------------------------------------------------------------*/
  254.     return JDI_TO_MMI(jdi_BrowserEnablePushHandling(pBrowserCtxt, is_enable_push));
  255. }
  256. #endif /* defined (JATAAYU_SUPPORT) && defined (WAP_SUPPORT) */ 
  257. #endif /* _MMI_PUSHINBOXCOMMONAPI_C */