MmsSrvGprot.h 158 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 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347
/*****************************************************************************
*  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:
 * ---------
 * MmsSrvGprot.h
 *
 * Project:
 * --------
 * MAUI
 *
 * Description:
 * ------------
 *
 *
 * 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!
 * 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 MMS_SRV_GPROT_H
#define MMS_SRV_GPROT_H
#include "MMI_features.h"
#ifdef __MMI_MMS_2__

#include "mmi_rp_srv_mms_def.h" //added as changes made during callbackmanager registration in res file

//#include "wap_ps_struct.h"
#include "custom_wap_config.h"
//#include "mmsadp.h"
//#include "FileManagerGProt.h"
//#include "UMGprot.h"
#include "app_usedetails.h"
#include "MmsXMLDefSrv.h"
//#include "MmsSrvSendRcv.h"
//#include "App_mine.h"
//#include "fat_fs.h"

 #include "FileMgrSrvGProt.h"   
 #include "wgui.h"  
 #include "wap_adp.h"   
 #include "MMIDataType.h" 
 #include "fs_type.h"  
 #include "mmi_res_range_def.h"   
 #include "mma_struct.h"   
 #include "UmSrvDefs.h"    
 #include "mma_api.h"  
 #include "wgui_categories_MMS_viewer.h" 
 #include "stack_ltlcom.h"   
 #include "UmSrvStruct.h"
 #include "kal_general_types.h"

#if defined(WAP_SUPPORT)
#include "ProcedureGprot.h"
#endif

#include "flash_opt.h"
#include "mmi_frm_utility_gprot.h"

#if !defined(__PUBLIC_DRIVE_AVAILABLE__) && defined(MMS_IN_LARGE_STORAGE)
#error Please help turn-on APP_STORAGE_IN_SYSTEM drive because this project does not support phone drive
#endif

/*!!!!!!Caution!!!!Please never change below code*/
/*240 count can not be modified without consulting with file owner */
/*1 sector  = 512 bytes                                           */
/*Total Required Bytes = 120 * 1024                              */
/*Total Required Sectors = 120*1024/512 = 240                   */
/***************************************************************/

#if !((defined (NAND_PARTITION_SECTORS) && (NAND_PARTITION_SECTORS  >= 240))||\
	( defined(NOR_PARTITION_SECTORS) && (NOR_PARTITION_SECTORS >= 240 )))
#ifdef __MMI_MMS_TEMPLATE_SUPPORT__
#error "!!!Due to Public Drive Memory is not enough to generate MMS Templates, Please turn off CFG_MMI_MMS_V02_TEMPLATES_SUPPORT"
#endif
#endif

/************For Parser Gport.h****/
/*Maximum length for Java app_id and Java reply_app_id for a Java MMS*/
#define SRV_MMS_MAX_COMM_STRING_LENGTH  100
/*Maximum Message subject length*/
#define SRV_MMS_XML_MAX_SUBJECT_LEN (40)
/*MMS version string lenght*/
#define SRV_MMS_VERSION_LEN (8)
/*Message count threshold limit*/
#define MAX_POSSIBLE_MESSAGES_THRESHOLD     wap_custom_get_max_mms_warning_num()
/*Maximum possible message count in phone*/
#define UMMS_MAX_POSSIBLE_MESSAGES        ((WAP_CUSTOM_CFG_MAX_NBR_MMS_MSG -1) + WAP_CUSTOM_CFG_MAX_NBR_MMS_MSG_ON_CARD)  
/*Maximum possible message count in phone storage.Memory card message count excluded*/
#define UMMS_MAX_POSSIBLE_PHONE_MESSAGES  (WAP_CUSTOM_CFG_MAX_NBR_MMS_MSG -1)
/*Maximum number of message count information query that can be done at a time in a single API call .Here MMI_SIM_TOTAL is max sim that can be used */
#define SRV_MMS_MAX_MSG_NUM_QUERY_NUM (10 + MMI_SIM_TOTAL)

#ifdef __MMI_VCARD__
/*Maximum file name length*/
#define SRV_MMS_MAX_FILENAME_LENGTH	100 
#endif/*__MMI_VCARD__*/

/*Maximum address length*/
#define  SRV_MMS_MAX_ADDR_LEN  MMA_MAX_ADDR_LEN   
/*Maximum data length*/
#define  SRV_MMS_MAX_APP_DATA_LENGTH  32  
/*Maximum address count in to,cc,bcc*/
#define  SRV_MMS_MAX_SUPPORT_ADDR_COUNT  20   
/*Maximum filename  length*/
#define SRV_MMS_MAX_INTERNAL_FILENAME_LENGTH  100   
/*Maximum Subject  length*/
#define SRV_MMS_MAX_SUBJECT_LEN 41   
/*Max length of message array MMS  supports*/
#define SRV_MMS_MAX_MSG_ARRAY_NUM   100    



/* DOM-NOT_FOR_SDK-BEGIN */
#define   UMMS_MMS_DEFAULT_SYS_DRIVE                SRV_FMGR_SYSTEM_DRV
#define   UMMS_MMS_DEFAULT_PUBLIC_DRIVE             SRV_FMGR_PUBLIC_DRV

#define SRV_MMS_MAX_COMM_STRING_LENGTH  100
#define SRV_MMS_TXT_BUF_UCS2_SIZE (40960)
#define SRV_MMS_MAX_UTF8_TXT_SLIDE_LEN (20480)
#define SRV_MMS_XML_MAX_ADDR_LEN (312)
#define SRV_MMS_XML_MAX_SUBJECT_LEN (40)
#define SRV_MMS_VIEWER_SLIDE_SWITCH_TIME (750)
#define SRV_MMS_USE_DETAILS_REQ_ID 0x04
#define SRV_MMS_XML_TEMP_STR_LEN (1024)
#define SRV_MMS_XML_INVALID_VALUE (0xFF)
#define SRV_MMS_MAX_ALT_STR_LEN (20)
#define SRV_MMS_MAX_USE_DETAILS_WHOLE_SLIDE (MMI_SUBMENU_CONTENT_HEIGHT/MMI_MENUITEM_HEIGHT)
#define SRV_MMS_MAX_URL_LENGTH           WAP_MAX_URL_LENGTH
#define MMI_MV_VFN_NUM_OF_WCHAR ((FS_GenVFN_SIZE/ENCODING_LENGTH) + 1 + SRV_FMGR_PATH_MAX_FILE_EXT_LEN )
#ifdef __MMI_MMS_SIM_USER_PREFERENCE_SUPPORT__
#define UMMS_MAX_SIM_READ_SIZE     256
#define UMMS_SIM_SETTINGS_REQUEST_TIME 500
#endif /* __MMI_MMS_SIM_USER_PREFERENCE_SUPPORT__ */
#define MMI_UMMS_ERROR  srv_mms_app_result_enum


#define         MMI_UMMS_STOP_CORRUPT_DWNLD       0x0B
#define         MMI_UMMS_STOP_UNRECONIZED_NOTIFICATION       0x0C


#define         MMI_UMMS_LOCK_MODE_ON             0x0A
#define         MMI_UMMS_LOCK_MODE_OFF            0x00

#define UMMS_MAX_SIM_READ_SIZE     256
#define UMMS_SIM_SETTINGS_REQUEST_TIME 500
#define UMMS_MAX_AUTO_SIGN_LENGTH        128
#define UMMS_MAX_POSSIBLE_SLIDES            20  /* (wap_custom_get_max_mms_slides()) */
#define UMMS_DEFAULT_SLIDE_DURATION                5000 /* /ms */

#define UMMS_DEFAULT_HOME_RETRIEVAL_MODE              E_HOME_NOETWORK_RETRIEVAL_IMMEDAITE       /* /immedaite */
#define UMMS_DEFAULT_ROAMING_RETRIEVAL_MODE         E_ROAMING_RETRIEVAL_AS_HOME
#define UMMS_DEFAULT_ADVERTISEMENT_FILTER_VALUE       E_ALLOW
#define UMMS_DEFAULT_ANONYMOUS_FILTER_VALUE        E_ALLOW
#define UMMS_DEFAULT_DELIVERY_REPORT_DURING_SENDING  E_OFF
#define UMMS_DEFAULT_READ_REPORT_DURING_SENDING       E_OFF
#define UMMS_DEFAULT_DELIVERY_REPORT_DURING_RETRIEVAL E_ON
#define UMMS_DEFAULT_READ_REPORT_DURING_RETRIEVAL     E_READ_REPORT_SEND_ON_REQUEST
#define UMMS_DEFAULT_PRIORITY                 MMA_PRIORITY_MEDIUM
#define UMMS_DEFAULT_EXPIRY_TIME                 MMA_EXPIRY_MAX
#define UMMS_DEFAULT_SENDER_VISIBILTY           E_OFF
#define UMMS_DEFAULT_DELIVERY_TIME              MMA_DELIVERY_IMMEDIATE
#define MMI_UMMS_MAKE_SETTINGS_TEXT_FILE_PATH  L"\\settings_text0.txt"
#define UMMS_MAX_DEFAULT_SLIDE_TIME_DURATION 99
#define UMMS_SIGNATURE_EXT_LENGTH      14
#define MMI_UMMS_MAKE_SIGNATURE_FOLDER_PATH(x)      \
   kal_wsprintf( (kal_uint16 *)x, "%c:\\@signature", SRV_FMGR_SYSTEM_DRV);
#define SRV_MMS_VIEWER_MAX_CONTAINER_SIZE 2
#define SRV_MMS_INSTANCE_DEFAULT_INDEX 1

#define SRV_MMS_MAX_LITE_REQ 10

#if (defined(JPG_ENCODE) && defined(__MMI_MMS_2__) && !defined(__MMI_ULTRA_SLIM_MMS_2__))
#ifndef __MMI_MMS_MEGA_PIXEL_SUPPORT__
#define __MMI_MMS_MEGA_PIXEL_SUPPORT__
#endif 
#endif

/* Max number of attachment UC supports. */
#define SRV_MMS_UC_MAX_ATTACHMENT_NUM (mma_get_max_attachment_no())

/* Max number of recipient UC supports. */
#define SRV_MMS_UC_MAX_ADDRESS_NUM (mma_get_max_recipient_no())

#define SRV_MMS_UC_MAX_EMAIL_LEN (MMI_EMAIL_MAX_ADDR_LEN)

/* Max Phone number length UC supports. */
#define SRV_MMS_UC_MAX_PHONE_NUMBER_LEN MMI_PHB_NUMBER_LENGTH

/* Max image width UC supports. */
#define SRV_MMS_UC_MAX_IMAGE_WIDTH (1600)
#define SRV_MMS_UC_MAX_IMAGE_HEIGHT (1600)

#ifdef __MMI_MMS_USE_ASM__
#define SRV_MMS_MMA_ASM_MEM_POOL_SIZE (MMA_ASM_MEM_POOL_SIZE)
#else
#define SRV_MMS_MMA_ASM_MEM_POOL_SIZE 0
#endif
/* DOM-NOT_FOR_SDK-END */


/**********************************************************************
 * Enumeration definitions
 **********************************************************************/

/* This enum defines the result of the current service request*/
typedef enum
{
   SRV_MMS_RESULT_OK,                        /*Success*/
   SRV_MMS_RESULT_NOT_READY = -1,            /*Not ready*/
   SRV_MMS_RESULT_FAIL = -2,                 /*Fail*/
   SRV_MMS_RESULT_INVALID_PARA = -3,         /*Invalid parameters*/
   SRV_MMS_RESULT_MAX_SRV_REACHED = -4,      /*Maximum number of requests that can be served already reached*/
   SRV_MMS_RESULT_INSUFFICIENT_MEMORY = -5,  /*Memory not enough*/
   SRV_MMS_RESULT_FILE_OPERATION_FAILED = -6,/*File operation failed*/
   SRV_MMS_RESULT_NEED_LEAVE_TIMER = -7,     /*Timer Expiry needed*/
   SRV_MMS_RESULT_END
}srv_mms_result_enum;

/* This enum defines the result of the request for widget image data request*/
typedef enum
{
   SRV_MMS_LITE_VIEWER_RESULT_OK,/*Success*/
   SRV_MMS_LITE_VIEWER_VIDEO_TYPE, /*video type media*/
   SRV_MMS_LITE_VIEWER_DRM_TYPE , /*DRM type media*/
   SRV_MMS_LITE_VIEWER_OPERATION_FAILED_ERROR,/*File system error*/
   SRV_MMS_LITE_VIEWER_END
}srv_mms_lite_viewer_image_result_enum;


/* This enum defines the state of a process*/
typedef enum
{
    SRV_MMS_STATUS_NONE,               /*None*/
    SRV_MMS_STATUS_INIT,               /*Ready*/
    SRV_MMS_STATUS_PROCESSING,         /*Processing data*/
    SRV_MMS_STATUS_WAITING,            /*Waiting for data*/
    SRV_MMS_STATUS_CANCELLING,         /*Cancelling the process*/
    SRV_MMS_STATUS_CANCELLED,          /*Process cancelled */
    SRV_MMS_STATUS_CANCEL_FAILED,      /*Process cancelling failed */
    SRV_MMS_STATUS_FINISHED,           /*Process finished*/
    SRV_MMS_STATUS_END
}srv_mms_process_status_enum;


typedef enum
{
    MMI_UMMS_FALSE,
    MMI_UMMS_TRUE,
    MMI_UMMS_ASYNC_WAIT,
    MMI_UMMS_ASM_DRAW_SCR,
    MMI_UMMS_FAIL,
    MMI_UMMS_SYNC_FAIL,
    MMI_UMMS_NOT_MEMORY
} srv_mms_app_result_enum;
/*This enum defines the Send and save settings for MMS*/
typedef enum
{
    SRV_MMS_SETTING_SEND_ONLY,/*Send MMS, do not save*/
    SRV_MMS_SETTING_SAVE_AND_SEND,/*Send MMS and save to Sent box*/
    SRV_MMS_SETTING_END
} srv_mms_send_setting_enum;



/*This enum defines various events emit by MMS service or MMS Application*/
	


/*This enum is used to specify kind of information requested in the message count request to MMA*/
typedef enum
{
  SRV_MMS_QUERY_UNREAD_INBOX_MSG_SIM1 = 1,   /* Number of unread Msg in Inbox for SIM1 */
  SRV_MMS_QUERY_UNREAD_INBOX_MSG_SIM2,       /* Number of unread Msg in Inbox for SIM2 */
  SRV_MMS_QUERY_UNREAD_INBOX_MSG_SIM3,
  SRV_MMS_QUERY_UNREAD_INBOX_MSG_SIM4,
  SRV_MMS_QUERY_TOTAL_UNREAD_INBOX_MSG,      /* Number of unread Msg in  Inbox*/
  SRV_MMS_QUERY_TOTAL_READ_INBOX_MSG,        /*  Number of read Msg in Inbox   */
  SRV_MMS_QUERY_TOTAL_INBOX_SIM1,            /* total Number of Msg in  Inbox for SIM1*/
  SRV_MMS_QUERY_TOTAL_INBOX_SIM2,            /* total Number of Msg in  Inbox for SIM2*/
  SRV_MMS_QUERY_TOTAL_INBOX_SIM3,
  SRV_MMS_QUERY_TOTAL_INBOX_SIM4,
  SRV_MMS_QUERY_TOTAL_INBOX_MSG,             /* total Number of Msg in  Inbox */
  SRV_MMS_QUERY_TOTAL_OUTBOX_SIM1,           /* total Number of Msg in Outbox SIM1 */
  SRV_MMS_QUERY_TOTAL_OUTBOX_SIM2,           /* total Number of Msg in Outbox SIM2 */
  SRV_MMS_QUERY_TOTAL_OUTBOX_SIM3,
  SRV_MMS_QUERY_TOTAL_OUTBOX_SIM4,
  SRV_MMS_QUERY_TOTAL_OUTBOX_MSG,            /* total Number of Msg in Outbox*/
  SRV_MMS_QUERY_TOTAL_SENT_SIM1,             /* total Number of Msg in Sent SIM1 */
  SRV_MMS_QUERY_TOTAL_SENT_SIM2,             /* total Number of Msg in Sent SIM2 */
  SRV_MMS_QUERY_TOTAL_SENT_SIM3,
  SRV_MMS_QUERY_TOTAL_SENT_SIM4,
  SRV_MMS_QUERY_TOTAL_SENT_MSG,              /* total Number of Msg in Sent  */
  SRV_MMS_QUERY_TOTAL_DRAFT_MSG,             /* total Number of Msg in Drafts */
  SRV_MMS_QUERY_UNREAD_ARCHIVE_MSG_SIM1,     /* Number of unread Msg in Archive for SIM1 */
  SRV_MMS_QUERY_UNREAD_ARCHIVE_MSG_SIM2,     /* Number of unread Msg in Archive for SIM2 */
  SRV_MMS_QUERY_UNREAD_ARCHIVE_MSG_SIM3,
  SRV_MMS_QUERY_UNREAD_ARCHIVE_MSG_SIM4,
  SRV_MMS_QUERY_TOTAL_UNREAD_ARCHIVE_MSG,    /* Number of unread Msg in Archive */
  SRV_MMS_QUERY_TOTAL_ARCHIVE_SIM1,          /* Number of Msg in Archive for SIM1 */
  SRV_MMS_QUERY_TOTAL_ARCHIVE_SIM2,          /* Number of Msg in Archive for SIM2 */
  SRV_MMS_QUERY_TOTAL_ARCHIVE_SIM3,
  SRV_MMS_QUERY_TOTAL_ARCHIVE_SIM4,
  SRV_MMS_QUERY_TOTAL_ARCHIVE_SENT,          /* Number of Msg in Archive from Sent Folder */
  SRV_MMS_QUERY_TOTAL_ARCHIVE_INBOX,         /* Number of Msg in Archive from Inbox Folder */
  SRV_MMS_QUERY_TOTAL_ARCHIVE_UNCLASSIFIED,  /* Number of Uncalssified Msg in Archive */
  SRV_MMS_QUERY_TOTAL_ARCHIVE_MSG,           /* Number of Msg in Archive  */
  SRV_MMS_QUERY_TOTAL_USER_DEF_TEMPLATE_MSG, /* Number of Msg in user defined template  */
  SRV_MMS_QUERY_TOTAL_PRE_DEF_TEMPLATE_MSG,  /* Number of Msg in Pr defined template  */
  SRV_MMS_QUERY_TOTAL_UNREAD_MSG,            /* Number of Unread Msg in All folders*/
  SRV_MMS_QUERY_UNREAD_TOTAL_MSG_SIM1,       /*Number of SIM1 Unread Msg in All folders*/
  SRV_MMS_QUERY_UNREAD_TOTAL_MSG_SIM2,       /*Number of SIM2 Unread Msg in All folders*/
  SRV_MMS_QUERY_UNREAD_TOTAL_MSG_SIM3,
  SRV_MMS_QUERY_UNREAD_TOTAL_MSG_SIM4,
  SRV_MMS_QUERY_TOTAL_PHONE_MSG,             /*Number of total message(s) in phone memory*/
  SRV_MMS_QUERY_TOTAL_CARD_MSG,              /*Number of total message(s) in card memory*/
  SRV_MMS_QUERY_TOTAL_RECENT_EVT_MSG,        /*Number of recent  message(s)*/
  SRV_MMS_QUERY_TOTAL
}srv_mms_query_option_enum;


/*This enum is used to specify status, type, priority of a Msg*/
typedef enum
{
    SRV_MMS_MSG_STATUS_NONE,
	SRV_MMS_MSG_STATUS_NORMAL_PRIORITY,
    SRV_MMS_MSG_STATUS_HIGH_PRIORITY,
	SRV_MMS_MSG_STATUS_LOW_PRIORITY,
	SRV_MMS_MSG_STATUS_JAVA,
	SRV_MMS_MSG_STATUS_DELIVERY_REPORT,
    SRV_MMS_MSG_STATUS_READ_REPORT,
	SRV_MMS_MSG_STATUS_NOTIFICATION,
	SRV_MMS_MSG_STATUS_NOTIFICATION_DOWNLOADING,
	SRV_MMS_MSG_STATUS_SENDING,
	SRV_MMS_MSG_STATUS_WAITING,
	SRV_MMS_MSG_STATUS_PENDING,
	SRV_MMS_MSG_STATUS_SENDING_FAILED,
	SRV_MMS_MSG_STATUS_SENT,
    SRV_MMS_MSG_STATUS_DOWNLOADING,
	SRV_MMS_MSG_STATUS_WAITING_DOWNLOAD,
	SRV_MMS_MSG_STATUS_PENDING_DOWNLOAD,
	SRV_MMS_MSG_STATUS_DOWNLOADING_FAILED,
	SRV_MMS_MSG_STATUS_DOWNLOADED
}srv_mms_msg_status_enum;


