Applying Tizen C++ coding style to provider initialization 69/64869/1
authorSomin Kim <somin926.kim@samsung.com>
Wed, 6 Apr 2016 02:17:31 +0000 (11:17 +0900)
committerSomin Kim <somin926.kim@samsung.com>
Wed, 6 Apr 2016 02:17:31 +0000 (11:17 +0900)
Change-Id: Icb44282ca2adf5309471e11ef93198ed6220a082
Signed-off-by: Somin Kim <somin926.kim@samsung.com>
include/CustomContextProvider.h [moved from include/custom_context_provider.h with 56% similarity]
include/DeviceContextProvider.h [moved from include/place_context_provider.h with 75% similarity]
include/PlaceContextProvider.h [moved from include/device_context_provider.h with 76% similarity]
include/StatisticsContextProvider.h [moved from include/statistics_context_provider.h with 74% similarity]
src/custom/custom_context_provider.cpp
src/device/device_context_provider.cpp
src/place/place_context_provider.cpp
src/statistics/statistics_context_provider.cpp

similarity index 56%
rename from include/custom_context_provider.h
rename to include/CustomContextProvider.h
index 918dfa6..c75d63e 100644 (file)
  * limitations under the License.
  */
 
-#ifndef __CONTEXT_CUSTOM_CONTEXT_PROVIDER_H__
-#define __CONTEXT_CUSTOM_CONTEXT_PROVIDER_H__
+#ifndef _CONTEXT_CUSTOM_CONTEXT_PROVIDER_H_
+#define _CONTEXT_CUSTOM_CONTEXT_PROVIDER_H_
 
 namespace ctx {
-       bool init_custom_context_provider();
+
+       bool initCustomContextProvider();
 
        namespace custom_context_provider {
-       int addItem(std::string subject, std::string name, ctx::Json tmpl, const char* owner, bool is_init = false);
-       int removeItem(std::string subject);
-       int publishData(std::string subject, ctx::Json fact);
 
-       ContextProviderBase* create(void* data);
-       void destroy(void* data);
-       }
-}
+               int addItem(std::string subject, std::string name, ctx::Json tmpl, const char* owner, bool isInit = false);
+               int removeItem(std::string subject);
+               int publishData(std::string subject, ctx::Json fact);
+
+               ContextProviderBase* create(void* data);
+               void destroy(void* data);
+
+       }       /* namespace custom_context_provider */
+
+}      /* namespace ctx */
 
-#endif //__CONTEXT_CUSTOM_CONTEXT_PROVIDER_H__
+#endif /* End of _CONTEXT_CUSTOM_CONTEXT_PROVIDER_H_ */
similarity index 75%
rename from include/place_context_provider.h
rename to include/DeviceContextProvider.h
index 407838b..1e47323 100644 (file)
  * limitations under the License.
  */
 
-#ifndef __CONTEXT_PLACE_CONTEXT_PROVIDER_H__
-#define __CONTEXT_PLACE_CONTEXT_PROVIDER_H__
+#ifndef _CONTEXT_DEVICE_CONTEXT_PROVIDER_H_
+#define _CONTEXT_DEVICE_CONTEXT_PROVIDER_H_
 
 namespace ctx {
-       bool init_place_context_provider();
-}
 
-#endif /* __CONTEXT_PLACE_CONTEXT_PROVIDER_H__ */
+       bool initDeviceContextProvider();
+
+}      /* namespace ctx */
+
+#endif /* End of _CONTEXT_DEVICE_CONTEXT_PROVIDER_H_ */
similarity index 76%
rename from include/device_context_provider.h
rename to include/PlaceContextProvider.h
index 09ef1e7..e7585b0 100644 (file)
  * limitations under the License.
  */
 
-#ifndef __CONTEXT_DEVICE_CONTEXT_PROVIDER_H__
-#define __CONTEXT_DEVICE_CONTEXT_PROVIDER_H__
+#ifndef _CONTEXT_PLACE_CONTEXT_PROVIDER_H_
+#define _CONTEXT_PLACE_CONTEXT_PROVIDER_H_
 
 namespace ctx {
-       bool init_device_context_provider();
-}
 
