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>
12 files changed:
include/CustomContextProvider.h [new file with mode: 0644]
include/DeviceContextProvider.h [new file with mode: 0644]
include/PlaceContextProvider.h [new file with mode: 0644]
include/StatisticsContextProvider.h [new file with mode: 0644]
include/custom_context_provider.h [deleted file]
include/device_context_provider.h [deleted file]
include/place_context_provider.h [deleted file]
include/statistics_context_provider.h [deleted file]
src/custom/custom_context_provider.cpp
src/device/device_context_provider.cpp
src/place/place_context_provider.cpp
src/statistics/statistics_context_provider.cpp

diff --git a/include/CustomContextProvider.h b/include/CustomContextProvider.h
new file mode 100644 (file)
index 0000000..c75d63e
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * 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 _CONTEXT_CUSTOM_CONTEXT_PROVIDER_H_
+#define _CONTEXT_CUSTOM_CONTEXT_PROVIDER_H_
+
+namespace ctx {
+
+       bool initCustomContextProvider();
+
+       namespace custom_context_provider {
+
+               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 /* End of _CONTEXT_CUSTOM_CONTEXT_PROVIDER_H_ */
diff --git a/include/DeviceContextProvider.h b/include/DeviceContextProvider.h
new file mode 100644 (file)
index 0000000..1e47323
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * 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 _CONTEXT_DEVICE_CONTEXT_PROVIDER_H_
+#define _CONTEXT_DEVICE_CONTEXT_PROVIDER_H_
+
+namespace ctx {
+
+       bool initDeviceContextProvider();
+
+}      /* namespace ctx */
+
+#endif /* End of _CONTEXT_DEVICE_CONTEXT_PROVIDER_H_ */
diff --git a/include/PlaceContextProvider.h b/include/PlaceContextProvider.h
new file mode 100644 (file)
index 0000000..e7585b0
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * 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 _CONTEXT_PLACE_CONTEXT_PROVIDER_H_
+#define _CONTEXT_PLACE_CONTEXT_PROVIDER_H_
+
+namespace ctx {
+
+       bool initPlaceContextProvider();
+
+}      /* namespace ctx */
+
+#endif /* End of _CONTEXT_PLACE_CONTEXT_PROVIDER_H_ */
diff --git a/include/StatisticsContextProvider.h b/include/StatisticsContextProvider.h
new file mode 100644 (file)
index 0000000..f356719
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * 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 _CONTEXT_STATISTICS_CONTEXT_PROVIDER_H_
+#define _CONTEXT_STATISTICS_CONTEXT_PROVIDER_H_
+
+namespace ctx {
+
+       bool initStatisticsContextProvider();
+
+}      /* namespace ctx */
+
+#endif /* End of _CONTEXT_STATISTICS_CONTEXT_PROVIDER_H_ */
diff --git a/include/custom_context_provider.h b/include/custom_context_provider.h
deleted file mode 100644 (file)
index 918dfa6..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
- *
- * 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 __CONTEXT_CUSTOM_CONTEXT_PROVIDER_H__
-#define __CONTEXT_CUSTOM_CONTEXT_PROVIDER_H__
-
-namespace ctx {
-       bool init_custom_context_provider();
-
-       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);
-       }
-}
-
-#endif //__CONTEXT_CUSTOM_CONTEXT_PROVIDER_H__
diff --git a/include/device_context_provider.h b/include/device_context_provider.h
deleted file mode 100644 (file)
index 09ef1e7..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
- *
- * 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 __CONTEXT_DEVICE_CONTEXT_PROVIDER_H__
-#define __CONTEXT_DEVICE_CONTEXT_PROVIDER_H__
-
-namespace ctx {
-       bool init_device_context_provider();
-}
-
-#endif //__CONTEXT_DEVICE_CONTEXT_PROVIDER_H__
diff --git a/include/place_context_provider.h b/include/place_context_provider.h
deleted file mode 100644 (file)
index 407838b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
- *
- * 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 __CONTEXT_PLACE_CONTEXT_PROVIDER_H__
-#define __CONTEXT_PLACE_CONTEXT_PROVIDER_H__
-
-namespace ctx {
-       bool init_place_context_provider();
-}
-
-#endif /* __CONTEXT_PLACE_CONTEXT_PROVIDER_H__ */
diff --git a/include/statistics_context_provider.h b/include/statistics_context_provider.h
deleted file mode 100644 (file)
index b45c3fd..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
- *
- * 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 __CONTEXT_STATISTICS_CONTEXT_PROVIDER_H__
-#define __CONTEXT_STATISTICS_CONTEXT_PROVIDER_H__
-
-namespace ctx {
-       bool init_statistics_context_provider();
-}
-
-#endif /* __CONTEXT_STATISTICS_CONTEXT_PROVIDER_H__ */
index 88aca00fc05cc9f6164797e5afce5c770badf5b5..5bec97e9b0d4ae28084ab12e5af7f83ba6643bd1 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 39fcf7d13bea30a5c46d3921539d44065b3fd45c..1e42e20a88f237a6617f043557eae7a265291c4a 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 6bcf1c395903e37a7a59e1e296256ccd76be3d2f..c3efaef4d403b3ce598be9f4899e419e86fcf805 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 2d305ebd9fa698c400f394c1fd5ef3f0de366c21..1fa29eee9f1e8ebfd7871957a40be57580eab10e 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);