summaryrefslogtreecommitdiff
path: root/main/src/data/ivug-data-filter.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/data/ivug-data-filter.c')
-rwxr-xr-xmain/src/data/ivug-data-filter.c101
1 files changed, 0 insertions, 101 deletions
diff --git a/main/src/data/ivug-data-filter.c b/main/src/data/ivug-data-filter.c
deleted file mode 100755
index 754a723..0000000
--- a/main/src/data/ivug-data-filter.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.tizenopensource.org/license
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-#include "ivug-common.h"
-#include "ivug-data-filter.h"
-
-List_Filter *ivug_data_filter_create(const ivug_parameter *param)
-{
- IV_ASSERT(param != NULL);
-
- List_Filter *filter = calloc(1, sizeof(List_Filter));
-
- IV_ASSERT(filter != NULL);
-
- filter->view_by = param->view_by;
- filter->media_type = param->media_type;
- filter->sort_type = param->sort_type;
-
- MSG_SDATA_HIGH("param->view_by is %d", param->view_by);
- switch(param->view_by)
- {
- case IVUG_VIEW_BY_PLACES:
- filter->place.max_longitude = param->max_longitude;
- filter->place.min_longitude = param->min_longitude;
- filter->place.max_latitude = param->max_latitude;
- filter->place.min_latitude = param->min_latitude;
- break;
- case IVUG_VIEW_BY_FILE:
- filter->file_path = strdup(param->filepath);
- break;
- case IVUG_VIEW_BY_ALL:
- filter->album_id = uuid_assign(param->album_id);
- break;
-
- case IVUG_VIEW_BY_FOLDER:
- filter->album_id = uuid_assign(param->album_id);
- break;
-
- case IVUG_VIEW_BY_INVAILD:
- default:
- MSG_SDATA_WARN("Invalid ViewBy : %d", param->view_by);
- break;
-
- }
-
- return filter;
-
-}
-
-void ivug_data_filter_delete(List_Filter *filter)
-{
- IV_ASSERT(filter != NULL);
-
- MSG_SDATA_HIGH("Removing filter. ViewBy=%d", filter->view_by);
-
- switch(filter->view_by)
- {
- case IVUG_VIEW_BY_PLACES:
- break;
-
- case IVUG_VIEW_BY_FILE:
- if ( filter->file_path )
- {
- free(filter->file_path);
- }
- break;
- case IVUG_VIEW_BY_ALL:
- uuid_free(filter->album_id);
- break;
-
- case IVUG_VIEW_BY_FOLDER:
- uuid_free(filter->album_id);
-
- break;
-
- case IVUG_VIEW_BY_INVAILD:
- default:
- MSG_SDATA_WARN("Invalid ViewBy : %d", filter->view_by);
- break;
- }
-
-
- free(filter);
-}
-
-
-