-#endif //__CONTEXT_DEVICE_CONTEXT_PROVIDER_H__
+       bool initPlaceContextProvider();
+
+}      /* namespace ctx */
+
+#endif /* End of _CONTEXT_PLACE_CONTEXT_PROVIDER_H_ */
similarity index 74%
rename from include/statistics_context_provider.h
rename to include/StatisticsContextProvider.h
index b45c3fd..f356719 100644 (file)
  * limitations under the License.
  */
 
-#ifndef __CONTEXT_STATISTICS_CONTEXT_PROVIDER_H__
-#define __CONTEXT_STATISTICS_CONTEXT_PROVIDER_H__
+#ifndef _CONTEXT_STATISTICS_CONTEXT_PROVIDER_H_
+#define _CONTEXT_STATISTICS_CONTEXT_PROVIDER_H_
 
 namespace ctx {
-       bool init_statistics_context_provider();
-}
 
-#endif /* __CONTEXT_STATISTICS_CONTEXT_PROVIDER_H__ */
+       bool initStatisticsContextProvider();
+
+}      /* namespace ctx */
+
+#endif /* End of _CONTEXT_STATISTICS_CONTEXT_PROVIDER_H_ */
index 88aca00..5bec97e 100644 (file)
@@ -20,7 +20,7 @@
 #include <ContextManager.h>
 #include <ContextProviderBase.h>
 #include <db_mgr.h>
-#include <custom_context_provider.h>
+#include <CustomContextProvider.h>
 #include "custom_base.h"
 
 std::map<std::string, ctx::custom_base*> custom_map;
@@ -59,7 +59,7 @@ EXTAPI void ctx::custom_context_provider::destroy(void *data)
        }
 }
 
-EXTAPI bool ctx::init_custom_context_provider()
+EXTAPI bool ctx::initCustomContextProvider()
 {
        // Create custom template db
        std::string q = std::string("CREATE TABLE IF NOT EXISTS context_trigger_custom_template ")
index 39fcf7d..1e42e20 100644 (file)
@@ -17,7 +17,7 @@
 #include <types_internal.h>
 #include <ContextManager.h>
 #include <ContextProviderBase.h>
-#include <device_context_provider.h>
+#include <DeviceContextProvider.h>
 
 #include "system/system_types.h"
 #include "social/social_types.h"
@@ -75,7 +75,7 @@ void registerProvider(const char *subject, const char *privilege)
        provider::submit_trigger_item();
 }
 
-EXTAPI bool ctx::init_device_context_provider()
+EXTAPI bool ctx::initDeviceContextProvider()
 {
        registerProvider<device_status_alarm>(DEVICE_ST_SUBJ_ALARM, NULL);
        registerProvider<device_status_time>(DEVICE_ST_SUBJ_TIME, NULL);
index 6bcf1c3..c3efaef 100644 (file)
@@ -17,7 +17,7 @@
 #include <types_internal.h>
 #include <ContextManager.h>
 #include <ContextProviderBase.h>
-#include <place_context_provider.h>
+#include <PlaceContextProvider.h>
 
 #ifdef _MOBILE_
 #include "geofence/place_geofence.h"
@@ -36,7 +36,7 @@ void registerProvider(const char *subject, const char *privilege)
        ctx::context_manager::registerProvider(subject, providerInfo);
 }
 
-EXTAPI bool ctx::init_place_context_provider()
+EXTAPI bool ctx::initPlaceContextProvider()
 {
 #ifdef _MOBILE_
        registerProvider<place_geofence_provider>(PLACE_SUBJ_GEOFENCE, PLACE_PRIV_GEOFENCE);
index 2d305eb..1fa29ee 100644 (file)
@@ -16,7 +16,7 @@
 #include <types_internal.h>
 #include <ContextManager.h>
 #include <ContextProviderBase.h>
-#include <statistics_context_provider.h>
+#include <StatisticsContextProvider.h>
 
 #include "app/app_stats_provider.h"
 
@@ -43,7 +43,7 @@ void registerProvider(const char *subject, const char *privilege)
        ctx::context_manager::registerProvider(subject, providerInfo);
 }
 
-EXTAPI bool ctx::init_statistics_context_provider()
+EXTAPI bool ctx::initStatisticsContextProvider()
 {
        app_statistics_provider::create(NULL);
        registerProvider<app_statistics_provider>(APP_SUBJ_RECENTLY_USED, APP_HISTORY_PRIV);