/*This enum is used to specify create Msg type*/
typedef enum
{
	SRV_MMS_CREATE_MMS,       /*Create an MMS*/
    SRV_MMS_CREATE_SAVE_MMS,  /*Create an MMS and save it to drafts*/
	SRV_MMS_CREATE_SEND_MMS,   /*Create an MMS and send it*/
    SRV_MMS_CREATE_SAVE_TEMPLATE_MMS   /*Create an MMS and save it in User-Defined template*/
}srv_mms_create_op_type_enum;


/*This enum is used to instruct the action for a status icon*/
typedef enum
{
	SRV_MMS_ICON_STATE_ACTION_HIDE,       /*Hide icon*/
    SRV_MMS_ICON_STATE_ACTION_BLINK,      /*Blink icon*/
	SRV_MMS_ICON_STATE_ACTION_TOTAL       /*Action total*/
}srv_mms_icon_state_action_enum;

/*This enum is used to instruct the action for a status icon*/
typedef enum
{
	SRV_MMS_STORAGE_NONE,       /*Storage None*/
    SRV_MMS_STORAGE_PHONE,      /*Storage Phone*/
	SRV_MMS_STORAGE_CARD1,      /*Storage Memory Card1*/
	SRV_MMS_STORAGE_TOTAL       /*Storage total*/
}srv_mms_msg_storage_enum;



/*This enum is used to specify the memory status */
typedef enum
{
	SRV_MMS_MEM_STATUS_NONE,                        /* None */
    SRV_MMS_MEM_STATUS_PHONE_COUNT_MAX_REACH,       /* Phone memory maximum MMS count limit reached */
	SRV_MMS_MEM_STATUS_CARD_COUNT_MAX_REACH,        /* Memory Card maximum MMS count limit reached */
    SRV_MMS_MEM_STATUS_PHONE_COUNT_NOT_MAX,         /* Phone memory MMS count not maximum */
	SRV_MMS_MEM_STATUS_CARD_COUNT_NOT_MAX,          /* Memory Card MMS count not maximum */
	SRV_MMS_MEM_STATUS_PHONE_COUNT_ALREADY_MAX,     /* Phone memory MMS count already maximum */
	SRV_MMS_MEM_STATUS_CARD_COUNT_ALREADY_MAX,      /* Memory Card MMS count already maximum */
	SRV_MMS_MEM_STATUS_TOTAL                        /* Total*/
}srv_mms_mem_status_enum;



/* DOM-NOT_FOR_SDK-BEGIN */

typedef enum
{
    UMMS_QUERY_OPTION_NUM_UNREAD_INBOX_MSG_SIM1 = 1,    /*  Number of unread Msg in Inbox for SIM1 */
    UMMS_QUERY_OPTION_NUM_UNREAD_INBOX_MSG_SIM2,        /*  Number of unread Msg in Inbox for SIM2 */
    UMMS_QUERY_OPTION_NUM_UNREAD_INBOX_MSG_SIM3,
    UMMS_QUERY_OPTION_NUM_UNREAD_INBOX_MSG_SIM4,
    UMMS_QUERY_OPTION_NUM_TOTAL_INBOX_MSG,              /*  total Number of Msg in  Inbox */
    UMMS_QUERY_OPTION_NUM_TOTAL_OUTBOX_MSG,             /*  total Number of Msg in Outbox */
    UMMS_QUERY_OPTION_NUM_TOTAL_SENT_MSG,               /*  total Number of Msg in Sent  */
    UMMS_QUERY_OPTION_NUM_TOTAL_DRAFT_MSG,              /*  total Number of Msg in Drafts */
    UMMS_QUERY_OPTION_NUM_TOTAL_ARCHIVE_MSG,            /*  Number of Msg in Archive  */
    UMMS_QUERY_OPTION_NUM_TOTAL_USER_DEF_TEMPLATE_MSG,  /*  Number of Msg in user defined template  */
    UMMS_QUERY_OPTION_NUM_TOTAL_PRE_DEF_TEMPLATE_MSG,   /*  Number of Msg in Pr defined template  */
    UMMS_QUERY_OPTION_NUM_TOTAL_UNREAD_MSG,             /*  Number of Unread Msg in All folders */
	UMMS_QUERY_OPTION_NUM_TOTAL_PHONE,
    UMMS_QUERY_OPTION_NUM_TOTAL_CARD
} srv_mms_num_enum;


typedef enum
{
    UMMS_STATUS_OFF = 0,
    UMMS_STATUS_NEW_MESSAGE,
    UMMS_STATUS_FULL,
    UMMS_STATUS_MAX
} srv_mms_status_icon_type_enum;

typedef enum
{	
	E_PREFER_STORAGE_MODE_PHONE,
	E_PREFER_STORAGE_MODE_CARD,
    E_PREFER_STORAGE_MODE_NO_CARD,
	E_PREFER_STORAGE_MODE_TOTAL
} srv_mms_prefer_storage_enum;

typedef enum
{
	E_MSG_FILTER_PHONE = 0x01,
	E_MSG_FILTER_CARD = 0x02,
	E_MSG_FILTER_TOTAL = 0xFF
} srv_mms_msg_filter_enum;


typedef enum
{
    SRV_MMS_GET_USE_DETAILS_NUMBER,
    SRV_MMS_GET_USE_DETAILS_EMAIL,
    SRV_MMS_GET_USE_DETAILS_URL,
    SRV_MMS_GET_USE_DETAILS_SENDER,
	SRV_MMS_GET_USE_DETAILS_RECIPIENT,
    SRV_MMS_GET_USE_DETAIL_MAX_TYPES
} srv_mms_get_use_details_enum;

typedef enum
{
    SRV_MMS_GET_USE_DETAILS_RESULT_SUCCESS = 1,
    SRV_MMS_GET_USE_DETAILS_RESULT_OUT_OF_MEM,
    SRV_MMS_GET_USE_DETAILS_RESULT_FAILED,
    SRV_MMS_GET_USE_DETAILS_RESULT_MAX
} srv_mms_get_use_details_result_enum;

typedef enum
{
    MMS_BGSR_REQ_TYPE_SEND=1,
    MMS_BGSR_REQ_TYPE_CANCEL_SEND,
    MMS_BGSR_REQ_TYPE_SEND_RR,
    MMS_BGSR_REQ_TYPE_DOWNLOADING,
    MMS_BGSR_REQ_TYPE_CANCEL_DOWNLOADING
}mms_bgsr_req_type_enum;


typedef enum
{
    E_IMAGE_RESIZE_OFF,
#ifndef __MMI_UC_AUTO_RESIZE_IMG_BASED_ON_LEFT_MMS_SIZE__
#if defined(__MMI_MMS_MAX_IMAGE_RESIZING_RESOLUTION__) && (__MMI_MMS_MAX_IMAGE_RESIZING_RESOLUTION__ == __160x120__)
    E_IMAGE_RESIZE_160x120,
#elif defined(__MMI_MMS_MAX_IMAGE_RESIZING_RESOLUTION__) && (__MMI_MMS_MAX_IMAGE_RESIZING_RESOLUTION__ == __320x240__)
    E_IMAGE_RESIZE_160x120,
    E_IMAGE_RESIZE_320x240,
#elif defined(__MMI_MMS_MAX_IMAGE_RESIZING_RESOLUTION__) && (__MMI_MMS_MAX_IMAGE_RESIZING_RESOLUTION__ == __640x480__)
    E_IMAGE_RESIZE_160x120,
    E_IMAGE_RESIZE_320x240,
    E_IMAGE_RESIZE_640x480,
#endif 
#else /* __MMI_UC_AUTO_RESIZE_IMG_BASED_ON_LEFT_MMS_SIZE__ */ 
    E_IMAGE_RESIZE_AUTO,
#endif /* __MMI_UC_AUTO_RESIZE_IMG_BASED_ON_LEFT_MMS_SIZE__ */ 
    IMAGE_RESIZE_TOTAL
} srv_umms_image_size_enum;


typedef enum
{
	E_PICTURE_RESIZE_10KB,
	E_PICTURE_RESIZE_50KB,
	E_PICTURE_RESIZE_100KB,
	E_PICTURE_RESIZE_OFF,
	E_PICTURE_RESIZE_TOTAL
}srv_umms_picture_size_enum;

typedef enum
{
    E_VALIDITY_PERIOD_MAX,
    E_VALIDITY_PERIOD_1HR,
    E_VALIDITY_PERIOD_6HRS,
    E_VALIDITY_PERIOD_12HRS,
    E_VALIDITY_PERIOD_1DAY,
    E_VALIDITY_PERIOD_1WEEK,
    VALIDITY_PERIOD_TOTAL
} srv_umms_validity_period_enum;


typedef enum
{
    E_SIM_SETTINGS_DELIVERY_REPORT = 0x06,
    E_SIM_SETTINGS_READ_REPLY = 0x10,
    E_SIM_SETTINGS_PRIORITY = 0x0F,
    E_SIM_SETTINGS_SENDER_VISIBILITY = 0x14,
    E_SIM_SETTINGS_DELIVERY_TIME = 0x07,
    E_SIM_SETTINGS_EXPIRY_TIME = 0x08
} umms_sim_user_preferences_settings_enum;

typedef enum
{
    E_IMMEDIATE,
    E_1_HR,
    E_12_HRS,
    E_24_HRS,
    E_2_HR, /*don't change sequence */
    SRV_DELIEVERY_TOTAL
} srv_mms_delievery_time_enum;



typedef enum
{
    E_ALLOW,
    E_REJECT,
    E_ALLOW_REJECT_NONE
} umms_allow_reject_enum;

typedef enum
{
    E_PRIORITY_LOW,
    E_PRIORITY_NORMAL,
    E_PRIORITY_HIGH,
    PRIORITY_TOTAL
} umms_priority_enum;





typedef enum
{
    E_READ_REPORT_SEND_ON_REQUEST,
    E_READ_REPORT_SEND_ALWAYS,
    E_READ_REPORT_SEND_NEVER,
    READ_REPORT_SEND_TOTAL
} umms_read_report_enum;
	




typedef enum
{
    E_FULL_MMS,
    E_TEXT_ONLY,
    REPLY_CHARGING_TYPE_TOTAL
} umms_reply_charging_type_enum;

typedef enum
{
    E_HOME_NOETWORK_RETRIEVAL_IMMEDAITE = 0x01, /* to match with raoming retrioeve modes */
    E_HOME_NOETWORK_RETRIEVAL_DEFFERED,
    E_HOME_NOETWORK_RETRIEVAL_RESTRICTED,
    HOME_NETWORK_TOTAL
} umms_home_network_retrieval_enum;

typedef enum
{
    E_ROAMING_RETRIEVAL_AS_HOME,
    E_ROAMING_RETRIEVAL_IMMEDAITE,
    E_ROAMING_RETRIEVAL_DEFFERED,
    E_ROAMING_RETRIEVAL_RESTRICTED,
    ROAMING_TOTAL
} umms_roaming_retrieval_enum;

typedef enum
{
    E_SENDING_SIZE_LIMIT_100,
    E_SENDING_SIZE_LIMIT_300,
    E_SENDING_SIZE_LIMIT_600,
    SENDING_SIZE_LIMIT_TOTAL
} umms_sending_size_limit_enum;

typedef enum
{
    E_CREAT_MODE_RESTRICTED,
    E_CREAT_MODE_FREE,
    E_CREAT_MODE_WARNING,
    CREATION_MODES_TOTAL
} srv_umms_creation_modes_enum;

typedef enum
{
    E_OFF,
    E_ON,
    E_ON_OFF_NONE
} umms_off_on_enum;



typedef enum
{
    E_MMS_LAYOUT_POTRAIT,
    E_MMS_LAYOUT_LANDSCAPE,
    LAYOUT_TOTAL
} umms_layout_enum;

#ifdef __MMI_MMS_BGSR_SUPPORT__

typedef enum
{
    SRV_MMS_BGSR_FOLDER_NONE,
    SRV_MMS_BGSR_FOLDER_INBOX,
    SRV_MMS_BGSR_FOLDER_OUTBOX,
    SRV_MMS_BGSR_FOLDER_ARCHIVE,
    SRV_MMS_BGSR_FOLDER_TOTAL
} srv_mms_bgsr_msg_box_enum;

typedef enum
{
    SRV_MMS_BGSR_RESULT_NOT_USED,                                   /*0*/
    SRV_MMS_BGSR_RESULT_OK,                                         /*1*/
    SRV_MMS_BGSR_RESULT_FAIL,                                       /*2*/
    SRV_MMS_BGSR_RESULT_FAIL_INCALL,                                /*3*/
    SRV_MMS_BGSR_RESULT_FAIL_NOT_READY,                             /*4*/
    SRV_MMS_BGSR_RESULT_FAIL_BUSY,                                  /*5*/
    SRV_MMS_BGSR_RESULT_FAIL_INSUFFICIENT_MEMORY,                   /*6*/
    SRV_MMS_BGSR_RESULT_FAIL_INSUFFICIENT_STORAGE,                  /*7*/
    SRV_MMS_BGSR_RESULT_FAIL_FILE_NOT_FOUND,                        /*8*/
    SRV_MMS_BGSR_RESULT_FAIL_FILE_CORRUPTED,                        /*9*/
    SRV_MMS_BGSR_RESULT_FAIL_FILE_IN_USE,                           /*10*/
    SRV_MMS_BGSR_RESULT_FAIL_FILE_IO,                               /*11*/
    SRV_MMS_BGSR_RESULT_FAIL_UNSUPPORT_CONTENT,                     /*12*/
    SRV_MMS_BGSR_RESULT_FAIL_COMM_UNSUPPORT_CONTENT,                /*13*/
    SRV_MMS_BGSR_RESULT_FAIL_COMM_CONFIG_ERROR,                     /*14*/
    SRV_MMS_BGSR_RESULT_FAIL_COMM_CONNECT_ERROR,                    /*15*/
    SRV_MMS_BGSR_RESULT_FAIL_COMM_SERVER_ERROR,                     /*16*/
    SRV_MMS_BGSR_RESULT_FAIL_COMM_SERVER_TIMEOUT,                   /*17*/
    SRV_MMS_BGSR_RESULT_FAIL_COMM_SERVICE_DENIED,                   /*18*/
    SRV_MMS_BGSR_RESULT_FAIL_COMM_UNAUTHORIZED,                     /*19*/
    SRV_MMS_BGSR_RESULT_FAIL_USER_CANCEL,                           /*20*/
    SRV_MMS_BGSR_RESULT_FAIL_INVALID_MSGID,                         /*21*/
    SRV_MMS_BGSR_RESULT_FAIL_MSGID_IS_USING,                        /*22*/
    SRV_MMS_BGSR_RESULT_FAIL_FILE_ACCESS_IN_USB_MODE,               /*23*/
    SRV_MMS_BGSR_RESULT_FAIL_RR_MSG_NOT_FOUND,                      /*24*/
    SRV_MMS_BGSR_RESULT_FAIL_MAX_MSG_SIZE_REACHED,                  /*25*/
    SRV_MMS_BGSR_RESULT_CANCELLED,                                  /*26*/
    SRV_MMS_BGSR_RESULT_FAIL_RESEND,                                /*27*/
    SRV_MMS_BGSR_RESULT_READ_REPORT_FAIL,                           /*28*/
    SRV_MMS_BGSR_RESULT_QUEUE_FULL,                                 /*29*/
    SRV_MMS_BGSR_RESULT_FAIL_TOTAL                                  /*30*/
}srv_mms_bgsr_result_enum;

typedef enum
{
    SRV_MMS_BGSR_SETTING_SEND_ONLY,
    SRV_MMS_BGSR_SETTING_SAVE_AND_SEND,
    SRV_MMS_BGSR_SETTING_TOTAL
} srv_mms_bgsr_send_setting_enum;

typedef enum
{
    SRV_MMS_BGSR_OP_NOT_USED,
    SRV_MMS_BGSR_OP_DELETE,
    SRV_MMS_BGSR_OP_MOVE_TO_FOLDER,
    SRV_MMS_BGSR_OP_FORMAT,
    SRV_MMS_BGSR_OP_DELETE_ALL_INBOX,
    SRV_MMS_BGSR_OP_DELETE_ALL_OUTBOX,    
    SRV_MMS_BGSR_OP_DELETE_ALL_ARCHIVE,
    SRV_MMS_BGSR_OP_CANCEL_ALL_INBOX,
    SRV_MMS_BGSR_OP_CANCEL_ALL_OUTBOX,
#ifdef __UNIFIED_MESSAGE_MARK_SEVERAL_SUPPORT__
    SRV_MMS_BGSR_OP_MULTI_MOVE,
    SRV_MMS_BGSR_OP_MULTI_DELETE,
#endif
    SRV_MMS_BGSR_OP_DELETE_ALL_INBOX_OUTBOX, /* it is used for "Delete all folder" scenario in MEA*/
    SRV_MMS_BGSR_OP_TOTAL    
} srv_mms_bgsr_msg_operation_notify_enum;

typedef enum
{
    SRV_MMS_BGSR_STATUS_NONE,
    SRV_MMS_BGSR_STATUS_WAITING_FOR_SEND,
    SRV_MMS_BGSR_STATUS_WAITING_FOR_DOWNLOAD,        
    SRV_MMS_BGSR_STATUS_SENDING,
    SRV_MMS_BGSR_STATUS_SEND_FAIL,
    SRV_MMS_BGSR_STATUS_DOWNLOADING,        
    SRV_MMS_BGSR_STATUS_DOWNLOAD_FAIL,
    SRV_MMS_BGSR_STATUS_DEFERRED_FOR_SEND,
    SRV_MMS_BGSR_STATUS_DEFERRED_FOR_DOWNLOAD,
    SRV_MMS_BGSR_STATUS_POSTPONE_FOR_SEND,	
    SRV_MMS_BGSR_STATUS_POSTPONE_FOR_DOWNLOAD,
    SRV_MMS_BGSR_STATUS_SAVING,
    SRV_MMS_BGSR_STATUS_DELETING,
    SRV_MMS_BGSR_STATUS_SEND_SIM_UNAVAILABLE,
    SRV_MMS_BGSR_STATUS_DOWNLOAD_SIM_UNAVAILABLE,

    SRV_MMS_BGSR_STATUS_SEND_FAILED_INVALID_DATA_ACCOUNT,
    SRV_MMS_BGSR_STATUS_DOWNLOAD_FAILED_INVALID_DATA_ACCOUNT,

#ifdef __MMI_MMS_MEMORY_CARD_STORAGE_SUPPORT__
    SRV_MMS_BGSR_STATUS_DOWNLOAD_MEM_CARD_UNAVAILABLE,
#endif  /*__MMI_MMS_MEMORY_CARD_STORAGE_SUPPORT__*/
    SRV_MMS_BGSR_STATUS_TOTAL
} srv_mms_bgsr_msg_status_enum;

typedef enum
{
    SRV_MMS_BGSR_UPDATE_NTT         = 0x01,
    SRV_MMS_BGSR_UPDATE_STATUS      = 0x02,
    SRV_MMS_BGSR_UPDATE_QUOTA       = 0x04,
    SRV_MMS_BGSR_UPDATE_TOTAL	    = 0x03
} srv_mms_bgsr_update_info_enum;

typedef enum
{
    SRV_MMS_BGSR_RSP_DISPLAY         = 0x01,
    SRV_MMS_BGSR_RSP_SAVE            = 0x02,
    SRV_MMS_BGSR_RSP_TOTAL	    = 0x02
} srv_mms_bgsr_response_info_enum;

