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.
21 #include <AppCommon.h>
25 int CFileList::t_Max(void)
30 void CFileList::t_Remove(Eina_List** list)
36 Eina_List* filelist = *list;
40 EINA_LIST_FREE(filelist, obj) {
41 pInfo = (CExtNameInfo *)obj;
49 CFileList::CFileList(int max)
51 m_lists = new Eina_List*[max + 1];
52 for (int a = 0; a <= max; a++)
58 CFileList::~CFileList()
65 void CFileList::Add(int idx, void* obj)
67 ASSERT(0 <= idx && idx <= t_Max());
68 m_lists[idx] = eina_list_append(m_lists[idx], obj);
71 Eina_List* CFileList::Clone(int idx)
73 ASSERT(0 <= idx && idx <= t_Max());
74 return eina_list_clone(m_lists[idx]);
77 void CFileList::RemoveAll(void)
79 for (int a = 0; a <= t_Max(); a++)
80 t_Remove(&m_lists[a]);