src/sound.c
src/vibrator.c
src/xmlparser.c
- src/feedback.c)
+ src/feedback.c
+ src/str.c)
SET(HEADERS
SLP_FEEDBACK_PG.h
*/
-#ifndef __FEEDBACK_INTERNAL_H__
-#define __FEEDBACK_INTERNAL_H__
-
-#include "feedback-ids.h"
+#ifndef __COMMON_H__
+#define __COMMON_H__
#ifdef __cplusplus
extern "C" {
#endif
/**
- * @file feedback-internal.h
+ * @file common.h
* @brief This file contains the common information
*/
extern int callstatus;
+extern const char *str_type[];
+extern const char *str_pattern[];
+
#ifdef __cplusplus
}
#endif
-#endif //__FEEDBACK_INTERNAL_H__
+#endif
*/
-#ifndef __FEEDBACK_LOG_H__
-#define __FEEDBACK_LOG_H__
+#ifndef __LOG_H__
+#define __LOG_H__
#define FEATURE_FEEDBACK_DLOG
#define FEEDBACK_ERROR(x, ...)
#endif
-#endif //__FEEDBACK_LOG_H__
+#endif //__LOG_H__
#include <glib.h>
#include "devices.h"
-#include "feedback-str.h"
-#include "feedback-log.h"
+#include "common.h"
+#include "log.h"
#define DD_LIST_PREPEND(a, b) \
a = g_list_prepend(a, b)
#include <vconf.h>
#include "feedback.h"
-#include "feedback-internal.h"
-#include "feedback-str.h"
-#include "feedback-log.h"
+#include "common.h"
+#include "log.h"
#include "devices.h"
#ifndef API
API int feedback_initialize()
{
- int err = -1;
-
if (binit)
return FEEDBACK_ERROR_NONE;
#include <vconf.h>
#include <mm_sound_private.h>
-#include "feedback.h"
-#include "feedback-internal.h"
-#include "feedback-str.h"
-#include "feedback-log.h"
+#include "feedback-ids.h"
+#include "common.h"
+#include "log.h"
#include "devices.h"
#define FEEDBACK_SOUND_DIR FEEDBACK_DATA_DIR"/sound"
*/
-#ifndef __FEEDBACK_STR_H__
-#define __FEEDBACK_STR_H__
+#include <stdio.h>
-static const char *str_type[] =
+const char *str_type[] =
{
"FEEDBACK_TYPE_NONE",
"FEEDBACK_TYPE_SOUND",
"FEEDBACK_TYPE_END",
};
-static const char *str_pattern[] =
+const char *str_pattern[] =
{
"FEEDBACK_PATTERN_TAP",
"FEEDBACK_PATTERN_SIP",
"FEEDBACK_PATTERN_SLIDER_SWEEP",
"FEEDBACK_PATTERN_VOLUME_KEY",
};
-
-#endif //__FEEDBACK_STR_H__
#include <vconf.h>
#include <haptic.h>
-#include "feedback.h"
-#include "feedback-internal.h"
-#include "feedback-str.h"
-#include "feedback-log.h"
-#include "xmlparser.h"
+#include "feedback-ids.h"
+#include "common.h"
+#include "log.h"
#include "devices.h"
+#include "xmlparser.h"
#define FEEDBACK_HAPTIC_DIR FEEDBACK_DATA_DIR"/haptic"
#define FEEDBACK_HAPTIC_TOUCH_DIR FEEDBACK_HAPTIC_DIR"/touch"
#include <glib.h>
#include "xmlparser.h"
-#include "feedback-log.h"
+#include "log.h"
-static const xmlChar* data_str[] = {
+static const char* data_str[] = {
[XML_LABEL] = "label",
[XML_DATA] = "data",
};
assert(expr);
for (node = cur->children; node != NULL; node = node->next) {
- if (xmlStrcmp(node->name, data_str[XML_LABEL]))
+ if (xmlStrcmp(node->name, (const xmlChar*)data_str[XML_LABEL]))
continue;
key = xmlNodeListGetString(doc, node->children, 1);
xmlNodePtr node;
struct xmlData *data;
char *b64_data;
- int len;
+ unsigned int len;
assert(doc);
assert(cur);
memset(data, 0, sizeof(struct xmlData));
for (node = cur->children; node != NULL; node = node->next) {
- if (!xmlStrcmp(node->name, data_str[XML_LABEL])) {
+ if (!xmlStrcmp(node->name, (const xmlChar*)data_str[XML_LABEL])) {
data->label = (char*)xmlNodeListGetString(doc, node->children, 1);
FEEDBACK_LOG("label : %s", data->label);
- } else if (!xmlStrcmp(node->name, data_str[XML_DATA])) {
+ } else if (!xmlStrcmp(node->name, (const xmlChar*)data_str[XML_DATA])) {
b64_data = (char *)xmlNodeListGetString(doc, node->children, 1);
if (b64_data != NULL) {
FEEDBACK_LOG("b64_data : %s", b64_data);