#endif

#ifdef __MMI_MMS_MEMORY_CARD_STORAGE_SUPPORT__
typedef enum
{
    SRV_MMS_CARD_MEMORY_OK,/*Current Storage is OK, keep downloading*/
	SRV_MMS_CARD_NOT_PRESENT_USE_PHONE,/*Card is removed, phone is present*/
    SRV_MMS_CARD_PHONE_FULL_USE_CARD_MEM,/*Phone is Full, card can be used*/
    SRV_MMS_CARD_FULL_USE_PHONE_MEM,/*Card is present but Full, phone can be used*/
	SRV_MMS_CARD_NOT_ENOUGH_MEMORY,/*Both card and phone memory is full*/
}srv_mms_card_usage_enum;
#endif /*__MMI_MMS_MEMORY_CARD_STORAGE_SUPPORT__*/

/* DOM-NOT_FOR_SDK-END */

/*****************************************************************************
 * DESCRIPTION
 *  Callback function to get memory from caller
 * PARAMETERS
 *  size:       [IN]   process result
 * RETURNS
 *  void *
 * RETURN VALUES
 *  
 *****************************************************************************/
typedef void * (*srv_mms_func_mem_alloc)(U32 size);
/*****************************************************************************
 * DESCRIPTION
 *  Callback function to get memory from caller
 * PARAMETERS
 *  size:			 [IN]   process result
 *  user_data:       [IN]   user needed data
 * RETURNS
 *  void *
 * RETURN VALUES
 *  
 *****************************************************************************/
typedef void * (*srv_mms_func_mem_alloc_user_data)(U32 size, void *user_data);
/*****************************************************************************
 * DESCRIPTION
 *  Callback function to free memory of caller
 * PARAMETERS
 *  memory:    [IN]   memory pointer to be disassociated, 
 * RETURNS
 *  void 
 * RETURN VALUES
 *  
 *****************************************************************************/
typedef void (*srv_mms_func_mem_free)(void *mem);

/*****************************************************************************
 * <GROUP  CallBackFunctions>
 * FUNCTION
 *  srv_mms_func_mem_free_user_data
 * DESCRIPTION
 *  Callback function to free memory of caller
 * PARAMETERS
 *  memory:    [IN]   memory pointer to be disassociated, 
 *  user_data : [IN]  For those who needs user data while freeing memory
 * RETURNS
 *  void 
 * RETURN VALUES
 *  
 *****************************************************************************/

typedef void (*srv_mms_func_mem_free_user_data)(void *mem, void *user_data);
/*****************************************************************************
 * DESCRIPTION
 *  Callback function to return the result to caller Application
 * PARAMETERS
 *  result:       [IN]   process result
 *  rsp_data:     [IN]   The result
 *  user_data:    [IN]   A paramter used by caller Application, the value shall be identical as the request
 * RETURNS
 *  void
 * RETURN VALUES
 *  
 *****************************************************************************/
typedef void (*srv_mms_funcptr_type)(srv_mms_result_enum result, void *rsp_data, void *user_data);



/*This structure is used to specify the type of message count request by filling the array req_tb with the enum srv_mms_query_option_enum*/
typedef struct
{
    U8 count;                                  /*Total number of requests made using req_tb array*/
    U32 req_tb[SRV_MMS_MAX_MSG_NUM_QUERY_NUM]; /* srv_mms_query_option_enum( The request option array. Applicatio can put several query options from srv_query_option_enum in this array)  */
    U32 rsp_tb[SRV_MMS_MAX_MSG_NUM_QUERY_NUM]; /*Application gets response in this array with message numbers  filled at corresponding indices to req_tb*/
}srv_mms_get_msg_count_struct;

/*This structure is used to specify data send with event EVT_ID_SRV_MMS_READY*/
typedef struct
 {
    MMI_EVT_PARAM_HEADER/*Header*/
    MMI_BOOL mms_ready;/*True if MMS service is ready, else False*/
} srv_mms_event_struct; 

/*This structure is generic structure used to specify data that can be send with any event */
typedef struct
{
    MMI_EVT_PARAM_HEADER/*Header*/
	void *sender_data; 

}srv_mms_base_event_struct;


/*This structure is used to specify data send with event EVT_ID_SRV_MMS_MEM_FULL */
typedef struct
{
    MMI_EVT_PARAM_HEADER/*Header*/
	U8 mms_mem_status;  /*srv_mms_mem_status_enum */

}srv_mms_mem_status_event_struct;

/* This structure defines the request parameters for API srv_mms_mma_get_msg_info*/
typedef struct
{
    U32  msg_id;                   /* Message id  msg id for which msg info is required */
    void *user_data;                 /* Service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;/* srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    U8   app_id;                   /* Application ID. User can ignore this field*/
}srv_mms_mma_get_msg_info_req_struct;


/* This structure defines single MMS information, the response data in callback to API srv_mms_mma_get_msg_info*/
typedef struct
{
    U32  msg_id;                             /* Message id */
    U32  msg_size;                           /* The size of message. Counted by byte */
    U32  user_elements_size;                 /* The size of MMS bodies and subject*/
    U32  date;                               /* The date field is in mms header of mms message. It should be given in seconds since 1.Jan. 1970 GMT. */
    U32  expiry_date;                        /* Expiration date. The format is in relative seconds value. */
    U32  received_date;                      /* Received date. This value is only valid for the received MMS message. */
    U16   from_address[MMA_MAX_ADDR_LEN];     /* SRV_MMS_MAX_ADDR_LEN From address of the MMS. Encoded by USC2 */
    U16 subject[MMA_MAX_SUBJECT_LEN];         /* SRV_MMS_MAX_SUBJECT_LEN Subject of the MMS. Encoded by USC2 */
    MMI_BOOL  need_read_report;               /* Specify if the MMS message require to send read report to sender. */
    MMI_BOOL  isRead;                         /* Specify if the MMS message is already read. */
    MMI_BOOL  isForwardLock;                  /* When MMS contain any DRM forward-lock or combine-delivery object, the value is KAL_TRUE. Because separate-delivery DRM object can be forwarded. */
    MMI_BOOL  isDRM;                                /* When MMS contain any DRM object, the value is KAL_TRUE */
    MMI_BOOL  isFollowPhoneMMSContentClass;         /* Specify if the MMS follow handset content class */   
    MMI_BOOL    hasAttachment;                      /* Specify if the MMS message contain any attachment. */
    U8   app_id;                             /* MMA_APP enum, application id*. User may ignore this field*/
    U8   result;                             /* mma_result_enum, result by MMA ,MMA_RESULT_OK=0 */
    U8   msg_media_type;                     /* mma_media_msg_enum, media type , for no media=0,text=1,audio=2,photo=3,video=4 */
    U8   from_address_type;                  /* mma_addr_type_enum, from address type,unknown=0,phone=1,email=2,IPV4=3 */
    U8 msg_type;                             /* mma_msg_type_enum, message type Notification=0,DR=1,RR=2,MMS=3,JAVA=4,Template=5,postcard=6 */
	  U8 storage_type;                         /*mma_msg_storage_type_enum, storage type,phone=1,card=2*/
    U8 msg_class;                            /* mma_msg_class_enum, message class pesonal=0,advetisement=1,Informational=2 */
    U8 priority;                             /* mma_priority_enum, message priority low=1,medium=2,high=3,not set=0 */
    U8   sim_id;                             /* mma_sim_id_enum, sim ID SIM1=1 SIM2=2 SIM3=4 ,SIM4=8 */
    U8   app_data[MMA_MAX_APP_DATA_LENGTH];  /*SRV_MMS_MAX_APP_DATA_LENGTH Application data saved at MMS adaptor(MMA)end*/
    U8   java_app_id[100];                   /* Java application id. It is for JSR205 (Java MMS). Encoded by ASCII */
    U8   java_reply_app_id[100];             /* Java reply-application id. It is for JSR205 (Java MMS). Encoded by ASCII */    
}srv_mms_mma_get_msg_info_rsp_struct;

/* This structure defines the details of an address*/
typedef struct
{
    kal_uint16 addr_len;                     /*Length of  address*/
    kal_uint8 addr_group; 	                 /* srv_mms_address_group_type_enum, address group*/	
    kal_uint8 addr_type;                   /* srv_mms_address_type_enum, address type*/
    kal_wchar address[MMA_MAX_ADDR_LEN];   /* SRV_MMS_MAX_ADDR_LEN Address  Encoded by USC2*/
}srv_mms_msg_addr_info_struct;

/* This structure defines single MMS information returned in blocking call to API srv_mms_mma_get_sync_msg_info*/
typedef struct
{
    kal_uint32 user_elements_size;        /* The size of MMS bodies and subject*/
    kal_uint32 msg_size;                  /* The size of message. Counted by byte */
    kal_uint32 msg_download_size;         /* For notification, message size that will be dowloaded corresponding to the notification */
    kal_uint32 date;                               /* The date field is in mms header of mms message. It should be given in seconds since 1.Jan. 1970 GMT. */
    kal_uint32 expiry_date;                        /* Expiration date. The format is relative second value. */
    kal_uint32 received_date;                      /* Received date. This value is only valid for the received MMS message. */
    kal_bool  need_read_report;                     /* Specify if the MMS message require to send read report to sender. */
#ifdef __MMI_MMS_REPORT_STATUS_MENU_SUPPORT__   
    MMI_BOOL  need_delivery_report;                /*Specify if Message sent have requested delivery report or not.Only valid for Sent MMS*/
#endif  
    kal_bool  isRead;                               /* Specify if the MMS message is already read. */
    kal_bool  isForwardlock;/* When MMS contain any DRM forward-lock or combine-delivery object, the value is KAL_TRUE. Because separate-delivery DRM object can be forwarded. */
    kal_bool  is_follow_phone_mms_content_class;/* Specify if the MMS follow handset content class */ 
    kal_uint8 result;/* mma_result_enum, result by MMA */
    kal_uint8 storage_type;                       /*mma_msg_storage_type_enum, storage type phone=1,card=2*/
    kal_uint8 msg_media_type;                     /* mma_media_msg_enum, media type for no media=0,text=1,audio=2,photo=3,video=4*/
    kal_uint8 from_address_type;                 /* mma_addr_type_enum, from address type */
    kal_uint8 msg_type;                          /* mma_msg_type_enum, message type Notification=0,DR=1,RR=2,MMS=3,JAVA=4,Template=5,postcard=6 */
    kal_uint8 msg_class;                            /* mma_msg_class_enum, message class */
    kal_uint8 priority;                             /* mma_priority_enum, message priority */
    kal_uint8 sim_id;                               /* mma_sim_id_enum, sim ID Simid1=1,simid2=2,simid3=4,simid4=8*/	
    kal_uint8 msg_report_status;                /* RR, DR report status */
    kal_uint8 to_addr_count;                    /*Number of addresses in To field*/
    kal_uint8 cc_addr_count;                 /*Number of addresses in Cc field*/  
    kal_uint8 bcc_addr_count;/*Number of addresses in Bcc field*/
    kal_uint8 ph_num;                    /*Number of addresses  of type phone number in To, Cc, Bcc, From fields*/
    kal_uint8 email_num;                 /*Number of addresses  of type email in To, Cc, Bcc, From fields*/
    kal_uint8 app_data[MMA_MAX_APP_DATA_LENGTH];  /* Application data saved at MMS adaptor(MMA)end*/
    kal_uint8 java_app_id[100];                   /* Java application id. It is for JSR205 (Java MMS). Encoded by ASCII */
    kal_wchar from_address[MMA_MAX_ADDR_LEN];  /* From address of the MMS. Encoded by USC2 */
    kal_wchar subject[MMA_MAX_SUBJECT_LEN];         /* Subject of the MMS. Encoded by USC2 */
    kal_wchar reported_subject[MMA_MAX_SUBJECT_LEN];/* Valid only in case of Deliver report and Read report message.Subject of the corresponding MMS. Encoded by USC2 */
    srv_mms_msg_addr_info_struct address[MMA_MAX_SUPPORT_ADDR_COUNT];/*Addresses in To, Cc, Bcc fields*/
}srv_mms_mma_get_msg_info_struct;


/*This structure defines data to request MMS content from MMS Adapter(MMA) */
typedef struct
{
    U32  msg_id;                   /* Message id */
    void * user_data;                 /* Service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;/*  srv_mms_funcptr_type, Callback API which service will use to response back to caller Application*/
    U32   app_id;                   /* Application id. */
				    /*if user is working on a project where __COSMOS_MMI_PACKAGE__  and __MMI_MMS_USE_ASM__ are defined */
				    /*user must, add SRV_MMS_MMA_ASM_MEM_POOL_SIZE in app's memory tag */
				    /*user must pass group id of app as app_id, if app_id is found to be 0 or invalid, ASSERT will happen*/
				    /*user must handle hold deinit app, if service has not responded yet, because freeing memory will cause serious issues */
				    /*if user is working on a non cosmos slim project, this field can be ignored*/
    U8   mode;                     /* mma_app_mode_enum, Content request mode edit=0 send=1 reply=2 replyall=3 forwward=4 upload=5 header=6 view=7 raw=8 abort=10 postcard=11 mixed=12 template=13 */
    U8   creation_mode;            /* mma_creation_mode_enum, Creation mode to filter content.Free=0,restricted=1,Warning=2*/
}srv_mms_get_content_req_struct;



/*This structure defines response data for MMS content from MMS Adapter(MMA) */
typedef struct
{
    U32  msg_id;                                         /* Message id */
    U32  req_id;                                         /* request id for get content rsp*/
    U32  mms_header_size;                                /* Size of MMS headers */
    U32  mms_body_size;                                  /* Size of MMS bodies */
   // U32  xml_size;                                       /* Size of the XML file */
    //U16   xml_filepath[MMA_MAX_INTERNAL_FILENAME_LENGTH]; /* Specify file path of XML file */
    MMI_BOOL    isFollowPhoneMMSContentClass;             /* Specify if the MMS follow handset content class */
    U8   app_id;                                         /* MMA_APP enum, application id in requst message*/
    U8   result;                                         /* mma_result_enum, result  OK=0 */
    U8   content_truncate_info;                          /* Unused */
	void *content_info;
}srv_mms_get_content_rsp_struct;


/*This structure defines data to request MMS count information from MMS Adapter(MMA) in non blocking call */
typedef struct
{
    void * user_data;                          /* service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;         /* srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    U32  req_tb[MMA_MAX_MSG_NUM_QUERY_NUM]; /* SRV_MMS_MAX_MSG_NUM_QUERY_NUM The request option array. Applicatio can put several query options from srv_mms_query_option_enum in this array.  */
    U8   app_id;                            /* MMA_APP enum, application id. User may ignore this field*/
}srv_mms_get_msg_num_req_struct;


/*This structure defines response data for MMS count information from MMS Adapter(MMA) in non blocking call*/
typedef struct
{
    kal_uint8   app_id;                             /* MMA_APP enum, application id*/
    kal_uint8   result;                             /* mma_result_enum */
    kal_uint32 rsp_tb[MMA_MAX_MSG_NUM_QUERY_NUM]; /* SRV_MMS_MAX_MSG_NUM_QUERY_NUM Anwser to req_tb[] options. MMS number in same order as in requesting array req_tb[]*/
}srv_mms_get_msg_num_rsp_struct;



/*This structure defines data to request save Message to a specified folder from MMS Adapter(MMA)*/
typedef struct
{
    void *user_data;                       /* service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;      /* srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    U32  no_of_msg;                      /* Num of messages in msg_id array */
    U32  msg_id[MMA_MAX_MSG_ARRAY_NUM];  /* SRV_MMS_MAX_MSG_ARRAY_NUM  The to-be-moved msg id list request */
    U16  box;                            /* mma_folder_enum  inbox=1,outbox=2,sentbox=4,draft=8*/
    U8   app_id;                         /* MMA_APP enum, application id. User may ignore this field*/
}srv_mms_save_req_struct;

/*This structure defines response data for save Message from MMS Adapter(MMA)*/
typedef struct
{
    U32  no_of_msg;                      /* Num of messages in msg_id array */
    U32  msg_id[MMA_MAX_MSG_ARRAY_NUM];  /* SRV_MMS_MAX_MSG_ARRAY_NUM, The to-be-moved msg id list request*/
    U32  result[MMA_MAX_MSG_ARRAY_NUM];  /* SRV_MMS_MAX_MSG_ARRAY_NUM, The result of deletion of the to-be-moved msg id list request*/
    U8   app_id;                         /* MMA_APP enum, application id. User may ignore this field*/
}srv_mms_save_rsp_struct;

/*This structure defines data to request delete Message from MMS Adapter(MMA) in non blocking call*/
typedef struct
{
    void *user_data;   /* service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;      /*  srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    U32  no_of_msg;                     /* Num of messages in msg_id array */
    U32  msg_id[MMA_MAX_MSG_ARRAY_NUM]; /* SRV_MMS_MAX_MSG_ARRAY_NUM, The to-be-deleted msg id list */
    U16  box;                           /* mma_folder_enum, Message box the message was saved in,INBOX=1,OUTBOX=2,SENTBOX=4 DRAFT=8*/
    U8   app_id;                        /* MMA_APP enum, application id. User may ignore this field*/
}srv_mms_delete_req_struct;

/*This structure defines response data for delete Message from MMS Adapter(MMA)*/
typedef struct
{
    U8   app_id;                         /* MMA_APP enum, application id.User may ignore this field*/
    U32  no_of_msg;                      /* Num of messages in msg_id array */
    U32  msg_id[MMA_MAX_MSG_ARRAY_NUM];  /* SRV_MMS_MAX_MSG_ARRAY_NUM, The to-be-deleted msg id list request*/
    U32  result[MMA_MAX_MSG_ARRAY_NUM];  /* SRV_MMS_MAX_MSG_ARRAY_NUM, The result of deletion of the to-be-deleted msg id list request*/
}srv_mms_delete_rsp_struct;



/*This structure defines data to request create MMS from MMS Adapter(MMA) in non blocking call*/
typedef struct
{
    void *user_data;                                        /* Service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;                       /* srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    U32  msg_id;                                          /* Message id */
    U32  xml_size;                                        /* Size of the XML file */
    U16  msg_file_path[MMA_MAX_INTERNAL_FILENAME_LENGTH]; /* SRV_MMS_MAX_INTERNAL_FILENAME_LENGTH, File path of MMS message. f the MMS message is stored in file, application can insert the MMS to MMA system. If msg_file_path is not NULL, MMA will directly insert this MMS file to MMA system. The message will be inserted to DRAFT folder first. Application can change the folder by SAVE_REQ primitive*/
    U16  xml_filepath[MMA_MAX_INTERNAL_FILENAME_LENGTH]; /* SRV_MMS_MAX_INTERNAL_FILENAME_LENGTH, Specify file path of XML file */
    U8   app_id;                                          /* MMA_APP enum, application id. User may ignore this field*/
    U8   mode;                                            /* mma_app_mode_enum, create mode edit=0 send=1 reply=2 replyall=3 forwward=4 upload=5 header=6 view=7 raw=8 abort=10 postcard=11 mixed=12 template=13 */
    U8   sim_id;                                          /* mma_sim_id_enum, sim id Simid1=1,simid2=2,simid3=4,simid4=8*/
	U8   op_type;                                         /*srv_mms_create_op_type_enum, Create mms=0 ,create and save in draft=1,Create and send=2, create and save in userdef template=3*/ 
	mma_mms_description_struct *content_info;
}srv_mms_create_req_struct;

/*This structure defines response data for create MMS from MMS Adapter(MMA)*/
typedef struct
{
    U32  msg_id;                                    /* Message id */
    U32  min_fs_space_required;                     /* When the value is more than 0, it means we don't have enoguh working file space to create the MMS */
    U8   app_id;                                    /* MMA_APP enum, application id*/
    U8   storage;                                   /*  mma_msg_storage_type_enum, storage type phone=1,card=2*/
    U8   result;                                    /* mma_result_enum, result  OK=0 */
}srv_mms_create_rsp_struct;

