+++ /dev/null
-/*
- * common_helpers.h
- *
- * Created on: Feb 19, 2014
- * Author: m.skorupinsk
- */
-
-#ifndef COMMON_HELPERS_H_
-#define COMMON_HELPERS_H_
-
-#include <dlog.h>
-
-#ifdef DEBUG
- #define PLOG(fmt, ...) \
- fprintf(stderr, "<D> %s(%d) --> ", __FUNCTION__, __LINE__); \
- fprintf(stderr, fmt, ##__VA_ARGS__);\
- fprintf(stderr, "\n");\
- LOGD(fmt, ##__VA_ARGS__);
-
- #define PLOGD(fmt, ...) \
- PLOG(fmt, ##__VA_ARGS__)
-
- #define PLOGW(fmt, ...) \
- fprintf(stderr, "<W> %s(%d) --> ", __FUNCTION__, __LINE__); \
- fprintf(stderr, fmt, ##__VA_ARGS__);\
- fprintf(stderr, "\n");\
- LOGD(fmt, ##__VA_ARGS__);
-
- #define PLOGE(fmt, ...) \
- fprintf(stderr, "<E> %s(%d) --> ", __FUNCTION__, __LINE__); \
- fprintf(stderr, fmt, ##__VA_ARGS__);\
- fprintf(stderr, "\n");\
- LOGD(fmt, ##__VA_ARGS__);
-
- #define PLOGI(fmt, ...) \
- fprintf(stderr, "<I> %s(%d) --> ", __FUNCTION__, __LINE__); \
- fprintf(stderr, fmt, ##__VA_ARGS__);\
- fprintf(stderr, "\n");\
- LOGD(fmt, ##__VA_ARGS__);
-
-#else
-
- #define PLOG(fmt, ...) \
- LOGD(fmt, ##__VA_ARGS__);
-
- #define PLOGD(fmt, ...) \
- PLOG(fmt, ##__VA_ARGS__);
-
- #define PLOGW(fmt, ...) \
- LOGW(fmt, ##__VA_ARGS__);
-
- #define PLOGE(fmt, ...) \
- LOGE(fmt, ##__VA_ARGS__);
-
- #define PLOGI(fmt, ...) \
- LOGI(fmt, ##__VA_ARGS__);\
-
-#endif
-
-#endif /* COMMON_HELPERS_H_ */
+++ /dev/null
-/*
- * Copyright (c) 2013 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 __DBG_H__
-
-#include <dlog.h>
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-#define LOG_TAG "org.tizen.clientDBusWrapper"
-
-#ifndef _ERR
-#define _ERR(fmt, args...) LOGE("[%s:%d] "fmt"\n", __func__, __LINE__, ##args)
-#endif
-
-#ifndef _DBG
-#define _DBG(fmt, args...) LOGD("[%s:%d] "fmt"\n", __func__, __LINE__, ##args)
-#endif
-
-#ifndef _INFO
-#define _INFO(fmt, args...) LOGI("[%s:%d] "fmt"\n", __func__, __LINE__, ##args)
-#endif
-
-
-#endif /* __DBG_H__ */
+++ /dev/null
-#ifndef __ETEST_H__
-#define __ETEST_H__
-
-#include <Elementary.h>
-#include <Ecore_X.h>
-#include <Elementary.h>
-#include <Evas.h>
-
-struct appdata {
- Evas_Object *win;
-};
-
-#endif
\ No newline at end of file
-#ifndef LOGGER_H_
-#define LOGGER_H_
+/*
+ * 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 <eina_log.h>
+#ifndef _LOGGER_H_
-extern int _eina_log_dom;
+#include <dlog.h>
-int logger_init(void);
-void logger_shutdown(void);
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+#define LOG_TAG "SmartNavigator"
-#define INFO(...) EINA_LOG_DOM_INFO(_eina_log_dom, __VA_ARGS__);
-#define DEBUG(...) EINA_LOG_DOM_DBG(_eina_log_dom, __VA_ARGS__);
-#define ERROR(...) EINA_LOG_DOM_ERR(_eina_log_dom, __VA_ARGS__);
-#define WARNING(...) EINA_LOG_DOM_WRN(_eina_log_dom, __VA_ARGS__);
+#ifndef ERROR
+#define ERROR(fmt, arg...) LOGE("[%s:%d]:" fmt, __FILE__, __LINE__, ##arg)
+#endif
-#define MEMORY_ERROR "Memory allocation error"
+#ifndef DEBUG
+#define DEBUG(fmt, arg...) LOGD("[%s:%d]:" fmt, __FILE__, __LINE__, ##arg)
+#endif
-#endif /* end of include guard: LOGGER_H_ */
+#ifndef INFO
+#define INFO(fmt, arg...) LOGI("[%s:%d]:" fmt, __FILE__, __LINE__, ##arg)
+#endif
+
+
+#endif /* _LOGGER_H_ */
+++ /dev/null
-#include "logger.h"
-
-int _eina_log_dom;
-
-int logger_init(void)
-{
- if (!_eina_log_dom)
- {
- _eina_log_dom = eina_log_domain_register("smart-navigator", NULL);
- if (_eina_log_dom < 0)
- {
- fprintf(stderr, "Unable to register smart-navogator log domain");
- return -1;
- }
- }
- return 0;
-}
-
-void logger_shutdown(void)
-{
- if (_eina_log_dom)
- {
- eina_log_domain_unregister(_eina_log_dom);
- _eina_log_dom = 0;
- }
-}
-
{
atspi_init();
elm_init(0, NULL);
- logger_init();
navigator_init();
screen_reader_create_service(data);
{
screen_reader_terminate_service(data);
navigator_shutdown();
- logger_shutdown();
}
int main(int argc, char **argv)
{
- printf("Application Main Function \n");
app_create(get_pointer_to_service_data_struct());
-
elm_run();
-
app_terminate(get_pointer_to_service_data_struct());
return 0;
#include "test_suite/test_suite.h"
#endif
+#define MEMORY_ERROR "Memory allocation failed"
#define NO_VALUE_INTERFACE "No value interface present"
#define NO_TEXT_INTERFACE "No text interface present"
sd->spi_listener = atspi_event_listener_new(spi_event_listener_cb, service_data, NULL);
if(sd->spi_listener == NULL)
{
- DEBUG("FAILED TO CREATE spi state changed listener")
+ DEBUG("FAILED TO CREATE spi state changed listener");
}
// ---------------------------------------------------------------------------------------------------
#include <Ecore.h>
#include "screen_reader_tts.h"
#include "logger.h"
+#define MEMORY_ERROR "Memory allocation failed"
// ---------------------------- DEBUG HELPERS ------------------------------
sd->update_language_list = EINA_TRUE;
}
- DEBUG("END")
+ DEBUG("END");
return EINA_TRUE;
}
start_index = 0;
end_index = 0;
- fprintf(stderr, "Event: %s: %d, obj: %p: role: %s\n", event->type, event->detail1, event->source,
- atspi_accessible_get_role_name(event->source, NULL));
+ DEBUG("Event: %s: %d, obj: %p: role: %s\n", event->type, event->detail1, event->source,
+ atspi_accessible_get_role_name(event->source, NULL));
if (!strcmp(event->type, "object:scroll-start"))
{
${CMAKE_SOURCE_DIR}/src/screen_reader_vconf.c
${CMAKE_SOURCE_DIR}/src/screen_reader_spi.c
${CMAKE_SOURCE_DIR}/src/screen_reader_tts.c
- ${CMAKE_SOURCE_DIR}/src/logger.c
${CMAKE_SOURCE_DIR}/src/flat_navi.c
${CMAKE_SOURCE_DIR}/src/position_sort.c
${CMAKE_SOURCE_DIR}/src/object_cache.c)