PlstSrvGprot.h 84.4 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
/*****************************************************************************
*  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:
 * ---------
 *  PlstSrvGprot.h
 *
 * Project:
 * --------
 *  MAUI
 *
 * Description:
 * ------------
 *  player list service head file
 *
 * 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!
 *
 *
 *------------------------------------------------------------------------------
 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *============================================================================
 ****************************************************************************/

#ifndef __PLST_SERVICE_GPROT_H__
#define __PLST_SERVICE_GPROT_H__

#include "FileMgrSrvGProt.h"
#include "meta_tag_api.h"

#include "MMIDataType.h"
#include "kal_general_types.h"
#include "gui_data_types.h"
#include "mmi_rp_file_type_def.h"
#include "MMI_features.h"
#include "mmi_frm_events_gprot.h"

#ifdef __PLST_SERVICE_DB_SUPPORT__

#if defined(__MMI_MAINLCD_320X480__) && defined(__MMI_VUI_SHELL_MEDIA_PLAYER__)
#define SRV_PLST_ARTWORK_RESIZED_WIDTH   176
#define SRV_PLST_ARTWORK_RESIZED_HEIGHT  176  //The size must be even number
#else
#define SRV_PLST_ARTWORK_RESIZED_WIDTH   150
#define SRV_PLST_ARTWORK_RESIZED_HEIGHT  150
#endif

#define SRV_PLST_USE_CRC_GEN_UNQIUE  


#define SRV_PLST_MAX_SERVICE_SUPPORT         (20)

/* max length of each meta info */
#define SRV_PLST_META_INFO_MAX_LEN            (META_TAG_FRAME_MAX_LEN)

#define SRV_PLST_MAX_TEMP_FILE_LENGTH          41
/* max file length */
#define SRV_PLST_MAX_FILE_LEN                 (SRV_FMGR_PATH_MAX_FILE_NAME_LEN + 1)
/* max filepath length */
#define SRV_PLST_MAX_PATH_LEN                 ((SRV_FMGR_PATH_MAX_LEN+1))
/* max file extension length*/
#define SRV_PLST_MAX_EXT_LEN                  (SRV_FMGR_PATH_MAX_FILE_EXT_LEN)
#define SRV_PLST_MAX_GROUP_NUM                 30


#define SRV_PLST_VIEW_LIST_DEPTH                    (6)
#define SRV_PLST_VIEW_LIST_CACHE                    (100)
#define SRV_PLST_MAX_FOLDER_DEPTH                   (16)
#define SRV_PLST_MIN_DB_SPACE                       (100)
#define SRV_PLST_MAX_ALL_TRACKS_ITEM                (5000)
#define SRV_PLST_MAX_PLST_ITEM                      (5000)
#define SRV_PLST_RECENT_LIST_MAX_COUNT              (20)
#define SRV_PLST_MOST_PLAYED_COUNT                  (20)
#define SRV_PLST_MAX_REORDER_STEP                   (SRV_PLST_VIEW_LIST_CACHE/2)

/* min memory size list service need */
#define SRV_PLST_MIN_MEM_SQLITE               (240 * 1024)  /* Memory reserve for SQLite database */
#define SRV_PLST_MIN_MEM_CONTROL              (20 *1024)    /* Foreground, consider sizeof(srv_plst_main_context_struct) + sizeof(srv_plst_gen_lib_context_struct) + meta parser memory */
#define SRV_PLST_MIN_MEM_CONTROL_BACKGROUND   (11 *1024)    /* Not add songs in background, only consider sizeof(srv_plst_main_context_struct) */
#define SRV_PLST_MIN_MEM_CONTROL_GEN_DB       (4500)        /* sizeof(srv_plst_gen_lib_context_struct), accurate size is 4416 */

#define SRV_PLST_MIN_MEM_SIZE                 (SRV_PLST_MIN_MEM_SQLITE + SRV_PLST_MIN_MEM_CONTROL)


#if defined(__MMI_CSTAR__) || defined(__MMI_T9__)
//#define  __SRV_PLST_SUPPORT_PINYIN_SORT__
#endif


/* configue default playlist, app need check to prevent create another playlist name same as default playlist */
typedef enum
{
    /* default playlist all kuro list */
    SRV_PLST_DEF_ALL_KURO_LIST       = 0X0001,
    /* default playlist my favourite */
    SRV_PLST_DEF_MY_FAVOURITE        = 0X0002,
    /* default playlist recent playlist */
    SRV_PLST_DEF_RECENTLY_PLST       = 0X0004,
    /* default playlist most played list */
    SRV_PLST_DEF_MOST_PLST           = 0X0008,
    /* default playlist on the fly list */
    SRV_PLST_DEF_ON_THE_FLY          = 0X0010,
    SRV_PLST_DEF_LIST_ENUM_END,   /* config info end */
    /* default playlist  */
    SRV_PLST_DEF_ACTIVE_LIST         = 0X8000    
}srv_plst_default_playlist_enum;


/* three type repeat mode */
typedef enum
{
    SRV_PLST_REPEAT_OFF, /* repeat off */
    SRV_PLST_REPEAT_ONE, /* repeat one */
    SRV_PLST_REPEAT_ALL, /* repeat all */
    SRV_PLST_REPEAT_END   /* end of enum */
}srv_plst_repeat_enum;

/* teo type shuffle mode*/
typedef enum
{
    SRV_PLST_SHUFFLE_OFF, /* shulffe off */
    SRV_PLST_SHUFFLE_ON,  /* shulffe on */
    SRV_PLST_SHUFFLE_END   /* end of enum */
}srv_plst_shuffle_enum;


/* view type in the data lib */
typedef enum
{
     SRV_PLST_VIEW_DUMMY = 0,	 /* DUMMY */
     SRV_PLST_VIEW_AUDIO,
     SRV_PLST_VIEW_VIDEO,
     SRV_PLST_VIEW_STREM_LINK,
     SRV_PLST_VIEW_ARTIST, /* artist  type */
     SRV_PLST_VIEW_ALBUM,  /* album type */
     SRV_PLST_VIEW_GENRE,  /* genre  type */
     SRV_PLST_VIEW_MEDIA,  /* media file type */
     SRV_PLST_VIEW_IMAGE_FLOW,
     SRV_PLST_VIEW_PLST,   /* play list type */
     SRV_PLST_VIEW_PLST_ADDTO,
     SRV_PLST_VIEW_PLST_ACTIVE, /* view active list, not use for entry default list directly */
     SRV_PLST_VIEW_PREFIX_SEARCH, /* app won't set this enum */
     SRV_PLST_VIEW_PLST_DEFAULT,  /* For shell or cube only, already phase out */
     SRV_PLST_VIEW_END,    /* end of enum */
     SRV_PLST_VIEW_ROOT = 0XFFFFFFFF
}srv_plst_view_type_enum;