/*This structure defines data to request delete folder from MMS Adapter(MMA) in non blocking call*/
typedef struct
{
    void *user_data;                                      /* service will save this data and will return in callback*/
	U8 app_id;                                           /* MMA_APP enum, application id. User may ignore this value*/
    srv_mms_funcptr_type call_back;                    /*  srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    srv_um_msg_enum msg_type;                          /* Type of message  mms=2,sms=1,wap push=4,provisining=8 */
    srv_um_msg_box_enum msg_box_type;                  /* Types of message boxes to delete; bit mask  inbox=1,outbox=2,sentbox=4*/
} srv_mms_delete_folder_req_struct;

/*This structure defines response data for delete folder from MMS Adapter(MMA)*/
typedef struct
{
    srv_um_msg_enum msg_type;                       /* Type of message  mms=2,sms=1,wap push=4,provisining=8 */
    MMI_BOOL result;                                /* MMI_TRUE means all msgs are deleted successfully; Otherwise MMI_FALSE */
    U8 app_id;                                      /* MMA_APP enum, application id*/
} srv_mms_delete_folder_rsp_struct;

/* This structure defines the request parameters for mms send API srv_mms_send*/
typedef struct
{
    U8 sim_id; /* mma_sim_id_enum, sim id  sim ID SIM1=1 SIM2=2 SIM3=4 ,SIM4=8*/
    U8 send_setting;/*send and save setting, srv_mms_send_setting_enum send=0,save and send=1*/
    U32 msg_id; /*Message id*/
    MMI_BOOL is_rr; /*Unused*/
	U8 storage_type;/*mma_msg_storage_type_enum, storage type phone=1,card=2*/
}srv_mms_send_req_struct;


/* This structure defines the request parameters for mms cancel send API srv_mms_cancel_send*/
typedef struct
{
    U32 msg_id;/*Message id*/
}srv_mms_cancel_send_req_struct;

/* DOM-NOT_FOR_SDK-BEGIN */


/* This structure defines the request parameters for mms immediate send API srv_mms_immed_send*/
typedef struct
{
   U8 app_id; /* MMA_APP */
   srv_mms_funcptr_type call_back;    /*  srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
   U32  msg_id;
   U8   sim_id;		/* mmi_mms_vendor_sim_id_enum */
   void *user_data;                                      /* service will save this data and will return in callback*/
}srv_mms_immed_send_req_struct;

/* This structure defines the response parameters for mms immediate send API srv_mms_immed_send*/
typedef struct
{
    U8 app_id; /* MMA_APP */
   U32  msg_id;
    MMI_BOOL result;  /*  mmi_mms_vendor_result_enum  */
}srv_mms_immed_send_rsp_struct;

/*This structure defines data to request delete all message in a folder from Unified Message in non blocking call*/
typedef struct
{
    void *user_data;   /* service will save this data and will return in callback*/
srv_mms_funcptr_type call_back;                       /* srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    srv_um_msg_enum msg_type;                       /* Type of message  mms=2,sms=1,wap push=4,provisining=8  */
    srv_um_msg_box_enum msg_box_type;               /* Types of message boxes to delete; bit mask */
} srv_mms_delete_all_ind_struct;

/*This structure defines response data for delete all message from Unified Message*/
typedef struct
{
    srv_um_msg_enum msg_type;                       /* Type of message  mms=2,sms=1,wap push=4,provisining=8  */
    MMI_BOOL result;                                /* MMI_TRUE means all msgs are deleted successfully; Otherwise MMI_FALSE */
} srv_mms_delete_all_res_struct;

/*This structure defines data to request marking Message read/unread from MMS Adapter(MMA)*/
typedef struct
{
    void *user_data;                           /* service will save this data and will return in callback*/
    U32  msg_id;                            /* Message id */
    srv_mms_funcptr_type call_back;         /*  srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    MMI_BOOL  readmark;                     /* Specify read status of the MMS */
    U8   app_id;                            /* MMA_APP enum, application id . User may ignore this field*/
}srv_mms_set_readmark_req_struct;

/*This structure defines response data for marking Message read/unread from MMS Adapter(MMA)*/
typedef struct
{
    kal_uint8   app_id; /* MMA_APP enum, application id */
    kal_uint8   result; /* mma_result_enum, result */    
}srv_mms_set_readmark_rsp_struct;



/*This structure defines data to request unread Message list from MMS Adapter(MMA) in non blocking call*/
typedef struct
{
    void *user_data;   /* service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;      /*  srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    U32  start_index;          /* Start index of this request. 0 means the latest unread mms message. */
    U32  num_of_msg_requested; /* Number of messages this request needs */
    U8   app_id;               /* MMA_APP enum, application id. User may ignore this field*/
}srv_mms_get_unread_msg_list_req_struct;

/*This structure defines response data for unread Message list from MMS Adapter(MMA)*/
typedef struct
{
    U32  total_num_of_unread_msg;                                       /* total number of unread msg */
    U32  num_of_unread_msg;                                             /* specify how many items are in unread_msg_list[] */
#if defined (__MMI_OP11_HOMESCREEN__) || defined (__MMI_OP12_TOOLBAR__) || defined( __MMI_OP11_HOMESCREEN_0301__) || defined(__MMI_OP11_HOMESCREEN_0302__)
    mma_unread_msg_list_struct unread_msg_list[MMA_MAX_UNREAD_MSG_NUM]; /* Unread message list. */
#endif
    U8   app_id;                                                        /* MMA_APP enum, application id.User may ignore this field*/
    U8   result;                                                        /* mma_result_enum, result */
    U8   more;                                                          /* 1: have more unread messages to be sent, 0: no more unread message */
}srv_mms_get_unread_msg_list_rsp_struct;

