JBrowserMMITypes.h
上传用户: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.  * Filename:
  37.  * ---------
  38.  * JBrowserMMITypes.h
  39.  *
  40.  * Project:
  41.  * --------
  42.  *   MAUI
  43.  *
  44.  * Description:
  45.  * ------------
  46.  *   This file contains all the data structures used for browser secondary MMI implementation.
  47.  *
  48.  * Author:
  49.  * -------
  50.  * -------
  51.  *
  52.  *==============================================================================
  53.  *             HISTORY
  54.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  55.  *------------------------------------------------------------------------------
  56.  * removed!
  57.  *
  58.  * removed!
  59.  * removed!
  60.  * removed!
  61.  *
  62.  * removed!
  63.  * removed!
  64.  * removed!
  65.  *
  66.  * removed!
  67.  * removed!
  68.  * removed!
  69.  *
  70.  * removed!
  71.  * removed!
  72.  * removed!
  73.  *
  74.  * removed!
  75.  * removed!
  76.  * removed!
  77.  *
  78.  * removed!
  79.  * removed!
  80.  * removed!
  81.  *
  82.  * removed!
  83.  * removed!
  84.  * removed!
  85.  *
  86.  * removed!
  87.  * removed!
  88.  * removed!
  89.  *
  90.  * removed!
  91.  * removed!
  92.  * removed!
  93.  *
  94.  * removed!
  95.  * removed!
  96.  * removed!
  97.  *
  98.  *------------------------------------------------------------------------------
  99.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  100.  *==============================================================================
  101.  *******************************************************************************/
  102. #ifndef _JBROWSERMMITYPES_H
  103. #define _JBROWSERMMITYPES_H
  104. #include "MMI_features.h"
  105. #if defined (JATAAYU_SUPPORT) && defined (WAP_SUPPORT)
  106. #include "PixtelDataTypes.h"
  107. #include "gui_data_types.h"
  108. #include "custom_wap_config.h"
  109. #include "custom_nvram_editor_data_item.h"
  110. /* Jataayu Module Includes */
  111. #include "jdi_servicehandler.h"
  112. #include "jdi_communicator.h"
  113. #include "jcal.h"
  114. #include "jdi_BrowserDatatype.h"
  115. #define BRW_DCS_ASCII                           0x00
  116. #define BRW_DCS_UCS                             0x01
  117. #define BRW_MAX_BOOKMARKS                       NVRAM_BRW_MAX_BOOKMARKS
  118. #define BRW_BKM_MAX_TITLE_LENGTH                NVRAM_BRW_BKM_MAX_TITLE_LENGTH
  119. #define BRW_BKM_MAX_URL_LENGTH                     NVRAM_BRW_BKM_MAX_URL_LENGTH
  120. #define BRW_MAX_ADDRESS_HISTORY                    NVRAM_BRW_MAX_ADDRESS_HISTORY
  121. #define BRW_ADDRESS_HISTORY_MAX_TITLE_LENGTH       NVRAM_BRW_ADDRESS_HISTORY_MAX_TITLE_LENGTH
  122. #define BRW_ADDRESS_HISTORY_MAX_URL_LENGTH            NVRAM_BRW_ADDRESS_HISTORY_MAX_URL_LENGTH
  123. #define BRW_WAP_PROFILE_HOMEPAGE_URL_LEN           NVRAM_WAP_PROFILE_HOMEPAGE_URL_LEN
  124. /* Maximum number of characters to be shown in case of url */
  125. #define BRW_MAX_VISIBLE_URL_LENGTH        38
  126. #define NUMBER_OF_ITEMS_IN_BROWSER_OPTION 8
  127. #define BRW_SHOW_IMAGES_OPTION            2
  128. #define BRW_SHOW_HISTORY_AS_OPTION        2
  129. #define BRW_SHOW_IMAGES_SELECTION   2
  130. #define  BRW_TIME_OUT_LEN              3
  131. #define BRW_MAX_TIME_OUT               WAP_CUSTOM_CFG_DEFAULT_BROWSE_TIMEOUT
  132. #define BRW_MAX_PATH_LENGTH      FMGR_MAX_PATH_LEN*ENCODING_LENGTH
  133. #define BRW_MAX_FILENAME_LENGTH  (FMGR_MAX_INPUT_FILE_LEN)*ENCODING_LENGTH
  134. /* Added for authentication */
  135. #define BRW_AUTH_LEN_USERNAME    31
  136. #define BRW_AUTH_LEN_PASSWORD    31
  137. #define BRW_MAX_WSP_RETRIES       4
  138. /* Added for maximum do elemnts on a page */
  139. #define MAX_DO_ELEMENTS          30
  140. /* Browser Screen Error Tone Duration */
  141. #define JBROWSER_POPUP_TIME    UI_POPUP_NOTIFYDURATION_TIME
  142. /* Browser Max Accesskey Value.Its value should always be TOTAL KEYS + 1 */
  143. /* Currently registered Accesskeys are as follows: */
  144. /* 
  145.    (1)  KEY_STAR,   (2)  KEY_0, 
  146.    (3)  KEY_1,      (4)  KEY_2, 
  147.    (5)  KEY_3,      (6)  KEY_4, 
  148.    (7)  KEY_5,      (8)  KEY_6, 
  149.    (9)  KEY_7,      (10) KEY_8, 
  150.    (11) KEY_9,      (12) KEY_POUND
  151.    (13) KEY_SEND (if BROWSER_SENDKEY_AS_ACCESSKEY is defined in ddl.h)
  152. */
  153. #ifdef BROWSER_SENDKEY_AS_ACCESSKEY
  154. #define MMI_JBROWSER_MAX_ACCESSKEY  14
  155. #else
  156. #define MMI_JBROWSER_MAX_ACCESSKEY  13
  157. #endif /* BROWSER_SENDKEY_AS_ACCESSKEY */
  158. /* Typedefs */
  159. typedef enum
  160. {
  161.     BRW_STATUS_NO,
  162.     BRW_STATUS_YES,
  163. BRW_STATUS_FROM_ENTER_ADDRESS,
  164. BRW_ADD_BKM_FROM_USE_URL
  165. } brw_status_enum;
  166. typedef enum
  167. {
  168.     BRW_DATACONN_ACTIVATING,
  169.     BRW_DATACONN_ACTIVATED,
  170. BRW_DATACONN_DEACTIVATING,
  171. BRW_DATACONN_DEACTIVATED
  172. } brw_data_conn_state_enum;
  173. typedef enum
  174. {
  175.     BRW_INLINE_TITLE_CAPTION,
  176.     BRW_INLINE_TITLE,
  177.     BRW_INLINE_ADDRESS_CAPTION,
  178.     BRW_INLINE_URL
  179. } brw_inline_item_display;
  180. typedef enum
  181. {
  182.     BRW_SAT_LAUCH_SUCC,
  183.     BRW_SAT_BRWOSER_BUSY,
  184.     BRW_SAT_BEARER_UNAVAILABLE,
  185.     BRW_SAT_PARAM_GATEWAY_ERROR,
  186.     BRW_SAT_PARAM_URL_ERROR,
  187.     BRW_SAT_PROV_DATA_ERROR,
  188.     BRW_SAT_UNKNOWN_ERROR
  189. } brw_sat_lauch_res_enum;
  190. typedef enum
  191. {
  192.     BRW_SAT_USER_TERMINATION,
  193.     BRW_SAT_ERROR_TERMINATION
  194. } brw_sat_browser_termination_mode_enum;
  195. typedef enum
  196. {
  197.     BRW_INLINE_USERNAME_CAPTION,
  198.     BRW_INLINE_USERNAME,
  199.     BRW_INLINE_PASSWORD_CAPTION,
  200.     BRW_INLINE_PASSWORD
  201. } brw_auth_inline_item_display;
  202. typedef enum
  203. {
  204.     BRW_INLINE_TIMEOUT_CAPTION = 0,
  205.     BRW_INLINE_TIMEOUT_EDIT,
  206.     BRW_INLINE_SHOW_IMAGES_CAPTION,
  207.     BRW_INLINE_SHOW_IMAGES_SELECT,
  208.     BRW_INLINE_SHOW_HISTORY_CAPTION,
  209.     BRW_INLINE_SHOW_HISTORY_SELECT,
  210. BRW_INLINE_IMAGES_SELECTION_CAPTION,
  211.     BRW_INLINE_IMAGES_SELECTION_SELECT
  212. } brw_option_inline_item_display;
  213. /* BROWSER EVENT TYPES */
  214. typedef enum
  215. {
  216.     E_BRW_STARTUP_EVENT = 1,
  217.     E_BRW_START_FETCH_EVENT,
  218.     E_BRW_STOP_FETCH_EVENT,
  219.     E_BRW_ACTION_EVENT,
  220.     E_BRW_KEY_UP_EVENT,
  221.     E_BRW_KEY_DOWN_EVENT,
  222.     E_BRW_KEY_LEFT_EVENT,
  223.     E_BRW_KEY_RIGHT_EVENT,
  224.     E_BRW_REFRESH_EVENT,
  225.     E_BRW_SAT_GOTO_URL_EVENT,
  226.     E_BRW_PARSE_DRM_EVENT,
  227. E_BRW_DEINIT_EVENT,
  228. E_BRW_DATACONN_AUTO_DISC_TIMEOUT_EVENT,
  229. E_BRW_ENDKEY_EVENT,
  230.     E_TOTAL_EVENTS
  231. } BRW_SECONDARY_MMI_EVENTS_ENUM;
  232. /* Page fetch event type */
  233. typedef enum
  234. {
  235.     BRW_START_FETCH_EVENT,
  236.     BRW_ACTION_EVENT
  237. } brw_page_fetch_event;
  238. /* Browser Context Structure */
  239. typedef struct
  240. {
  241.     nvram_brw_bkm_title_struct *bookmark_title_p;
  242.     nvram_brw_bkm_url_struct *bookmark_url_p;
  243.     nvram_brw_hist_title_struct *address_history_title_p;
  244.     nvram_brw_hist_url_struct *address_history_url_p;
  245.     U8 total_bookmark_items;
  246.     U8 total_address_history_items;
  247.     U16 timeout_value;
  248.     brw_status_enum show_images;
  249.     U8 show_history_as_url;
  250. brw_status_enum image_selection;
  251.     U8 index_highlighted_item;
  252.     MMI_BOOL push_msg_rcvd_flag;
  253.     JC_DO_LIST **DoElementList;
  254.     U16 do_element_count;
  255.     U16 used_do_element_count;
  256.     JC_AUTH_INFO pAuthInfo;
  257.     U8 brw_auth_username[BRW_AUTH_LEN_USERNAME * ENCODING_LENGTH];
  258.     U8 brw_auth_password[BRW_AUTH_LEN_PASSWORD * ENCODING_LENGTH];
  259.     U8 isBrowserReady;
  260.     U8 isBrowserInitInProgress;
  261.     JC_BOOLEAN isConnectionActive;
  262.     JC_BOOLEAN isRenderedFlag;
  263.     JC_BOOLEAN isLayoutInitialized;
  264.     JC_BOOLEAN isSATURL;            /* added to identify if browsing from SAT application */
  265.     JC_BOOLEAN isServiceMsgSetting; /* added to identify whether service message is on or of */
  266.     U8 isDownloading;
  267.     U8 isDownloadSuspended;
  268.     U8 downloadSizeInKB;
  269.     U8 showDownloadAbortedPopup;
  270.     U32 total_content_length;
  271.     U32 downloaded_content_length;
  272.     JDD_FSHANDLE dwnld_fs_handle;
  273.     JDD_FILE dwnld_file_handle;
  274.     S8 dwnld_progress_str[100];
  275.     JC_MIME_INFO dwnld_mime_info;
  276.     U8 page_fetch_event;            /* added to iddentify if page is fetched from E_BRW_START_FETCH_EVENT or E_BRW_ACTION_EVENT */
  277.     U8 page_fetchReqSrc;            /* added to iddentify if page is requested from wap menu(setting as 0) or from other screen (setting as 1) */
  278.     JC_CHAR *prompt_buffer;         /* added by pawan for prompt input */
  279. COMM_HANDLE hCommHandle;
  280.     U8 launch_brw_ext_app;
  281.     JC_BOOLEAN isDataConnectionDeactivate; /*Added to iddentify if the data connection is deactivated bt the app in case of csd connection*/
  282. U8 dataConnectionState; /*Added to iddentify the current state of the data connection in case of csd*/
  283. } brw_context_struct;
  284. /* Browser Page context */
  285. typedef struct
  286. {
  287.     U8 request_id;
  288.     U8 navigation_list_size;    /* store the URL list number */
  289. U8 brw_ActiveScreenstatus;
  290. U8 brw_PageFetchStatus;
  291. U8 brw_PageRefreshDispStatus;
  292. U8 brw_PageRefreshStatus;
  293. U8 brw_pageRenderStatus;
  294. U8 brw_Pre_PageRenderStatus;
  295. U8 brw_cancel_flag;
  296. U8 brw_PageStatusCodeStack[3];
  297. JC_BOOLEAN brw_isRefreshDisplay;
  298. } brw_page_context_struct;
  299. extern U8 g_brw_add_hist_flag;
  300. extern U8 g_brw_enter_add_flag;
  301. extern brw_context_struct g_brw_cntx;
  302. extern U8 brw_current_url[BRW_BKM_MAX_URL_LENGTH * ENCODING_LENGTH];
  303. extern JC_BROWSER_CONTEXT pBrowserCtxt;
  304. extern SERVICE_VALUE *g_brw_rcvd_service_msg_p; /* puneet */
  305. extern BOOL g_BrwCsdCallDisconnect; /*It is being set when csd call get disconnected*/
  306. extern BOOL g_EndKey_pressed; /*Added to procss the end key through internal queue*/
  307. extern brw_status_enum edit_flag;
  308. extern U8 g_brw_bkm_selected_url[(BRW_BKM_MAX_URL_LENGTH) * ENCODING_LENGTH];
  309. extern U8 g_brw_bkm_selected_title[(BRW_BKM_MAX_TITLE_LENGTH) * ENCODING_LENGTH];
  310. extern brw_page_context_struct g_brw_page_cntx;
  311. #ifdef __JBROWSER_DLS_SUPPORT__
  312. /* Download Agent Service context */
  313. typedef struct
  314. {
  315. S32 session_id;
  316. U32 seq_num;
  317. BOOL progress_flag;
  318. JC_CHAR *p_file_name;
  319. }brw_dls_context_struct;
  320. extern brw_dls_context_struct g_brw_dls_cntx;
  321. #endif /* __JBROWSER_DLS_SUPPORT__ */
  322. #endif /* defined (JATAAYU_SUPPORT) && defined (WAP_SUPPORT) */ 
  323. #endif /* _JBROWSERMMITYPES_H */