typedef enum
{
    SRV_PLST_TYPE_ID_NONE,
    SRV_PLST_TYPE_ID_AUDIO,
    SRV_PLST_TYPE_ID_VIDEO,
    SRV_PLST_TYPE_ID_ARTIST,
    SRV_PLST_TYPE_ID_ALBUM,
    SRV_PLST_TYPE_ID_GENRE,
    SRV_PLST_TYPE_ID_MEDIA,
    SRV_PLST_TYPE_ID_PLST,
    SRV_PLST_TYPE_END
}srv_plst_storage_type_id_enum;

typedef enum
{
    SRV_PLST_CNTX_TYPE_FILENAME,
    SRV_PLST_CNTX_TYPE_TITLE,
    SRV_PLST_CNTX_TYPE_ARTISTNAME,
    SRV_PLST_CNTX_TYPE_ALBUMNAME,
    SRV_PLST_CNTX_TYPE_GENRENAME,
  //  SRV_PLST_CNTX_TYPE_PLSTNAME,
   // SRV_PLST_CNTX_TYPE_PATH,
  //  SRV_PLST_CNTX_TYPE_DETAILS,
    SRV_PLST_CNTX_TYPE_END
}srv_plst_get_context_type_enum;

typedef enum
{
    SRV_PLST_ACTIVE_LIST_TYPE_NONE,
    SRV_PLST_ACTIVE_LIST_TYPE_AUDIO,
    SRV_PLST_ACTIVE_LIST_TYPE_VIDEO,
    SRV_PLST_ACTIVE_LIST_TYPE_AUDIO_DYNAMIC_LIST,
    SRV_PLST_ACTIVE_LIST_TYPE_END
}srv_plst_active_list_media_type_enum;

typedef enum
{
    SRV_PLST_ACTIVE_LIST_NONE,
    SRV_PLST_ACTIVE_LIST_AUDIO,
    SRV_PLST_ACTIVE_LIST_VIDEO,
    SRV_PLST_ACTIVE_LIST_PLST,
    SRV_PLST_ACTIVE_LIST_TEMP_AUDIO,  /* for mark serval play */
    SRV_PLST_ACTIVE_LIST_TEMP_VIDEO,
    SRV_PLST_ACTIVE_LIST_TEMP_PLST,
    SRV_PLST_ACTIVE_LIST_STREAM_LINK,  /* current no support */
    SRV_PLST_ACTIVE_LIST_ENUM_END
}srv_plst_active_list_enum;

typedef enum
{
    SRV_PLST_LIST_SORT_BY_UNICODE,   /* default type */  
    SRV_PLST_LIST_SORT_BY_PINYIN,  
    SRV_PLST_LIST_SORT_BY_MODIFY_TIME, /* only for playlist */
    SRV_PLST_LIST_SORT_BY_INDEX,       /* only for playlist item, by added index */
    SRV_PLST_LIST_SORT_END
}srv_plst_list_sort_type_enum;

typedef enum
{
    SRV_PLST_SEARCH_BY_PREFIX_NEW_LIST,  /* default type */
    SRV_PLST_SEARCH_BY_PREFIX_CURRENT_LIST,
    SRV_PLST_SEARCH_BY_WORD_FIX,
    SRV_PLST_SEARCH_END
}srv_plst_search_type_enum;

typedef enum
{
    SRV_PLST_PLST_REORDER_CONTINUE, /* default type, can cancelreorder action*/
    SRV_PLST_PLST_REORDER_DERECTLY, /* can't cacnel the reorder action */
    SRV_PLST_PLST_REORDER_END
}srv_plst_plst_reorder_enum;

typedef enum
{
    SRV_PLST_VIEW_SORT_BY_FILENAME,
    SRV_PLST_VIEW_SORT_BY_TITLE,
    SRV_PLST_VIEW_SROT_END
}srv_plst_view_sort_type;


typedef enum
{
    SRV_PLST_PLAY_INFO_STORE,
    SRV_PLST_PLAY_INFO_NOT_STORE,
    SRV_PLST_PLAY_INFO_STORE_MANUAL,    /* store playing info in database, but update action triggered by caller */
    SRV_PLST_PLAY_INFO_ENUM,
}srv_plst_playing_info_store_enum;

typedef enum
{
    SRV_PLST_HAVE_PLAY_CYCLE_INFO, /* Application will cotrol repeat all cycle */
    SRV_PLST_NO_PLAY_CYCLE_INFO,   /* List service control repeat all (do not return empty)  */
    SRV_PLST_PLAY_CYCLE_INFO_END
}srv_plst_play_cycle_info_enum;

typedef enum
{
    SRV_PLST_CONFIG_LIST_VIEW_SORT_TYPE,
    SRV_PLST_CONFIG_PLST_VIEW_SORT_TYPE,
    SRV_PLST_CONFIG_VIEW_SORT_CONTEXT,
    SRV_PLST_CONFIG_SEARCH_TYPE,
    SRV_PLST_CONFIG_REORDER_TYPE,
    SRV_PLST_CONFIG_PLAY_INFO,
    SRV_PLST_CONFIG_RET_PLAY_CYCLE_INFO,
    SRV_PLST_CONFIG_END
}srv_plst_config_type_enum;

/* player list service caller handler return value */
typedef enum
{
    /* api execute OK, no error */
    SRV_PLST_OK = 0,
    /* need more time to return result */
    SRV_PLST_ASYNC,  
    SRV_PLST_RET_ERR_BEGIN = -5000,
    /* version wrong, api can popup or recall open */
    SRV_PLST_VERSION_WRONG,
    SRV_PLST_RET_ERR_MEMORY_NOT_ENOUGH,
    SRV_PLST_RET_ERR_DISK_NOT_ENOUGH,
    SRV_PLST_RET_ERR_SERVICE_MAX_SUPPORT,
    SRV_PLST_RET_ERR_MEMORY_CONRRUPT,
    SRV_PLST_RET_ERR_DB_CONRRUPT,
    SRV_PLST_RET_ERR_DESTROY_FAIL,
    SRV_PLST_RET_ERR_SQLITE_ERR,
    SRV_PLST_RET_ERR_PARAM_ERR,
    SRV_PLST_RET_ERR_UNKOWN_ERR, //-4990
    SRV_PLST_RET_ERR_FS_ERROR,
    SRV_PLST_RET_ERR_FATAL_ERROR,
    SRV_PLST_RET_ITEM_EXIST,
    SRV_PLST_RET_CONTINUE,
    SRV_PLST_RET_EMPTY,
    SRV_PLST_RET_ERR_META_PAESER,
    SRV_PLST_RET_ERR_GDI_ERR,
    SRV_PLST_RET_ERR_DB_NOT_FOUND,
    SRV_PLST_RET_ERR_DB_CRASH,
    SRV_PLST_RET_DELETE_ACTIVE,
    SRV_PLST_RET_CANCEL_ACTION,
    SRV_PLST_RET_DB_FULL,
    SRV_PLST_RET_DB_AUDIO_FULL,
    SRV_PLST_RET_DB_VIDEO_FULL,
    SRV_PLST_RET_PLST_FULL,
    SRV_PLST_RET_ERR_IMG_FORMAT_ERROR,    
   /* end of enum */
    SRV_PLST_RET_END  
}srv_plst_caller_handler_enum;

