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

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.  *   ThemeConverterXML.c
  40.  *
  41.  * Project:
  42.  * --------
  43.  *   MAUI
  44.  *
  45.  * Description:
  46.  * ------------
  47.  * Contains parser side handlers for the DLT project
  48.  *
  49.  * Author:
  50.  * -------
  51.  * -------
  52.  *  Vikas Gupta(PMT)
  53.  *   
  54.  *==============================================================================
  55.  *             HISTORY
  56.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  57.  *------------------------------------------------------------------------------
  58.  * removed!
  59.  *
  60.  * removed!
  61.  * removed!
  62.  * removed!
  63.  *
  64.  * removed!
  65.  * removed!
  66.  * removed!
  67.  *
  68.  * removed!
  69.  * removed!
  70.  * removed!
  71.  *
  72.  * removed!
  73.  * removed!
  74.  * removed!
  75.  *
  76.  * removed!
  77.  * removed!
  78.  * removed!
  79.  *
  80.  * removed!
  81.  * removed!
  82.  * removed!
  83.  *
  84.  * removed!
  85.  * removed!
  86.  * removed!
  87.  *
  88.  * removed!
  89.  * removed!
  90.  * removed!
  91.  * removed!
  92.  *
  93.  *------------------------------------------------------------------------------
  94.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  95.  *==============================================================================
  96.  *******************************************************************************/
  97. #include "MMI_features.h"
  98. #include "stdC.h"
  99. #include "L4Dr1.h"
  100. #include "Fat_fs.h"
  101. #include "PixtelDataTypes.h"
  102. #include "ThemeConverter.h"
  103. #include "ThemeManager.h"
  104. #include "GlobalMenuItems.h"
  105. #include "WallpaperDefs.h"
  106. #include "ScreenSaverDefs.h"
  107. #include "MainMenuDef.h"
  108. #include "StatusIconRes.h"
  109. #include "CalendarDef.h"
  110. #include "Phonebookdef.h"
  111. #include "CallManagementIdDef.h"
  112. #include "MessagesResourceData.h"
  113. #include "NetworkSetupGProt.h"
  114. #include "wgui_categories_defs.h"
  115. #include "callhistoryenum.h"
  116. #include "xml_def.h"
  117. #include "wgui_status_icons.h"
  118. #include "PhoneBookDef.h"
  119. #include "ComposeRingToneDefs.h"
  120. #include "FunAndGamesDefs.h"
  121. #include "PhoneSetup.h"
  122. #ifdef __MMI_DOWNLOADABLE_THEMES_SUPPORT__
  123. /* Parser Object */
  124. XML_PARSER_STRUCT g_tc_parser;  /* parser object */
  125. #define NO_IMG_ATTR 300
  126. #define NO_XML_TAGS 42
  127. #define IMAGE_LIST_POS_XML_TAG_MAP 12
  128. /* Temporary Images ID for some images */
  129. /* End of the temporary id's */
  130. /*******book Keeping***************/
  131. extern MMI_theme theme_DLT;
  132. extern U16 g_tm_checkThemeVersion;
  133. /**********************************/
  134. /*****************************************************************************
  135. Various table structures for the themeconverter
  136. ******************************************************************************/
  137. const tc_all_tags_index_struct g_tc_xml_tags_map[] = 
  138. {
  139.     {"aphorism_scr", mmi_tc_aphorism_scr_tag_handler},
  140.     {"buttonbar", mmi_tc_buttonbar_tag_handler},
  141.     {"call_scr", mmi_tc_call_scr_tag_handler},
  142.     {"datetimebar", mmi_tc_datetimebar_tag_handler},
  143.     {"deviceinfo", mmi_tc_deviceinfo_tag_handler},
  144.     {"devicetheme", mmi_tc_device_theme_ver_info},
  145.     {"dialer_ip_box", mmi_tc_dialer_ip_box_tag_handler},
  146.     {"drop_dn", mmi_tc_drop_dn_tag_handler},
  147.     {"font_col", mmi_tc_font_col_tag_handler},
  148.     {"format_ipbox", mmi_tc_format_ipbox_tag_handler},
  149.     {"general_bkgrnd", mmi_tc_general_bkgrnd_tag_handler},
  150.     {"idle_scr_font_col", mmi_tc_idle_scr_font_col_tag_handler},
  151.     {"image_id", mmi_tc_image_list_tag_handler},
  152.     {"infobar", mmi_tc_infobar_tag_handler},
  153.     {"inline_edit", mmi_tc_inline_edit_tag_handler},
  154.     {"inline_list_menu", mmi_tc_inline_list_menu_tag_handler},
  155.     {"ip_box", mmi_tc_ip_box_tag_handler},
  156.     {"list_menu", mmi_tc_list_menu_tag_handler},
  157.     {"lsk_down", mmi_tc_lsk_down_tag_handler},
  158.     {"lsk_up", mmi_tc_lsk_up_tag_handler},
  159.     {"main_menu", mmi_tc_main_menu_tag_handler},
  160.     {"mm_list", mmi_tc_list_main_menu_tag_handler},
  161.     {"mm_matrix", mmi_tc_matrix_main_menu_tag_handler},
  162.     {"matrix_menu", mmi_tc_matrix_menu_tag_handler},
  163.     {"menubar", mmi_tc_menubar_tag_handler},
  164.     {"multi_tap", mmi_tc_multi_tap_tag_handler},
  165.     {"nw_scr", mmi_tc_nw_scr_tag_handler},
  166.     {"opacity", mmi_tc_opacity_tag_handler},
  167.     {"pin_ip_box", mmi_tc_pin_ip_box_tag_handler},
  168.     {"popup_description", mmi_tc_popup_description_tag_handler},
  169.     {"popup_scr", mmi_tc_popup_scr_tag_handler},
  170.     {"progress_scr", mmi_tc_progress_scr_tag_handler},
  171.     {"rsk_down", mmi_tc_rsk_down_tag_handler},
  172.     {"rsk_up", mmi_tc_rsk_up_tag_handler},
  173.     {"scroll_bar", mmi_tc_scroll_bar_tag_handler},
  174.     {"setting_pin_scr", mmi_tc_setting_pin_scr_tag_handler},
  175.     {"shortcut_ind", mmi_tc_shortcut_ind_tag_handler},
  176.     {"statusbar", mmi_tc_statusbar_tag_handler},
  177.     {"title", mmi_tc_title_tag_handler},
  178.     {"tones_list", mmi_tc_tones_list_tag_handler},
  179.     {"virtual_kb", mmi_tc_virtual_kb_tag_handler}
  180. };
  181. const tc_image_tags_index_struct g_tc_image_tags_map[] = 
  182. {
  183.     {"calendar_may", IMG_CALENDAR_MAY},
  184.     {"calendar_jan", IMG_CALENDAR_JAN},
  185.     {"calendar_feb", IMG_CALENDAR_FEB},
  186.     {"calendar_mar", IMG_CALENDAR_MAR},
  187.     {"calendar_apr", IMG_CALENDAR_APR},
  188.     {"calendar_jun", IMG_CALENDAR_JUN},
  189.     {"calendar_jul", IMG_CALENDAR_JUL},
  190.     {"calendar_aug", IMG_CALENDAR_AUG},
  191.     {"calendar_sep", IMG_CALENDAR_SEP},
  192.     {"calendar_oct", IMG_CALENDAR_OCT},
  193.     {"calendar_nov", IMG_CALENDAR_NOV},
  194.     {"calendar_dec", IMG_CALENDAR_DEC},
  195.     {"calendar_week", CAL_ENGLISH_DAYS_IMAGE},
  196.     {"call_scr_out", IMG_CM_STATE_SINGLE_ACTIVE},
  197.     {"call_scr_inc", IMG_PHB_DEFAULT},
  198.     {"call_missed", MISSED_LSK_ICN},
  199.     {"comp_bkg", IMG_RING_COMPOSER_BACKGROUND},
  200.     {"inprogress", IMG_THEME_ACTIVATION},
  201.     {"idle_scr_techno_analog_clock", IMG_TECHNO_ANALOG_CLOCK},
  202.     {"idle_scr_techno_digital_clock", IMG_TECHNO_DIGITAL_CLOCK},
  203.     {"idle_scr_mm_shortcut", IMG_IDLE_MAINMENU_SHORCUT},
  204.     {"idle_scr_msg_shortcut", IMG_IDLE_MESSAGE_SHORTCUT},
  205.     {"idle_scr_phb_shortcut", IMG_IDLE_PHONEBOOK_SHORTCUT},
  206.     {"idle_scr_dialingscr_shortcut", IMG_IDLE_DIALING_SCREEN_SHORTCUT},
  207.     {"idle_scr_mm_shortcut_pressed", IMG_IDLE_MAINMENU_SHORCUT_PRESSED},
  208.     {"idle_scr_msg_shortcut_pressed", IMG_IDLE_MESSAGE_SHORTCUT_PRESSED},
  209.     {"idle_scr_phb_shortcut_pressed", IMG_IDLE_PHONEBOOK_SHORTCUT_PRESSED},
  210.     {"idle_scr_dialingscr_shortcut_pressed", IMG_IDLE_DIALING_SCREEN_SHORTCUT_PRESSED},
  211. #ifdef __MMI_MAINMENU_STYLE_CHANGE_EN__
  212.     {"message_sending", IMG_NEW_SMS_SEND},
  213.     {"mm_mm_oft", MAIN_MENU_MATRIX_MULTIMEDIA_ICON},
  214.     {"mm_ch_oft", MAIN_MENU_MATRIX_CALL_HISTORY_ICON},
  215.     {"mm_extras_oft", MAIN_MENU_MATRIX_EXTRA_ICON},
  216.     {"mm_fng_oft", MAIN_MENU_MATRIX_FUNANDGAMES_ICON},
  217.     {"mm_org_oft", MAIN_MENU_MATRIX_ORGANIZER_ICON},
  218.     {"mm_phb_oft", MAIN_MENU_MATRIX_PHONEBOOK_ICON},
  219.     {"mm_profile_oft", MAIN_MENU_MATRIX_PROFILES_ICON},
  220.     {"mm_scut_oft", MAIN_MENU_MATRIX_SHORTCUTS_ICON},
  221.     {"mm_service_oft", MAIN_MENU_MATRIX_SERVICES_ICON},
  222.     {"mm_settings_oft", MAIN_MENU_MATRIX_SETTINGS_ICON},
  223.     {"mm_sms_oft", MAIN_MENU_MATRIX_MESSAGES_ICON},
  224.     {"mm_fm_oft", MAIN_MENU_MATRIX_FILEMNGR_ICON},
  225.     {"mm_bkgrnd", IMG_MAIN_MENU_CIRCULAR_BG},
  226.     {"mm_mm_list_oft", MAIN_MENU_LIST_MULTIMEDIA_ICON},
  227.     {"mm_ch_list_oft", MAIN_MENU_LIST_CALL_HISTORY_ICON},
  228.     {"mm_extras_list_oft", MAIN_MENU_LIST_EXTRA_ICON},
  229.     {"mm_fng_list_oft", MAIN_MENU_LIST_FUNANDGAMES_ICON},
  230.     {"mm_org_list_oft", MAIN_MENU_LIST_ORGANIZER_ICON},
  231.     {"mm_phb_list_oft", MAIN_MENU_LIST_PHONEBOOK_ICON},
  232.     {"mm_profile_list_oft", MAIN_MENU_LIST_PROFILES_ICON},
  233.     {"mm_scut_list_oft", MAIN_MENU_LIST_SHORTCUTS_ICON},
  234.     {"mm_service_list_oft", MAIN_MENU_LIST_SERVICES_ICON},
  235.     {"mm_settings_list_oft", MAIN_MENU_LIST_SETTINGS_ICON},
  236.     {"mm_sms_list_oft", MAIN_MENU_LIST_MESSAGES_ICON},
  237.     {"mm_fm_list_oft", MAIN_MENU_LIST_FILEMNGR_ICON},
  238.     {"mm_mm_circ_oft", MAIN_MENU_CIRCULAR_MULTIMEDIA_ICON},
  239.     {"mm_ch_circ_oft", MAIN_MENU_CIRCULAR_CALL_HISTORY_ICON},
  240.     {"mm_extras_circ_oft", MAIN_MENU_CIRCULAR_EXTRA_ICON},
  241.     {"mm_fng_circ_oft", MAIN_MENU_CIRCULAR_FUNANDGAMES_ICON},
  242.     {"mm_org_circ_oft", MAIN_MENU_CIRCULAR_ORGANIZER_ICON},
  243.     {"mm_phb_circ_oft", MAIN_MENU_CIRCULAR_PHONEBOOK_ICON},
  244.     {"mm_profile_circ_oft", MAIN_MENU_CIRCULAR_PROFILES_ICON},
  245.     {"mm_scut_circ_oft", MAIN_MENU_CIRCULAR_SHORTCUTS_ICON},
  246.     {"mm_service_circ_oft", MAIN_MENU_CIRCULAR_SERVICES_ICON},
  247.     {"mm_settings_circ_oft", MAIN_MENU_CIRCULAR_SETTINGS_ICON},
  248.     {"mm_fm_circ_oft", MAIN_MENU_CIRCULAR_FILEMNGR_ICON},
  249.     {"mm_sms_circ_oft", MAIN_MENU_CIRCULAR_MESSAGES_ICON},
  250.     {"mm_mm_rotate_oft", MAIN_MENU_ROTATE_MULTIMEDIA_ICON},
  251.     {"mm_ch_rotate_oft", MAIN_MENU_ROTATE_CALL_HISTORY_ICON},
  252.     {"mm_extras_rotate_oft", MAIN_MENU_ROTATE_EXTRA_ICON},
  253.     {"mm_fng_rotate_oft", MAIN_MENU_ROTATE_FUNANDGAMES_ICON},
  254.     {"mm_org_rotate_oft", MAIN_MENU_ROTATE_ORGANIZER_ICON},
  255.     {"mm_phb_rotate_oft", MAIN_MENU_ROTATE_PHONEBOOK_ICON},
  256.     {"mm_profile_rotate_oft", MAIN_MENU_ROTATE_PROFILES_ICON},
  257.     {"mm_scut_rotate_oft", MAIN_MENU_ROTATE_SHORTCUTS_ICON},
  258.     {"mm_service_rotate_oft", MAIN_MENU_ROTATE_SERVICES_ICON},
  259.     {"mm_settings_rotate_oft", MAIN_MENU_ROTATE_SETTINGS_ICON},
  260.     {"mm_sms_rotate_oft", MAIN_MENU_ROTATE_MESSAGES_ICON},
  261.     {"mm_fm_rotate_oft", MAIN_MENU_ROTATE_FILEMNGR_ICON},
  262.     {"mm_mm_ma_oft", MAIN_MENU_MATRIX_MULTIMEDIA_ANIMATION},
  263.     {"mm_ch_ma_oft", MAIN_MENU_MATRIX_CALL_HISTORY_ANIMATION},
  264.     {"mm_extras_ma_oft", MAIN_MENU_MATRIX_EXTRA_ANIMATION},
  265.     {"mm_fng_ma_oft", MAIN_MENU_MATRIX_FUNANDGAMES_ANIMATION},
  266.     {"mm_org_ma_oft", MAIN_MENU_MATRIX_ORGANIZER_ANIMATION},
  267.     {"mm_phb_ma_oft", MAIN_MENU_MATRIX_PHONEBOOK_ANIMATION},
  268.     {"mm_profile_ma_oft", MAIN_MENU_MATRIX_PROFILES_ANIMATION},
  269.     {"mm_scut_ma_oft", MAIN_MENU_MATRIX_SHORTCUTS_ANIMATION},
  270.     {"mm_service_ma_oft", MAIN_MENU_MATRIX_SERVICES_ANIMATION},
  271.     {"mm_settings_ma_oft", MAIN_MENU_MATRIX_SETTINGS_ANIMATION},
  272.     {"mm_sms_ma_oft", MAIN_MENU_MATRIX_MESSAGES_ANIMATION},
  273.     {"mm_fm_ma_oft", MAIN_MENU_MATRIX_FILEMNGR_ANIMATION},
  274.     {"mm_mm_pa_oft", MAIN_MENU_PAGE_MULTIMEDIA_ICON},
  275.     {"mm_ch_pa_oft", MAIN_MENU_PAGE_CALL_HISTORY_ICON},
  276.     {"mm_extras_pa_oft", MAIN_MENU_PAGE_EXTRA_ICON},
  277.     {"mm_fng_pa_oft", MAIN_MENU_PAGE_FUNANDGAMES_ICON},
  278.     {"mm_org_pa_oft", MAIN_MENU_PAGE_ORGANIZER_ICON},
  279.     {"mm_phb_pa_oft", MAIN_MENU_PAGE_PHONEBOOK_ICON},
  280.     {"mm_profile_pa_oft", MAIN_MENU_PAGE_PROFILES_ICON},
  281.     {"mm_scut_pa_oft", MAIN_MENU_PAGE_SHORTCUTS_ICON},
  282.     {"mm_service_pa_oft", MAIN_MENU_PAGE_SERVICES_ICON},
  283.     {"mm_settings_pa_oft", MAIN_MENU_PAGE_SETTINGS_ICON},
  284.     {"mm_sms_pa_oft", MAIN_MENU_PAGE_MESSAGES_ICON},
  285.     {"mm_fm_pa_oft", MAIN_MENU_PAGE_FILEMNGR_ICON},
  286. #endif /* __MMI_MAINMENU_STYLE_CHANGE_EN__ */ 
  287. #ifdef __MMI_BI_DEGREE_MAIN_MENU_STYLE__
  288.     /* Bidegree icons */
  289.     {"mm_bideg_ap_bdeg_oft", MAIN_MENU_AUDPLY_ICON},
  290.     {"mm_bideg_ch_oft", MAIN_MENU_CALL_HISTORY_ICON},
  291.     {"mm_bideg_cm_bdeg_oft", MAIN_MENU_CAMERA_ICON},
  292.     {"mm_bideg_extras_oft", MAIN_MENU_EXTRA_ICON},
  293.     {"mm_bideg_fm_oft", MAIN_MENU_FILEMNGR_ICON},
  294.     {"mm_bideg_fng_oft", MAIN_MENU_FUNANDGAMES_ICON},
  295.     {"mm_bideg_mm_oft", MAIN_MENU_MULTIMEDIA_ICON},
  296.     {"mm_bideg_org_oft", MAIN_MENU_ORGANIZER_ICON},
  297.     {"mm_bideg_phb_oft", MAIN_MENU_PHONEBOOK_ICON},
  298.     {"mm_bideg_profile_oft", MAIN_MENU_PROFILES_ICON},
  299.     {"mm_bideg_scut_oft", MAIN_MENU_SHORTCUTS_ICON},
  300.     {"mm_bideg_service_oft", MAIN_MENU_SERVICES_ICON},
  301.     {"mm_bideg_settings_oft", MAIN_MENU_SETTINGS_ICON},
  302.     {"mm_bideg_sms_oft", MAIN_MENU_MESSAGES_ICON},
  303.     {"mm_bideg_vp_bdeg_oft", MAIN_MENU_VDOPLY_ICON},
  304.     {"mm_bideg_vr_bdeg_oft", MAIN_MENU_VDOREC_ICON},
  305.     {"mm_bkgrnd", IMG_MAIN_MENU_BG},
  306.     {"mm_bideg_avzone_selected",MAIN_MENU_AVZONE_ICON_SELECTED},
  307.     {"mm_bideg_pim_selected",MAIN_MENU_PIM_ICON_SELECTED},
  308.     {"mm_bideg_entertainment_selected",MAIN_MENU_ENTERTAINMENT_ICON_SELECTED},
  309.     {"mm_bideg_system_selected",MAIN_MENU_SYSTEM_ICON_SELECTED},
  310.     /* Bidegree icons */
  311. #endif /* __MMI_BI_DEGREE_MAIN_MENU_STYLE__ */ 
  312.     {"popup", IMG_PROCESSING_PHONEBOOK},
  313.     {"phb_sub_sear", IMG_ID_PHB_QUICK_SEARCH},
  314.     {"phb_sub_se_en", IMG_PHB_SEARCH_ENTRY},
  315.     {"phb_sub_add", IMG_PHB_ADD_ENTRY},
  316.     {"phb_sub_copy", IMG_PHB_COPY_ALL},
  317.     {"phb_sub_del", IMG_PHB_DELETE_ALL},
  318.     {"phb_sub_grp", IMG_PHB_CALLER_GROUP},
  319.     {"phb_sub_ext", IMG_PHB_OWNER_NUMBER},
  320.     {"phb_sub_sett", IMG_PHB_SETTINGS},
  321.     {"scr_idl_search", IMG_ID_NETSET_NW_SEARCH},
  322.     {"scr_idl_logo", IMG_BOOTUP_SCANNING_LOGO},
  323.     {"scsaver", IMG_ID_DISPCHAR_THEME_SCREENSAVER},
  324.     {"status_battery", IMG_SI_BATTERY_STRENGTH},
  325.     {"status_sig", IMG_SI_SIGNAL_STRENGTH},
  326.     {"st_ROAMING", IMG_SI_ROAMING_INDICATOR},
  327.     {"st_CALL_DIVERT_L1", IMG_SI_CALL_DIVERT_L1},
  328.     {"st_CALL_DIVERT_L2", IMG_SI_CALL_DIVERT_L2},
  329.     {"st_MUTE", IMG_SI_MUTE},
  330.     {"st_INCOMING_SMS", IMG_SI_SMS_INDICATOR},
  331.     {"st_MMS_UNREAD", IMG_SI_MMS_UNREAD_INDICATOR},
  332.     {"st_MMS_BUSY", IMG_SI_MMS_BUSY_INDICATOR},
  333.     {"st_VIBRATION", IMG_SI_VIBRATE},
  334.     {"st_SILENT", IMG_SI_SILENT},
  335.     {"st_RING", IMG_SI_RING},
  336.     {"st_VIBRATE_AND_RING", IMG_SI_VIBRATE_AND_RING},
  337.     {"st_VIBRATE_THEN_RING", IMG_SI_VIBRATE_THEN_RING},
  338.     {"st_GPRS_SERVICE", IMG_SI_GPRS_INDICATOR},
  339.     {"st_EARPHONE_INDICATOR", IMG_SI_EARPHONE_INDICATOR},
  340.     {"st_GPRS_ATT_NO_PDP_INDICATOR", IMG_SI_GPRS_ATT_NO_PDP_INDICATOR},
  341.     {"st_ALARM", IMG_SI_ALARM_ACTIVATED},
  342.     {"st_VOICE_RECORD", IMG_SI_VOICE_RECORD},
  343.     {"st_KEYPAD_LOCK", IMG_SI_KEYPAD_LOCK},
  344.     {"st_KEYPAD_UNLOCK", IMG_SI_KEYPAD_UNLOCK},
  345.     {"st_MISSED_CALL", IMG_SI_MISSED_CALL_INDICATOR},
  346.     {"st_UNREAD_VOICE_L1L2", IMG_SI_UNREAD_VOICE_L1L2},
  347.     {"st_UNREAD_VOICE_L1", IMG_SI_UNREAD_VOICE_L1},
  348.     {"st_UNREAD_VOICE_L2", IMG_SI_UNREAD_VOICE_L2},
  349.     {"st_UNREAD_FAX_L1L2", IMG_SI_UNREAD_FAX_L1L2},
  350.     {"st_UNREAD_FAX_L1", IMG_SI_UNREAD_FAX_L1},
  351.     {"st_UNREAD_FAX_L2", IMG_SI_UNREAD_FAX_L2},
  352.     {"st_UNREAD_EMAIL_L1L2", IMG_SI_UNREAD_EMAIL_L1L2},
  353.     {"st_UNREAD_EMAIL_L1", IMG_SI_UNREAD_EMAIL_L1},
  354.     {"st_UNREAD_EMAIL_L2", IMG_SI_UNREAD_EMAIL_L2},
  355.     {"st_IMPS_MSG", IMG_SI_IMPS_MSG},
  356.     {"st_IMPS_LOGIN", IMG_SI_IMPS_LOGIN},
  357.     {"st_WAP", IMG_SI_WAP},
  358.     {"st_POC", IMG_SI_POC},
  359.     {"st_BT", IMG_SI_BT},
  360.     {"st_IR", IMG_SI_IR_INDICATOR},
  361.     {"st_STOP_WATCH", IMG_SI_STOPWATCH},
  362.     {"st_CHAT_INDICATION_ROOM1", IMG_BLINKINGICON_CHAT_ROOM1},
  363.     {"st_CHAT_INDICATION_ROOM2", IMG_BLINKINGICON_CHAT_ROOM2},
  364.     {"st_NETWORK_CIPHER_GSM", IMG_SI_NETWORK_CIPHER_GSM},
  365.     {"st_NETWORK_CIPHER_GPRS", IMG_SI_NETWORK_CIPHER_GPRS},
  366.     {"st_sig1", IMG_SI_SIGNAL_STRENGTH_L1},
  367.     {"st_sig2", IMG_SI_SIGNAL_STRENGTH_L2},
  368.     {"st_JAVA_PAUSE", IMG_SI_JAVA_PAUSE},
  369.     {"title_mm_mm_icon", MAIN_MENU_TITLE_MULTIMEDIA_ICON},
  370.     {"title_mm_ch_icon", MAIN_MENU_TITLE_CALL_HISTORY_ICON},
  371.     {"title_mm_extras_icon", MAIN_MENU_TITLE_EXTRA_APP_ICON},
  372.     {"title_mm_fng_icon", MAIN_MENU_TITLE_FUNANDGAMES_ICON},
  373.     {"title_mm_org_icon", MAIN_MENU_TITLE_ORGANIZER_ICON},
  374.     {"title_mm_phb_icon", MAIN_MENU_TITLE_PHONEBOOK_ICON},
  375.     {"title_mm_profile_icon", MAIN_MENU_TITLE_PROFILES_ICON},
  376.     {"title_mm_scut_icon", MAIN_MENU_TITLE_SHORTCUTS_ICON},
  377.     {"title_mm_service_icon", MAIN_MENU_TITLE_SERVICES_ICON},
  378.     {"title_mm_settings_icon", MAIN_MENU_TITLE_SETTINGS_ICON},
  379.     {"title_mm_sms_icon", MAIN_MENU_TITLE_MESSAGES_ICON},
  380.     {"title_mm_fm_icon", MAIN_MENU_TITLE_FILE_MNGR_ICON},
  381.     {"wallpaper", IMG_ID_DISPCHAR_THEME_WALLPAPER}
  382. };
  383. const tc_search_all_tags_struct g_tc_search_all_tags_map[] = 
  384. {
  385.     {0, 1},     /* a */
  386.     {1, 1},     /* b */
  387.     {2, 1},     /* c */
  388.     {3, 5},     /* d */
  389.     {0, 0},     /* e */
  390.     {8, 2},     /* f */
  391.     {10, 1},    /* g */
  392.     {0, 0},     /* h */
  393.     {11, 6},    /* i */
  394.     {0, 0},     /* j */
  395.     {0, 0},     /* k */
  396.     {17, 3},    /* l */
  397.     {20, 6},    /* m */
  398.     {26, 1},    /* n */
  399.     {27, 1},    /* o */
  400.     {28, 4},    /* p */
  401.     {0, 0},     /* q */
  402.     {32, 2},    /* r */
  403.     {34, 4},    /* s */
  404.     {38, 2},    /* t */
  405.     {0, 0},     /* u */
  406.     {40, 1},    /* v */
  407.     {0, 0},     /* w */
  408.     {0, 0},     /* x */
  409.     {0, 0},     /* y */
  410.     {0, 0}      /* z */
  411. };
  412. #ifdef __MMI_MAINMENU_STYLE_CHANGE_EN__
  413. const tc_search_image_all_tags_struct g_tc_search_all_tags_image_map[] = 
  414. {
  415.     {0, 0},     /* a */
  416.     {0, 0},     /* b */
  417.     {0, 17},    /* c */
  418.     {0, 0},     /* d */
  419.     {0, 0},     /* e */
  420.     {0, 0},     /* f */
  421.     {0, 0},     /* g */
  422.     {0, 0},     /* h */
  423.     {17, 11},   /* i */
  424.     {0, 0},     /* j */
  425.     {0, 0},     /* k */
  426.     {0, 0},     /* l */
  427.     {28, 74},   /* m */
  428.     {0, 0},     /* n */
  429.     {0, 0},     /* o */
  430.     {102, 9},   /* p */
  431.     {0, 0},     /* q */
  432.     {0, 0},     /* r */
  433.     {111, 48},  /* s */
  434.     {159, 12},  /* t */
  435.     {0, 0},     /* u */
  436.     {0, 0},     /* v */
  437.     {171, 1},   /* w */
  438.     {0, 0},     /* x */
  439.     {0, 0},     /* y */
  440.     {0, 0}      /* z */
  441. };
  442. #elif defined(__MMI_BI_DEGREE_MAIN_MENU_STYLE__)
  443. const tc_search_image_all_tags_struct g_tc_search_all_tags_image_map[] = 
  444. {
  445.     {0, 0},     /* a */
  446.     {0, 0},     /* b */
  447.     {0, 17},    /* c */
  448.     {0, 0},     /* d */
  449.     {0, 0},     /* e */
  450.     {0, 0},     /* f */
  451.     {0, 0},     /* g */
  452.     {0, 0},     /* h */
  453.     {17, 11},   /* i */
  454.     {0, 0},     /* j */
  455.     {0, 0},     /* k */
  456.     {0, 0},     /* l */
  457.     {28, 21},   /* m */
  458.     {0, 0},     /* n */
  459.     {0, 0},     /* o */
  460.     {49, 9},    /* p */
  461.     {0, 0},     /* q */
  462.     {0, 0},     /* r */
  463.     {58, 48},   /* s */
  464.     {106, 12},  /* t */
  465.     {0, 0},     /* u */
  466.     {0, 0},     /* v */
  467.     {118, 1},   /* w */
  468.     {0, 0},     /* x */
  469.     {0, 0},     /* y */
  470.     {0, 0}      /* z */
  471. };
  472. #else /* __MMI_BI_DEGREE_MAIN_MENU_STYLE__ */
  473. const tc_search_image_all_tags_struct g_tc_search_all_tags_image_map[] = 
  474. {
  475.     {0, 0},     /* a */
  476.     {0, 0},     /* b */
  477.     {0, 17},    /* c */
  478.     {0, 0},     /* d */
  479.     {0, 0},     /* e */
  480.     {0, 0},     /* f */
  481.     {0, 0},     /* g */
  482.     {0, 0},     /* h */
  483.     {17, 11},   /* i */
  484.     {0, 0},     /* j */
  485.     {0, 0},     /* k */
  486.     {0, 0},     /* l */
  487.     {0, 0},     /* m */
  488.     {0, 0},     /* n */
  489.     {0, 0},     /* o */
  490.     {28, 9},    /* p */
  491.     {0, 0},     /* q */
  492.     {0, 0},     /* r */
  493.     {37, 48},   /* s */
  494.     {85, 12},   /* t */
  495.     {0, 0},     /* u */
  496.     {0, 0},     /* v */
  497.     {97, 1},    /* w */
  498.     {0, 0},     /* x */
  499.     {0, 0},     /* y */
  500.     {0, 0}      /* z */
  501. };
  502. #endif /* __MMI_MAINMENU_STYLE_CHANGE_EN__ */ 
  503. static U8 g_tc_thm_process_call_count;  /* theme Process Queue Counter */
  504. /*****************************************************************************
  505.  * FUNCTION
  506.  *  mmi_tc_my_xml_elem_start_hdlr
  507.  * DESCRIPTION
  508.  *  (void *data, const char *el, const char **attr)
  509.  *  function for handling of the start element tag
  510.  * PARAMETERS
  511.  *  data_p      [?]         
  512.  *  el_p        [IN]        
  513.  *  attr_p      [IN]        
  514.  * RETURNS
  515.  *  void
  516.  *****************************************************************************/
  517. void mmi_tc_my_xml_elem_start_hdlr(void *data_p, const char *el_p, const char **attr_p)
  518. {
  519.     /*----------------------------------------------------------------*/
  520.     /* Local Variables                                                */
  521.     /*----------------------------------------------------------------*/
  522.     /*----------------------------------------------------------------*/
  523.     /* Code Body                                                      */
  524.     /*----------------------------------------------------------------*/
  525.     if (g_tm_checkThemeVersion)
  526.     {
  527.         if (!(strncmp((PS8) "devicetheme", el_p, strlen(el_p))) || !(strncmp((PS8) "deviceinfo", el_p, strlen(el_p))) ||
  528.             !(strncmp((PS8) "media", el_p, strlen(el_p))))
  529.         {   /* continue */
  530.         }
  531.         else
  532.         {
  533.             xml_free_parse(&g_tc_parser);
  534.             return;
  535.         }
  536.     }
  537.     if (!strncmp(el_p, "image_id", strlen("image_id")))
  538.     {
  539.         (*g_tc_xml_tags_map[IMAGE_LIST_POS_XML_TAG_MAP].tag_handler) ((U8 **) attr_p);
  540.     }
  541.     else
  542.     {
  543.         U8 first_alpha_tag = *(el_p);
  544.         U8 count1;  /* count for total number of the image attributes */
  545.         U8 loc;     /* position of the tag in the table */
  546.         loc = g_tc_search_all_tags_map[first_alpha_tag - 97].index;
  547.         for (count1 = 0; count1 < g_tc_search_all_tags_map[first_alpha_tag - 97].no_of_elements; count1++, loc++)
  548.         {
  549.             S16 check;
  550.             check = strncmp((PS8) g_tc_xml_tags_map[loc].xml_tag, el_p, strlen(el_p));
  551.             if (check == 0)
  552.             {
  553.                 (*g_tc_xml_tags_map[loc].tag_handler) ((U8 **) attr_p);
  554.                 break;  /* shariq */
  555.             }
  556.         }
  557.     }
  558.     g_tc_thm_process_call_count++;
  559. }
  560. /*****************************************************************************
  561.  * FUNCTION
  562.  *  mmi_tc_my_xml_elem_end_hdlr
  563.  * DESCRIPTION
  564.  *  (void *data, const char *el)
  565.  *  function for handling of the end element tag
  566.  * PARAMETERS
  567.  *  data_p      [?]         
  568.  *  el_p        [IN]        
  569.  * RETURNS
  570.  *  void
  571.  *****************************************************************************/
  572. void mmi_tc_my_xml_elem_end_hdlr(void *data_p, const char *el_p)
  573. {
  574.     /*----------------------------------------------------------------*/
  575.     /* Local Variables                                                */
  576.     /*----------------------------------------------------------------*/
  577.     U8 end_element[] = "media";
  578.     /*----------------------------------------------------------------*/
  579.     /* Code Body                                                      */
  580.     /*----------------------------------------------------------------*/
  581.     if (!strcmp(el_p, (PS8) end_element))
  582.     {
  583.         xml_free_parse(&g_tc_parser);
  584.     }
  585.     else
  586.     {
  587.         if (g_tc_thm_process_call_count == 15)
  588.     #ifdef __DLT_ENABLE_PROCESS_QUEUE__
  589.             theme_process_queue();
  590.     #else /* __DLT_ENABLE_PROCESS_QUEUE__ */ 
  591.         {
  592.         }
  593.     #endif /* __DLT_ENABLE_PROCESS_QUEUE__ */ 
  594.     }
  595. }
  596. /*****************************************************************************
  597.  * FUNCTION
  598.  *  mmi_tc_processqueue
  599.  * DESCRIPTION
  600.  *  (void)
  601.  *  function for polling of the queues
  602.  * PARAMETERS
  603.  *  void
  604.  * RETURNS
  605.  *  
  606.  *****************************************************************************/
  607. int mmi_tc_processqueue(void)
  608. {
  609.     /*----------------------------------------------------------------*/
  610.     /* Local Variables                                                */
  611.     /*----------------------------------------------------------------*/
  612.     /*----------------------------------------------------------------*/
  613.     /* Code Body                                                      */
  614.     /*----------------------------------------------------------------*/
  615.     return 0;
  616. }
  617. /*****************************************************************************
  618.  * FUNCTION
  619.  *  mmi_tc_image_list_tag_handler
  620.  * DESCRIPTION
  621.  *  (U8 **attr)
  622.  *  handles the image_list tag obained by parsing the XML file
  623.  * PARAMETERS
  624.  *  attr_p      [IN]        
  625.  * RETURNS
  626.  *  void
  627.  *****************************************************************************/
  628. void mmi_tc_image_list_tag_handler(U8 **attr_p)
  629. {
  630.     /*----------------------------------------------------------------*/
  631.     /* Local Variables                                                */
  632.     /*----------------------------------------------------------------*/
  633.     U8 first_alpha_attr;
  634.     U8 count1;   /* count for total number of the image attributes */
  635.     U8 loc;             /* position of the attribute in the table */
  636.     U8 type;
  637.     /*----------------------------------------------------------------*/
  638.     /* Code Body                                                      */
  639.     /*----------------------------------------------------------------*/
  640. #ifdef __MMI_STATUS_ICON_SIGNAL_WITH_LINE_SWITCH__
  641.     if (!strcmp((PS8) attr_p[0], "status_sig"))
  642.     {
  643.         strcpy((PS8) attr_p[0], "st_sig1");
  644.     }
  645. #endif /* __MMI_STATUS_ICON_SIGNAL_WITH_LINE_SWITCH__ */ 
  646.     first_alpha_attr = attr_p[0][0];
  647.     loc = g_tc_search_all_tags_image_map[first_alpha_attr - 97].index;
  648.     type = (U8) atoi((PS8) attr_p[3]);
  649.     for (count1 = loc; count1 <= (g_tc_search_all_tags_image_map[first_alpha_attr - 97].no_of_elements + loc); count1++)
  650.     {
  651.         S16 check;
  652.         check = strncmp((PS8) g_tc_image_tags_map[count1].image_tag, (PS8) attr_p[0], strlen((PS8) attr_p[0]));
  653.         if (check == 0)
  654.         {
  655.             mmi_tm_set_imageid(g_tc_image_tags_map[count1].imageId, (U32) atoi((PS8) attr_p[1]), type);
  656.             break;
  657.         }
  658.     }
  659. }
  660. #endif /* __MMI_DOWNLOADABLE_THEMES_SUPPORT__ */ /* mmi downloadble themes support */