PhoneBookProt.h 45.8 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487
/*****************************************************************************
*  Copyright Statement:
*  --------------------
*  This software is protected by Copyright and the information contained
*  herein is confidential. The software may not be copied and the information
*  contained herein may not be used or disclosed except with the written
*  permission of MediaTek Inc. (C) 2005
*
*  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
*  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
*  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
*  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
*  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
*  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
*  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
*  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
*  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
*  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
*  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
*  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
*  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
*  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
*  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
*  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
*
*  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
*  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
*  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
*  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
*  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/

/*******************************************************************************
 * Filename:
 * ---------
 *  PhoneBookProt.h
 *
 * Project:
 * --------
 *  MAUI
 *
 * Description:
 * ------------
 *  phone book application 
 *
 * Author:
 * -------
 * -------
 *
 *==============================================================================
 *             HISTORY
 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
 *------------------------------------------------------------------------------
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 * removed!
 *
 *------------------------------------------------------------------------------
 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
 *==============================================================================
 *******************************************************************************/
#ifndef _PHONEBOOKPROT_H
#define _PHONEBOOKPROT_H

#ifndef __RESOURCE_GEN_
#include "MMIDataType.h"
#include "CommonScreens.h"

#include <ctype.h>
#include "PhoneBookTypes.h"
#include "PhbSrvGprot.h"
#include "PhoneBookCore.h"

#ifdef __MMI_VCARD__
#include "vcard.h"
#endif

#include "mmi_frm_scenario_gprot.h"

/* auto add by kw_check begin */
#include "MMI_features.h"
#include "PhoneBookGprot.h"
#include "gui_data_types.h"
#include "kal_general_types.h"
#include "custom_phb_config.h"
#include "mmi_frm_events_gprot.h"
#include "wgui_categories_list.h"
#include "AlertScreen.h"
/* auto add by kw_check end */
#include "wgui_categories_search.h"
#ifdef __MMI_SNS_CONTACTS__
#include "SnsCuiGprot.h"
#include "Gdi_include.h"
#endif
#endif


#include "PhoneBookAppMem.h"

#ifdef __TOPWELL_MMI_INLINE_ICON_SUPPORT__
//////////////////

#else
#ifndef __MMI_PHB_SLIM__
#define __MMI_PHB_SLIM__
#endif
#endif

#if defined(__MMI_PHB_SLIM__) 
	#ifndef __MMI_PHB_SLIM_NO_SAT__
    #define __MMI_PHB_SLIM_NO_SAT__
    #endif
#if !defined(__TOPWELL_MMI_PHB_PREFERRED_STORAGE__)    
	#ifndef __MMI_PHB_SLIM_NO_PREFERRED_STORAGE__
    #define __MMI_PHB_SLIM_NO_PREFERRED_STORAGE__
    #endif
#endif    
#endif


#if defined(__MMI_PHB_USIM_SUPPORT__)
	#ifndef __MMI_PHB_USIM_GROUP_SUPPORT__
	#define __MMI_PHB_USIM_GROUP_SUPPORT__
	#endif
#endif
#if (defined(__MMI_PHB_USIM_GROUP_SUPPORT__) && defined(__MMI_PHB_GENERIC_MULTI_SELECT__))
	#ifndef __MMI_PHB_GROUP_ENHANCE__
	#define __MMI_PHB_GROUP_ENHANCE__
	#endif
#endif
#if defined(__MMI_PHB_USIM_GROUP_SUPPORT__)
	#ifndef __MMI_PHB_GROUP_MEMBER_MOVE_SUPPORT__
	#define __MMI_PHB_GROUP_MEMBER_MOVE_SUPPORT__
	#endif
#endif

#ifdef __TOPWELL_MMI_INLINE_ICON_SUPPORT__
////////////////
#elif defined(__TOPWELL_MMI_PHB_TAB_SEPARATE_SIM_LIST__)||defined(__TOPWELL_MMI_PHB_PREFERRED_STORAGE__)
////////////////
#else
#ifndef __MMI_PHB_SLIM_NEW__
#define __MMI_PHB_SLIM_NEW__
#endif
#endif

#define  PHB_NOTIFY_TIMEOUT         UI_POPUP_NOTIFYDURATION_TIME        /* phonebook notify time */

/* phonebook call picture enmu */
typedef enum
{
    MMI_PHB_IMAGE_NO_SELECT,                    /* No caller picture, use default. */
    MMI_PHB_IMAGE_FOR_ENTRY,                    /* caller picture for phonebook entry */
    MMI_PHB_IMAGE_SELECT_PATH,                  /* caller picture from select path for phb entry */
    MMI_PHB_IMAGE_CALLER_GROUP,                 /* caller picture for caller group */
    MMI_PHB_SWFLASH_SELECT_PATH,                /* caller picture from swflash */
    MMI_PHB_AVATAR_SELECT_PATH,                 /* caller picture from avata */
    MMI_PHB_IMAGE_LOCATION_ENUM_TOTAL           /* enmu total */
} mmi_phb_image_location_enum;

/* phonebook fte list toolbar enum */
typedef enum
{
    MMI_PHB_VOICE_CALL = 0,                     /* Button voice call */
//#if (defined(__OP01__) && defined(__MMI_VIDEO_TELEPHONY__))
#if defined(__MMI_VIDEO_TELEPHONY__)
    MMI_PHB_VIDEO_CALL,                         /* Button video call */
#endif
    MMI_PHB_SEND_MSG,                           /* Button send message */
    MMI_PHB_EDIT,                               /* Button edit contact */
    MMI_PHB_TOOLBAR_ENUM_TOTAL           /* enmu total */
} mmi_phb_fte_toolbar_enum;

#ifdef __MMI_SNS_CONTACTS__
/* phonebook sns tab list toolbar enum */
typedef enum
{
    MMI_PHB_SNS_FAVORITE = 0,                      /* Button add favorite */  
    MMI_PHB_SNS_MESSAGE,                       /* Button direct message */
    MMI_PHB_SNS_TAB_TOOLBAR_ENUM_TOTAL        /* enmu total */
} mmi_phb_sns_tab_toolbar_enum;
#endif

/* 
 * Define
 */

typedef struct mmi_phb_setting_cntx
{
    mmi_menu_id highlighted_menu_id;
    U16 prefer_storage;
#if defined(__MMI_PHB_SAVE_CONTACT_NOTIFY__)
    U16 save_contact_notify;
#endif /* __MMI_PHB_SAVE_CONTACT_NOTIFY__ */

#if defined(__MMI_INTELLIGENT_CALL_ALERT__)
    U8 speak_name;
#endif /* __MMI_INTELLIGENT_CALL_ALERT__ */
}mmi_phb_setting_cntx_struct;