typedef enum
{
    SRV_PLST_PLST_SHOW_NONE,
    SRV_PLST_PLST_DEFAULT_SHOW_FIRST,
    //SRV_PLST_PLST_DEFAULT_SHOW_LAST, /* OBSOLETE */
    SRV_PLST_PLST_SHOW_END,
}srv_plst_plst_show_sequeue_enum;


typedef enum
{
    SRV_PLST_ACTIVE_ALBUM,
    SRV_PLST_ACTIVE_MEDIA,
    SRV_PLST_ACTIVE_END
}srv_plst_active_type_enum;

/* enum for open libarary  */
typedef enum
{
    SRV_PLST_OPEN_ONLY,   /* open directly, failed return */
    SRV_PLST_OPEN_AUTO,   /* only update the damaged */
    SRV_PLST_OPEN_NEW,   /* open, delete old db and create new one  */ 
    SRV_PLST_OPEN_AFTER_MEDIA_CHANGE,  /* call when plug in SD card during service already in using  */
    SRV_PLST_OPEN_REOPEN,  /* reopen database for memory shrink, everything is the same as original config  */
    SRV_PLST_OPEN_END
}srv_plst_open_flag_enum;

/* player list operation strcture */
typedef struct
{
    S32 index;         /* index of selected, */
    U32 id;            /* id of selected */
    U16 view_type;     /* see srv_plst_view_type_enum */
    MMI_BOOL is_id_used;  /* the index and id only use one param, is_id_used: TRUE: used id param  FALSE: use index */
}srv_plst_list_view_struct;
/*
sample if op artist all                 (SRV_PLST_VIEW_ROOT, SRV_PLST_VIEW_ARTIST )
          op second artist'slbum          ( 2 ,SRV_PLST_VIEW_ALBUM)  
          op selected artist all tracks     (2, SRV_PLST_VIEW_MEDIA )            
          op selected album's all song           (2, SRV_PLST_VIEW_MEDIA )
          
          op album's second song        (2, SRV_PLST_VIEW_MEDIA)
          op all audio                  (SRV_PLST_VIEW_ROOT, SRV_PLST_VIEW_AUDIO) 
          op all plst                  (SRV_PLST_VIEW_ROOT, SRV_PLST_VIEW_PLST)
          op second play list           (2,SRV_PLST_VIEW_MEDIA)
*/

/* player list get fixed count strcture */
typedef struct
{
    srv_plst_list_view_struct view_stack[SRV_PLST_VIEW_LIST_DEPTH];

}srv_plst_fixed_count_struct;

/* get item display structure */
typedef struct
{
    U32 index;   /* in :item index */
    U32 buff_size;    /* in:  buff_size */
    U32 string_ptr;   /* in/out: context */
}srv_plst_list_get_display_struct;


typedef struct
{
    U32 param_a;  /* unique id in db, or index1 */
    U32 param_b; /* storage info or index2 */    
}srv_plst_list_item_info;


/* time stucture */
typedef struct
{
   U16  year;  /*  year */
   U8   month; /*  mouth */
   U8   day;  /* day*/
   U8   hour; /*  hour */
   U8   min;	 /*  minites */
}srv_plst_time_struct;

/* player list service details structure */
typedef struct
{
    U32 media_id;
    UI_character_type filename[SRV_PLST_META_INFO_MAX_LEN + 1];  /* filename */
    UI_character_type title[SRV_PLST_META_INFO_MAX_LEN + 1];     /* title */
    UI_character_type artist[SRV_PLST_META_INFO_MAX_LEN + 1];    /* artist name */
    UI_character_type album[SRV_PLST_META_INFO_MAX_LEN + 1];     /* album name */
    UI_character_type author[SRV_PLST_META_INFO_MAX_LEN + 1];    /* author name */
    UI_character_type genre[SRV_PLST_META_INFO_MAX_LEN + 1];     /* genre */
    UI_character_type copyrights[SRV_PLST_META_INFO_MAX_LEN + 1];   /* copyrights */
    UI_character_type description[SRV_PLST_META_INFO_MAX_LEN + 1];   /*description */
    S32 artwork_type;
    S32 duration;   /* secend */
    U32 bits_rate;
    U16 sample_rate;
    S16 track_num;    /* traks number */
    S16 year;         /* year */
    U8 channel_num;     /* channel num */
    U16 play_count;    /* 65536 */ 
    S16 volume;/* 65535 */
    U8  user_rating;    /* user rating */
    U8 sample_bits;
    srv_plst_time_struct last_played;  /*last played time */
    srv_plst_time_struct last_modified;   /* last modifyed name */ 
}srv_plst_media_details_struct;

typedef union
{
    UI_character_type name[SRV_PLST_MAX_PATH_LEN + 1];  /* filename */
   // UI_character_type path[SRV_PLST_MAX_PATH_LEN];   
}srv_plst_get_context_struct;

typedef struct
{
    U32 id;
    srv_plst_storage_type_id_enum id_enum;    
    srv_plst_get_context_type_enum get_type;
}srv_plst_get_cntx_param_struct;

typedef struct
{
    U32 group_count;  /* the group count will only return 1 or 27, 1: show no sub group only one  27: A-Z/# */
    U32 group[SRV_PLST_MAX_GROUP_NUM];
}srv_plst_list_group_item_info_struct;

typedef struct
{
    U32 buff_size;   /* in */
    U32 buff_ptr;    /* in/out: buff to get info*/
}srv_plst_get_cntx_output_struct;

typedef struct
{
    CHAR *path;
    S8 is_folder;
    MMI_BOOL is_delete_all;
    FMGR_FILTER filter;
}srv_plst_delete_file_from_fmgr_struct;

