ADD_EXECUTABLE(${PROJECT_NAME}
${PROJECT_ROOT_DIR}/src/controller.c
+ ${PROJECT_ROOT_DIR}/src/controller_internal.c
${PROJECT_ROOT_DIR}/src/connectivity.c
${PROJECT_ROOT_DIR}/src/resource.c
${PROJECT_ROOT_DIR}/src/resource/resource_illuminance_sensor.c
#ifndef __POSITION_FINDER_CONTROLLER_H__
#define __POSITION_FINDER_CONTROLLER_H__
+#include "controller_internal.h"
+
#endif /* __POSITION_FINDER_CONTROLLER_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Geunsun Lee <gs86.lee@samsung.com>
+ * Eunyoung Lee <ey928.lee@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+ *
+ * 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 __POSITION_FINDER_CONTROLLER_INTERNAL_H__
+#define __POSITION_FINDER_CONTROLLER_INTERNAL_H__
+
+extern void controller_init_internal_functions(void);
+extern void controller_fini_internal_functions(void);
+
+#endif /* __POSITION_FINDER_CONTROLLER_INTERNAL_H__ */
#define USE_MULTIPLE_SENSOR 0
#define MULTIPLE_SENSOR_NUMBER 5
-static void _start_internal_function(void);
-static void _stop_internal_function(void);
-
typedef struct app_data_s {
Ecore_Timer *getter_timer[PIN_MAX];
connectivity_resource_s *resource_info;
app_data *ad = data;
int ret = -1;
- _start_internal_function();
+ controller_init_internal_functions();
ret = connectivity_set_resource("/door/1", "org.tizen.door", &ad->resource_info);
if (ret == -1) _E("Cannot broadcast resource");
}
connectivity_unset_resource(ad->resource_info);
- _stop_internal_function();
+ controller_fini_internal_functions();
free(ad);
}
return ret;
}
-
-/* Do not modify codes under this comment */
-static void _start_internal_function(void)
-{
- connectivity_init();
-}
-
-static void _stop_internal_function(void)
-{
- _I("Terminating...");
- resource_close_all();
- connectivity_fini();
-}
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Geunsun Lee <gs86.lee@samsung.com>
+ * Eunyoung Lee <ey928.lee@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+ *
+ * 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 <iotcon.h>
+
+#include "log.h"
+#include "connectivity.h"
+#include "resource.h"
+
+void controller_init_internal_functions(void)
+{
+ connectivity_init();
+}
+
+void controller_fini_internal_functions(void)
+{
+ _I("Terminating...");
+ resource_close_all();
+ connectivity_fini();
+}