#ifdef __MMI_MAINLCD_96X64__
typedef struct mmi_phb_setting_screen_cntx{
    // change name
    U16 temp_prefer_storage;
#if defined(__MMI_PHB_SAVE_CONTACT_NOTIFY__)
    U16 temp_save_contact_notify;
#endif
#if defined(__MMI_INTELLIGENT_CALL_ALERT__)
    U8 temp_speak_name;
#endif /* __MMI_INTELLIGENT_CALL_ALERT__*/
#if defined(__MMI_MULTI_VCARD__)
    U16 *contact_array;                     /* contact list content */
    U16 contact_count;                      /* contact count */
#endif
}mmi_phb_setting_screen_cntx_struct;
#endif

 
/**
 * PhoneBookList.c
 */
#if defined(__MMI_PHB_MULTI_OPERATION__)
extern MenucuiPtr g_mmi_phb_mark_several_build_op_func;
extern FunctionPtr g_mmi_phb_mark_several_entry_func;
#endif

extern void mmi_phb_launch_entry(void);
extern srv_phb_filter_struct *mmi_phb_list_build_filter(
                                  U8 storage,
                                  U32 field_filter,
                                  srv_phb_group_filter_struct* group_filter,
                                  U16* key_word,
                                  U16 input_mode);

extern void mmi_phb_list_free_filter(srv_phb_filter_struct *filter);


extern void mmi_phb_list_highlight_handler(S32 item_index);

#if defined(__MMI_PHB_GENERIC_MULTI_SELECT__)
extern void mmi_phb_generic_mark_several_select_number_pre_entry(void);
extern void mmi_phb_generic_mark_several_select_number_more(void);
extern void mmi_phb_entry_generic_mark_several_tab(void);
extern void mmi_phb_mark_several_select_field(MMI_ID group_id);
extern void mmi_phb_entry_generic_mark_several(void);
#if defined(__TOPWELL_MMI_PHB_SMS_SEND_GROUPS__)
extern void mmi_phb_entry_generic_mark_several_sms(void);
#endif
#endif

extern mmi_ret mmi_phb_choose_number_scrn_proc(mmi_event_struct *param);

extern void mmi_phb_entry_choose_field_ex(
                mmi_id sg_id,
                WCHAR *name,
                U8 storage,
                const U8* select_type,
                U32 field_mask,
                FunctionPtr entry_func,
                FunctionPtr lsk_func,
                FunctionPtr rsk_func);

extern void mmi_phb_entry_choose_field(
                mmi_id sg_id,
                U16 store_index,
                U32 field_type,
                FunctionPtr entry_func,
                FunctionPtr lsk_func,
                FunctionPtr rsk_func,
                FunctionPtr send_key_func,
                MMI_BOOL show_if_empty,
                MMI_BOOL start_primitive);

extern void mmi_phb_entry_list_ext(
                mmi_id sg_id,
                U16 entry_count,
                U16 str_title,
                U16 img_title,
                U16 str_lsk,
                U16 img_lsk,
                U16 scr_id,
                U16 img_csk,
                HighlightPtr highlight_ptr,
                FunctionPtr lsk_ptr,
                FunctionPtr csk_ptr,
                FunctionPtr send_key_ptr,
                FunctionPtr ip_key_ptr,
                GetAsyncItemFuncPtr item_ptr,
                GetAsyncHintFuncPtr hint_ptr,
                FunctionPtr entry_ptr,
                FunctionPtr exit_ptr,
                MMI_BOOL alpha_index);
#ifdef __MMI_MOBILE_SERVICE__
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif

extern void mmi_phb_list_select_entry(void);

/**
 * PhoneBookApp.c
 */
extern void mmi_phb_op_cntx_init(mmi_phb_op_action_cntx_struct *op_cntx);
extern void mmi_phb_op_start(mmi_phb_op_action_cntx_struct *op_action, MMI_ID group_id);

#ifdef __MMI_UNIFIED_COMPOSER__
extern void mmi_phb_uc_send_msg(CHAR* addr_p, MMI_ID group_id);
extern void mmi_phb_uc_send_msg_choose_entry(U16 store_index, MMI_ID group_id);

#else /* __MMI_UNIFIED_COMPOSER__ */

extern void mmi_phb_sms_send_data_for_entry(CHAR *number, MMI_ID group_id);
extern void mmi_phb_sms_send_data_choose_entry(U16 store_index, MMI_ID group_id);

#ifdef __MMI_MMS__
extern void mmi_phb_mms_send_data_for_entry(CHAR *number, MMI_ID group_id);
extern void mmi_phb_mms_send_data_choose_entry(U16 store_index, MMI_ID group_id);
#endif /* __MMI_MMS__ */
#endif /* __MMI_UNIFIED_COMPOSER__ */

#if defined(__MMI_INTELLIGENT_CALL_ALERT__)
extern void mmi_phb_speak_name_start(void);
extern void mmi_phb_speak_name_end(void);
#endif

#ifdef __MMI_PHB_DEFAULT_NUMBER__
extern void mmi_phb_dial_default_number_and_start_browser(void);
extern void mmi_phb_dial_default_number_and_start_browser_ex(U16 store_index, MMI_ID group_id);
#endif

extern void mmi_phb_dial_normal_call(void);
extern void mmi_phb_dial_ip_call(void);

extern void mmi_phb_entry_op_option(void);

#if defined(__MMI_PHB_MULTI_OPERATION__)
extern void mmi_phb_op_mark_several_cb(U16 *contact_array, U16 finish_count, U16 total_count, void *user_data);
#endif



#if defined(__MMI_PHB_BIRTHDAY_FIELD__)
#ifdef __MMI_BIRTHDAY_REMINDER__
extern void mmi_phb_single_op_extra_handle_bday(S32 result, U16 store_index);
#endif
#endif

extern void mmi_phb_op_save_contact_ex(void);

extern void mmi_phb_entry_op_save_contact_cancel(void);
extern void mmi_phb_entry_op_save_contact_confirm(void);
extern void mmi_phb_entry_op_view_entry_options(void);

#ifdef __MMI_SAVE_CONTACT_REPLACE__
extern void mmi_phb_entry_save_contact_opt_update_list(void);
extern void mmi_phb_entry_general_save_contact_option(void);
#endif

#ifdef __DM_LAWMO_SUPPORT__
extern void mmi_phb_dm_register_notify(void);
extern void mmi_phb_dm_delete_all_pre_req(void);
#endif

/**
 * PhoneBookEditor.c
 */ 
 
extern void mmi_phb_op_view_pre_entry(void);
extern U32 mmi_phb_get_field_mask_by_field_type(U8 field_type);
extern U8 mmi_phb_get_field_type_by_field_mask(U32 field_mask);
extern U16 mmi_phb_get_str_by_field_type(U8 field_type, U8 storage);
extern U16 mmi_phb_get_img_by_field_type(U8 field_type);
extern U16 mmi_phb_get_img_by_number_type(mmi_phb_num_type_enum number_type);


