2 * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
\r
4 * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
\r
6 * Licensed under the Flora License, Version 1.0 (the "License");
\r
7 * you may not use this file except in compliance with the License.
\r
8 * You may obtain a copy of the License at
\r
10 * http://www.tizenopensource.org/license
\r
12 * Unless required by applicable law or agreed to in writing, software
\r
13 * distributed under the License is distributed on an "AS IS" BASIS,
\r
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
15 * See the License for the specific language governing permissions and
\r
16 * limitations under the License.
\r
21 #ifndef _MP_UTIL_DATABASE_
\r
22 #define _MP_UTIL_DATABASE_
\r
24 #include "video-player.h"
\r
29 MP_MEDIA_VIDEO_FILE_TYPE = 0,
\r
30 MP_MEDIA_CAMERA_FILE_TYPE,
\r
31 MP_MEDIA_ALL_FILE_TYPE,
\r
32 MP_MEDIA_FILE_TYPE_MAX,
\r
33 }MpMediaSvcVideoFileType;
\r
37 MP_MEDIA_SORT_BY_NONE = 0,
\r
38 MP_MEDIA_SORT_BY_NAME_ASC,
\r
39 MP_MEDIA_SORT_BY_NAME_DESC,
\r
40 MP_MEDIA_SORT_BY_DATE_MOST_RECENT,
\r
41 MP_MEDIA_SORT_BY_OLDEST,
\r
42 MP_MEDIA_SORT_BY_MAX,
\r
43 }MpMediaSvcSortType;
\r
47 MP_MEDIA_LIST_TYPE_FOLDER = 0,
\r
48 MP_MEDIA_LIST_TYPE_ALL_FOLDER_GALLERY,
\r
49 MP_MEDIA_LIST_TYPE_TAG_GALLERY,
\r
50 MP_MEDIA_LIST_TYPE_FAVORITE,
\r
51 MP_MEDIA_LIST_TYPE_ALLSHARE,
\r
52 MP_MEDIA_LIST_TYPE_MAX,
\r
53 }MpMediaSvcListType;
\r
56 void MpUtilMediaSvcInitSession(void);
\r
57 void MpUtilMediaSvcFinishSession(void);
\r
59 ////////////////////////////////////////////////////////
\r
60 // Manage video item list
\r
63 bool MpUtilMediaSvcExtractVideoListFromFolder(char* szFolderPath, int nSortType); // For myfiles.
\r
64 bool MpUtilMediaSvcExtractVideoListFromAllFolderOfGallery(int nSortType); // For 'All' folder of gallery.
\r
65 bool MpUtilMediaSvcExtractVideoListVideoType(int nSortType); // For only video type files of video list view.
\r
66 bool MpUtilMediaSvcExtractVideoListRecordedType(int nSortType); // For only recorded type files of video list view.
\r
67 bool MpUtilMediaSvcExtractVideoListByTagName(char *szTagName); // For tag folder of gallery.
\r
68 bool MpUtilMediaSvcExtractVideoListFromFavorite(int nSortType); // For favorite naming of gallery.
\r
69 bool MpUtilMediaSvcExtractVideoListForSearchView(const char *keyword); // For only video type files of video search view*/
\r
72 void MpUtilMediaSvcDestoryVideoList(void);
\r
73 bool MpUtilMediaSvcRemoveItemByUrlWithList(char *szFilePath);
\r
74 bool MpUtilMediaSvcRemoveItemByListIndex(int nVideoItemIndex);
\r
75 bool MpUtilMediaSvcRemoveItemByListIndexWithoutListItem(int nVideoItemIndex);
\r
78 bool MpUtilMediaSvcGetVideoIDByVideoUri(const char *szPath, char *szVideoID);
\r
79 char* MpUtilMediaSvcGetVideoThumbnailByVideoUri(const char *szMediaUri);
\r
80 unsigned int MpUtilMediaSvcGetVideoLastPlayTimeByVideoUri(const char *szPath);
\r
81 unsigned int MpUtilMediaSvcGetVideoDurationByVideoUri(const char *szPath);
\r
82 int MpUtilMediaSvcGetVideoFilesizeByVideoUri(const char *szPath);
\r
83 void MpUtilMediaSvcSetVideoLastPlayedTimeByUri(char* szMediaUri, unsigned int nLastPlayedTime);
\r
85 bool MpUtilMediaSvcGetVideoCurrentUrlPreNextItem(char* szCurrMediaUri, char* szPreMediaUri, char* szNextMediaUri,bool bLoop);
\r
88 char* MpUtilMediaSvcGetVideoUrl(const int nVideoItemIndex);
\r
89 char* MpUtilMediaSvcGetVideoThumbnail(const int nVideoItemIndex);
\r
90 char* MpUtilMediaSvcGetVideoTitle(const int nVideoItemIndex);
\r
91 int MpUtilMediaSvcGetVideoDurationTime(const int nVideoItemIndex);
\r
92 int MpUtilMediaSvcGetVideoLastPlayedPos(const int nVideoItemIndex);
\r
93 int MpUtilMediaSvcGetVideoItemSize(const int nVideoItemIndex);
\r
94 int MpUtilMediaSvcGetVideoItemWidth(const int nVideoItemIndex);
\r
95 int MpUtilMediaSvcGetVideoItemHeight(const int nVideoItemIndex);
\r
96 time_t MpUtilMediaSvcGetVideoItemDateTime(const int nVideoItemIndex);
\r
97 char *MpUtilMediaSvcGetVideoItemExtension(const int nVideoItemIndex);
\r
98 double MpUtilMediaSvcGetVideoItemLongitude(const int nVideoItemIndex);
\r
99 double MpUtilMediaSvcGetVideoItemLatitude(const int nVideoItemIndex);
\r
101 int MpUtilMediaSvcGetVideoListSizeForCheckingIndex(void);
\r
102 int MpUtilMediaSvcGetNumberOfVideoItemByType(void);
\r
103 int MpUtilMediaSvcGetTotalVideoTypeFiles(void);
\r
104 void MpUtilMediaSvcPrintListInfo(void);
\r
105 int MpUtilMediaSvcFindVideoItemIndexByUrl(const char *szPath);
\r
108 bool MpUtilMediaSvcExtractVideoFolderList(int nSortType);
\r
109 bool MpUtilMediaSvcDestoryVideoFolderList(void);
\r
110 int MpUtilMediaSvcGetVideoFolderListSize(void);
\r
111 char* MpUtilMediaSvcGetVideoFolderName(int nVideoFolderIndex);
\r
112 char* MpUtilMediaSvcGetVideoFolderUrl(int nVideoFolderIndex);
\r
114 ////////////////////////////////////////////////////////
\r
117 bool MpUtilMediaSvcBookmarkListGet(char *vid, GList **list);
\r
118 void MpUtilMediaSvcBookmarkListClear(GList *list);
\r
119 int MpUtilMediaSvcBookmarkInsert(char *vid, int position, char *path);
\r
120 int MpUtilMediaSvcBookmarkDelete(char *vid, int position);
\r
121 int MpUtilMediaSvcBookmarkDeleteAll(char *vid);
\r
122 char* MpUtilMediaSvcBookmarkGetThumbnail(void* pBookmarkItemHandle);
\r
123 int MpUtilMediaSvcBookmarkGetPos(void* pBookmarkItemHandle);
\r
125 #endif // _MP_UTIL_DATABASE_