/* player list service callback event */
typedef enum
{
    /* DONE/FAILED
       when open down, will call caller callback*/
    SRV_PLST_CB_EVT_OPEN,
    /* DONE/CANCElED/FAILED 
       when finished completed, response this event and done info
       when canceled completed, response this event and cacenled ino
       when gen failed, response this event and failed info*/    
    SRV_PLST_CB_EVT_UPDATE, 
    /* DONE/FAILED */  
    SRV_PLST_CB_EVT_SEARCH, 
    /* DONE /FAILED/CANCELED*/
    SRV_PLST_CB_EVT_DELETE_LIST,
    SRV_PLST_CB_EVT_DELETE_ACTIVE_MEDIA,
    SRV_PLST_CB_EVT_ADD_TO_PLST,
    SRV_PLST_CB_EVT_GET_IMAGE,
    SRV_PLST_CB_EVT_USB_PLUG_IN,
    SRV_PLST_CB_EVT_USB_PLUG_OUT,
    SRV_PLST_CB_EVT_MSDC_PLUG_OUT,
    SRV_PLST_CB_EVT_MSDC_PLUG_IN,
    SRV_PLST_CB_EVT_PRE_FORMAT,
    SRV_PLST_CB_EVT_AFT_FORMAT,
    SRV_PLST_CB_EVT_NOTIFY_DEFAULT_STORAGE_CHANGE,
    SRV_PLST_CB_EVT_MSDC_ENTRY_UNMOUNT,
    SRV_PLST_CB_EVT_MSDC_EXIT_UNMOUNT,
    SRV_PLST_CB_EVT_ACTIVE_LIST_INVALID,
    SRV_PLST_CB_EVT_DELETE_FROM_FMGR,
    SRV_PLST_CB_EVT_UPDATE_ARTWORK,
    SRV_PLST_CB_EVT_ADD_PROGRESS,
    SRV_PLST_CB_EVT_DELETE_PROGRESS,
    SRV_PLST_CB_EVT_STORE_ACTIVE,
    SRV_PLST_CB_EVT_TOTAL	
}srv_plst_cb_evt_enum;


/*call back function for notify events
  user_data:reserve for caller, normal used in multi-instanace
  cb_event:see srv_list_cb_evt_enum
  cb_para   :events attached parameter
*/
typedef S32 (*cb_func)(void* user_data, srv_plst_cb_evt_enum cb_event, S32 cb_para_1, U32 cb_para_2);

/* player list service create structure */
typedef struct
{
    void  *mem_ptr;     /* memory for create service handle, it should be the KAL_ADM_ID return by kal_adm_create() */
    U32   mem_size;     /* total memory size */
    U32   db_mem_size;  /* memory size reserve for SQLite database */
    U32   gen_mem_size; /* memory size reserve for generate database, ie. sizeof(srv_plst_gen_lib_context_struct) */
    U32   max_item_support;  /* max list item support */
}srv_plst_create_struct;


/*****************************************************************************
 * FUNCTION
 *  srv_plst_default_playlist_configure
 * DESCRIPTION
 *   set the configure of default playlist, set it before SRV_PLST_CMD_LIBRARY_OPEN, and only call once after service created    
 * PARAMETERS
 *  srv_plst_hdr :         [IN]   service handle
 *  default_flag :         [IN]   default play list configure info  
 * Sample
 *     default_flag   SRV_PLST_DEFAULT_RECENTLY_PLST|SRV_PLST_DEFAULT_MOST_PLST
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_default_playlist_configure(U32 srv_plst_hdr, U32 default_flag);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_default_playlist_configure
 * DESCRIPTION
 *   get the default playlist type by index that selected index from lib   
 * PARAMETERS
 *  srv_plst_hdr :         [IN]   service handle
 *  index        :         [IN]   index in current   
 *  default_type :         [OUT]   SRV_PLST_DEFAULT_RECENTLY_PLST or SRV_PLST_DEFAULT_MOST_PLST etc
 * RETURNS
 *  return error code  S32
 *****************************************************************************/ 
extern S32 srv_plst_default_playlist_get_type(U32 srv_plst_hdr, U32 index, U32* default_type);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_library_open
 * DESCRIPTION
 *   open the DB library and create/check DB, table, fill the default,after service is created, this action only do once time
 * PARAMETERS
 *  srv_plst_hdr :         [IN]   service handle
 *  name         :         [IN]   db name
 *  open_flag    :         [IN]   see srv_plst_open_flag_enum
 * RETURNS
 *  return error code  S32
 *****************************************************************************/ 
extern S32 srv_plst_library_open(U32 srv_plst_hdr, UI_string_type name, srv_plst_open_flag_enum open_flag);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_library_stop_open
 * DESCRIPTION
 *   stop open lib after last open return is SRV_PLST_ASYNC
 * PARAMETERS
 *  srv_plst_hdr :         [IN]   service handle
 *  name         :         [IN]   db name
 *  open_flag    :         [IN]   see srv_plst_open_flag_enum
 * RETURNS
 *  return error code  S32
 *****************************************************************************/ 
