3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
24 #include <mm_sound_private.h>
32 * @brief This file contains the common information
35 #ifndef __CONSTRUCTOR__
36 #define __CONSTRUCTOR__ __attribute__ ((constructor))
39 #ifndef __DESTRUCTOR__
40 #define __DESTRUCTOR__ __attribute__ ((destructor))
46 typedef GList dd_list;
47 #define DD_LIST_PREPEND(a, b) \
48 a = g_list_prepend(a, b)
49 #define DD_LIST_APPEND(a, b) \
50 a = g_list_append(a, b)
51 #define DD_LIST_REMOVE(a, b) \
52 a = g_list_remove(a, b)
53 #define DD_LIST_FOREACH(head, elem, node) \
54 for (elem = head; elem && ((node = elem->data) != NULL); elem = elem->next, node = NULL)
55 #define DD_LIST_FOREACH_SAFE(head, elem, elem_next, node) \
56 for (elem = head, elem_next=g_list_next(elem), node = NULL; \
57 elem && ((node = elem->data) != NULL); \
58 elem = elem_next, elem_next = g_list_next(elem), node=NULL)
61 #define FEEDBACK_DATA_DIR FEEDBACK_SYS_SHARE"/feedback"
62 #define FEEDBACK_ORIGIN_DATA_DIR FEEDBACK_SYS_RO_SHARE"/feedback"
64 #define FEEDBACK_RETRY_CNT 1
66 #define DEFAULT_VIB_LEVEL 3
67 #define HAPTIC_FEEDBACK_STEP 20 /**< feedback max / slider step */
69 #define ARR_SIZE(arr) (sizeof(arr)/sizeof((arr)[0]))
70 #define FEEDBACK_LEVEL(x) ((x)? ((x/2)+1): 0)
72 int is_sound_mode(void);
73 int is_touch_sndstatus(void);
74 int is_keytone_sndstatus(void);
75 int is_vibration_mode(void);