extern MMI_BOOL mmi_phb_op_check_pre_save(mmi_phb_contact_info_struct *contact, U8 storage, MMI_BOOL popup_error);
extern MMI_BOOL mmi_phb_check_valid_number(U16 *number, U8 storage);
#if 0
#if defined(__MMI_IMPS__) && defined(IMPS_WV13_ENHANCEMENT)
/* under construction !*/
#endif
#endif

#ifdef __MMI_URI_AGENT__
extern void mmi_phb_init_uri_agent_registration(void);
#endif

extern void mmi_phb_op_email_custom_function(void);



#ifdef __MMI_PHB_UI_IN_TABS__
extern void mmi_phb_edit_add_more_number(void);
#endif
#ifdef __MMI_PHB_USIM_SUPPORT__
extern U32 mmi_phb_get_usim_field_mask_by_field_mask(U32 field_mask,MMI_BOOL flag);
extern U32 mmi_phb_get_usim_field_mask_by_field_type(U8 field_type,MMI_BOOL flag);
extern MMI_BOOL mmi_phb_edit_usim_field_display(U8 field_type, U32 field_mask, U8 storage);
extern MMI_BOOL mmi_phb_check_usim_detail_ex(phb_storage_enum storage, U8 occr, phb_type_enum type);
#ifdef __MMI_PHB_OPTIONAL_FIELD__
extern U8 mmi_phb_get_usim_number_type(U32 field_mask);
#endif
#endif

/**
 * PhoneBookCallerRes.c
 */
extern void mmi_phb_contact_build_res(void);
extern void mmi_phb_contact_res_config(void);
extern void mmi_phb_contact_res_value_assign(
                mmi_id sg_id,
                mmi_phb_caller_res_struct *caller_res,
                mmi_phb_contact_info_struct *contact_cntx);
extern void mmi_phb_contact_res_value_save(
                mmi_phb_contact_info_struct *contact_cntx,
                mmi_phb_caller_res_struct *caller_res);

extern void mmi_phb_entry_image_view(void);
extern void mmi_phb_entry_image_option(void);

#if defined(__MMI_FILE_MANAGER__) && defined(__MMI_FILE_USEAS_SUPPORT__)
extern void mmi_phb_image_select_from_file_mamager(void);
#endif

#ifdef __MMI_PHB_UI_IN_TABS__
extern void mmi_phb_entry_choose_caller_ringtone(void);
#endif
extern void mmi_phb_ring_tone_highlight_hdlr(S32 ringToneIndex);

#if defined(__MMI_PHB_CALLER_VIDEO__)
extern void mmi_phb_entry_video_view(void);
extern void mmi_phb_entry_video_view_ext(MMI_ID group_id);
extern void mmi_phb_entry_choose_caller_video(void);
extern void mmi_phb_video_pre_entry_file_option(void);
#endif



/**
 * PhoneBookSetting.c
 */
extern void mmi_phb_setting_init(void);
extern U8 mmi_phb_get_speak_name(void);
extern U16 mmi_phb_get_preferred_storage(void);
#if defined( __MMI_PHB_SAVE_CONTACT_NOTIFY__)
extern U16 mmi_phb_get_save_contact_notify(void);
#endif

/**
 * PhoneBookUtil.c
 */
extern U32 mmi_phb_contact_build_field_mask(mmi_phb_contact_info_struct *contact);
extern void mmi_phb_truncate_number_field_to_max_len(U16 *ucs2_num_dest, U16 *ucs2_num_src, U16 number_length);
extern U32 mmi_phb_get_name_length(U8 storage);
extern void mmi_phb_contact_get_item_image(U16 store_index, U8** image_buffer1, U8** image_buffer2);
extern mmi_phb_contact_info_struct* mmi_phb_contact_get_contact(U16 store_index);
extern void mmi_phb_contact_free_contact(mmi_phb_contact_info_struct *contact);
extern void mmi_phb_contact_get_contact_info(U16 store_index, mmi_phb_contact_info_struct* contact);
extern srv_phb_contact_info_struct* mmi_phb_contact_build(mmi_phb_contact_info_struct *contact);
#ifdef __MMI_VCARD__
extern void mmi_phb_contact_mmi_to_vcard(mmi_phb_contact_info_struct *contact, mmi_vcard_field_data_struct *vcard);
#endif
extern void mmi_phb_contact_srv_to_mmi(srv_phb_contact_data_struct *srv_contact, mmi_phb_contact_info_struct *mmi_contact);
extern MMI_BOOL mmi_phb_check_storage_full(U8 storage, MMI_BOOL is_popup);
extern srv_phb_contact_info_struct *mmi_phb_get_contact_build_buffer(mmi_phb_contact_info_struct* contact);
extern void mmi_phb_get_contact_free_buffer(srv_phb_contact_info_struct *contact);


extern void mmi_phb_show_in_progress(mmi_id, U16);

extern void mmi_phb_entry_not_ready(U16 str_id);


#if defined(__MMI_PHB_BIRTHDAY_FIELD__)
extern void mmi_phb_bday_to_string(U16 *bday, U16 *pbYear, U16 *pbMon, U16 *pbDay, U16 b_year, U8 b_onth, U8 b_day);
#endif

/**
 * PhoneBookGroup.c
 */

#ifdef __MMI_PHB_UI_IN_TABS__
extern void mmi_phb_entry_group_list_tab(void);
#else
extern void mmi_phb_entry_group_list_non_tab(void);
#endif

/**
 * PhoneBookExtraNumber.c
 */
extern void mmi_phb_sos_list_init(void);
extern MMI_BOOL mmi_phb_check_extra_number_available(void);

extern void *mmi_phb_construct_group_editor(phb_storage_enum storage);
extern void mmi_phb_popup_display(UI_string_type text, mmi_event_notify_enum event_id);
extern void mmi_phb_popup_display_ext(MMI_STR_ID title_id, mmi_event_notify_enum event_id);
extern void mmi_phb_confirm_display(UI_string_type text, mmi_id parent_id, FuncPtr lsk_func, FuncPtr rsk_func, MMI_BOOL is_enable_csk);
extern void mmi_phb_confirm_display_ext(MMI_STR_ID title_id, mmi_id parent_id, FuncPtr lsk_func, FuncPtr rsk_func, MMI_BOOL is_enable_csk);
extern void mmi_phb_confirm_display_handle(mmi_alert_result_evt_struct *alert_result);

/*
 *Phonebook List Screen
 */
