apply FSL(Flora Software License)
[apps/home/indicator-win.git] / test / indicator_test_util.c
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.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
7  *
8  *  http://www.tizenopensource.org/license
9  *
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.
15  */
16
17 #include <stdio.h>
18 #include <stdlib.h>
19 #include <appcore-efl.h>
20
21 #include "common.h"
22 #include "indicator_icon_util.h"
23 #include "indicator_icon_list.h"
24 #include "indicator_ui.h"
25 #include "indicator_test_util.h"
26
27 int print_indicator_icon_object(Indicator_Icon_Object *obj)
28 {
29 #ifdef DEBUG_MODE
30         retif(cond, ret, str, args...)(obj == NULL, FAIL, "Invalid parameter!");
31
32         INFO(str, args...)(%s : priority(%d) obj(%x), obj->name, obj->priority,
33                            (unsigned int)obj->obj);
34 #endif
35         return OK;
36 }
37
38 int print_indicator_icon_list(Eina_List *list)
39 {
40 #ifdef DEBUG_MODE
41         Eina_List *l;
42         void *data;
43
44         retif(list == NULL, FAIL, "Invalid parameter!");
45
46         INFO("*******Indicator_Icon List(%x) *******", (unsigned int)list);
47         EINA_LIST_FOREACH(list, l, data) {
48                 if (data) {
49                         print_indicator_icon_object(data);
50                 }
51         }
52 #endif
53         return OK;
54 }