extern S32 srv_plst_library_stop_open(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_library_close
 * DESCRIPTION
 *   close the DB library before destory service
 * PARAMETERS
 *  srv_plst_hdr :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_library_close(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_library_update
 * DESCRIPTION
 *   add/update DB data (sync in another task PLS), scan the file system to find all media file 
 *        and then add to library by the class of audio/video. It need a long time, so use internal msg in the PLS 
 *       the find operation 
 * PARAMETERS
 *  srv_plst_hdr :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_library_update(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_library_stop_udpate
 * DESCRIPTION
 *   stop udpate DB, stop the udpate, use current data state when app query 
 * PARAMETERS
 *  srv_plst_hdr :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_library_stop_udpate(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_library_pause_update
 * DESCRIPTION
 *   pause udpate DB, between pause and resume, no any other service api can be called
 * PARAMETERS
 *  srv_plst_hdr :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_library_pause_update(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_library_stop_udpate
 * DESCRIPTION
 *   resume  udpate DB, between pause and resume, no any other service api can be called
 * PARAMETERS
 *  srv_plst_hdr :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_library_resume_update(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_library_add
 * DESCRIPTION
 *   add file or add from folder to library,  similiar like srv_plst_library_udpate, but this cmd is only scan the input path,not all drives
 * PARAMETERS
 *  srv_plst_hdr :         [IN]   service handle
 *  path         :         [IN]   filepath or folder path
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_library_add(U32 srv_plst_hdr, UI_string_type path);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_library_stop_add
 * DESCRIPTION
 *   stop add, smiliar like srv_plst_library_stop_udpate
 * PARAMETERS
 *  srv_plst_hdr :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/  
extern S32 srv_plst_library_stop_add(U32 srv_plst_hdr);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_reset_all_list
 * DESCRIPTION
 *   clear service list info (temp function for APP)
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_reset_all_list(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_set_temp_memory
 * DESCRIPTION
 *   set temp memory for list cache to speed up the view
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  mem_ptr            :         [IN]   temp memory ptr
 *  mem_size           :         [IN]   temp_mem_size
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/  
extern S32 srv_plst_set_temp_memory(U32 srv_plst_hdr, void** mem_ptr, U32 mem_size);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_set_temp_memory
 * DESCRIPTION
 *   clear temp memory for list cache to speed up the view
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  mem_ptr            :         [IN]   temp memory ptr
 *  mem_size           :         [IN]   temp_mem_size
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/  
extern S32 srv_plst_clear_temp_memory(U32 srv_plst_hdr);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_clear_curr_view_cache
 * DESCRIPTION
 *  clear up current view stack cache for the skip query data from pls
 *  notes: this api will not effect parent_id and total num for curr view
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_clear_curr_view_cache(U32 srv_plst_hdr, MMI_BOOL clear_count);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_clear_active_list
 * DESCRIPTION
 *  clear up active playing list info
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_clear_active_list(U32 srv_plst_hdr);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_entry
 * DESCRIPTION
 *   use it as a first filter type, such as all audio list, all video list, artist list, album list
                   entry list type , set it each entry a filter, artist, artist'album ,album,all audio etc
                   but if you need entry artist first and then entry artist'album, you need code as below: 
                   SRV_PLST_CMD_LIST_ENTRY (SRV_PLST_VIEW_ROOT, SRV_PLST_VIEW_ARTIST )
                   SRV_PLST_CMD_LIST_ENTRY (2 ,SRV_PLST_VIEW_ALBUM)
                   SRV_PLST_CMD_LIST_EXIT
                   SRV_PLST_CMD_LIST_EXIT	
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  list_view_param    :         [IN]   see srv_plst_list_view_struct
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/  
extern S32 srv_plst_list_entry(U32 srv_plst_hdr, srv_plst_list_view_struct *list_view_param );


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_exit
 * DESCRIPTION
 *   set this cmd when exit the filter type, include the sub filter, such as artist'album
                      exit current list type, deinit
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/  
extern S32 srv_plst_list_exit(U32 srv_plst_hdr);   
 
    
/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_get_fixed_count
 * DESCRIPTION
 *   to get the count of fixed view
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  count              :         [IN]   count of selected
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/  
extern S32 srv_plst_list_get_fixed_count(U32 srv_plst_hdr, srv_plst_fixed_count_struct *view,  U32* count);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_get_item_count
 * DESCRIPTION
 *   to get the count of current list,artist id , album id or playlist id
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  count              :         [IN]   count of selected
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/  
extern S32 srv_plst_list_get_item_count(U32 srv_plst_hdr, U32 *count);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_get_item_display
 * DESCRIPTION
 *  get the item display info such as name, set this action when need get item info to show 
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  item_display       :         [IN]   see srv_plst_list_get_display_struct idx:[IN] item index , buff_size: [IN]  buffer size buff_ptr:[out] buffer_point
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/  
extern S32 srv_plst_list_get_item_display(U32 srv_plst_hdr, srv_plst_list_get_display_struct* item_display);


#ifdef __PLST_SRV_FEATURE_GROUP_LIST__
/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_item_jumpto
 * DESCRIPTION
 *  during show list, make the list jump to the special location
 *  it's a special function, for list service performance not so good to any index, only can to specical prefix alphabet
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  jump_to_info       :         [IN]   such as "A - Z" "a - z" "#" and # is specail for not belong to "A- Z" "a - z"
 *  index              :         [OUT]  the index of the specical alphabet in the list
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/  
extern S32 srv_plst_list_item_jumpto(U32 srv_plst_hdr, U32 jump_to_info, U32* index);
#endif /* __PLST_SRV_FEATURE_GROUP_LIST__ */

/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_get_item_id
 * DESCRIPTION
 *  get the item id
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index       :         [IN]   
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/  
extern S32 srv_plst_list_get_item_id(U32 srv_plst_hdr, S32 index, U32 *id);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_prefix_search_begin
 * DESCRIPTION
 *  prefix search for input text for artist/ album/all tracks
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_prefix_search_begin(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_prefix_search_do_search
 * DESCRIPTION
 *  prefix search for input text for artist/ album/all tracks
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  item_display       :         [IN]   string searched           
 *  count              :         [OUT]  count                                               
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_prefix_search_do_search(U32 srv_plst_hdr, U32 string, U32* count);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_prefix_search_get_display
 * DESCRIPTION
 *  get the tile for show the prefix search result
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  param_display      :         [IN/OUT]   see srv_plst_list_get_display_struct idx:[IN] item index , buff_size: [IN]  buffer size buff_ptr:[out] buffer_point          
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern  S32 srv_plst_list_prefix_search_get_display(U32 srv_plst_hdr, srv_plst_list_get_display_struct* param_display);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_prefix_search_end
 * DESCRIPTION
 *  exit prefix search
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle                                    
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_prefix_search_end(U32 srv_plst_hdr);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_get_hint_count
 * DESCRIPTION
 *   to get the count of sub item for hint show
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   sub item index 
 *  count              :         [IN]   count of selected
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/  
extern S32 srv_plst_list_get_hint_count(U32 srv_plst_hdr, U32 index, U32* count);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_get_hint_count_ex
 * DESCRIPTION
 *   to get the count of sub item for hint show
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   sub item index 
 *  count              :         [IN]   count of selected
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/  
extern S32 srv_plst_list_get_hint_count_ex(U32 srv_plst_hdr, U32 index, srv_plst_view_type_enum get_count_type, U32* count);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_get_artwork_parser_path_by_media_id
 * DESCRIPTION
 *  get the path the file path that used to parse artwork
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index       :         [IN]   
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/  
S32 srv_plst_list_get_artwork_parser_path_by_media_id(U32 srv_plst_hdr, srv_plst_list_get_display_struct* param_artwork_path);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_get_item_artwork
 * DESCRIPTION
 *   get the artwokdata of selected album(blocking)
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   sub item index 
 *  param_artwork      :         [OUT]  see srv_plst_list_get_display_struct
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_get_item_artwork(U32 srv_plst_hdr, srv_plst_list_get_display_struct* param_artwork);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_get_item_artwork_async
 * DESCRIPTION
 *   get the artwokdata of selected album(non blocking)
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   sub item index 
 *  param_artwork      :         [OUT]  see srv_plst_list_get_display_struct
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_get_item_artwork_async(U32 srv_plst_hdr, srv_plst_list_get_display_struct* param_artwork);

extern S32 srv_plst_list_update_item_artwork(U32 srv_plst_hdr, U32 index, UI_string_type path);
extern S32 srv_plst_list_update_item_artwork_async(U32 srv_plst_hdr, U32 index, UI_string_type path);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_get_item_artwork_async_stop
 * DESCRIPTION
 *   stop the getting the artwokdata of selected album(non blocking)
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   sub item index 
 *  param_artwork      :         [OUT]  see srv_plst_list_get_display_struct
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_get_item_artwork_async_stop(U32 srv_plst_hdr);

extern S32 srv_plst_list_stop_update_item_artwork(U32 srv_plst_hdr);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_get_artwork_by_media_id
 * DESCRIPTION
 *   get the artwokdata of selected media id
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  param_artwork      :         [OUT]  see srv_plst_list_get_display_struct
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_get_artwork_by_media_id(U32 srv_plst_hdr, srv_plst_list_get_display_struct* param_artwork);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_media_add_to_playlist
 * DESCRIPTION
 *   add the selected media/ artist id/ album id to playlist
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   index  >=0 add selected type/index to playlist; -1  add marked server to playlist 
 *  param_artwork      :         [OUT]  see srv_plst_list_get_display_struct
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_media_add_to_playlist(U32 srv_plst_hdr, S32 index, U32 plst_idx);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_media_stop_add_to_playlist
 * DESCRIPTION
 *   stop add the selected media/ artist id/ album id to playlist
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   index  >=0 add selected type/index to playlist; -1  add marked server to playlist 
 *  param_artwork      :         [OUT]  see srv_plst_list_get_display_struct
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_media_stop_add_to_playlist(U32 srv_plst_hdr);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_media_get_id
 * DESCRIPTION
 *   get the current id in current list, and return media_id when in song list
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   index
 *  id_info            :         [OUT]  see srv_plst_list_item_info
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_media_get_id(U32 srv_plst_hdr, U32 index, U32* id);
      
      
/*****************************************************************************
 * FUNCTION
 *  srv_plst_media_get_path
 * DESCRIPTION
 *  get the path of select media
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  param_display      :         [IN/OUT]   see srv_plst_list_get_display_struct idx:[IN] item index , buff_size: [IN]  buffer size buff_ptr:[out] buffer_point          
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_media_get_path(U32 srv_plst_hdr, srv_plst_list_get_display_struct* path_info);
      
/*****************************************************************************
 * FUNCTION
 *  srv_plst_media_get_details
 * DESCRIPTION
 *   get the details of the selected media_id, the detail info check srv_plst_media_details_struct
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  id_info            :         [IN]   see srv_plst_list_item_info
 *  details            :         [OUT]  see srv_plst_media_details_struct
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/
extern S32 srv_plst_media_get_details(U32 srv_plst_hdr, U32 id, srv_plst_media_details_struct *details_info);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_media_get_details
 * DESCRIPTION
 *   get the details of the selected media_id, the detail info check srv_plst_media_details_struct
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  id_info            :         [IN]   see srv_plst_list_item_info
 *  details            :         [OUT]  see srv_plst_media_details_struct
 *  field              :         [IN]   only get specific fields (under construction)
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/
extern S32 srv_plst_media_get_details_by_filter(U32 srv_plst_hdr, U32 id, srv_plst_media_details_struct *details_info, U32 field);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_media_get_details
 * DESCRIPTION
 *  update the details of the select media_id, the detail info check srv_plst_media_details_struct
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  id_info            :         [IN]   see srv_plst_list_item_info
 *  details            :         [IN]  see srv_plst_media_details_struct
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/      
extern S32 srv_plst_media_update_details(U32 srv_plst_hdr, U32 id_info, srv_plst_media_details_struct* details_info);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_store_active_info
 * DESCRIPTION
 *  update the current playing info to service database
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/      
extern S32 srv_plst_plst_store_active_info(U32 srv_plst_hdr);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_media_update_playing_info
 * DESCRIPTION
 *  update the play count and play time of the select media_id(current playing media) after played in the app
 *   use applib_dt_get_date_time get current time and use applib_dt_mytime_2_utc_sec to store db as current playing time
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_media_update_playing_info(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_multi_select_mark_begin
 * DESCRIPTION
 *  begin multi mark 
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_multi_select_mark_begin(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_multi_select_mark_end
 * DESCRIPTION
 *  end multi mark 
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_multi_select_mark_end(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_multi_select_set_mark
 * DESCRIPTION
 *  mark the select or unmark when multi-select
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   item index
 *  is_mark            :         [IN]   MMI_TRUE:  mark   MMI_FALSE: unmark
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_multi_select_set_mark(U32 srv_plst_hdr, U32 index, MMI_BOOL is_mark);

    
/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_multi_select_get_mark
 * DESCRIPTION
 *  get the mark the select or unmar state when multi-select in current list
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   item index
 *  is_mark            :         [OUT]   MMI_TRUE:  mark   MMI_FALSE: unmark
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_multi_select_get_mark(U32 srv_plst_hdr, U32 index, MMI_BOOL* is_mark);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_multi_select_mark_all
 * DESCRIPTION
 *  mark/ unmark all current list when multi-select
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  is_mark            :         [OUT]   MMI_TRUE:  mark   MMI_FALSE: unmark
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_multi_select_mark_all(U32 srv_plst_hdr, MMI_BOOL is_mark);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_set_as_active
 * DESCRIPTION
 *  set the current index to active and update into database
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   active index
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_set_as_active(U32 srv_plst_hdr, U32 index);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_set_as_active_ex
 * DESCRIPTION
 *  set the current index to active , 
 *  if update_db is false, update to DB by using srv_plst_list_update_current_active_to_db()
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   active index
 *  update_db          :         [IN]   is update to DB after set active
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_set_as_active_ex(U32 srv_plst_hdr, U32 index, MMI_BOOL update_db);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_update_current_active_to_db
 * DESCRIPTION
 *  Use current playing info in the context and update it to database table
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_update_current_active_to_db(U32 srv_plst_hdr);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_item_delete
 * DESCRIPTION
 *  delete the selected/ multi-select item, or artist id, album id
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   item index 
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_item_delete(U32 srv_plst_hdr, U32 index);  

/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_item_stop_delete
 * DESCRIPTION
 *  stop delete the selected/ multi-select item, or artist id, album id
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   item index 
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_item_stop_delete(U32 srv_plst_hdr, U32 *count); 
 
/*****************************************************************************
 * FUNCTION
 *  srv_plst_get_plst_index_by_name
 * DESCRIPTION
 *   To query playlist index by input playlist name
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  name               :         [IN]   playlist name
 *  index            :           [OUT]  plst index
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_get_plst_index_by_name(U32 srv_plst_hdr, UI_string_type name, U32* index);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_create
 * DESCRIPTION
 *   create new playlist, unable to create a exist name 
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  name               :         [IN]   playlist name
 *  id_info            :         [OUT]  playlist id info in the db  see srv_plst_list_item_info
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_create(U32 srv_plst_hdr, UI_string_type name, U32* id_info);    

 
/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_delete
 * DESCRIPTION
 *  delete the selected playlist
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   index
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_delete(U32 srv_plst_hdr, U32 index);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_stop_delete
 * DESCRIPTION
 *  delete the selected playlist
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   index
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_stop_delete(U32 srv_plst_hdr, U32 *count);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_rename
 * DESCRIPTION
 *  rename the selected playlist
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  name               :         [IN]   new name 
 *  index              :         [IN]   index
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_rename(U32 srv_plst_hdr, UI_string_type name, U32 index);
 

/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_get_plst_id
 * DESCRIPTION
 *   get plst_id of the selected  playlist
 *       this action only used in all playlist's list
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   index
 *  id_info            :         [OUT]  U32 
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_get_plst_id(U32 srv_plst_hdr, U32 index, U32 *id_info);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_get_active_plst_id
 * DESCRIPTION
 *   get active playing list id
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  id                 :         [OUT]  U32 
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_get_active_plst_id(U32 srv_plst_hdr, U32 *id);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_get_active_plst_item_index
 * DESCRIPTION
 *  get playing item index
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [OUT]  U32
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/
extern S32 srv_plst_plst_get_active_plst_item_index(U32 srv_plst_hdr, U32* index);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_get_active_plst_item_count
 * DESCRIPTION
 *  get playing item count
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  count              :         [OUT]  U32
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/
extern S32 srv_plst_get_active_plst_item_count(U32 srv_plst_hdr, U32 *count);

#ifdef __PLST_SRV_DEFAULT_LIST__
/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_default_list_entry
 * DESCRIPTION
 *  entry default list
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_default_list_entry(U32 srv_plst_hdr,srv_plst_default_playlist_enum def_list);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_default_list_exit
 * DESCRIPTION
 *  exit default list
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_default_list_exit(U32 srv_plst_hdr);
#endif /* __PLST_SRV_DEFAULT_LIST__ */

/*****************************************************************************
 * FUNCTION
 *  srv_plst_get_active_list_media_type
 * DESCRIPTION
 *  get media type of active list
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  srv_plst_active_list_media_type_enum  
 *****************************************************************************/ 
extern srv_plst_active_list_media_type_enum srv_plst_get_active_list_media_type(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_item_remove
 * DESCRIPTION
 *  remove the item form the playlist 
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   index
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_item_remove(U32 srv_plst_hdr, U32 index);



/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_item_stop_remove
 * DESCRIPTION
 *  remove the item form the playlist 
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [IN]   index
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_item_stop_remove(U32 srv_plst_hdr, U32* count);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_item_check_exist_in_plst
 * DESCRIPTION
 *  check the selected if exist in playlist
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  flag               :         [IN]   MMI_TRUE/ MMI_FALSE
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_config_set_media_unique_in_plst(U32 srv_plst_hdr, MMI_BOOL flag);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_item_reorder_begin
 * DESCRIPTION
 *  begin reorder play list item
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_item_reorder_begin(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_item_reorder_get_display
 * DESCRIPTION
 *  get reorder display
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_item_reorder_get_display(U32 srv_plst_hdr,srv_plst_list_get_display_struct * param_display);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_item_reorder_action
 * DESCRIPTION
 *  re_order the list sequeue 
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index_orign        :         [IN]   origin location index
 *  index_dest         :         [IN]   destination location idnex *  
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_item_reorder_action(U32 srv_plst_hdr, U32 index_orign, U32 index_dest);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_item_reorder_action_set_result
 * DESCRIPTION
 *  reorder playlist end
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_item_reorder_action_set_result(U32 srv_plst_hdr, MMI_BOOL save_notice);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_item_reorder_end
 * DESCRIPTION
 *  reorder playlist end
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_item_reorder_end(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_item_clear
 * DESCRIPTION
 *  clear current playlist's all item
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_item_clear(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_item_stop_clear
 * DESCRIPTION
 *  cancel the clear current playlist's all items action
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_item_stop_clear(U32 srv_plst_hdr, U32* count);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_item_get_active_media_info_auto
 * DESCRIPTION
 *  get the previouse playing media info: id, storage_id
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  param_struct       :         [OUT]  see srv_plst_list_item_info  param_a: media_id, param_b:  storage_id
 *  path               :         [OUT]  media's filepath
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_item_get_active_media_info_auto(U32 srv_plst_hdr, U32* id , U32* index, UI_string_type path);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_item_get_active_media_info_manul_prev
 * DESCRIPTION
 *  get the previouse playing media info: id, storage_id
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  param_struct       :         [OUT]  see srv_plst_list_item_info  param_a: media_id, param_b:  storage_id
 *  path               :         [OUT]  media's filepath
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_item_get_active_media_info_manul_prev(U32 srv_plst_hdr, U32* id, U32* index, UI_string_type path);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_item_get_active_media_info_manul_next
 * DESCRIPTION
 *  get the next playing media info: id, storage_id
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  param_struct       :         [OUT]  see srv_plst_list_item_info  param_a: media_id, param_b:  storage_id
 *  path               :         [OUT]  media's filepath
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_item_get_active_media_info_manul_next(U32 srv_plst_hdr,U32* id, U32* index, UI_string_type path);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_item_get_active_media_info_curr
 * DESCRIPTION
 *  get current playing media info: id, storage_id
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  param_struct       :         [OUT]  see srv_plst_list_item_info  param_a: media_id, param_b:  storage_id
 *  path               :         [OUT]  media's filepath
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_plst_item_get_active_media_info_curr(U32 srv_plst_hdr, U32* id, U32* index, UI_string_type path);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_get_active_list_type
 * DESCRIPTION
 *  get media type of active list
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 * RETURNS
 *  srv_plst_active_list_media_type_enum  
 *****************************************************************************/ 
srv_plst_active_list_enum srv_plst_get_active_list_type(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_get_context_by_id
 * DESCRIPTION
 *  get context of input id and input type
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  in_param           :         [OUT]  see srv_plst_get_cntx_param_struct
 *  out_pram           :         [OUT]  srv_plst_get_context_struct
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_list_get_context_by_id(U32 srv_plst_hdr, srv_plst_get_cntx_param_struct *in_param, srv_plst_get_context_struct *out_pram);
 


/*****************************************************************************
 * FUNCTION
 *  srv_plst_list_get_context
 * DESCRIPTION
 *  get context of input id and input type
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  in_param           :         [OUT]  see srv_plst_get_cntx_param_struct
 *  out_pram           :         [OUT]  srv_plst_get_cntx_output_struct
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
//extern S32 srv_plst_list_get_context(U32 srv_plst_hdr, srv_plst_get_cntx_param_struct *in_param, 
                                     //          srv_plst_get_cntx_output_struct *out_pram);
 
 
/*****************************************************************************
 * FUNCTION
 *  srv_plst_config_set_plst_order
 * DESCRIPTION
 *  confige the playlist show sequeues, it can be default list show at first or default list show at last
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  order              :         [IN]   see srv_plst_plst_show_sequeue_enum  
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_config_set_plst_order(U32 srv_plst_hdr, srv_plst_plst_show_sequeue_enum order);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_config_shuffle
 * DESCRIPTION
 *  set shuffle info
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  shuffle            :         [IN]   see srv_plst_shuffle_enum  
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_config_shuffle(U32 srv_plst_hdr, srv_plst_shuffle_enum shuffle);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_config_repeat
 * DESCRIPTION
 *  set repeat info
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  shuffle            :         [IN]   see srv_plst_repeat_enums  
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_config_repeat(U32 srv_plst_hdr, srv_plst_repeat_enum repeat);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_config_info
 * DESCRIPTION
 *  config infomation, if not configure, service will use default value
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  config_type        :         [IN]   see srv_plst_config_type_enum
 *  config_value       :         [IN]   differrent enum when the config type change
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/ 
extern S32 srv_plst_config_info(U32 srv_plst_hdr, srv_plst_config_type_enum config_type, U32 config_value);


extern MMI_BOOL srv_plst_check_sort_type_support(U32 srv_plst_hdr, srv_plst_list_sort_type_enum type);
extern S32 srv_plst_list_item_get_group_count(U32 srv_plst_hdr, srv_plst_list_group_item_info_struct* group_c);
extern S32 srv_plst_list_search_async(U32 srv_plst_hdr, U32 string);
extern S32 srv_plst_list_search_sync(U32 srv_plst_hdr, U32 string, U32* count);
extern S32 srv_plst_default_playlist_get_type_info_by_id(U32 srv_plst_hdr, U32 id, srv_plst_default_playlist_enum *type);


/*****************************************************************************
 * FUNCTION
 *  srv_list_create
 * DESCRIPTION
 *  create list service, get memory from caller
 * PARAMETERS
 *  result                :  [OUT]     error code
 *  srv_list_create_struct:  [IN]      service create stucture
 *  callback              :  [IN]      see the callback define
 *  create_struct         :  [IN]      see srv_plst_create_struct
 * RETURNS
 *  return service handle
 *****************************************************************************/ 
extern U32 srv_plst_create(S32* result, 
                    void* user_data, 
                    S32 (*callback)(void* user_data, srv_plst_cb_evt_enum cb_event, S32 result, U32 ca_para), 
                    srv_plst_create_struct* create_struct);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_destroy_for_realloc_memory
 * DESCRIPTION
 *  Close DB, get context memory and destroy db for later recreate
 * PARAMETERS
 *  srv_plst_hdr          :  [IN]      db handle
 *  memory_ptr            :  [IN]      memory buffer pointer
 *  memory_size           :  [IN]      memory buffer size
 * RETURNS
 *  get result
 *****************************************************************************/
S32 srv_plst_destroy_for_realloc_memory(U32 srv_plst_hdr, void* memory_ptr, U16 memory_size);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_realloc_memory
 * DESCRIPTION
 *  App close DB and free its instance, 
 *  then use this API to reopen it with new allocated memory without check integrality of DB
 * PARAMETERS
 *  result                :  [OUT]     error code
 *  srv_plst_hdr          :  [IN]      old db handle
 *  create_struct         :  [IN]      see srv_plst_create_struct
 *  original_db_context_hdr  :  [IN]      original memory context
 * RETURNS
 *  return new service handle
 *****************************************************************************/
extern U32 srv_plst_realloc_memory(S32* result, U32 srv_plst_hdr, srv_plst_create_struct* create, void* original_db_context_ptr);


/*****************************************************************************
 * FUNCTION
 *  srv_list_destory
 * DESCRIPTION
 *  reset, destory list service
 * PARAMETERS
 *  srv_plst_hdr :         [IN]   service handle
 * RETURNS
 *  return error code  S32
 *****************************************************************************/ 
extern S32 srv_plst_destroy(U32 srv_plst_hdr);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_msdc_plug_in_hdlr
 * DESCRIPTION
 *  plug in 
 * PARAMETERS
 *  drv_num     [IN]
 *  drv_list    [IN]
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_plst_msdc_plug_in_hdlr(U8 drv_num, PU8 drv_list);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_msdc_plug_out_hdlr
 * DESCRIPTION
 *  plug in 
 * PARAMETERS
 *  drv_num     [IN]
 *  drv_list    [IN]
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_plst_msdc_plug_out_hdlr(U8 drv_num, PU8 drv_list);

//#ifdef __MMI_USB_SUPPORT__
/*****************************************************************************
 * FUNCTION
 *  srv_plst_usb_plug_in_hdlr
 * DESCRIPTION
 *  plug in 
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern MMI_RET srv_plst_usb_plug_in_hdlr(mmi_event_struct *evt);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_usb_plug_out_hdlr
 * DESCRIPTION
 *  plug out 
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern MMI_RET srv_plst_usb_plug_out_hdlr(mmi_event_struct *evt);
//#endif

/*****************************************************************************
 * FUNCTION
 *  srv_plst_pre_format_hdlr
 * DESCRIPTION
 *  pre format
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_plst_pre_format_hdlr(CHAR drv);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_aft_format_hdlr
 * DESCRIPTION
 *  pre format
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_plst_aft_format_hdlr(CHAR drv);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_msdc_entry_unmount
 * DESCRIPTION
 *  unmount 
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_plst_msdc_entry_unmount(CHAR drv);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_msdc_exit_unmout
 * DESCRIPTION
 *  unmount 
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_plst_msdc_exit_unmount(CHAR drv);

extern mmi_ret srv_plst_service_notify_hdlr(mmi_event_struct *event);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_check_file_is_delete
 * DESCRIPTION
 *  unmount 
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/

extern MMI_BOOL srv_plst_check_file_is_delete(CHAR *path, MMI_BOOL is_folder, MMI_BOOL is_delete_all, const FMGR_FILTER *filter);
    
/*****************************************************************************
 * FUNCTION
 *  srv_list_get_error_string
 * DESCRIPTION
 *  get list service error string id
 * PARAMETERS
 *  error code        :    [IN]   error code
 *  event_type        :    [OUT]  event type
 * RETURNS
 *  return error string id
 *****************************************************************************/ 
extern U32 srv_plst_get_error_string(S32 error_code, mmi_event_notify_enum *evt_type);


/*****************************************************************************
 * FUNCTION
 *  srv_plst_init
 * DESCRIPTION
 *  init when phone start, and before other app called it
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/ 
extern void srv_plst_init(void);

extern MMI_BOOL srv_plst_check_playlist_is_exist(U32 srv_plst_hdr, UI_string_type name);

extern MMI_BOOL srv_plst_check_active_media_is_in_playlist(U32 srv_plst_hdr, srv_plst_default_playlist_enum type);

extern S32 srv_plst_active_media_remove_from_playlist(U32 srv_plst_hdr, srv_plst_default_playlist_enum type);

extern S32 srv_plst_active_media_add_to_playlist(U32 srv_plst_hdr, srv_plst_default_playlist_enum type);
extern S32 srv_plst_media_get_id_in_group(U32 srv_plst_hdr, U32 group, U32 sub_index, U32 *id);

/*****************************************************************************
 * FUNCTION
 *  srv_plst_plst_get_active_index
 * DESCRIPTION
 *   get active index in current list, currently only support for cover flow active album index
 * PARAMETERS
 *  srv_plst_hdr       :         [IN]   service handle
 *  index              :         [OUT]  U32 
 * RETURNS
 *  return error code  S32
 *                     < 0 error code
 *                     >=0 see srv_plst_caller_handler_enum 
 *****************************************************************************/
S32 srv_plst_plst_get_active_index(U32 srv_plst_hdr, srv_plst_active_type_enum type,  U32 *index);


#endif /* __PLST_SERVICE_DB_SUPPORT__ */
#endif  /* __PLST_SERVICE_GPROT_H__ */