#ifdef __MMI_QWERTY_KEYPAD_SUPPORT__
extern MMI_BOOL mmi_phb_list_alpha_callback(S16 key_code, S16 key_type, U16 ucs2_value, U32 key_flag);
extern MMI_BOOL mmi_phb_list_alpha_callback_ext(S16 key_code, S16 key_type, U16 ucs2_value, U32 key_flag);
extern MMI_BOOL mmi_phb_list_alpha_callback_replace_existing(S16 key_code, S16 key_type, U16 ucs2_value, U32 key_flag);
#endif



#define IN_MMI_PHONEBOOKOPERATESINGLE_C

/*
 *Add New Entry
 */
extern void mmi_phb_op_add_pre_entry(mmi_phb_save_contact_cntx_struct *save_cntx);         /* Entry function for adding an entry */
extern void mmi_phb_op_add_new_entry_ext(MMI_ID group_id);


#ifdef __MMI_PHB_UI_IN_TABS__
extern mmi_ret mmi_phb_number_editor_proc(mmi_event_struct *evt);
#else
extern mmi_ret mmi_phb_sim_editor_proc(mmi_event_struct *evt);
extern mmi_ret mmi_phb_phone_editor_proc(mmi_event_struct *evt);
#endif

#if defined(__MMI_PHB_INFO_FIELD__)
extern MMI_BOOL mmi_phb_op_check_valid_url(CHAR* ucs2_url);
#endif

/* 
 *Entry Option - View entry
 */
extern void mmi_phb_view_entry_hdlr(mmi_phb_view_contact_cntx_struct *cntx, mmi_phb_op_action_enum op_action); 
extern void mmi_phb_entry_op_view_entry(mmi_scrn_essential_struct* scrn_data);


/*
 *  Entry Option - Edit entry
 */
extern void mmi_phb_view_contact_op_edit_entry_ext(void);
extern void mmi_phb_op_edit_pre_entry_ext(MMI_ID group_id);
#if !defined(__MMI_PHB_UI_IN_TABS__)
extern void mmi_phb_op_edit_highlight_hdlr(S32);
#endif

/* 
 *  Entry Option - Delete entry
 */

extern void mmi_phb_op_delete_update_index(U16 store_index);



/*
 *Entry Option - Process Image From File Manager.
 */


#if !(defined(LOW_COST_SUPPORT) && !(defined(__MMI_FILE_MANAGER__) && defined(__MMI_FILE_USEAS_SUPPORT__)))
extern void mmi_phb_entry_image_view_default_pic_ext(mmi_scrn_essential_struct *scrn_data);
#endif
extern void mmi_phb_edit_option_image_highlight_hdlr(mmi_id menu_id);


#if defined(__MMI_FILE_MANAGER__) && defined(__MMI_FILE_USEAS_SUPPORT__)
extern BOOL mmi_phb_image_check_image_file(U16 store_index);
extern void mmi_phb_image_view_from_phb_folder(mmi_scrn_essential_struct *scrn_data);
extern void mmi_phb_image_select_from_file_mamager(void);
extern void mmi_phb_image_select_from_file_mamager_done(void);
#if defined(__MMI_IMAGE_CLIP_CUI__) && defined(__MMI_PHB_PHOTO_STICKER_SUPPORT__)
extern void mmi_phb_clip_image_finish(WCHAR* file_path);
#endif

extern BOOL mmi_phb_image_update_by_index(U16);
extern void mmi_phb_image_delete_by_index(U16);
extern BOOL mmi_phb_image_duplicate_by_index(U16 dst_record, U16 src_record);

#if defined(__MMI_CAMCORDER__) || defined(__MMI_CAMERA__)
extern void mmi_phb_image_select_from_camera(void);
#endif/* defined(__MMI_CAMCORDER__) || defined(__MMI_CAMERA__) */

#endif /* defined(__MMI_FILE_MANAGER__) && defined(__MMI_FILE_USEAS_SUPPORT__) */ 

#if defined(__MMI_FILE_MANAGER__)
extern MMI_BOOL mmi_phb_image_check_valid_image(CHAR *path, MMI_BOOL auto_resize);
extern void mmi_phb_image_preview_callback(S32 result);
extern void mmi_phb_image_init_folder(void);
#endif /* defined(__MMI_FILE_MANAGER__) */ 

#define MMI_PHB_INCOMING_CALL_VIDEO
#if defined(__MMI_PHB_CALLER_VIDEO__)
extern void mmi_phb_video_init_data_store(void);
extern void mmi_phb_video_highlight_hdlr(S32 index);

extern void mmi_phb_entry_video_file_option(void);

extern void mmi_phb_highlight_video_setting(void);
extern void mmi_phb_hint_video_setting(U16 index);
extern void mmi_phb_highlight_video_file_view(void);
extern void mmi_phb_highlight_video_file_select(void);
extern void mmi_phb_video_malloc_buf(void);
extern void mmi_phb_video_free_buf(void);
extern void mmi_phb_video_select_from_file_mamager(void);
extern void mmi_phb_video_select_from_file_mamager_done(void);
extern void mmi_phb_highlight_video_file_delete(void);
extern void mmi_phb_entry_video_default_option(void);
extern void mmi_phb_video_pre_entry_file_option(void);
extern void mmi_phb_exit_video_view(void);
extern void mmi_phb_video_view_from_default(mmi_scrn_essential_struct *scrn_data);
extern void mmi_phb_video_view_from_file(mmi_scrn_essential_struct *scrn_data);
extern void mmi_phb_video_delete_file_reference(MMI_ID group_id);
extern void mmi_phb_entry_video_audio_option(MMI_ID group_id);
extern U16 mmi_phb_video_get_id_by_index(U16 store_index);
extern BOOL mmi_phb_video_get_path_by_index(U16 store_index);
extern void mmi_phb_video_delete_by_index(U16 store_index);
extern BOOL mmi_phb_video_duplicate_by_index(U16 dest_index, U16 src_index);
extern BOOL mmi_phb_video_update_by_index(U16 store_index);
extern U16 mmi_phb_video_update_by_index_for_path(U16 original_id, BOOL *update_result);
extern MMI_BOOL mmi_phb_video_check_data_space(CHAR *path);
#if 0
#ifdef __MMI_SWFLASH__
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif
#endif

//#ifndef __MMI_PHB_UI_IN_TABS__
extern void mmi_phb_edit_option_video_highlight_hdlr(mmi_id menu_gid);
//#endif

#endif /* defined(__MMI_PHB_CALLER_VIDEO__) */ 

