Apply Tizen C++ coding style to EventDrivenThread 92/58592/1
authorMu-Woong Lee <muwoong.lee@samsung.com>
Tue, 2 Feb 2016 06:15:59 +0000 (15:15 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Tue, 2 Feb 2016 06:15:59 +0000 (15:15 +0900)
Change-Id: I6d472742320351ecab16847a1c2476f3eceab221
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
src/db_mgr_impl.cpp
src/db_mgr_impl.h

index 795bacc..f436a24 100644 (file)
@@ -75,7 +75,7 @@ void ctx::db_manager_impl::close()
        db_handle = NULL;
 }
 
-void ctx::db_manager_impl::on_thread_event_popped(int type, void* data)
+void ctx::db_manager_impl::onEvent(int type, void* data)
 {
        IF_FAIL_VOID(data);
        query_info_s *info = static_cast<query_info_s*>(data);
@@ -91,10 +91,10 @@ void ctx::db_manager_impl::on_thread_event_popped(int type, void* data)
                break;
        }
 
-       delete_thread_event(type, data);
+       deleteEvent(type, data);
 }
 
-void ctx::db_manager_impl::delete_thread_event(int type, void* data)
+void ctx::db_manager_impl::deleteEvent(int type, void* data)
 {
        IF_FAIL_VOID(data);
        query_info_s *info = static_cast<query_info_s*>(data);
@@ -124,7 +124,7 @@ bool ctx::db_manager_impl::create_table(unsigned int query_id, const char* table
        info->id = query_id;
        info->listener = listener;
 
-       if (!push_thread_event(QTYPE_CREATE_TABLE, info)) {
+       if (!pushEvent(QTYPE_CREATE_TABLE, info)) {
                _E("Pushing thread event failed");
                delete info;
                return false;
@@ -186,7 +186,7 @@ bool ctx::db_manager_impl::insert(unsigned int query_id, const char* table_name,
        info->id = query_id;
        info->listener = listener;
 
-       if (!push_thread_event(QTYPE_INSERT, info)) {
+       if (!pushEvent(QTYPE_INSERT, info)) {
                _E("Pushing thread event failed");
                delete info;
                return false;
@@ -207,7 +207,7 @@ bool ctx::db_manager_impl::execute(unsigned int query_id, const char* query, db_
        info->query = query;
        info->listener = listener;
 
-       if (!push_thread_event(QTYPE_EXECUTE, info)) {
+       if (!pushEvent(QTYPE_EXECUTE, info)) {
                _E("Pushing thread event failed");
                delete info;
                return false;
index a00fd52..4ca11c1 100644 (file)
 #include <json.h>
 #include <sqlite3.h>
 
-#include <event_driven.h>
+#include <EventDrivenThread.h>
 #include <db_listener_iface.h>
 #include <db_mgr_iface.h>
 
 namespace ctx {
 
-       class db_manager_impl : public event_driven_thread, public db_manager_iface {
+       class db_manager_impl : public EventDrivenThread, public db_manager_iface {
        private:
                enum query_type_e {
                        QTYPE_CREATE_TABLE = 1,
@@ -51,8 +51,8 @@ namespace ctx {
 
                sqlite3 *db_handle;
 
-               void on_thread_event_popped(int type, void* data);
-               void delete_thread_event(int type, void* data);
+               void onEvent(int type, void* data);
+               void deleteEvent(int type, void* data);
 
                bool open();
                void close();