2 * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include <AppCommon.h>
19 #include "folderinfo.h"
20 #include "mediainfo.h"
21 #include "imageinfo.h"
22 #include "videoinfo.h"
29 CFolderInfo::CFolderInfo(void)
31 m = new SFolderInfo();
33 _ERR("FolderInfo Create Failed");
37 memset(m, 0, sizeof(*m));
40 CFolderInfo::~CFolderInfo(void)
49 void CFolderInfo::m_DeleteMediaList(void)
55 EINA_LIST_FREE(m->medialist, obj) {
56 minfo = (CMediaInfo *)obj;
64 Eina_List *CFolderInfo::MediaList(void)
72 bool CFolderInfo::SetMediaList(Eina_List *medialist)
74 CMediaInfo *minfo, *nminfo;
82 EINA_LIST_FOREACH(medialist, l, obj) {
83 minfo = (CMediaInfo *)obj;
85 if (minfo->Type() == E_MEDIA_IMAGE)
86 nminfo = new CImageInfo;
87 else if (minfo->Type() == E_MEDIA_VIDEO)
88 nminfo = new CVideoInfo;
91 nminfo->Duplicate(minfo);
93 m->medialist = eina_list_append(m->medialist, nminfo);