#if defined(__MMI_PHB_BIRTHDAY_FIELD__)
extern void mmi_phb_util_clear_bday_buffer(void);
extern void mmi_phb_bday_set_changed(void);
extern void mmi_phb_bday_read_data_to_buff(U16 store_index);
extern void mmi_phb_bday_delete_field(U16 store_index);
extern void mmi_phb_bday_duplicate_field(U16 store_index, U16 src_store_index);
#endif /* defined(__MMI_PHB_BIRTHDAY_FIELD__) */ 
#if defined(__MMI_PHB_INFO_FIELD__)
extern void mmi_phb_info_delete_field(U16 store_index);
extern void mmi_phb_info_update_field(U16 store_index);
#endif 
#if 0
#if defined(__MMI_IMPS__) || defined(__MMI_PHB_POC_FIELD__) || defined(__MMI_VOIP__)
/* under construction !*/
#endif 
#else
#if defined(__MMI_PHB_POC_FIELD__)
extern void mmi_phb_service_delete_field(U16 store_index);
#endif 
#endif 

#define IN_MMI_PHONEBOOKOPERATEMASS_C


/*
 * AT command
 */
extern void mmi_phb_at_cmd_edit(void *);
extern void mmi_phb_at_cmd_add(void *);
extern void mmi_phb_at_cmd_delete(void *);
extern void mmi_phb_at_cmd_delete_all(void *);

/*
 *  Entry Option - Common Util
 */
extern void mmi_phb_op_delete_all_update_index(U8 storage);
extern void mmi_phb_op_delete_all_update_optioal_id(void);
extern void mmi_phb_op_update_optional_field(U16 store_index, U8 storage, U8 type);
extern void mmi_phb_clear_optional_ids(U16 store_index);
extern void mmi_phb_util_clear_info_buffer(void);

#if defined(__MMI_PHB_CALLERGROUP_IN_SIM__)     /* Associate caller group in SIM card entry */
extern void mmi_phb_clear_optional_ids_for_sim(U16 store_index);
extern void mmi_phb_copy_optional_ids_for_sim(U16 dst_store_index, U16 src_store_index);
#endif 
extern BOOL mmi_phb_copy_optional_ids(U16 dst_store_index, U16 src_store_index);
extern void mmi_phb_op_set_entry_prepare_name_number_by_index(void *dst_msg, U16 store_index);
extern void mmi_phb_op_set_entry_rsp_name_number(void *rsp_msg, U16 store_index);
extern U16 mmi_phb_op_get_store_index_and_increase_counter(U8 storage, U16 record_index);
extern U16 mmi_phb_op_clear_lookup_table_by_index(U16 store_index);


#define IN_MMI_PHONEBOOKSEARCH_C
/*
 * Sort Name
 */

extern void mmi_phb_ind_startup_finish_after_name_sort(void);



/*
 * Quick Search
 */
#if defined(__MMI_PHB_QUICK_SEARCH__)

#if 0
#if defined(__MMI_MULTITAP_FOR_STAR_AND_POUND__)
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif /* defined(__MMI_MULTITAP_FOR_STAR_AND_POUND__) */ 
#endif

extern pBOOL mmi_phb_generic_quick_search_list_get_item(S32 item_index, UI_string_type str_buff, PU8 *img_buff_p, U8 str_img_mask);
extern S32 mmi_phb_generic_quick_search_list_get_hint(S32 item_index, UI_string_type *hint_array);

#endif /* defined(__MMI_PHB_QUICK_SEARCH__) */ 

/*
 *Compare Functions Utilities
 */
extern S32 mmi_phb_compare_chars(U16 char1, U16 char2);

#if defined(__MMI_PHB_PINYIN_SORT__)
extern void mmi_phb_util_make_pinyin_cache(U16 store_index);
extern void mmi_phb_util_get_pinyin_cache(U16 store_index, U8 **pinyin_ptr);
extern U16 mmi_phb_util_convert_to_pinyin(U8 *inputString, U8 *outputString, U16 out_length);
#endif /* defined(__MMI_PHB_PINYIN_SORT__) */ 

/* 
 * Sort / Search Number Lookup Table
 */
extern void mmi_phb_lookup_table_sort(void);
extern void mmi_phb_lookup_table_quicksort(U16, U16);
extern void mmi_phb_lookup_table_insertionsort(U16, U16);
extern void mmi_phb_lookup_table_swap_node(U16, U16);
extern void mmi_phb_util_read_compare_length(void);


#define IN_MMI_PHONEBOOKSETTING_C
/*
 *  Settings Main Menu
 */
extern void mmi_phb_highlight_setting(void);    /* Highlight handler for Phonebook Settings option */


/*
 * My vCard
 */
#if defined(__MMI_VCARD__)
extern MMI_BOOL mmi_phb_send_contact_menu_check(mmi_id group_id);
#if defined(__MMI_OPP_SUPPORT__)
extern void mmi_phb_mark_several_op_send_vcard(MMI_ID group_id);
#endif
#if defined(__MMI_MULTI_VCARD__)
extern void mmi_phb_mark_several_op_backup(MMI_ID group_id);
extern void mmi_phb_entry_backup_contact(MMI_ID group_id);
extern void mmi_phb_entry_restore_contact(MMI_ID group_id);
#endif
#endif

/*
 * Speak Name in Phonebook list
 */
#if defined(__MMI_INTELLIGENT_CALL_ALERT__)
extern void mmi_phb_init_speak_name(void);
extern void mmi_phb_speak_name_toggle(void);
#endif /* defined(__MMI_INTELLIGENT_CALL_ALERT__) */ 

/*
 * Save contact notify
 */
#if defined( __MMI_PHB_SAVE_CONTACT_NOTIFY__)
void mmi_phb_entry_save_contact_notify(void);
void mmi_phb_save_contact_notify_set_req(void);
#endif

/* 
 *  Inline Editor Selection List - Ring Tone, Image List, LED, Alert.
 */
#if defined(__MMI_FILE_MANAGER__) && defined(__MMI_FILE_USEAS_SUPPORT__)
extern void mmi_phb_ringtone_select_from_file_mamager(void);
extern void mmi_phb_edit_option_ringtone_highlight_hdlr(mmi_id menu_id);
#endif

extern void mmi_phb_stop_ring_tone_id(void);
#if 0
#if defined(__MMI_PHB_PREFERRED_NUMBER_FIELD__)
/* under construction !*/
#endif
#endif
extern void mmi_phb_build_image_list(void);



#if defined(__MMI_PHB_CALLER_VIDEO__)
extern void mmi_phb_build_video_list(void);
extern U16 mmi_phb_get_video_id(U8 index);
extern U8 mmi_phb_get_video_index(U16 video_id);
extern void mmi_phb_video_view_callback(S32 result);
#if 0
#ifdef __MMI_SWFLASH__
/* under construction !*/
#endif
#endif
#endif /* defined(__MMI_PHB_CALLER_VIDEO__) */ 



#define IN_MMI_PHONEBOOKSTUBS_C

/*
 * Interface for MMS
 */
//#if defined(MMS_SUPPORT))
#if defined(__MMI_PHB_INFO_FIELD__) && defined(__MMI_MMS_POSTCARD__)
extern S32 mmi_phb_mms_address_list_get_hint(S32 item_index, UI_string_type *hint_array);
extern void mmi_phb_return_address_data(void);
#endif
//#endif /* defined(MMS_SUPPORT)) */ 

