summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJehun Lim <jehun.lim@samsung.com>2015-07-01 21:50:46 +0900
committerJehun Lim <jehun.lim@samsung.com>2015-07-01 21:50:46 +0900
commitcb05893c72d7bd17c8074a0f6a6d9aa6e84b2cac (patch)
tree5ddb2b95e4cc2f9f093e4e9b86fcc393cb63a58b
parentb81aa668ac86b55ccfcc5ac6d67c5a1a20487b61 (diff)
downloadair_mediahub-cb05893c72d7bd17c8074a0f6a6d9aa6e84b2cac.tar.gz
air_mediahub-cb05893c72d7bd17c8074a0f6a6d9aa6e84b2cac.tar.bz2
air_mediahub-cb05893c72d7bd17c8074a0f6a6d9aa6e84b2cac.zip
remove gridmgr
Change-Id: I7514b7e397626238bee8a3f40203b44042ea691c Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
-rw-r--r--CMakeLists.txt1
-rw-r--r--include/util/gridmgr.h39
-rw-r--r--src/util/gridmgr.c169
3 files changed, 0 insertions, 209 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 848459a..747150e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,7 +53,6 @@ src/view/viewer.c
src/layout/movie.c
src/layout/gallery.c
src/layout/music.c
-src/util/gridmgr.c
src/util/controller.c
src/util/timeout_handler.c
src/data/mediadata.c
diff --git a/include/util/gridmgr.h b/include/util/gridmgr.h
deleted file mode 100644
index 97ba910..0000000
--- a/include/util/gridmgr.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-#ifndef _AIR_MEDIAHUB_GRIDMGR_H__
-#define _AIR_MEDIAHUB_GRIDMGR_H__
-
-#include <stdbool.h>
-
-struct gridmgr;
-
-struct grid_class {
- const char *grid_style;
-
- char *(*text_get)(void *data, Evas_Object *obj, const char *part);
- Evas_Object *(*content_get)(void *data, Evas_Object *obj,
- const char *part);
- /* It will be added later */
-};
-
-struct gridmgr *gridmgr_create(void);
-bool gridmgr_destroy(struct gridmgr *gmgr);
-bool gridmgr_add_grid(struct gridmgr *gmgr, const char *grid_id,
- Evas_Object *grid, struct grid_class *gclass);
-bool gridmgr_update_grid(struct gridmgr *gmgr, const char *grid_id, Eina_List *item_list);
-
-#endif /* _AIR_MEDIAHUB_GRIDMGR_H__ */
diff --git a/src/util/gridmgr.c b/src/util/gridmgr.c
deleted file mode 100644
index 2a7cad9..0000000
--- a/src/util/gridmgr.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
- *
- * 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 <Elementary.h>
-#include <app_debug.h>
-
-#include "define.h"
-#include "util/gridmgr.h"
-
-struct gridmgr {
- Eina_List *list;
-};
-
-struct grid_item {
- const char *id;
- Evas_Object *grid;
- struct grid_class *gclass;
-};
-
-struct grid_item *_get_item_from_id(struct gridmgr *gmgr, const char *id)
-{
- Eina_List *l;
- struct grid_item *gitem;
-
- if (!gmgr || !id)
- return NULL;
-
- gitem = NULL;
- EINA_LIST_FOREACH(gmgr->list, l, gitem) {
- if (!strcmp(gitem->id, id))
- break;
- }
-
- return gitem;
-}
-
-Elm_Gengrid_Item_Class *_get_item_class(struct grid_class *gclass)
-{
- Elm_Gengrid_Item_Class *ic;
-
- if (!gclass)
- return NULL;
-
- ic = elm_gengrid_item_class_new();
- if (!ic) {
- _ERR("failed to create item class");
- return NULL;
- }
-
- ic->func.text_get = gclass->text_get;
- ic->func.content_get = gclass->content_get;
-
- ic->item_style = gclass->grid_style;
-
- return ic;
-}
-
-struct gridmgr *gridmgr_create(void)
-{
- struct gridmgr *gmgr;
-
- gmgr = calloc(1, sizeof(*gmgr));
- if (!gmgr) {
- _ERR("failed to create gridmgr");
- return NULL;
- }
-
- return gmgr;
-}
-
-bool gridmgr_destroy(struct gridmgr *gmgr)
-{
- struct grid_item *gitem;
-
- if (!gmgr) {
- _ERR("failed to get gridmgr");
- return false;
- }
-
- EINA_LIST_FREE(gmgr->list, gitem)
- free(gitem);
-
- free(gmgr);
- gmgr = NULL;
-
- return true;
-}
-
-bool gridmgr_add_grid(struct gridmgr *gmgr, const char *grid_id,
- Evas_Object *grid, struct grid_class *gclass)
-{
- struct grid_item *gitem;
-
- if (!gmgr) {
- _ERR("failed to get gridmgr");
- return false;
- }
-
- if (!gclass || !gclass->text_get || !gclass->content_get) {
- _ERR("failed to get grid class");
- return false;
- }
-
- gitem = calloc(1, sizeof(*gitem));
- if (!gitem) {
- _ERR("failed to create gengrid item");
- return false;
- }
-
- gitem->id = grid_id;
- gitem->grid = grid;
- gitem->gclass = gclass;
-
- gmgr->list = eina_list_append(gmgr->list, gitem);
-
- return true;
-}
-
-bool gridmgr_update_grid(struct gridmgr *gmgr, const char *grid_id,
- Eina_List *item_list)
-{
- Eina_List *l;
- Elm_Object_Item *it;
- Elm_Gengrid_Item_Class *ic;
- struct grid_item *gitem;
- void *data;
-
- if (!gmgr) {
- _ERR("failed to get gridmgr");
- return false;
- }
-
- gitem = _get_item_from_id(gmgr, grid_id);
- if (!gitem) {
- _ERR("%s doesn't exist", grid_id);
- return false;
- }
-
- elm_gengrid_clear(gitem->grid);
-
- ic = _get_item_class(gitem->gclass);
- if (!ic) {
- _ERR("failed to get item class");
- return false;
- }
-
- EINA_LIST_FOREACH(item_list, l, data) {
- it = elm_gengrid_item_append(gitem->grid, ic, data, NULL, NULL);
-
- elm_object_item_data_set(it, data);
- }
-
- elm_gengrid_item_class_free(ic);
-
- return true;
-}