/*This structure defines data to request  Message property list from MMS Adapter(MMA) in non blocking call*/
typedef struct
{
    U8   app_id;                        /* MMA_APP enum, application id. User may ignore this field*/
    U32  no_of_msg;                     /* Num of messages in msg_id arrary */
    U32  msg_id[MMA_MAX_MSG_ARRAY_NUM]; /*SRV_MMS_MAX_MSG_ARRAY_NUM Message id that application want to get property */
    void *user_data;   /* service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;      /* srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
}srv_mms_property_req_struct;

/*This structure defines response data for Message property list from MMS Adapter(MMA)*/
typedef struct
{
    U8   app_id;                                          /* MMA_APP enum, application id*/
    U32  result;                                          /* mma_result_enum , result*/
    U32  num_of_msg;                                      /* Num of messages in msg_property arrary */
    mma_msg_property_struct msg_property[MMA_MAX_MSG_ARRAY_NUM]; /*SRV_MMS_MAX_MSG_ARRAY_NUM Message property list */
}srv_mms_property_rsp_struct;

/*This structure defines data to request  recent event list from MMS Adapter(MMA) in non blocking call*/
typedef struct
{
    void *user_data;                      /* service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;      /* srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    U32  start_index;          /* Start index of this request. 0 means the latest recent event */
    U32  num_of_evt_requested; /* Number of events this request needs */
    U8   app_id;               /* MMA_APP, application id. User may ignore this field*/
}srv_mms_recent_evt_list_req_struct;

/*This structure defines response data for recent event list from MMS Adapter(MMA)*/
typedef struct
{
    U32  total_num_of_evt;   /* Number of total events */
    U32  num_of_evt;         /* specify how many items are in event_list[] */
    mma_recent_evt_list_struct event_list[MMA_MAX_EVT_NUM]; /*Event list */
    U8   app_id;             /* MMA_APP enum, application id */
    U8   result;             /* mma_result_enum, result */
    U8   more;               /* 1: have more event to be sent, 0: no more event */
}srv_mms_recent_evt_list_rsp_struct;

/*This structure defines request data needed to refresh folder*/
typedef struct
{
    mma_folder_enum msg_box_type;          /* mma_folder_enum, folder needed to be refreshed */
    srv_um_refresh_enum refresh_type;       /* reason to send refresh indication, 0: unknown */
    kal_uint32          msg_id;             /* which message is changed, 0: unknown */
    kal_uint32          addr_number;        /* if address_number > 1, addr_type and address can be skppied */
    kal_uint8           addr_type;          /* mma_addr_type_enum,the address type, sender for inbox, recipient for outbox */
    kal_wchar address[SRV_UM_MAX_ADDR_LEN + 1];  /* sender address */
}srv_mms_um_refresh_ind_struct;

/* This structure defines the request parameters for mms read report send API srv_mms_send_read_report_req*/
typedef struct
{
   U32 msg_id; /*Message id*/
   U8 sim_id;/*Sim id, mmi_sim_id_enum */
   U8 storage_location;/*mma_msg_storage_type_enum, storage type phone=1,card=2*/
}srv_mms_send_read_report_req_struct;

/* This structure defines the request parameters for mms download API srv_mms_download*/
typedef struct
{
    U32 msg_id; /*Message id*/
    U8 sim_id;/*Sim id, mmi_sim_id_enum */
	U8 storage_type;/*mma_msg_storage_type_enum, storage type phone=1,card=2*/
}srv_mms_download_req_struct;

/* This structure defines the request parameters for mms cancel download API srv_mms_cancel_download */
typedef struct
{
    U32 msg_id; /*Message id*/
}srv_mms_cancel_download_req_struct;

/* This structure defines the request parameters for application data set request.Data will be set at MMS adapter end */
typedef struct
{
    void *user_data;  /*Service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;                       /* srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    U32  msg_id; /* Message id */
    U8   app_id; /* MMA_APP enum, application id*/
    U8   app_data[MMA_MAX_APP_DATA_LENGTH]; /* SRV_MMS_MAX_APP_DATA_LENGTHData specified by MMS application */
}srv_mms_set_app_data_req_struct;

/* This structure defines the response for application data set request */
typedef struct
{
    U32  msg_id; /* Message id */
    U8   app_id; /* MMA_APP enum, application id*/
    U8   result; /* result, mma_result_enum */    
}srv_mms_set_app_data_rsp_struct;

/* This structure defines the request parameters for set settings request to MMA */
typedef struct
{	
    void *user_data; /*Service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;	 /*srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    U8 app_id;/* MMA_APP enum, application id*/
}srv_mms_mma_set_settings_req_struct;

/* This structure defines the response for set settings */
typedef struct
{
	U8 app_id;/* MMA_APP enum, application id*/
	U8 result;/* result, mma_result_enum */
}srv_mms_mma_set_settings_rsp_struct;

/* This structure defines the data for a messsage in conversation list*/
typedef struct
{
	kal_uint32 body_size;                                /*size of object on MMS first slide*/
    kal_uint32 body_offset;                              /*offset of object on MMS first slide*/
	kal_uint16 body_name_len;                            /*Length of name of object on MMS on MMS first slide*/
	kal_uint16 txt_encoding_scheme;                            /*extension for app who wants text, this is mms text encoding*/
    kal_uint8 body_type;                                 /* Object type: Text, Image, Audio, Video mma_media_msg_enum*/
    kal_uint8 is_drm;                                    /* Object DRM or not */
	kal_wchar body_name[MMA_MAX_MMS_BODY_FILE_NAME_LEN]; /*Name of object on MMS on MMS first slide*/
	kal_uint32 msg_download_size;                        /* Downloaded mms size for the Notification */
    kal_wchar subject[MMA_MAX_SUBJECT_LEN];              /* SRV_MMS_MAX_SUBJECT_LEN Subject of the MMS. Encoded by USC2 */
}srv_mms_get_lite_view_data_struct;



#ifdef __MMI_MMS_COPY_TO_ARCHIVE_SUPPORT__
/*This structure defines data to request copy Message to archive folder from MMS Adapter(MMA)*/
typedef struct
{
    S32 user_data;                       /* service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;      /* srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    U32  msg_id;                         /* The to-be-moved msg id  */
    U8   app_id;                         /* MMA_APP enum, application id. User may ignore this value*/
}srv_mms_copy_to_archive_req_struct;

/*This structure defines response data for copy Message to archive folder from MMS Adapter(MMA)*/
typedef struct
{
    U32  msg_id;                       /* The to-be-copied msg id */
    U32  result;                       /* The result of to-be-copied msg id request*/
    U8   app_id;                       /* MMA_APP enum, application id*/
}srv_mms_copy_to_archive_rsp_struct;
#endif

/*This structure defines data for status of an outbox message*/
typedef struct
{
    U32  msg_id;                                           /* msg id */
    srv_mms_msg_status_enum  status;                       /* status of msg srv_mms_msg_status_enum*/
}srv_mms_update_status_struct;



#ifdef __MMI_MMS_SIM_USER_PREFERENCE_SUPPORT__
typedef struct
{
		U8 *data_buffer;
    MMI_BOOL sim_settings_progress;
}srv_mms_sim_settings_struct;

#endif /* __MMI_MMS_SIM_USER_PREFERENCE_SUPPORT__ */ 

typedef struct
{
    //LOCAL_PARA_HDR
	applib_address_node_struct *num_list;
    applib_address_node_struct *email_list;
    applib_address_node_struct *url_list;

    applib_address_node_struct *header_num_list;    /* UNUSED */
    applib_address_node_struct *header_email_list;  /* UNUSED */
	U32 total_count;
#ifdef __MMI_MMS_UNLIMITED_USE_DETAILS_SUPPORT__
	S32 start_index;
	S32 end_index;
#endif /*__MMI_MMS_UNLIMITED_USE_DETAILS_SUPPORT__*/
    srv_mms_get_use_details_enum returned_type;
    srv_mms_get_use_details_result_enum result;
} srv_mms_get_use_details_rsp_struct;

typedef struct
{
    
    S32 req_id;
#ifdef __MMI_MMS_UNLIMITED_USE_DETAILS_SUPPORT__
	S32 curr_index;
	MMI_BOOL is_more;
#endif /*__MMI_MMS_UNLIMITED_USE_DETAILS_SUPPORT__*/
   	srv_mms_get_use_details_enum request_type;
	applib_addr_type_enum data_type;
} srv_mms_get_use_details_req_struct;


typedef struct
{
    U8 app_id;
#ifdef __MMI_MMS_UNLIMITED_USE_DETAILS_SUPPORT__
	S32 curr_index;
	MMI_BOOL is_more;
#endif /*__MMI_MMS_UNLIMITED_USE_DETAILS_SUPPORT__*/
	S32 req_id;
	void *user_data; 
  srv_mms_get_use_details_enum request_type;
	applib_addr_type_enum data_type;
	srv_mms_funcptr_type call_back;	
} srv_mms_get_use_details_list_req_struct;

typedef struct 
{
    S32 file_error_type;
	srv_mms_viewer_result_enum result;
}srv_mms_viewer_event_data_struct;

typedef struct 
{
	U16 error_id;
	U16 error_type;
	void *user_data;
}srv_mms_save_object_event_data_struct;

typedef struct 
{
	U8 result;
	U8 bgsr_req_type;
}srv_mms_bgsr_result_struct;

typedef struct 
{
    kal_uint32 total_unread_msgs_sim1;
    kal_uint32 total_unread_msgs_sim2;
    kal_uint32 total_unread_msgs_sim3;
    kal_uint32 total_unread_msgs_sim4;
    kal_uint32 msg_number_inbox;
    kal_uint32 msg_number_outbox;
    kal_uint32 msg_number_sent;
    kal_uint32 msg_number_drafts;
    kal_uint32 total_number_of_unread_msgs;
    kal_uint32 predefined_template_msg_number;
    kal_uint32 userdefined_template_msg_number;
    kal_uint32 archive_msg_number;
	kal_uint32 total_phone_msg_number;
    kal_uint32 total_card_msg_number; 
} srv_mms_message_number_struct;

/*This structure defines data to request delete recent event from MMS Adapter(MMA) in non blocking call*/
typedef struct
{
    void *user_data;   /* service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;      /*srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    U32  msg_id; /* Message id, 0xFFFFFFFF means that MMA should remove all recent event list. */
    U8   app_id; /* MMA_APP enum, application id */
}srv_mms_delete_recent_evt_req_struct;

/*This structure defines response data for delete recent event from MMS Adapter(MMA)*/
typedef struct
{
    U32  msg_id; /* Message id */
    U8   app_id; /* MMA_APP, application id, Ex: MMA_APP_ID_UC, MMA_APP_ID_UM, MMA_APP_ID_TEMPLATE,.. */
    U8   result; /* mma_result_enum */
}srv_mms_delete_recent_evt_rsp_struct;


typedef struct
{
    void *user_data;   /* service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;      /*srv_mms_funcptr_type  Callback API which service will use to response back to caller Application*/
    U16  mms_filepath[MMA_MAX_EXTERNAL_FILE_PATH_LEN];   /* Notification filepath, Encoded by USC2 */
    U8   app_id;                                         /* MMA_APP, application id, Ex: MMA_APP_ID_UC, MMA_APP_ID_UM, MMA_APP_ID_TEMPLATE,.. */
    U8   msg_type;                                       /* mma_msg_type_enum, msg type Notification=0,DR=1,RR=2,MMS=3,JAVA=4,Template=5,postcard=6  */
    U8   sim_id;                                         /* mma_sim_id_enum, specify which sim card this MMS comes from */
}srv_mms_obj_ind_struct;


typedef struct
{
    U8   app_id;                                    /* MMA_APP, application id, Ex: MMA_APP_ID_UC, MMA_APP_ID_UM, MMA_APP_ID_TEMPLATE,.. */
    U8   result;                                    /* mma_result_enum */
}srv_mms_obj_res_struct;

#ifdef __UNIFIED_MESSAGE_MARK_SEVERAL_SUPPORT__
/*This structure defines data to request entry Mark several screen from Unified Message in non blocking call*/
typedef struct
{
    void *user_data;   
    srv_mms_funcptr_type call_back;                       /* srv_mms_funcptr_type Callback API which service will use to response back to caller Application*//* service will save this data and will return in callback*/
    srv_um_msg_enum msg_type;                       /* type of message  mms=2,sms=1,wap push=4,provisining=8 */
    U32 app_id;                                     /* application id. for UM, always 0 */
    srv_um_msg_box_enum msg_box_type;               /* message folder */
    U32 msg_id;                                     /* unique message id */
} srv_mms_entry_mark_several_req_struct;

/*This structure defines response data for entry Mark several screen  from Unified Message*/
typedef struct
{
    srv_um_msg_enum msg_type;                       /* type of message */
    U32 app_id;                                     /* application id. for UM, always 0 */
    srv_um_msg_box_enum msg_box_type;               /* message folder */
    MMI_BOOL result;                                /* entry mark several screen result */
} srv_mms_entry_mark_several_rsp_struct;
#endif


/*This structure defines msg id of MMS needed to be opened*/
typedef struct
{
    U32  msg_id; /* Specify the message id of MMS will be played */
}srv_mms_view_msg_ind_struct;

/*This structure defines MMS storage full reason */
typedef struct
{
    U32         min_fs_space_required; /* When the value is more than 0, it means we don't have enoguh working file space to receive MMS */
    U8 result;        /* mma_result_enum, Specify  reason for MMS storage full like Maximum MMS count reach , storage shortage,etc. */
}srv_mms_storage_full_ind_struct;


typedef struct
{
    U32  msg_id; /* Message id */
    U8   sim_id; /* mma_sim_id_enum, specify which sim card is used to download the MMS */
}srv_mms_start_immed_retrieval_ind_struct;


typedef struct
{
    U32  msg_id;      /* Message id */
    U32  error_cause; /* mma_result_enum */
    U8   result;      /* mma_result_enum */    
    U8   sim_id;      /* mma_sim_id_enum */
    U16  response_text[MMA_MAX_RESPONSE_TEXT_LENGTH];    /* Encoded by UCS2 */
}srv_mms_stop_immed_retrieval_ind_struct;


typedef struct
{
    MMI_BOOL result; /* KAL_TRUE means ready; KAL_FALSE means initialization failure */
    srv_um_msg_enum msg_type;             /* Type of ready message  mms=2,sms=1,wap push=4,provisining=8  */
}srv_mms_um_ready_ind_struct;

#if(0)
typedef struct
{
    U8 sim_id;           /*mmi_sim_id_enum*/
    U8 sim_inserted;     /*mmi_sim_id_enum*/
    U8 setting_mode;     /*mmi_sim_id_enum*/
    U8 sim1_can_read;    
    U8 sim2_can_read;
    U8 sim1_type;        /*mmi_sim_type_enum*/
    U8 sim2_type;        /*mmi_sim_type_enum*/
} mmi_sim_status_info_ind_struct;
#endif//[Ashwani-Correct]



#ifdef __UNIFIED_MESSAGE_MARK_SEVERAL_SUPPORT__
/*Internal*/
typedef struct
{
    srv_um_msg_enum msg_type;                             /* type of message */
    U32 app_id;                                     /* application id. for UM, always 0 */
    srv_um_msg_box_enum msg_box_type;                      /* message folder */
    srv_um_mark_several_op_action_enum action_type;   /* the multi-op action type */
    U16 msg_number;                                 /* number of message should be executed */
    U32 msg_id[SRV_UM_MAX_MSG_PER_MARK_SEVERAL_OP];               /* an array of the executed message id */
} srv_mms_multi_op_recv_req_struct;


typedef struct
{
    srv_um_msg_enum msg_type;                             /* type of message */
    U32 app_id;                                     /* application id. for UM, always 0 */
    srv_um_msg_box_enum msg_box_type;                      /* message folder */
    srv_um_mark_several_op_action_enum action_type;   /* the multi-op action type */
    U16 msg_number;                                 /* number of message should be executed */
    U32 msg_id[SRV_UM_MAX_MSG_PER_MARK_SEVERAL_OP];               /* an array of the executed message id */
    MMI_BOOL action_result[SRV_UM_MAX_MSG_PER_MARK_SEVERAL_OP];   /* an array of results corresponding to the executed msg id */
} srv_mms_multi_op_send_rsp_struct;
#endif


typedef struct
{
    U32 download_time;
    U32 download_msg_id;
    MMI_BOOL sim1_on;
    MMI_BOOL sim2_on;
    U8 setting_mode;
    U8 sim_select_id;
    U8 download_size;
} srv_mms_dual_sim_struct;


/* This structure defines the request parameters for API srv_mms_parse_xml*/
typedef struct
{
    srv_mms_xml_msg_header_struct *msg;
    srv_mms_alloc_mem malloc_fn;
    srv_mms_free_mem free_fn;
	U32 index;
    U16  *xml_file_path;				/* XML File Path */
    void *user_data;						/* service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;		/* srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    U8   app_id;						/* MMA_APP(enum), application id, Ex: MMA_APP_ID_UC, MMA_APP_ID_UM, MMA_APP_ID_TEMPLATE,.. */
	srv_mms_xml_parse_mode_enum   mode;	/*use to decide whether to parse header only or complete xml*/
	void *mma_rsp;
}srv_mms_xml_parse_req_struct;

/* This structure defines the response parameters for API srv_mms_parse_xml*/
typedef struct
{
    //U32 index;
    //PU8 slide_txt_buffer;   /* final buffer with UCS2 encoding */
	//PU8 src_buffer;         /* buffer with source encoding */
	//PU8 inputbox_buffer;
	//U32 ptxtbuffersize;
//srv_mms_viewer_xml_msg_struct *msg_cntx;						/* MMA_APP(enum), application id, Ex: MMA_APP_ID_UC, MMA_APP_ID_UM, MMA_APP_ID_TEMPLATE,.. */
	//srv_mms_xml_msg_header_struct *header_info;	/*use to decide whether to parse header only or complete xml*/
	srv_mms_result_enum error;
	
}srv_mms_xml_parse_rsp_struct;

extern void srv_mms_viewer_fill_data_from_index(U32 index, srv_mms_xml_parse_rsp_struct *rsp);

/* This structure defines the request parameters for API srv_mms_process_drm_files*/
typedef struct
{
    void *user_data;						/* service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;		/* srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    U8   app_id;						/* MMA_APP(enum), application id, Ex: MMA_APP_ID_UC, MMA_APP_ID_UM, MMA_APP_ID_TEMPLATE,.. */
}srv_mms_process_drm_req_struct;


typedef struct
{
    srv_mms_viewer_result_enum error;
}srv_mms_process_drm_rsp_struct;


/* There is no response structure for drm processing caller only need to handle error passed in the result*/

typedef struct
{
	srv_mms_funcptr_type call_back;		/* srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
	U32 index;
	void *user_data;	
}srv_mms_get_use_details_viewer_req_struct;

typedef struct
{
	srv_mms_viewer_use_details_list *list_head;
}srv_mms_get_use_details_viewer_rsp_struct;

typedef struct
{
    kal_uint16 inbox_unread_msg_num_sim1;
	kal_uint16 inbox_unread_msg_num_sim2;
    kal_uint16 inbox_read_msg_num_sim1;
	kal_uint16 inbox_read_msg_num_sim2;
    kal_uint16 unsent_msg_num_sim1;
	kal_uint16 unsent_msg_num_sim2;
    kal_uint16 sent_msg_num_sim1;
	kal_uint16 sent_msg_num_sim2;
    kal_uint16 draft_msg_num;
    kal_uint16 predefined_template_msg_num;
    kal_uint16 userdefined_template_msg_num;
	kal_uint16 archive_unread_inbox_msg_num_sim1;
	kal_uint16 archive_unread_inbox_msg_num_sim2;
	kal_uint16 archive_read_inbox_msg_num_sim1;
    kal_uint16 archive_read_inbox_msg_num_sim2;
	kal_uint16 archive_sent_msg_num_sim1;
	kal_uint16 archive_sent_msg_num_sim2;
	kal_uint16 archive_msg_num;	/* Draft to Archive. Non-LG */
    kal_uint16 total_phone_mms;
    kal_uint16 total_mcard_mms;	/* Mem-Card. Non-LG */
}srv_mms_folder_msg_count_status_struct;



#ifdef __MMI_VCARD__
typedef struct
{
    LOCAL_PARA_HDR
    U32  req_id;
    U16 filepath[SRV_MMS_MAX_FILENAME_LENGTH];
    U32 size;
    U32 offset;
}srv_mms_get_vcard_version_req_struct;

typedef struct
{
	LOCAL_PARA_HDR
	U32  req_id;
	U8   result;  /* mma_result_enum */
	U8   vcard_ver; /* Vcard Version*/
}srv_mms_get_vcard_version_rsp_struct;


#endif/*__MMI_VCARD__*/
typedef struct
{
    U8 validity_period;
    U8 delivery_report;
    U8 read_report;
    U8 priority;
    U8 delivery_time;
    U8 reply_charging;
    U8 request_type;
    U8 hide_sender;
    U32 send_and_save;
    U32 deadline_for_reply;
    U32 size;
} srv_mms_nvram_sending_settings_struct;

typedef struct
{
    U8 layout;
    U8 add_drm;
    U8 creation_mode;
    U8 image_resize_option;
    U8 max_no_pages;
    U8 best_page_duration;
    /* PMT VIKAS START 20060403 */
//#ifdef __MMI_MMS_SIGNATURE__
    U8 auto_signature;
    U8 auto_signature_content[(128 + 1) *ENCODING_LENGTH];
    #ifndef __MMI_SLIM_MMS_2__
    U8 auto_signature_image_file[(MMA_MAX_EXTERNAL_FILE_PATH_LEN + 1) *ENCODING_LENGTH];
    U8 auto_signature_audio_file[(MMA_MAX_EXTERNAL_FILE_PATH_LEN + 1) *ENCODING_LENGTH];
    U8 auto_signature_video_file[(MMA_MAX_EXTERNAL_FILE_PATH_LEN + 1) *ENCODING_LENGTH];
	#endif /* __MMI_SLIM_MMS_2__*/
//#endif /* __MMI_MMS_SIGNATURE__ */ 
    /* PMT VIKAS END 20060403 */
    U32 default_slide_time;
} srv_mms_nvram_compose_settings_struct;

typedef struct
{
    U8 home_network;
    U8 roaming;
    U8 anonymous_filter;
    U8 advertisement_filter;
    U8 read_report;
    U8 delivery_report;
 } srv_mms_nvram_retrieval_settings_struct; 	


typedef struct
{
	srv_mms_nvram_compose_settings_struct nvram_compose_settings;
    srv_mms_nvram_sending_settings_struct nvram_sending_settings;
    srv_mms_nvram_retrieval_settings_struct nvram_retrieval_settings;
}srv_mms_read_nvram_settings_struct;




#ifdef __MMI_MMS_TEMPLATE_SUPPORT__
typedef struct
{
	void *user_data; 
        srv_mms_funcptr_type call_back;
	U8 app_id;
	srv_um_msg_box_enum template_type;

}srv_mms_get_list_info_req_struct;

typedef struct
{
	U8 app_id;
	kal_bool result;                    /* KAL_TRUE means OK; KAL_FALSE means failed */
  srv_um_msg_enum msg_type;           /* Type of message   mms=2,sms=1,wap push=4,provisining=8 */
                 /* application id, ex: UnifiedMessage, UnifiedComposer, MMS Application */
  srv_um_msg_box_enum msg_box_type;   /* Type of message box */
  kal_uint16 start_entry;             /* The first entry number in this response primitive */
  kal_uint16 msg_number;              /* Number of messages in this response primitive */
  srv_um_msg_list_struct list_info[SRV_UM_MAX_GET_MSG_LIST_NUMBER];  /* List info array */
#ifdef __UNIFIED_MESSAGE_LIST_INDEX_DATA__
    srv_um_list_idx_data_union list_idx_data[SRV_UM_MAX_GET_MSG_LIST_NUMBER];
#endif
}srv_mms_get_list_info_rsp_struct;

typedef struct
{
	void *user_data; 
        U32 msg_id[5];
	srv_mms_funcptr_type call_back;
	U8 app_id;
	srv_um_msg_box_enum template_type;
	U8 msg_number;
	
}srv_mms_get_msg_info_req_struct;

typedef struct
{
	U8 app_id;                                 /* application id, ex: UnifiedMessage, UnifiedComposer, MMS Application */
  kal_bool result[SRV_UM_MAX_GET_MSG_INFO_NUMBER];    /* KAL_TRUE means OK; KAL_FALSE means failed */
  srv_um_msg_enum msg_type;                           /* Type of message   mms=2,sms=1,wap push=4,provisining=8 */
  srv_um_msg_box_enum msg_box_type;                   /* Type of message box */
  kal_uint16 msg_number;                              /* Number of messages in this response primitive */
  kal_uint32 msg_id[SRV_UM_MAX_GET_MSG_INFO_NUMBER];  /* the sequence of message id */
  srv_um_msg_info_struct msg_info[SRV_UM_MAX_GET_MSG_INFO_NUMBER];  
}srv_mms_get_msg_info_rsp_struct;
#endif /*__MMI_MMS_TEMPLATE_SUPPORT__*/


/*This structure defines data to request Power off from MMS core in non blocking call*/
typedef struct
{
    void *user_data;                                       /* Service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;                       /* srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
}srv_mms_power_off_req_struct;

/*This structure defines data to request Power off from MMS core in non blocking call*/
typedef struct
{
    MMI_BOOL result;                                          /* Service will save this data and will return in callback*/
}srv_mms_power_off_rsp_struct;

typedef struct
{
    U8 sim_valid_flag;
    U8 profile_set_flag;
}srv_mms_sim_context_struct;

typedef struct
{
	U8 sim_id;
	srv_mms_icon_state_action_enum icon_state;
}srv_mms_show_hide_icon_struct;

#ifdef __MMI_MMS_BGSR_SUPPORT__

typedef struct 
{
    kal_uint32      msg_id;
    kal_uint8       ntt;
    kal_uint8       status;     /*srv_mms_bgsr_msg_status_enum*/
    kal_uint8       quota;
    kal_uint8       result;     /*srv_mms_bgsr_result_enum*/
}srv_mms_bgsr_msg_info_struct;

typedef void(*srv_mms_bgsr_funcptr_type) (kal_uint32, kal_uint8);
#ifdef __UNIFIED_MESSAGE_MARK_SEVERAL_SUPPORT__
typedef void(*srv_mms_bgsr_multi_funcptr_type) (kal_bool result[]);
#endif
typedef void(*srv_mms_bgsr_rsp_funcptr_type) (kal_uint32, kal_uint8, kal_uint16*, kal_uint8, kal_uint8);
typedef void(*srv_mms_bgsr_msg_funcptr_type) (kal_uint32, srv_mms_bgsr_msg_info_struct *);
typedef void(*srv_mms_bgsr_void_funcptr_type) (void);
typedef void(*srv_mms_bgsr_download_rsp_funcptr_type) (kal_uint32, kal_uint32, kal_uint8, kal_uint16*, kal_uint8, kal_uint8, kal_uint8);

#ifdef __MMI_MMS_FALLBACK__
typedef struct
{
    MMI_EVT_PARAM_HEADER
    kal_uint32 account_id;
}srv_mms_bgsr_fallback_cui_struct;
#endif /*__MMI_MMS_FALLBACK__*/

#endif

typedef struct
{
    void *user_data;                                      /* Service will save this data and will return in callback*/
    srv_mms_funcptr_type call_back;                       /* srv_mms_funcptr_type Callback API which service will use to response back to caller Application*/
    U32  msg_id;                                          /* Message id */
    U8   app_id;                                          /* MMA_APP enum, application id. User may ignore this field*/
}srv_mms_get_lite_viewer_data_req_struct;

typedef struct
{
	srv_mms_get_lite_view_data_struct *txt_data; /*Lite viewer text related data*/
	U16 *mem;															/*memory buffer requring text content in UCS format*/
	void *user_data;													/*To pass to alloc function*/
	srv_mms_func_mem_alloc_user_data alloc_fn;	/*for some API internal memory requirements*/
	srv_mms_func_mem_free free_fn;						/*for some API internal memory requirements*/
	U32 txt_size;														/*Text Size to be buffered*/
	U32  msg_id;														/* Message id */
	U8 msg_type;														/* Msg type mma_msg_type_enum*/
	U8 storage_type;													/* mma_msg_storage_type_enum, storage type phone=1,card=2*/  
}srv_mms_get_lite_viewer_text_req_struct;

typedef struct
{
	U32 msg_id ;
    S32 file_handle;
 }srv_mms_lite_viewer_handle_data;

typedef struct
{
  srv_mms_get_lite_view_data_struct *image_data; /*Lite viewer image related data*/
  void *mem ;                                   /*memory buffer for virtual file name size = FS_GenVFN_SIZE+12 */    
  srv_mms_lite_viewer_handle_data *file_table ;                           /* memory buffer for keeping handle*/ 
  U32  msg_id;
  U8 msg_type;
  U8 storage_type;              /* mma_msg_storage_type_enum, storage type phone=1,card=2*/ 
}srv_mms_get_lite_viewer_image_req_struct ;




typedef S32 (*srv_mms_text_buffer_callback)(srv_mms_get_lite_viewer_text_req_struct *req);
typedef S32 (*srv_mms_image_buffer_callback)(srv_mms_get_lite_viewer_image_req_struct *req);
typedef S32 (*srv_mms_lite_viewer_deinit_callback)(srv_mms_lite_viewer_handle_data *file_handle );



typedef struct
{
     U32  msg_id;                  /* Message id */
     U32 result;                   /* mma_result_enum */ 
     U32 timestamp;                /* Time in seconds */
     U32 msg_size;                 /* The size of message. Counted by byte */
	 U8 msg_type;	               /* Msg type mma_msg_type_enum*/
	 U8 storage_type;              /* mma_msg_storage_type_enum, storage type phone=1,card=2*/ 
     U8 msg_sim_id;                /* mma_sim_id_enum */     
     srv_mms_get_lite_view_data_struct thumbnail_info;   
     srv_mms_get_lite_view_data_struct thumbnail_info_txt; /*extension for app who wants text*/
     PU16 thumbnail_path;/*extension for app which can not know how to get image path from msg_id*/  
     srv_mms_text_buffer_callback cb_text_function;/*For app who wants text to display*/
     srv_mms_image_buffer_callback cb_image_function; /*For app who wants image to display */
     srv_mms_lite_viewer_deinit_callback cb_deinit_function; /* called to close the file handle */
	 
}srv_mms_get_lite_viewer_data_rsp_struct;

/* DOM-NOT_FOR_SDK-END */



/**********************************************************************
 * External APIs
 **********************************************************************/

/*****************************************************************************
 * FUNCTION
 *  srv_mms_mma_get_msg_info
 * DESCRIPTION
 *  1. This function gets some basic information (srv_mms_mma_get_msg_info_rsp_struct) of the MMS asynchronously .
 *  2. User passes filling msg_id,callback,app_id,user_data in  srv_mms_mma_get_msg_info_req_struct
 *  3. If correct parameter are not provided, then user will get synchronous result in enum srv_mms_result_enum .
 *  3. User gets response in  callback function provided in srv_mms_mma_get_msg_info_req_struct with srv_mms_mma_get_msg_info_rsp_struct
 *     as parameter.
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_mma_get_msg_info_req_struct
 * RETURNS
 *  srv_mms_result_enum
 ******************************************************************************/
extern S32 srv_mms_mma_get_msg_info(srv_mms_mma_get_msg_info_req_struct *para);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_mma_get_content
 * DESCRIPTION
 *  1. This function gets detail single mms data like msg_id,xml_filepath,mms_header size,mms body size asynchronously.
 *  2. User passes msg_id,user_data,callback,app_id,mode and creation mode in  srv_mms_get_content_req_struct  
 *  3. If correct parameter are not provided, then user will get synchronous result in enum srv_mms_result_enum .
 *  4. User gets response in  callback function provided in srv_mms_get_content_req_struct with srv_mms_get_content_rsp_struct 
 *     as parameter.
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_get_content_req_struct
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_get_content(srv_mms_get_content_req_struct *para);



/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_msg_num
 * DESCRIPTION
 *  1. This function gets information about  number of  MMS  present in  various Folders(inbox,Draft,Outbox,Sent,Archive) asynchronously.
 *  2. It also gets total  unread messages,total number of phone and card message and total template messages(deafult and user defined) .
 *  3. User passes queries in req_tb array , app_id,user_data,callback in  srv_mms_get_msg_num_req_struct .
 *  4. If correct parameter are not provided, then user will get synchronous result in enum srv_mms_result_enum . 
 *  5. User gets response in  callback function provided in srv_mms_get_msg_num_req_struct with srv_mms_get_msg_num_rsp_struct 
 *     as parameter which contains rsp_tb array containing the response in same order as it was queried in req_tb

 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_get_msg_num_req_struct
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_get_msg_num(srv_mms_get_msg_num_req_struct *para);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_save
 * DESCRIPTION
 *  1. This function saves MMS to a specific message box after creation procedure asynchronously.
 *  2. User passes srv_mms_save_req_struct structure filling msg_id's,destination msg box,number of msg's to be saved ,callback etc.
 *  3. If correct parameter are not provided, then user will get synchronous result in enum srv_mms_result_enum . 
 *  4. User gets save response in callback function provided in srv_mms_save_req_struct with srv_mms_save_rsp_struct  
 *     as parameter which contains msg_id's and result for each msg'id showing whether its saved or not .  
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_save_req_struct
 * RETURNS
 *  srv_mms_result_enum
 ****************************************************************************/
extern S32 srv_mms_save(srv_mms_save_req_struct *para);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_delete
 * DESCRIPTION
 *  1. This function deletes MMS asynchronously. 
 *  2. User passes srv_mms_delete_req_struct filling msg_id's ,number of msg's in msg_id array,msg_box type(folder in which the mms were saved),app_id,callback function.
 *  3. If correct parameter are not provided, then user will get synchronous result in enum srv_mms_result_enum . 
 *  4. User gets create response in callback function provided in srv_mms_delete_req_struct with srv_mms_delete_rsp_struct 
 *     as parameter which contains  array of msg_id of MMS and result array showing result about the msg_id's being deleted or not.
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_delete_req_struct
 * RETURNS
 *  srv_mms_result_enum
 ****************************************************************************/
extern S32 srv_mms_delete(srv_mms_delete_req_struct *para);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_create
 * DESCRIPTION
 *  1. This Function is used to create a mms asynchronously.
 *  2. User passes srv_mms_create_req_struct filling xml_filepath,xml_size,call_back function.
 *  3. If correct parameter are not provided, then user will get synchronous result in enum srv_mms_result_enum .
 *  4. User gets create response in callback function provided in srv_mms_create_req_struct with strcuture  srv_mms_create_rsp_struct
 *     as parameter.
 *  5. MMS might not be created if we do not have enough working space.If Created, it also tells application about the storage place.

 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_create_req_struct
 * RETURNS
 *  srv_mms_result_enum
 ****************************************************************************/
extern S32 srv_mms_create(srv_mms_create_req_struct *para);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_delete_folder
 * DESCRIPTION
 * 1. This function is used to delete the folder(inbox,outbox,sentbox etc) of msg  
 * 2. User passes srv_mms_delete_folder_req_struct structure filling msg_box_type,msg_type,app_id,callback function ,user data.
 * 3. If correct parameter are not provided, then user will get synchronous result in enum srv_mms_result_enum .
 * 4. User gets response in callback function provided in srv_mms_delete_folder_req_struct with structure srv_mms_delete_folder_rsp_struct 
 *    as parameter result 
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_delete_folder_req_struct
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_delete_folder(srv_mms_delete_folder_req_struct *para);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_send
 * DESCRIPTION
 *  1.This function sends MMS. 
 *  2.Message will be stored in outbox for making automatic retry.
 *  3.User passes sim_id,msg_id,send_setting (send_only/save_and_send),storage_type(phone/card) in srv_mms_send_req_struct. 
 *  4.After calling this function a progressive screen for sending is shown .  
 * PARAMETERS
 *  req:              [IN]  Parameters passed by caller Application through struct srv_mms_send_req_struct    
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_mms_send(srv_mms_send_req_struct *req);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_cancel_send
 * DESCRIPTION
 *  1.This Function cancels sending of mms corresponding msg_id passed in srv_mms_cancel_send_req_struct.
 *  2.Further confirmation screen for cancel send comes.If send is cancelled then cancelled pop up comes 
    
 * PARAMETERS
 *  req:              [IN]  Parameters passed by caller Application through struct   srv_mms_cancel_send_req_struct
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_mms_cancel_send(srv_mms_cancel_send_req_struct *req);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_is_ready
 * DESCRIPTION
 *  This function checks if MMS service is ready or not
 * PARAMETERS
 *  void
 * RETURNS
 *  MMI_BOOL MMI_TRUE:Ready, MMI_FALSE:otherwise
 *****************************************************************************/
extern MMI_BOOL srv_mms_is_ready(void);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_set_read_status
 * DESCRIPTION
 *  This API sets a msg read status in sync operation. User of this API also
 *  need to refresh message list, if necessary, using UM primitive MSG_ID_MMI_UM_REFRESH_IND
 * PARAMETERS
 *  msg_id:     [IN] Message id
 *  is_read:    [IN]MMI_TRUE:Read, MMI_FALSE:Unread
 *  result:     [OUT] result returned by mma , mma_result_enum [OUT]
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_set_read_status(U32 msg_id, MMI_BOOL is_read, U8 *result);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_set_lock_status
 * DESCRIPTION
 *  This API sets lock and corrupt status of a msg in sync operation
 * PARAMETERS
 *  msg_id:     [IN] Message id
 *  is_lock:    [IN]MMI_UMMS_LOCK_MODE_ON:Locked, MMI_UMMS_LOCK_MODE_OFF:Unlocked
 *  is_corrupt: [IN]MMI_UMMS_STOP_CORRUPT_DWNLD:Corrupt, MMI_UMMS_STOP_UNRECONIZED_NOTIFICATION:Unrecognized notification
 *  result:     [OUT] result returned by mma , mma_result_enum [OUT]
result
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_set_lock_status(U32 msg_id, U8 is_lock, U8 is_corrupt, U8 *result);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_mma_get_mms_read_status
 * DESCRIPTION
 *  This API gives message status
 * PARAMETERS
 *  msg_id
 * RETURNS
 *  [TRUE] if message is read
 *  [FALSE]o/w
 *****************************************************************************/
extern MMI_BOOL srv_mms_mma_get_mms_read_status(U32 msg_id);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_mma_get_sync_msg_info
 * DESCRIPTION
 *  This function gets the detail single msg info from MMA in blocking call
 * PARAMETERS
 *  msg_id:		  [IN] Message id
 *  msg_info:     [OUT]Single Message information
 *  alloc_fn:     [IN] callback func to allocate memory
 *  free_fn:      [IN] callback func to free memory
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_mma_get_sync_msg_info(U32 msg_id, srv_mms_mma_get_msg_info_struct* msg_info, srv_mms_func_mem_alloc alloc_fn,srv_mms_func_mem_free free_fn);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_is_java_mms
 * DESCRIPTION
 *  This function tells mms type is java or not
 * PARAMETERS
 *  msg_id:		  [IN] Message id
 * RETURNS
 *  TRUE :[if message is Java]
 *  FALSE: [O/W]
 *****************************************************************************/
extern MMI_BOOL srv_mms_is_java_mms(U32 msg_id);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_is_corrupted_mms
 * DESCRIPTION
 *  This function tells mms type is corrupted or not
 * PARAMETERS
 *  msg_id:		  [IN] Message id
 * RETURNS
 *  TRUE :[if message is corrupted or unsupported]
 *  FALSE: [O/W]
 *****************************************************************************/
extern MMI_BOOL srv_mms_is_corrupted_mms(U32 msg_id);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_msg_storage
 * DESCRIPTION
 *  This API returns storage of a message
 * PARAMETERS
 *  msg_id - Message ID
 * RETURNS
 *  srv_mms_msg_storage_enum - Message storage
 *****************************************************************************/
extern srv_mms_msg_storage_enum srv_mms_get_msg_storage(U32 msg_id);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_is_mms_notification
 * DESCRIPTION
 *  This function tells msg type is MMS notification or not
 * PARAMETERS
 *  msg_id:		  [IN] Message id
 * RETURNS
 *  TRUE :[if message is  MMS notification]
 *  FALSE: [O/W]
 *****************************************************************************/
extern MMI_BOOL srv_mms_is_mms_notification(U32 msg_id);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_is_forward_lock
 * DESCRIPTION
 *  This API returns if mms can be forwarded or not
 * PARAMETERS
 * void
 * RETURNS
 *  BOOL - returns TRUE if MMS can not be forwarded else returns FALSE 
 *****************************************************************************/
extern BOOL srv_mms_is_forward_lock(U32 msg_id);


/* DOM-NOT_FOR_SDK-BEGIN */
#ifdef __MMI_MMS_VENDOR_APP_SUPPORT__
/*****************************************************************************
 * FUNCTION
 *  srv_mms_immed_send
 * DESCRIPTION
 *  This function semd  MMS immediate
 * PARAMETERS
 *  para        [IN]        Parameters passed by caller Application through struct srv_mms_immed_send_req_struct
 * RETURNS
 *  S32
 * RETURN VALUES
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_immed_send(srv_mms_immed_send_req_struct *para);
#endif
/*****************************************************************************
 * FUNCTION
 *  srv_mms_delete_all
 * DESCRIPTION
 *  This function deletes all MMS of a folder
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_delete_all_ind_struct
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_delete_all(srv_mms_delete_all_ind_struct *para);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_set_readmark
 * DESCRIPTION
 *  This function set the MMS read/unread status
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_set_readmark_req_struct
 * RETURNS
 *  srv_mms_result_enum
 ****************************************************************************/
extern S32 srv_mms_set_readmark(srv_mms_set_readmark_req_struct *para);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_unread_msg_list
 * DESCRIPTION
 *  This function gets unread MMS list from MMA
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_get_unread_msg_list_req_struct
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_get_unread_msg_list(srv_mms_get_unread_msg_list_req_struct *para);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_msg_property_list
 * DESCRIPTION
 *  This function gets Message property list from MMA
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_property_req_struct
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_get_msg_property_list(srv_mms_property_req_struct *para);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_recent_evt_list
 * DESCRIPTION
 *  This function gets recent event list from MMA
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_recent_evt_list_req_struct
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_get_recent_evt_list(srv_mms_recent_evt_list_req_struct *para);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_um_refresh_msg_list
 * DESCRIPTION
 *  This function refreshes UM Msg List
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_um_refresh_ind_struct
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_um_refresh_msg_list(void *para);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_send_read_report_req
 * DESCRIPTION
 *  This function sends read report
 * PARAMETERS
 *  req:              [IN]  Parameters passed by caller Application through struct   srv_mms_send_read_report_req_struct
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_mms_send_read_report_req(srv_mms_send_read_report_req_struct *req);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_download
 * DESCRIPTION
 *  This function downloads MMS
 * PARAMETERS
 *   req:              [IN]  Parameters passed by caller Application through struct   srv_mms_download_req_struct     
 * RETURNS
 *  void
  *****************************************************************************/
extern void  srv_mms_download(srv_mms_download_req_struct *req);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_download
 * DESCRIPTION
 *  This function downloads MMS without showing any popup
 * PARAMETERS
 *   req:              [IN]  Parameters passed by caller Application through struct   srv_mms_download_req_struct     
 * RETURNS
 *  void
  *****************************************************************************/
extern void srv_mms_download_without_popup(srv_mms_download_req_struct *req);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_cancel_download
 * DESCRIPTION
 *  This function cancels download MMS
 * PARAMETERS
 *   req:              [IN]  Parameters passed by caller Application through struct   srv_mms_cancel_download_req_struct
* RETURNS
 *  void
 *****************************************************************************/
extern void srv_mms_cancel_download(srv_mms_cancel_download_req_struct *req);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_set_app_data
 * DESCRIPTION
 *  This function sets app data for a MMS
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_set_app_data_req_struct
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_set_app_data(void *para);



/*****************************************************************************
 * FUNCTION
 *  srv_mms_show_status_icon
 * DESCRIPTION
 *  Show status icon based upon the maximum number and unread mms
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_mms_show_status_icon(void);


#ifdef __MMI_MMS_COPY_TO_ARCHIVE_SUPPORT__
/*****************************************************************************
 * FUNCTION
 *  srv_mms_copy_to_archive
 * DESCRIPTION
 *  This function copy MMS to Archive
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_copy_to_archive_req_struct
 * RETURNS
 *  S32
 * RETURN VALUES
 *  srv_mms_result_enum 
 *****************************************************************************/
extern S32 srv_mms_copy_to_archive(srv_mms_copy_to_archive_req_struct *para);
#endif

#ifdef __MMI_FTE_SUPPORT__
/*****************************************************************************
 * FUNCTION
 *  srv_mms_is_reply_on
 * DESCRIPTION
 *  This API Checks if reply option can be enabled for a MMS or not
 * PARAMETERS
 *  msg_id:     [IN] Messaage id 
 * RETURNS
 *  MMI_BOOL  MMI_TRUE:Enabled, MMI_FALSE:Disabled
 *****************************************************************************/
extern MMI_BOOL srv_mms_is_reply_on(U32 msg_id);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_is_forward_on
 * DESCRIPTION
 *  This API Checks if forward option can be enabled for a  MMS or not
 * PARAMETERS
 *  msg_id:     [IN]Message id
 * RETURNS
 *  MMI_BOOL  MMI_TRUE:Enabled, MMI_FALSE:Disabled
 *****************************************************************************/
extern MMI_BOOL srv_mms_is_forward_on(U32 msg_id);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_is_edit_on
 * DESCRIPTION
 *  This API Checks if edit option can be enabled for a MMS or not
 * PARAMETERS
 *  msg_id:     [IN] Message id 
 * RETURNS
 *  MMI_BOOL  MMI_TRUE:Enabled, MMI_FALSE:Disabled
 *****************************************************************************/
extern MMI_BOOL srv_mms_is_edit_on(U32 msg_id);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_is_delete_on
 * DESCRIPTION
 *  This API Checks if delete option can be enabled for a message or not
 * PARAMETERS
 *  msg_id:     [IN] Message id 
 * RETURNS
 *  MMI_BOOL  MMI_TRUE:Enabled, MMI_FALSE:Disabled
 *****************************************************************************/
extern MMI_BOOL srv_mms_is_delete_on(U32 msg_id);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_is_resend_on
 * DESCRIPTION
 *  This API Checks if resend option can be enabled for a MMS or not
 * PARAMETERS
 *  msg_id:     [IN] Message id 
 * RETURNS
 *  MMI_BOOL  MMI_TRUE:Enabled, MMI_FALSE:Disabled
 *****************************************************************************/
extern MMI_BOOL srv_mms_is_resend_on(U32 msg_id);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_is_send_on
 * DESCRIPTION
 *  This API Checks if send option can be enabled for a MMS or not
 * PARAMETERS
 *  msg_id:     [IN] Message id 
 * RETURNS
 *  MMI_BOOL  MMI_TRUE:Enabled, MMI_FALSE:Disabled
 *****************************************************************************/
extern MMI_BOOL srv_mms_is_send_on(U32 msg_id);
#endif

/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_msg_count
 * DESCRIPTION
 *  This API gets message(s) number from MMA in blocking operation
 * PARAMETERS
 *  msg_count_req:   [OUT]Caller application passes its count information request through srv_mms_get_msg_count_struct and gets response in the same structure
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_get_msg_count(srv_mms_get_msg_count_struct *msg_count_req);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_delete_msg
 * DESCRIPTION
 *  This API deletes a msg in blocking operation
 * PARAMETERS
 *  msg_id:       [IN] Message id
 *  result:      [OUT] result returned by mma , mma_result_enum 
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_delete_msg(U32 msg_id, U8 *result);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_save_msg
 * DESCRIPTION
 *  This API saves a msg to given box in blocking operation
 * PARAMETERS
 *  msg_id:      [IN] Message id
 *  folder_id:   [IN]Folder id , mma_folder_enum
 *  result:      [OUT] result returned by mma , mma_result_enum [OUT]
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_save_msg(U32 msg_id, mma_folder_enum folder_id, U8 *result);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_set_read_status_and_refresh_list
 * DESCRIPTION
 *  This API sets a msg read status in sync operation and refreshes message list
 * PARAMETERS
 *  msg_id:     [IN] Message id
 *  is_read:    [IN]MMI_TRUE:Read, MMI_FALSE:Unread
 *  result:     [OUT] result returned by mma , mma_result_enum [OUT]
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_set_read_status_and_refresh_list(U32 msg_id, MMI_BOOL is_read, U8 *result);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_mma_get_sync_msg_info_user_data_input
 * DESCRIPTION
 *  This function gets the detail single msg info from MMA in blocking call
 * PARAMETERS
 *  msg_id:		  [IN] Message id
 *  msg_info:     [OUT]Single Message information
 *  alloc_fn:     [IN] callback func to allocate memory
 *  free_fn:      [IN] callback func to free memory
 *  user_data:    [IN] user data of caller
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_mma_get_sync_msg_info_user_data_input(U32 msg_id, srv_mms_mma_get_msg_info_struct* msg_info, srv_mms_func_mem_alloc_user_data alloc_fn,srv_mms_func_mem_free free_fn, void *user_data);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_update_ui_status_icons
 * DESCRIPTION
 *  This function updates the status bar icons
 * PARAMETERS
 *  sim_id:    [IN] mma_sim_id
 *  icon_state:  [IN] srv_mms_icon_state_enum
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_mms_update_ui_status_icons(U8 sim_id, srv_mms_icon_state_action_enum icon_state);



/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_lite_view_data
 * DESCRIPTION
 *  This function gets data corresponding to a message in conversation list
 * PARAMETERS
 *  msg_id:  [IN] U32
 *  data:    [OUT] srv_mms_get_lite_view_data_struct 
 * RETURNS
 *  S32
 *****************************************************************************/
extern S32 srv_mms_get_lite_view_data(U32 msg_id, srv_mms_get_lite_view_data_struct * data);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_msg_status
 * DESCRIPTION
 *  This function returns the status of single msg 
 * PARAMETERS
 *  msg_id        [IN]  Message ID       
 * RETURNS
 *  srv_mms_msg_status_enum
 * RETURN VALUES
 *  srv_mms_msg_status_enum
 *****************************************************************************/
extern srv_mms_msg_status_enum srv_mms_get_msg_status(U32 msg_id);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_max_mms_num_on_phone
 * DESCRIPTION
 *  This function returns maximum number of MMS that can be saved on phone 
 *  memory
 * PARAMETERS
 *  void
 * RETURNS
 *  U32
 * RETURN VALUES
 *  U32 
 *****************************************************************************/
extern U32 srv_mms_get_max_mms_num_on_phone(void);


/*****************************************************************************
 * FUNCTION
 *  wap_custom_get_max_mms_num_on_card
 * DESCRIPTION
 *  This function returns maximum number of MMS that can be saved on card 
 *  memory
 * PARAMETERS
 *  void
 * RETURNS
 *  U32
 * RETURN VALUES
 *  U32 
 *****************************************************************************/
extern U32 srv_mms_get_max_mms_num_on_card (void);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_msg_to_address_by_index
 * DESCRIPTION
 *  This API returns To address by address index 
 * PARAMETERS
 * addr_buff  - Address buffer, already allocated MMA_MAX_ADDR_LEN*2 bytes 
 *              by caller
 * msg_id     - Message ID
 * addr_index - To Address Index.Starting from 0 to total To address count -1
 * RETURNS
 *  srv_mms_result_enum - returns SRV_RESULT_MMS_OK only if required address found
 *****************************************************************************/
extern S32 srv_mms_get_msg_to_address_by_index (U16* addr_buff, U32 msg_id, U8 addr_index);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_msg_to_address_count
 * DESCRIPTION
 *  This API returns To address count 
 * PARAMETERS
 * msg_id     - Message ID
 * RETURNS
 *  U32 - returns required count 
 *****************************************************************************/
extern U32 srv_mms_get_msg_to_address_count (U32 msg_id);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_has_sending_mms
 * DESCRIPTION
 *  This API returns if currently any mms is sending or not
 * PARAMETERS
 * void
 * RETURNS
 *  BOOL - returns TRUE if currently sending MMS else returns FALSE 
 *****************************************************************************/
extern BOOL srv_mms_has_sending_mms(void);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_send_failed_count
 * DESCRIPTION
 *  This API returns count of send failed MMS
 * PARAMETERS
 * void
 * RETURNS
 *  U32 - Total number of send failed MMS
 *****************************************************************************/
extern U32 srv_mms_get_send_failed_count(void);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_has_waiting_mms
 * DESCRIPTION
 *  This function tells if any MMS is waiting for send
 * PARAMETERS
 *  void
 * RETURNS
 *  TRUE :[if any MMS is waiting for send]
 *  FALSE: [if no MMS is waiting for send]
 *****************************************************************************/
extern MMI_BOOL srv_mms_has_waiting_mms(void);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_waiting_mms_count
 * DESCRIPTION
 *  This function returns count of MMS waiting for send
 * PARAMETERS
 *  void
 * RETURNS
 *  U32 - Count of MMS waiting for send
 *****************************************************************************/
extern U32 srv_mms_get_waiting_mms_count(void);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_lite_viewer_data
 * DESCRIPTION
 *  This function is to get lite viewer data in async
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_get_lite_viewer_data_req_struct
 * RETURNS
 *  S32
 * RETURN VALUES
 *  srv_mms_result_enum 
 *****************************************************************************/
extern S32 srv_mms_get_lite_viewer_data(srv_mms_get_lite_viewer_data_req_struct *req);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_text_buffer
 * DESCRIPTION
 *  This function is to get lite viewer text in sync
 * PARAMETERS
 *  srv_mms_get_lite_viewer_text_req_struct:     [IN] used by api to extract text path and content
 * RETURNS
 *  S32
 * RETURN VALUES
 *  srv_mms_result_enum 
 *****************************************************************************/
extern S32 srv_mms_get_text_buffer(srv_mms_get_lite_viewer_text_req_struct *req);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_image_buffer
 * DESCRIPTION
 *  This function is to get lite viewer image in sync
 * PARAMETERS
 *  srv_mms_get_lite_viewer_image_req_struct:     [IN] used by api to extract image virtual  path 
 * RETURNS
 *  S32
 * RETURN VALUES
 *  srv_mms_result_enum 
 *****************************************************************************/
extern S32 srv_mms_get_image_buffer(srv_mms_get_lite_viewer_image_req_struct *req);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_is_lite_view_content_req_reached_max
 * DESCRIPTION
 *  This function is to get lite viewer content reached max
 * PARAMETERS
 *  void
 * RETURNS
 *  MMI_BOOL
 * RETURN VALUES
 *  MMI_TRUE: if count reached max
 *  MMI_FALSE : o/w
 *****************************************************************************/
MMI_BOOL srv_mms_is_lite_view_content_req_reached_max(void);


#ifdef __MMI_MMS_URI_AGENT__
#if (defined(__UNIFIED_COMPOSER_SUPPORT__) || defined(__MMS_STANDALONE_COMPOSER_SUPPORT__))
extern void mmi_umms_de_init_uri(void);
#endif 
#endif /* __MMI_MMS_URI_AGENT__ */ 
#ifdef __MMI_OP11_MMS_SEND_TO_PHOTO_BLOG__
/* under construction !*/
#endif 

/*****************************************************************************
 * FUNCTION
 *  srv_mms_delete_recent_event
 * DESCRIPTION
 *  This function deletes recent event
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_delete_recent_evt_req_struct
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_delete_recent_event(void *para);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_send_obj_ind
 * DESCRIPTION
 *  This function sends object indication to MMA
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_obj_ind_struct
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_send_obj_ind(void *para);
/*****************************************************************************
 * FUNCTION
 *  srv_mms_entry_mark_several_screen
 * DESCRIPTION
 *  This function enters Mark Several screen asynchronously
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_entry_mark_several_req_struct 
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_entry_mark_several_screen(void *para);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_process_data_init
 * DESCRIPTION
 *  This function parses xml
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_xml_parse_req_struct
			  [OUT]srv_mms_xml_parse_rsp_struct in case it is a blocking call
 * RETURNS
 *  S32
 * RETURN VALUES
 *  return value is error (srv_mms_result_enum) if < 0
 *  return value is pid if > 0
 *****************************************************************************/
extern srv_mms_viewer_result_enum srv_mms_process_data_init(
                                        mma_mms_description_struct *body,
                                        srv_mms_xml_parse_req_struct *req);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_process_drm_files
 * DESCRIPTION
 *  This function process drm files in stored in objects already stored in service
 * PARAMETERS
 *  para:     [IN] Parameters passed by caller Application through struct srv_mms_xml_parse_req_struct
			  
 * RETURNS
 *  S32
 * RETURN VALUES
 *  return value is error (srv_mms_result_enum) if < 0
 *  return value is pid if > 0
 *****************************************************************************/
extern S32 srv_mms_process_drm_files_ext(void *para);

#if defined(__MMI_OP11_HOMESCREEN__)
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif
/*****************************************************************************
 * FUNCTION
 *  srv_mms_create_mms_xml_description_file
 * DESCRIPTION
 *  Getting Generate XML in case of default templates
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern S32 srv_mms_create_mms_xml_description_file(srv_mms_xml_msg_header_struct *srv_xml_msg, U8 *file_path);

/*****************************************************************************
 * FUNCTION
 *  mmi_umms_jsr_xml_creation_stop
 * DESCRIPTION
 *  Getting Generate XML in case of default templates
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern S32 srv_mms_jsr_xml_creation_stop(FS_HANDLE fh);

/*****************************************************************************
 * FUNCTION
 *  mmi_umms_jsr_add_object_in_xml
 * DESCRIPTION
 *  Getting Generate XML in case of default templates
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern S32 srv_mms_jsr_add_object_in_xml(srv_mms_viewer_object_struct *object, FS_HANDLE fh);

/*****************************************************************************
 * FUNCTION
 *  mmi_umms_jsr_create_mms_xml_header
 * DESCRIPTION
 *  Getting Generate XML in case of default templates
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern S32 srv_mms_jsr_create_mms_xml_header(srv_mms_xml_msg_header_struct *srv_xml_msg, FS_HANDLE fh);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_viewer_get_objects_from_current_slide
 * DESCRIPTION
 *  returns objects from current slide
 * PARAMETERS
 *  image       [IN]        
 *  video       [IN]        
 *  audio       [IN]        
 *  text        [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_mms_viewer_get_objects_from_current_slide(
        mma_mms_object_struct **image,
        mma_mms_object_struct **video,
        mma_mms_object_struct **audio,
        mma_mms_object_struct **text);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_viewer_get_med_object_from_current_slide
 * DESCRIPTION
 *  returns media object from current slide
 * PARAMETERS
 *  media       [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_mms_viewer_get_med_object_from_current_slide(
        mma_mms_object_struct **media);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_viewer_get_attachment_list
 * DESCRIPTION
 *  returns the attachment list
 * PARAMETERS
 *  attachment_list         [IN]        
 *  num_of_attachments      [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_mms_viewer_get_attachment_list(mma_mms_attachment_info_struct **attachment_list, PU32 num_of_attachments);

/***USE DETAIL AMITESH************************/
extern void srv_mms_delete_viewer_services(void);
extern void srv_mms_deinit_viewer(U32 index);
extern U32 srv_mms_viewer_get_total_obj_count(void);
/***********************/
/* Use Details Related */
/***********************/

typedef struct 
{
	kal_uint16 addr_len;
    kal_uint8 addr_group; 	/* mma_address_group_type_enum */	
	kal_uint8 addr_type;    /* mma_addr_type_enum */
    kal_uint8 rr_status;    /* Read report status for this address */ 		
	kal_uint8 dr_status;    /* Delivery report status for this address */
	kal_wchar address[MMA_MAX_ADDR_LEN];   /*  SRV_MMS_MAX_ADDR_LEN Encoded by USC2 */
}srv_mms_msg_report_status_struct;


typedef srv_mms_msg_report_status_struct * p_srv_mms_msg_report_status;
/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_mms_msg_addr_info
 * DESCRIPTION
 *  This function gets the detail single msg info from MMA in blocking call
 * PARAMETERS
 *  msg_id:		  [IN] Message id
 *  addr_info:    [OUT]Group Address information
 *  to_count:     [OUT]total count of address in to
 *  cc_count:     [OUT]total count of address in cc
 *  bcc_count:    [OUT]total count of address in bcc
 *  alloc_fn:     [IN] callback func to allocate memory
 *  free_fn:      [IN] callback func to free memory
 *  user_data:    [IN] user data of caller
 * RETURNS
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_get_mms_msg_addr_info(U32 msg_id, p_srv_mms_msg_report_status* msg_info, S32 *to_count, S32 *cc_count,S32 *bcc_count,srv_mms_func_mem_alloc_user_data alloc_fn,srv_mms_func_mem_free free_fn, void *user_data);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_send_read_report_after_validation
 * DESCRIPTION
 *  This function sends read report of a MMS
 * PARAMETERS
 *  msg_id					   [IN]        
 *  follow_settings            [IN] 
 * RETURNS
 *  MMI_BOOL
 * RETURN VALUES
 *  TRUE [if Read Report Sent Successfully]
 *  FALSE [o/w]
 *****************************************************************************/
extern MMI_BOOL srv_mms_send_read_report_after_validation(
							U32 msg_id,
							MMI_BOOL follow_settings);
/*Amitesh Temp*/


#ifdef __MMI_MMS_POSTCARD__
/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_filepath_from_decoder
 * DESCRIPTION
 *  Give file path to application in case of message type is postcard
 * PARAMETERS
 *  file_path           [IN]        [out]
 *  offset              [?]         
 *  size                [?]         
 *  mem_alloc_fn(?)     [IN]        
 * RETURNS
 *  void
 *****************************************************************************/

extern void srv_mms_get_filepath_from_decoder(U16 **file_path, S32 *offset, S32 *size);
#endif




#ifdef __MMI_MMS_DUAL_SIM__
srv_mms_dual_sim_struct* srv_mms_get_sim_info(void);
#endif


/*  srv_mms_set_app_data_req_struct */
S32 mmi_umms_set_app_data_req(void *para);
/****************************************/
/*MEMORY RELATED CODE WILL BE MOVED SOON*/
/****************************************/



extern srv_mms_nvram_compose_settings_struct* srv_mms_get_nvram_compose_settings(void);
extern srv_mms_nvram_sending_settings_struct* srv_mms_get_nvram_sending_settings(void);
extern srv_mms_nvram_retrieval_settings_struct* srv_mms_get_nvram_retrieval_settings(void);

#ifdef __MMI_MMS_SIM_USER_PREFERENCE_SUPPORT__

extern void srv_mms_set_sim_mms_settings(void);
extern void srv_mms_get_sim_mms_user_pref_info(U16 total_file_size, U16 num_records);
extern U16 srv_mms_get_sim_delivery_time(U32 index, U8 length);
extern U16 srv_mms_get_sim_expiry_time(U32 index, U8 length);
extern void srv_mms_sim_settings_timer_callback(void);

extern void srv_mms_get_sim_mms_file_access_info(void);


#endif /* __MMI_MMS_SIM_USER_PREFERENCE_SUPPORT__ */ 

extern U32 srv_get_total_number_of_messages(void);
extern U32 srv_get_tone_id_for_new_message(void);
extern void srv_mms_get_number_status_icon(void);
extern mma_msg_storage_type_enum srv_mms_get_mms_prefer_storage(void);
extern mma_msg_storage_type_enum srv_mms_get_mms_prefer_storage(void);
srv_mms_prefer_storage_enum srv_mms_get_mms_prefer_storage_ex(void);
extern mma_creation_mode_enum srv_mms_compose_settings_creation_mode(void);
extern mma_priority_enum srv_mms_sending_settings_priority(void);
extern void srv_mms_compose_setting_image_resize_info(mma_image_resizing_struct *resize);
extern srv_umms_picture_size_enum srv_mms_compose_setting_image_resize_based_upon_size(void);
extern U8 srv_mms_compose_setting_user_defined_slide_time(void);
extern mma_expiry_time_enum srv_mms_sending_settings_validity_period(void);
extern mma_delivery_time_enum srv_mms_sending_settings_delivery_time(void);
extern U8 srv_mms_sending_settings_delivery_report(void);
extern U8 srv_mms_sending_settings_read_report(void);
extern U8 srv_mms_retrieval_settings_read_report(void);
extern mma_setting_size_limit_enum srv_mms_sending_mms_size_limit(void);
extern void srv_mms_compose_settings_sign_info(mma_signature_struct *signature);
extern void srv_mms_compose_settings_default_slide_time(mma_setting_struct *set);
extern U8 srv_mms_compose_settings_layout(void);
extern U8 srv_mms_compose_settings_add_as_drm(void);
extern U8 srv_mms_compose_settings_max_no_pages(void);
extern U8 srv_mms_compose_settings_layout(void);
extern U8 srv_mms_compose_settings_best_page_duration(void);
extern U8 srv_mms_sending_settings_reply_charging_status(void);
extern U8 srv_mms_sending_settings_reply_charging_request_type(void);
extern U32 srv_mms_sending_settings_deadline_for_reply(void);
extern U8 srv_mms_sending_settings_hide_sender(void);
extern U8 srv_mms_sending_settings_send_and_save(void);
extern mma_retrieval_mode_enum srv_mms_retrieval_settings_home_network_retrieval_mode(void);
extern mma_retrieval_mode_enum srv_mms_retrieval_settings_roaming_retrieval_mode(void);
extern U8 srv_mms_retrieval_settings_anonymous_filter(void);
extern U8 srv_mms_retrieval_settings_advertisment_filter(void);
extern U8 srv_mms_retrieval_settings_delivery_report(void);

MMI_BOOL srv_mms_mma_set_settings_rsp(void *msg);
MMI_BOOL srv_mms_um_get_msg_list_rsp(void *msg);
MMI_BOOL srv_mms_um_get_msg_info_rsp(void *inMsg);

extern void srv_mms_set_current_mms_profile(MMI_BOOL boot_up);
extern void srv_mms_set_current_profile_req(void);
extern MMI_BOOL srv_mms_save_objects_get_file_name(S8 **const file_path, S8 const *const file_name, MMI_BOOL flag);
extern void srv_mms_set_current_mms_profile(MMI_BOOL boot_up);


extern void srv_mms_cancel_download_rsp(U32 msg_id, U8 result);

extern MMI_BOOL srv_mms_is_msg_exist(U32 msg_id);




#ifdef __MMI_OP12_TOOLBAR__
extern void srv_mms_tb_evnt_query_mms(S32 num);
#endif /* __MMI_OP12_TOOLBAR__ */



extern S32 srv_mms_get_use_details_for_slide(void *para);
extern void srv_mms_save_object_file_callback(S32 copy_result);
extern MMI_BOOL srv_mms_abort_file_copy(void);
extern void srv_mms_make_file_name(S8 *file_name, S8 *file_ext);
/***********************************************************************/ 
extern void srv_mms_update_menu_callback(U32 msg_id, U8 result);
extern void srv_mms_update_folder_callback(void);
extern void srv_mms_cancel_send_rsp(U32 msg_id, U8 result);
extern void srv_mms_send_rsp(kal_uint32 msg_id, kal_uint8 result, kal_uint16 *response_text, kal_uint8 flag, kal_uint8 sim_id);
extern void srv_mms_cancel_download_rsp(U32 msg_id, U8 result);
extern void srv_mms_download_rsp(U32 msg_id, U32 new_msg_id, U8 result, U16 *response_txt,U8 quota, U8 flag, U8 sim_id);
extern MMI_BOOL mmi_umms_app_ready(void);
extern void srv_mms_update_recent_event_list_from_phone_suit(void);
extern U16 srv_mms_viewer_get_total_slide_num(void);
extern U16 srv_mms_viewer_get_current_slide_num(void);
extern void srv_mms_send_save_rsp_to_app(void);
extern S32 srv_mms_get_total_use_detail_count(applib_addr_type_enum type);
extern MMI_BOOL srv_mms_is_use_detail_parsing_going_on(void);
extern U32 srv_mms_get_default_template_count(void);
extern void srv_mms_write_nvram_retrieval_settings(void);
extern void srv_mms_write_nvram_compose_settings(void);
extern void srv_mms_write_nvram_sending_settings(void);
extern S32 srv_mms_set_setting(void *req);

#ifdef __MMI_MMS_TEMPLATE_SUPPORT__
extern U32 srv_mms_um_get_list_info(void *req);
extern U32 srv_mms_um_get_template_msg_info(void *req);
extern U32 srv_mms_get_userdef_template_num(void);
extern void srv_mms_phone_suit_template_support_callback(U32 msg_id);
#endif /*__MMI_MMS_TEMPLATE_SUPPORT__*/

extern MMI_BOOL srv_mms_get_filename_by_id(mma_mms_slide_object_struct *media, PU16 vf, PU16 *file_path, PS32 vf_parent_file_handle);
extern BOOL srv_mms_is_usb_mode(void);

//extern MMI_BOOL srv_mms_viewer_load_ucs2_txt_to_buffer(PU8 dest_buffer, U32 dest_buffer_size, U32 object_id);
extern MMI_BOOL srv_mms_check_rights_by_id(mma_mms_slide_object_struct *media);
extern MMI_BOOL srv_mms_start_consume_rights(mma_mms_slide_object_struct *media, PU16 file_path, srv_mms_rights_expiry_notify_cb expiry_func, void *user_data);
extern void srv_mms_stop_consume_rights(mma_mms_slide_object_struct *media);
extern void srv_mms_update_rights_by_id(mma_mms_slide_object_struct *media, MMI_BOOL rights_expired);
extern  MMI_BOOL srv_mms_move_to_attachment(mma_mms_slide_object_struct *media);

extern void srv_mms_viewer_best_page_duration(U64 playing_time, kal_uint32 * slide_duration, kal_uint32 * obj_start_time, kal_uint32 * obj_end_time);
extern void srv_mms_delete_single_msg_from_notify_list(U32 msg_id);
extern MMI_BOOL srv_mms_viewer_load_ucs2_txt_to_buffer(PU8 dest_buffer, U32 dest_buffer_size, mma_mms_slide_text_object_struct *media);
extern void srv_mms_set_message_type(kal_uint8 msg_type);
extern kal_uint8 srv_mms_get_message_type(void);
extern void *srv_mms_get_use_details_req_hdlr(void *msgPtr);
#ifdef __MMI_OP11_HOMESCREEN__ 
/* under construction !*/
/* under construction !*/
#endif
#if defined(__MMI_OP11_HOMESCREEN__) || defined(__MMI_VUI_HOMESCREEN__)
extern void srv_mms_hs_get_recent_mms(S32 num);
extern void srv_mms_hs_entry_clear_all_event(void);
#endif
extern MMI_BOOL srv_mms_is_wap_ready(void);
extern void srv_mms_close_use_detail_file_hdl(void);
extern void srv_mms_compute_rest_use_details(void);
//extern void srv_mms_set_prefered_storage(U8 mms_prefer_storage_enum, U8 flag);
extern void srv_mms_change_msg_storage(U8 action_type, U8 storage, U32 msg_id);
#ifdef __MMI_MMS_MEMORY_CARD_STORAGE_SUPPORT__
extern U8 srv_mms_get_mms_prefer_storage_for_hilight(void);
extern void srv_mms_set_prefered_storage(U8 mms_prefer_storage_enum, U8 flag);
extern void srv_mms_set_msg_filter(U8 mms_msg_filter_flag);
#endif
extern U8 srv_mms_get_msg_filter(void);
extern U32 srv_mms_get_phone_mem_total_msg(void);
extern U32 srv_mms_get_mem_card_total_msg(void);
extern void srv_mms_reset_mem_card_total_msg(void);


#if(MMI_MAX_SIM_NUM >= 2)
extern void srv_mms_set_selected_sim_id(const U8 sim_id);
extern U8 srv_mms_get_selected_sim_id(void);
extern MMI_BOOL srv_mms_get_sim_status(U8 sim_id);
extern void srv_mms_dual_sim_set_download_msg_id(U32 msg_id);
extern U32 srv_mms_dual_sim_get_download_msg_id(void);
extern void srv_mms_settings_sim_info_handler(void *inMsg);
#endif /* __MMI_MMS_DUAL_SIM__ */ 

#ifdef __MMI_OP11_MMS_SEND_TO_PHOTO_BLOG__
/* 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

#ifdef __MMI_MMS_MMA_MMS_OBJECT_IND__
extern void srv_mms_delete_all_obj_ind_msg(void);
#endif /* __MMI_MMS_MMA_MMS_OBJECT_IND__ */ 

#ifdef __MMI_MMS_VENDOR_APP_SUPPORT__
extern void srv_mms_vendor_send_rsp_callback(U32 msg_id, U8 result);
#endif
#ifdef __MMI_FTE_SUPPORT__
extern void srv_mms_reset_sync_data(void);
#endif

extern void srv_mms_read_nvram_retrieval_settings(void);
extern void srv_mms_read_nvram_sending_settings(void);
extern void srv_mms_read_nvarm_compose_settings(void);
extern void srv_mms_close_xml_file_handle(void);


extern MMI_BOOL srv_mms_is_duplicate_address(
                                U8 *ucs2_addr,
                                srv_mms_address_type_enum type,
                                srv_mms_addr_struct *list1, 
                                srv_mms_addr_struct *list2, 
                                srv_mms_addr_struct *list3);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_msg_update_count_and_status_icon
 * DESCRIPTION
 *  This API gets message(s) number from MMA in sync operation and updates status icon
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_mms_msg_update_count_and_status_icon(void);




/*****************************************************************************
 * FUNCTION
 *  srv_mms_entry_folder_hdlr
 * DESCRIPTION
 *  
 * PARAMETERS
 *  para   
 * RETURNS
 *  mmi_ret
 *****************************************************************************/
extern mmi_ret srv_mms_entry_folder_hdlr(mmi_event_struct* para);

#ifndef __MMI_PLUTO_3232_IDLE_NMGR_SLIM__
/*****************************************************************************
 * FUNCTION
 *  srv_mms_nmgr_if_new_msg_event
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void   
 * RETURNS
 *  MMI_BOOL
 *****************************************************************************/
extern MMI_BOOL srv_mms_nmgr_if_new_msg_event(void);
#endif /*__MMI_PLUTO_3232_IDLE_NMGR_SLIM__*/

extern U8 srv_mms_nmgr_sim_id_for_new_msg(void);
extern MMI_BOOL srv_mms_check_app_is_sending_mms(void);
extern MMI_BOOL srv_mms_check_app_is_receiving_mms(void);
#ifdef __MMI_MMS_REPORT_BOX_SUPPORT__

#ifndef __MMI_PLUTO_3232_IDLE_NMGR_SLIM__
/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_report_count
 * DESCRIPTION
 *  
 * PARAMETERS
 *
result
 * RETURNS
 *  
 *****************************************************************************/
extern void srv_mms_query_unread_report_data(void);



/*****************************************************************************
 * FUNCTION
 *  srv_mms_nmgr_if_new_msg_event
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void   
 * RETURNS
 *  MMI_BOOL
 *****************************************************************************/
extern MMI_BOOL srv_mms_nmgr_if_new_report_event(void);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_nmgr_cancel_unread_report
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_mms_nmgr_cancel_unread_report(void);
#endif/*__MMI_PLUTO_3232_IDLE_NMGR_SLIM__*/

#endif/*__MMI_MMS_REPORT_BOX_SUPPORT__*/

/*****************************************************************************
 * FUNCTION
 *  srv_mms_sim_unavailable_hdlr
 * DESCRIPTION
 *  
 * PARAMETERS
 *  para   
 * RETURNS
 *  mmi_ret
 *****************************************************************************/
extern mmi_ret srv_mms_sim_unavailable_hdlr(mmi_event_struct* para);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_sim_available_hdlr
 * DESCRIPTION
 *  
 * PARAMETERS
 *  para   
 * RETURNS
 *  mmi_ret
 *****************************************************************************/
extern mmi_ret srv_mms_sim_available_hdlr(mmi_event_struct* para);

#ifdef __USB_IN_NORMAL_MODE__
/*****************************************************************************
 * FUNCTION
 *  srv_mms_exit_usb_rsp_hdlr
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_mms_exit_usb_rsp_hdlr(void);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_entry_usb_rsp_hdlr
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_mms_entry_usb_rsp_hdlr(void);
#endif /*__USB_IN_NORMAL_MODE__*/

/*****************************************************************************
 * FUNCTION
 *  srv_mms_sim_availability_handler
 * DESCRIPTION
 *  
 * PARAMETERS
 *  inMsg       [?]     
 * RETURNS
 *  void
 *****************************************************************************/
extern mmi_ret srv_mms_sim_availability_handler(mmi_event_struct *evt);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_power_off
 * DESCRIPTION
 *  This function creates new MMS
 * PARAMETERS
 *  para        [IN]        Parameters passed by caller Application through struct srv_mms_power_off_req_struct
 * RETURNS
 *  S32
 * RETURN VALUES
 *  srv_mms_result_enum
 *****************************************************************************/
extern S32 srv_mms_power_off(srv_mms_power_off_req_struct *para);

/*App Srv Enhancements*/
#ifdef __MMI_MMS_NOT_ALLOW_USER_DOWNLOAD_CORRUPTED_MMS_MSG__
extern void srv_mms_get_dwnld_quota_from_bgsr(U32 msg_id, U8 result, U8 quota);
#endif /* __MMI_MMS_NOT_ALLOW_USER_DOWNLOAD_CORRUPTED_MMS_MSG__ */ 

typedef void (* save_obj_cb)(void *user_data, mmi_id evt_type, void *rsp_err);
typedef struct
{
	void *user_data;
	MMI_BOOL is_preview;
	S32 fs_error;
	save_obj_cb save_obj_fn;
}srv_mms_save_obj_req_struct;

typedef struct
{
	void *user_data;
	S32 copy_result;
}srv_mms_save_obj_rsp_evt_struct;

#if defined(OBIGO_Q03C_MMS_V02) && defined(WAP_SUPPORT)
extern mmi_frm_proc_result_enum mmi_mms_deinit(void *arg, const mmi_frm_proc_id_info_struct id_info);
#endif


extern void srv_mms_send_events(mmi_id evt_id, void *user_data);
extern void srv_mms_send_events_ex(mmi_id evt_id, void *sender_data);

extern void srv_mms_set_sim1_context(MMI_BOOL flag);
extern void srv_mms_set_sim2_context(MMI_BOOL flag);
extern MMI_BOOL srv_mms_get_sim1_context(void);
extern MMI_BOOL srv_mms_get_sim2_context(void);
extern void srv_mms_set_sim1_profile_flag(MMI_BOOL flag);
extern void srv_mms_set_sim2_profile_flag(MMI_BOOL flag); 
extern MMI_BOOL srv_mms_get_sim1_profile_flag(void);
extern MMI_BOOL srv_mms_get_sim2_profile_flag(void);
extern U16 srv_mms_convert_umbox_type_to_mma_folder(srv_um_msg_box_enum um_box_id);
extern U8 srv_mms_convert_mma_folder_to_bgsr_folder(mma_folder_enum folderID);
extern srv_um_msg_box_enum srv_mms_convert_mma_folder_to_umbox_type(mma_folder_enum folder_id);
extern srv_um_sim_enum srv_mms_translate_mma_simid_to_um_simid(U8 sim_id);
extern U8 srv_mms_send_setting_to_bgsr_send_setting( /* srv_mms_send_setting_enum */ U8 send_setting);
extern U32 srv_mms_get_current_utc_time(void);


extern U16 *srv_mms_get_virtual_file_name(void);
extern U16 *srv_mms_get_media_file_path(void);
extern U16 *srv_mms_get_src_file_name(void);
extern mma_mms_description_struct* srv_mms_get_desc_pointer(void);
PU8 srv_mms_get_slide_txt_buffer(void);
U32 srv_mms_get_ptxt_buffer_size(void);
PU8 srv_mms_get_pinputbox_buffer(void);



extern void srv_mms_save_object(mma_mms_object_struct *obj, void *user_data);
extern U16 *srv_mms_get_virtual_file_name(void);
extern void srv_mms_set_virtual_file_name(U16 *virtual_file_name);
extern U16 *srv_mms_get_media_file_path(void);
extern void srv_mms_set_media_file_path(U16 *media_file_path);
extern U16 *srv_mms_get_src_file_name(void);
extern void srv_mms_set_src_file_name(U16 *src_file_name);
extern U8 srv_mms_get_drm_type(void);
extern void srv_mms_set_drm_type(U8 drm_type);
extern FS_HANDLE srv_mms_get_file_handle(void);
extern void srv_mms_set_file_handle(FS_HANDLE file_handle);
extern void srv_mms_close_object_file_handle(void);
extern void srv_mms_set_media_info(U16 *media_info);
extern S32 srv_mms_get_attachment_list_hilighted_item(void);
extern void srv_mms_send_save_objects_error(U16 error_id, U16 error_type);
extern void srv_mms_viewer_send_event_to_exit(srv_mms_viewer_result_enum result, S32 file_error_type);
extern U32 srv_mms_get_viewer_asm_size(void);
extern mmi_ret srv_mms_mode_switch_finish_event_hdlr(mmi_event_struct *evt);
extern mma_mms_slide_struct *srv_mms_viewer_get_current_slide(void);
#ifdef __DRM_SUPPORT__
extern MMI_BOOL srv_mms_viewer_is_media_with_no_rights(void);
#endif /*__DRM_SUPPORT__*/
extern void srv_mms_refresh_profile_settings(U8 sim_id);
extern U8 srv_mms_mma_folder_to_bgsr_folder(mma_folder_enum folderID);
extern U32 srv_mms_viewer_get_slide_obj_count(U32 slide_num);
extern mma_mms_slide_struct * srv_mms_viewer_get_slide_by_index(U32 index);
extern mma_mms_object_struct * srv_mms_viewer_get_objects_from_id(U32 id);
extern MMI_BOOL srv_mms_parse_xml_resume(U32 index);
#ifdef __MMI_MV_SUPPORT_USE_DETAIL_HIGHLIGHT__
extern MMI_BOOL srv_mms_viewer_get_urls_on_slide(U32 index);
extern MMI_BOOL srv_mms_viewer_get_emails_on_slide(U32 index);
extern MMI_BOOL srv_mms_viewer_get_numbers_on_slide(U32 index);
extern void srv_mms_viewer_rsp_for_use_details_for_category(U32 index);
extern MMI_BOOL srv_mms_viewer_start_compute_use_details(U32 index);
#endif
extern U16 *srv_mms_duplicate_phoneno_no_written_sep(srv_mms_alloc_mem mem_alloc_fn, U16 *str);
#ifdef __MMI_MMS_URI_AGENT__
#if (defined(__UNIFIED_COMPOSER_SUPPORT__) || defined(__MMS_STANDALONE_COMPOSER_SUPPORT__))
extern void srv_mms_launch_write_msg(void);
extern void srv_mms_send_call_back_to_uri_agnt(void);
#endif /* (defined(__UNIFIED_COMPOSER_SUPPORT__) || defined(__MMS_STANDALONE_COMPOSER_SUPPORT__)) */ /* #ifdef __UNIFIED_COMPOSER_SUPPORT__ */
#endif /* __MMI_MMS_URI_AGENT__ */ 
typedef  void(*delete_instance_callback)(void *);
extern U32 srv_mms_create_main_instance(delete_instance_callback , void *, U32);
extern void srv_mms_delete_instance(U32 index);
extern MMI_BOOL srv_mms_search_instance_ext(U32 index);
#ifdef __MMI_MMS_BGSR_SUPPORT__
extern kal_uint8 srv_mms_bgsr_send_req( kal_uint8 sim_id, kal_uint32 msg_id, srv_mms_bgsr_send_setting_enum send_setting, kal_uint8 storage_type, kal_uint16 app_id);
extern kal_uint8 srv_mms_bgsr_download_req(kal_uint8 sim_id, kal_uint32 msg_id, kal_uint8 storage_type);
extern void srv_mms_bgsr_get_msg_info( kal_uint32 msg_id,
                                      srv_mms_bgsr_msg_info_struct * msg_info, 
                                      srv_mms_bgsr_msg_funcptr_type get_msg_info_callback,
                                      kal_uint8 storage_type,
                                      mma_msg_type_enum msg_type);
extern kal_uint32 srv_mms_bgsr_get_msg_status(kal_uint32 msg_id);
extern kal_uint32 srv_mms_bgsr_update_msg_status_info(kal_uint32 msg_id, kal_uint8* ntt, kal_uint8* quota);
extern kal_uint32 srv_mms_bgsr_get_sending_msg_id(void);
extern kal_uint32 srv_mms_bgsr_get_downloading_msg_id(void);
extern kal_uint8 srv_mms_bgsr_change_msg_notify(kal_uint32 msg_id, 
                                                srv_mms_bgsr_msg_operation_notify_enum msg_operation_notify,
                                                srv_mms_bgsr_msg_box_enum msg_folder,
                                                srv_mms_bgsr_funcptr_type change_msg_notify_callback,
                                           kal_uint8 storage_type);
extern void srv_mms_bgsr_set_rr_flag (U32 msg_id);
extern kal_bool srv_mms_bgsr_is_rr_pending(U32 msg_id);

extern kal_bool srv_mms_bgsr_is_in_use(kal_uint8 sim_id);

#ifdef __MMI_MMS_FALLBACK__
extern void srv_mms_bgsr_discard_bearer_fallback(kal_uint8 sim_id);
extern mmi_ret srv_mms_bgsr_bearer_fallback_cui_proc(mmi_event_struct *evt);
#endif /*__MMI_MMS_FALLBACK__*/
#ifdef __DM_LAWMO_SUPPORT__
extern void srv_mms_bgsr_law_mo_wipe_notify(void);
#endif
#endif

/*****************************************************************************
 * FUNCTION
 *  srv_mms_set_sim_context
 * DESCRIPTION
 *  This function sets the bit corresponding to the SIM.
 * PARAMETERS
 *  sim_id      [IN]
 * RETURNS
 *  void 
 *****************************************************************************/
extern void srv_mms_set_sim_valid_flag(mmi_sim_enum sim_id);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_reset_sim_context
 * DESCRIPTION
 *  This function resets the bit corresponding to the SIM.
 * PARAMETERS
 *  sim_id      [IN]
 * RETURNS
 *  void 
 *****************************************************************************/
extern void srv_mms_reset_sim_valid_flag(mmi_sim_enum sim_id);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_sim_context
 * DESCRIPTION
 *  This function sets the bit corresponding to the SIM.
 * PARAMETERS
 *  sim_id      [IN]
 * RETURNS
 *  MMI_BOOL 
 *****************************************************************************/
 extern U8 srv_mms_get_sim_valid_flag(void);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_sim_context
 * DESCRIPTION
 *  This function sets the bit corresponding to the SIM.
 * PARAMETERS
 *  sim_id      [IN]
 * RETURNS
 *  MMI_BOOL 
 *****************************************************************************/
 extern MMI_BOOL srv_mms_is_sim_valid(mmi_sim_enum sim_id);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_num_valid_sim
 * DESCRIPTION
 *  This function sets the bit corresponding to the SIM.
 * PARAMETERS
 *  sim_id      [IN]
 * RETURNS
 *  MMI_BOOL 
 *****************************************************************************/
 extern U8 srv_mms_num_valid_sim(void);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_set_profile_flag
 * DESCRIPTION
 *  This function sets the bit corresponding to the SIM.
 * PARAMETERS
 *  sim_id      [IN]
 * RETURNS
 *  void 
 *****************************************************************************/
extern void srv_mms_set_profile_flag(mmi_sim_enum sim_id);


/*****************************************************************************
 * FUNCTION
 *  srv_mms_reset_sim_context
 * DESCRIPTION
 *  This function resets the bit corresponding to the SIM.
 * PARAMETERS
 *  sim_id      [IN]
 * RETURNS
 *  void 
 *****************************************************************************/
extern void srv_mms_reset_profile_flag(mmi_sim_enum sim_id);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_get_sim_context
 * DESCRIPTION
 *  This function sets the bit corresponding to the SIM.
 * PARAMETERS
 *  sim_id      [IN]
 * RETURNS
 *  MMI_BOOL 
 *****************************************************************************/
 U8 srv_mms_get_profile_flag(void);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_is_sim_valid
 * DESCRIPTION
 *  This function sets the bit corresponding to the SIM.
 * PARAMETERS
 *  sim_id      [IN]
 * RETURNS
 *  MMI_BOOL 
 *****************************************************************************/
MMI_BOOL srv_mms_is_profile_set(mmi_sim_enum sim_id);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_is_sim_valid
 * DESCRIPTION
 *  This function sets the bit corresponding to the SIM.
 * PARAMETERS
 *  sim_id      [IN]
 * RETURNS
 *  MMI_BOOL 
 *****************************************************************************/
void srv_mms_refresh_profile(void);

 /*****************************************************************************
 * FUNCTION
 *  srv_mms_sim_availability_handler
 * DESCRIPTION
 *  
 * PARAMETERS
 *  inMsg       [?]     
 * RETURNS
 *  void
 *****************************************************************************/
extern mmi_ret srv_mms_sim_availability_handler(mmi_event_struct *evt);

#ifdef __MMI_MMS_MEMORY_CARD_STORAGE_SUPPORT__
/*****************************************************************************
 * FUNCTION
 *  srv_mms_check_memory_usage
 * DESCRIPTION
 *  
 * PARAMETERS
 *  Size       [Downloadable MMS Size]     
 * RETURNS
 *  U8 srv_mms_card_usage_enum
 *****************************************************************************/
extern srv_mms_card_usage_enum srv_mms_check_memory_usage(U32);
#endif /*__MMI_MMS_MEMORY_CARD_STORAGE_SUPPORT__*/

extern void srv_mms_update_ui_status_icons(U8 sim_id, srv_mms_icon_state_action_enum icon_state);

extern MMI_BOOL srv_mms_if_is_mms_in_open_state(const U32 msg_id);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_is_delivery_report
 * DESCRIPTION
 *  This function tells mms type is delivery report or not
 * PARAMETERS
 *  msg_id      [IN]        Message id
 * RETURNS
 *  TRUE :[if message is Java]
 *  FALSE: [O/W]
 *****************************************************************************/
 extern MMI_BOOL srv_mms_is_delivery_report(U32 msg_id);

/*****************************************************************************
 * FUNCTION
 *  srv_mms_is_read_report
 * DESCRIPTION
 *  This function tells mms type is read report or not
 * PARAMETERS
 *  msg_id      [IN]        Message id
 * RETURNS
 *  TRUE :[if message is Java]
 *  FALSE: [O/W]
 *****************************************************************************/
extern MMI_BOOL srv_mms_is_read_report(U32 msg_id);

/* DOM-NOT_FOR_SDK-END */

/*XML Removal Activity*/
extern MMI_BOOL srv_mms_container_copy_header(mma_mms_description_header_struct *src,
	mma_mms_description_header_struct *dst,
	srv_mms_func_mem_alloc_user_data alloc_fn,
	srv_mms_func_mem_free_user_data free_func,
	mma_mms_state_enum state,
	U8 mode,
	mma_app_mode_enum app_mode,
	void *user_data);

extern MMI_BOOL srv_mms_container_copy_body(mma_mms_description_body_struct *src,
	mma_mms_description_body_struct *dst,
	srv_mms_func_mem_alloc_user_data alloc_fn,
	srv_mms_func_mem_free_user_data free_func,
	void *user_data);
extern void *srv_mms_mem_mgr_viewer_asm_alloc_ext(U32 size, void *user_data);
extern void srv_mms_mem_mgr_viewer_asm_free_ext(void *memory, void *user_data);

extern mma_mms_description_struct* srv_mms_get_desc_pointer(void);
extern mma_mms_attachment_info_struct *srv_mms_insert_attachment(mma_mms_description_body_struct *dst,
																 srv_mms_func_mem_alloc_user_data alloc_fn,
																 srv_mms_func_mem_free_user_data free_fn,
																 void *user_data);
extern  mma_mms_object_struct *srv_mms_copy_existing_object(mma_mms_description_body_struct *dst,
														   mma_mms_object_struct *obj1,
														   srv_mms_func_mem_alloc_user_data alloc_fn,
														   srv_mms_func_mem_free_user_data free_fn,
														   void *user_data);


extern MMI_BOOL srv_mms_add_address_ext(
								 mma_mms_description_header_struct *dst,
								 U8 *ucs2_addr,
								 mma_addr_type_enum type,
								 mma_mms_address_group_type_enum group,
								 srv_mms_func_mem_alloc_user_data alloc_fn,
								 srv_mms_func_mem_free_user_data free_fn,
								 void *user_data);

MMI_BOOL srv_mms_convert_file_name_to_ascii(mma_mms_object_struct *obj,
									  srv_mms_func_mem_alloc_user_data alloc_fn,
									  srv_mms_func_mem_free_user_data free_func,
									  void *user_data);
extern MMI_BOOL srv_mms_viewer_is_attachment_in_mms(void);
typedef enum
{
    SRV_MMS_NORMAL_EDIT_MODE,  /* Edit Mode */
    SRV_MMS_FORWARD_WITHOUT_EDIT_MODE,   /* Forward mode having no edit. Need to keep original content. */
    SRV_MMS_FORWARD_WITH_EDIT_MODE   /* Forward mode having edit. Can change content according to edit mode. */
} srv_mms_mode_change_status_enum;

#define __MMI_MMS_SLIM_SETTINGS__

#ifdef __MMI_MMS_SLIM_SETTINGS__
typedef enum
{
    SRV_MMS_SENDING_SETTINGS_READ_REPORT,  
    SRV_MMS_RETRIEVAL_SETTINGS_HOME_NW,   
    SRV_MMS_RETRIEVAL_SETTINGS_ANON,      
    SRV_MMS_RETRIEVAL_SETTINGS_ADV,
    SRV_MMS_RETRIEVAL_SETTINGS_DELIVERY_REPORT,
    SRV_MMS_RETRIEVAL_SETTINGS_READ_REPORT,
    
} srv_mms_settings_enum;

#endif /* __MMI_MMS_SLIM_SETTINGS__ */

#endif /* __MMI_MMS_2__ */
#endif /* MMS_SRV_GPROT_H */