/* 
 * Save Image To Phb from File Manager
 */
#if defined(__MMI_FILE_MANAGER__)
extern void mmi_phb_entry_fmgr_save_option(void);
extern void mmi_phb_exit_fmgr_save_option(void);
extern void mmi_phb_fmgr_pre_add_entry(void);
extern void mmi_phb_fmgr_pre_edit_entry(U16 store_index);
extern S32 mmi_phb_fmgr_edit_list_get_hint(S32 item_index, UI_string_type *hint_array);
extern void mmi_phb_fmgr_pre_edit_callergrp(void);
#endif /* defined(__MMI_FILE_MANAGER__) */ 

/*
 * Pubic Utilities- Convert Functions
 */


extern U16 mmi_phb_convert_to_0x81_get_base(U16 code);
extern U8 mmi_phb_convert_to_0x81_get_offset(U16 base, U16 code);



/* USIM related */
#ifdef __MMI_PHB_USIM_FIELD__
extern void mmi_phb_op_add_usim_entry_req(void);         /* Send information to stack to store an entry */
extern void mmi_phb_op_edit_usim_entry_req(void);

extern void mmi_phb_op_set_entry_usim_fields(void *field_msg, U16 store_index);
extern void mmi_phb_op_set_entry_prepare_usim_data_by_index(U16 index);
extern void mmi_phb_op_set_option_data_by_usim_index(U16 index, PHB_OPTIONAL_FIELDS_STRUCT *opt_fields);

extern void mmi_phb_build_usim_group_list(void);
extern void mmi_phb_gas_save_req(void);
#endif /* __MMI_PHB_USIM_FIELD__ */ 

#if defined(__MMI_PHB_QUICK_SEARCH__) && defined(__MMI_PHB_GENERIC_MULTI_SELECT__)
extern S32 mmi_phb_generic_multi_select_and_quick_search_set_state(S32 item_index);
extern void mmi_phb_generic_multi_select_and_quick_search_check(void);
extern void mmi_phb_generic_multi_select_and_quick_search_highlight_handler(S32 item_index);
extern S32 mmi_phb_generic_multi_select_and_quick_search_get_state(S32 item_index, PU8 *checkbox_image);
extern MMI_BOOL mmi_phb_star_key_pre_handler(U16 key_code, U16 key_type);
#if 0
#if defined(__MMI_MULTITAP_FOR_STAR_AND_POUND__)
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif /* __MMI_MULTITAP_FOR_STAR_AND_POUND__ */
#endif
#endif /* defined(__MMI_PHB_QUICK_SEARCH__) && defined(__MMI_PHB_GENERIC_MULTI_SELECT__) */
extern MMI_BOOL mmi_phb_is_num_in_bcd(const U16* source, U8 num, U16 len_in_bytes);

#ifdef __MMI_URI_AGENT__
extern void mmi_phb_init_uri_agent_registration(void);
extern void mmi_phb_uriagent_result_callback(U8 uriagent_result);
extern U8 mmi_phb_uriagent_choose_storage_delete_cb(void);
extern void mmi_phb_uriagent_display_popup(U8 result);
#endif


extern MMI_BOOL mmi_phb_og_start_browser(U16 store_index, MMI_ID group_id);



#ifdef __MMI_SYNCML_APP_SYNC_MENU_SUPPORT__
extern void mmi_phb_entry_sync_menu(void);
#endif

#if (MMI_MAX_SIM_NUM > 1)
extern void mmi_phb_move_several_build_menu(mmi_id menu_gid);
extern void mmi_phb_copy_several_build_menu(mmi_id menu_gid);
#endif

#if defined(__MMI_PHB_MULTI_OPERATION__)
extern void mmi_phb_pre_entry_mark_several_main(MMI_ID group_id);

extern void mmi_phb_mark_several_main_build_option(MMI_ID menu_gid);
extern void mmi_phb_mark_several_copy_build_option(MMI_ID menu_gid);
extern void mmi_phb_mark_several_move_build_option(MMI_ID menu_gid);
extern void mmi_phb_entry_mark_several_option(void);
extern void mmi_phb_entry_mark_several_main(void);
extern void mmi_phb_entry_mark_several_move(void);
extern void mmi_phb_entry_mark_several_copy(void);
extern void mmi_phb_entry_mark_several_list(U16, U16, U16, U16, U16, FunctionPtr, FunctionPtr, FunctionPtr);
#if defined(__MMI_PHB_QUICK_SEARCH__)
extern void mmi_phb_entry_quick_search_mark_several_main(void);
extern void mmi_phb_entry_quick_search_mark_several_copy(void);
extern void mmi_phb_entry_quick_search_mark_several_move(void);
extern void mmi_phb_entry_quick_search_mark_several_add_to_group(void);
extern void mmi_phb_entry_quick_search_mark_several_list(U16, U16, U16, U16, U16, FunctionPtr, FunctionPtr, FunctionPtr, FunctionPtr);
#endif /*(__MMI_PHB_QUICK_SEARCH__)*/




#ifdef __MMI_UNIFIED_COMPOSER__
extern void mmi_phb_pre_entry_mark_several_send_uc(void);
extern void mmi_phb_mark_several_send_uc_choose_address(MMI_ID group_id);
extern void mmi_phb_entry_mark_several_send_uc_choose_address(void);
extern void mmi_phb_mark_several_send_uc_choose_address_more(void);
extern void mmi_phb_entry_mark_several_send_uc(void);
#else /*__MMI_UNIFIED_COMPOSER__ */
extern void mmi_phb_entry_mark_several_send_sms(MMI_ID group_id);
extern void mmi_phb_mark_several_send_sms_choose_address_more(void);
extern void mmi_phb_entry_mark_several_send_sms_choose_address(void);
extern void mmi_phb_mark_several_send_sms_choose_address(MMI_ID group_id);
extern void mmi_phb_pre_entry_mark_several_send_sms(void);
extern void mmi_phb_pre_entry_mark_several_send_sms(void);
extern void mmi_phb_entry_mark_several_send_sms(MMI_ID group_id);
#if defined(__MMI_MMS__) &&  defined(OBIGO_Q03C_MMS_V02) && !defined(__MMI_SLIM_MMS_2__)
extern void mmi_phb_pre_entry_mark_several_send_mms(void);
extern void mmi_phb_mark_several_send_mms_choose_address(MMI_ID group_id);
extern void mmi_phb_entry_mark_several_send_mms_choose_address(void);
extern void mmi_phb_mark_several_send_mms_choose_address_more(void);
extern void mmi_phb_entry_mark_several_send_mms(void);
extern void mmi_phb_mark_several_send_mms_req(void);
extern void mmi_phb_mark_several_send_mms_rsp(void *info);
extern void mmi_phb_mark_several_send_mms_insert_more_ind(U32);
extern U16 mmi_phb_mark_several_send_mms_prepare_buffer(U16, U16, void*);
#endif /* defined(OBIGO_Q03C_MMS_V02) &&  defined(__MMI_MMS__) */
#endif /* __MMI_UNIFIED_COMPOSER__ */
extern MMI_BOOL mmi_phb_mark_several_filter_for_send_message(U16, U16);
extern U8* mmi_phb_mark_several_get_address_callback(U16 index, U16* type);
extern void mmi_phb_mark_several_send_message_go_back_histoty(void);
extern void mmi_phb_mark_several_send_message_go_back_histoty_ext(MMI_ID group_id);


#else /* defined(__MMI_PHB_MULTI_OPERATION__) */
extern void mmi_phb_op_copy_all_confirm(MMI_ID group_id);
extern void mmi_phb_op_move_all_confirm(MMI_ID group_id);
extern U16 mmi_phb_op_copy_move_all_get_confirm_str(U16 dst_storage);
extern void mmi_phb_move_all_pre_req(MMI_ID group_id);
extern void mmi_phb_move_all_copy_call_back(U16 error_result, U16 store_index);
extern void mmi_phb_move_all_call_back(U16 result, U16 store_index);
#endif /* defined(__MMI_PHB_MULTI_OPERATION__) */




#if defined(__MMI_PHB_SLIM_SETTING_MESS_OPERATION__) || defined(__MMI_PHB_MULTI_OPERATION__) || defined(__DM_LAWMO_SUPPORT__)
extern void mmi_phb_multi_op_cancel(void);
#endif
extern void mmi_phb_show_mass_processing(mmi_id sg_id, U16 msg, U16 total_count);

extern void mmi_phb_mass_processing_abort(void);
extern void mmi_phb_end_key_save_contact(void);

extern mmi_ret mmi_phb_update_mass_processing(mmi_event_struct* param);



extern MMI_BOOL mmi_phb_check_storage_status(U8, mmi_phb_check_storage_enum, MMI_BOOL);
extern MMI_BOOL mmi_phb_op_all_check_storage_status(U8 storage, mmi_phb_check_storage_enum check_type, MMI_BOOL need_popup, MMI_ID group_id);
extern MMI_BOOL mmi_phb_get_fdn_status(U8 storage);


extern void mmi_phb_entry_delete_all_no_sim(void);


extern void mmi_phb_continue_send_multi_message_confirm(U16, MenucuiPtr, MenucuiPtr, MMI_ID);

#if defined (__MMI_PHB_UI_IN_TABS__)
extern void mmi_phb_entry_choose_caller_alert(void);
extern void mmi_phb_choose_caller_alert_done(void);
extern void mmi_phb_entry_choose_caller_led(void);
extern void mmi_phb_exit_choose_caller_led(void);
extern void mmi_phb_choose_caller_led_done(void);
extern void mmi_phb_entry_choose_caller_ringtone(void);
#endif /* __MMI_PHB_UI_IN_TABS__ */

/* caller picture */

extern void mmi_phb_entry_choose_caller_pic(void);

extern void mmi_phb_entry_image_view_ext(MMI_ID group_id);

#ifdef __MMI_UDX_VCARD_SUPPORT__
extern void mmi_phb_mark_several_op_build_udx_confirm(MMI_ID group_id);
extern void mmi_phb_mark_several_op_build_udx(MMI_ID group_id);
#endif /* __MMI_UDX_VCARD_SUPPORT__ */


extern mmi_ret mmi_phb_edit_menu_cui_proc(mmi_event_struct *evt);
extern mmi_ret mmi_phb_number_editor_proc(mmi_event_struct *evt);
extern void mmi_phb_sg_entry_setting(MMI_ID group_id);
extern void mmi_phb_entry_group_speed_dial(void);
#if 0
#ifdef __OP01_FWPBW__
/* under construction !*/
/* under construction !*/
#endif
#endif

#ifdef __MMI_PHB_SPEED_DIAL__
extern void mmi_phb_speed_dial_pre_set_number(mmi_id sg_id, U16 store_index, U32 num_type, mmi_phb_contact_info_struct* contact);
extern void mmi_phb_speed_dial_pre_del_number(U16 store_index, U32 num_index);
extern void mmi_phb_speed_dial_set_number_commit(U16 store_index, mmi_phb_contact_info_struct* contact);
#endif

extern void mmi_phb_entry_group_my_number(void);
extern void mmi_phb_entry_group_extra_number(void);
#ifdef __MMI_PHB_SLIM_SETTING_MESS_OPERATION__
extern void mmi_phb_group_copy_several(void);
extern void mmi_phb_group_move_several(void);
extern void mmi_phb_group_delete_all(void);
#endif /* __MMI_PHB_SLIM_SETTING_MESS_OPERATION__ */
extern mmi_ret mmi_phb_mark_several_menu_cui_proc(mmi_event_struct *evt);
#if defined(__MMI_PHB_MULTI_OPERATION__) || defined(__MMI_PHB_GENERIC_MULTI_SELECT__)
extern U8 mmi_phb_bitmask_get_state(U8* bit_mask, U16 store_index);
extern void mmi_phb_bitmask_set_state(U8* bit_mask, U16 store_index, MMI_BOOL status);
extern mmi_phb_group_member_ms_menu_cui_proc(mmi_event_struct *evt);
extern void mmi_phb_entry_group_mark_several_list(FunctionPtr lsk_ptr, FunctionPtr csk_ptr, FunctionPtr entry_ptr, U8 group_id);
extern U16 mmi_phb_mark_several_populate(void);
extern U16 mmi_phb_mark_several_search_count(void);
extern void mmi_phb_mark_several_check(void);
extern void mmi_phb_op_mark_several_mark_unmark(void);
extern void mmi_phb_op_mark_several_unmark_all(void);
extern void mmi_phb_op_mark_several_mark_all(void);
#endif
extern mmi_ret mmi_phb_choose_storage_menu_cui_proc(mmi_event_struct *evt);
extern mmi_ret mmi_phb_main_list_menu_cui_proc(mmi_event_struct *evt);
extern mmi_ret mmi_phb_view_contact_menu_cui_proc(mmi_event_struct *evt);

#ifdef __MMI_BPP20_SUPPORT__
extern mmi_ret mmi_phb_bpp_cui_proc(mmi_event_struct* evt);
#endif

#if !(defined(LOW_COST_SUPPORT) && !(defined(__MMI_FILE_MANAGER__) && defined(__MMI_FILE_USEAS_SUPPORT__)))
extern mmi_ret mmi_phb_image_edit_menu_cui_proc(mmi_event_struct *evt);
#endif

#if defined(__MMI_FILE_MANAGER__)
extern mmi_ret mmi_phb_fmgr_edit_menu_cui_proc(mmi_event_struct *evt);
#endif

#ifdef __MMI_SAVE_CONTACT_REPLACE__
extern mmi_ret mmi_phb_save_choose_menu_cui_proc(mmi_event_struct * evt);
#endif

#if defined(__MMI_PHB_CALLER_VIDEO__)
extern mmi_ret mmi_phb_video_edit_menu_cui_proc(mmi_event_struct *evt);
extern mmi_ret mmi_phb_video_audio_menu_cui_proc(mmi_event_struct *evt);
#endif

extern void mmi_phb_op_add_new_entry(void);

#ifdef __MMI_PHB_UI_IN_TABS__
extern mmi_ret mmi_phb_profiles_contact_proc(mmi_event_struct *evt);
#endif

#if defined(__MMI_FILE_MANAGER__) && defined(__MMI_FILE_USEAS_SUPPORT__)
extern void mmi_phb_select_image_preview(mmi_scrn_essential_struct* scrn_data);
extern void mmi_phb_select_image(MMI_ID group_id);
#endif

extern void mmi_phb_search_contact_pre_run(void);
extern void mmi_phb_search_contact_run(void);
extern void mmi_phb_search_contact_continue(MMI_ID group_id);

#ifdef __MMI_PHB_OPTIONAL_FIELD__
extern U8 mmi_phb_edit_get_opt_number_field(U8 index);
#endif

extern MMI_ID mmi_phb_entry_menu_cui_generic(MMI_ID parent_gid, MMI_MENU_ID menu_id, U16 title_id);

extern MMI_ID mmi_phb_entry_menu_cui_generic_ext(
                MMI_ID parent_gid,
                cui_menu_type_enum menu_type,
                MMI_MENU_ID menu_id,
                U16 title_id,
                void* parent_data);

#ifdef __MMI_PHB_PHOTO_STICKER_SUPPORT__
extern void mmi_phb_thumbnail_reset_displayable(void);
extern MMI_BOOL mmi_phb_thumbnail_get_image_path_callback(U16 store_id, CHAR *path);
extern void mmi_phb_thumbnail_set_displayable(U16 store_id, MMI_BOOL displayable);
extern MMI_BOOL mmi_phb_thumbnail_get_displayable(U16 store_id);
extern void mmi_phb_thumbnail_get_menuitem_info(U16 store_id, wgui_thumbnail_info_struct *menuitem_data);
#endif

#ifdef __MMI_SNS_CONTACTS__
extern void mmi_phb_sns_entry_view_member(mmi_phb_sns_list_enum list_type);
#ifdef __MMI_SNS_MESSAGES__
extern void mmi_phb_sns_entry_send_msg(mmi_phb_sns_list_enum type);
extern void mmi_phb_sns_view_message(void);
#endif
extern void mmi_phb_sns_favorite_op(mmi_phb_sns_list_enum list_type, MMI_BOOL is_add);
extern void mmi_phb_sns_view_unlink(U16 store_index, MMI_ID group_id);
extern MMI_BOOL mmi_phb_sns_is_scrn_active(const MMI_ID group_id, const MMI_ID scrn_id);
#ifdef BROWSER_SUPPORT
extern void mmi_phb_sns_view_browser(void);
#endif
extern void mmi_phb_sns_entry_contact_link(cui_sns_result_enum result);
extern void mmi_phb_sns_entry_filter(cui_sns_result_enum result, S32 list_id, MMI_BOOL is_group, S32 provider);
extern mmi_ret mmi_phb_sns_link_not_ready_proc(mmi_event_struct *evt);
extern mmi_ret mmi_phb_sns_filter_not_ready_proc(mmi_event_struct *evt);
extern MMI_BOOL mmi_phb_sns_is_linked(U16 contact);
extern void mmi_phb_sns_is_progress(mmi_id sg_id, U16 msg);
extern MMI_BOOL mmi_phb_sns_list_ready(void);
extern PU8 mmi_phb_sns_friend_get_provider_image(S32 item_index);
extern gdi_image_cache_bmp_struct mmi_phb_sns_friend_cache_provider_image(S32 item_index);
extern mmi_ret mmi_phb_sns_unload_proc(mmi_event_struct *evt);
#endif


extern MMI_BOOL mmi_phb_sim_ctrl_not_available_hide_menu(mmi_sim_enum mmi_sim, MMI_ID inline_gid, U16 menu_id, U16 string_id);
extern void mmi_phb_new_entry_choose_storage_check(mmi_id sender_id, U16 menu_id, U16 string_id);
#ifdef __MMI_DYNAMIC_SIM_DYNAMIC_UI__
extern void mmi_phb_sim_dynamic_name(mmi_sim_enum mmi_sim, MMI_ID inline_gid, U16 menu_id, U16 string_id);
extern void mmi_phb_sim_dynamic_name_simx_title(mmi_sim_enum mmi_sim, MMI_ID inline_gid, U16 string_id, WCHAR *buffer);
extern U16 mmi_phb_sim_dynamic_name_string_index(sim_interface_enum string_index);
#endif

#ifdef __MMI_PHB_TCARD_STORAGE_SUPPORT__
void mmi_phb_memory_card_not_available_hide_menu(MMI_ID inline_gid, U16 menu_id);
MMI_BOOL mmi_phb_memory_card_is_ready(phb_storage_enum storage, MMI_BOOL is_popup);
#endif

#ifdef __MMI_MAINLCD_96X64__


#if defined(__MMI_PHB_LAST_NAME_FIELD__)
extern void mmi_phb_name_display_menu_cui_proc(mmi_event_struct *evt);//maggie
#endif
extern mmi_ret mmi_phb_prefer_storage_menu_cui_proc(mmi_event_struct *evt);//maggie
#if defined(__MMI_INTELLIGENT_CALL_ALERT__)
extern mmi_ret mmi_phb_speak_name_menu_cui_proc(mmi_event_struct *evt);//maggie
#endif
#if defined( __MMI_PHB_SAVE_CONTACT_NOTIFY__)
extern mmi_ret mmi_phb_save_notify_menu_cui_proc(mmi_event_struct *evt);//maggie
#endif
extern void mmi_phb_entry_memory_status(void);                   //entry memory status screen
extern void mmi_phb_entry_preferred_storage(void);               //entry prefer storage screen

extern void mmi_phb_entry_setting(void);                         //½øÈësetting menuÖ÷Ñ¡µ¥
extern void mmi_phb_entry_memory_status(void);                   //entry memory status screen
extern void mmi_phb_set_preferred_storage(void);
extern void mmi_phb_entry_preferred_storage(void);  


#endif

#endif /* _PHONEBOOKPROT_H */