summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorJin Yoon <jinny.yoon@samsung.com>2018-11-23 16:22:45 +0900
committerJin Yoon <jinny.yoon@samsung.com>2018-11-24 02:55:01 +0900
commite1fb5d830cf84b2926571421e2cfe4df45bbb2c7 (patch)
tree0c03b2216f262156add1c390d75e9750f5787b05 /inc
parent2a04482c9b50f90cef6b6be7d988cbd7e4ed0170 (diff)
downloadst-things-light-e1fb5d830cf84b2926571421e2cfe4df45bbb2c7.tar.gz
st-things-light-e1fb5d830cf84b2926571421e2cfe4df45bbb2c7.tar.bz2
st-things-light-e1fb5d830cf84b2926571421e2cfe4df45bbb2c7.zip
Change SmartThings APIs for Tizen 5.0
Change-Id: Ia848afa3b3fdf0956a0c3282157ecae0aac069dd
Diffstat (limited to 'inc')
-rw-r--r--inc/log.h6
-rw-r--r--inc/sensor-data.h52
-rw-r--r--inc/smartthings.h18
-rw-r--r--inc/smartthings_payload.h11
-rw-r--r--inc/smartthings_resource.h19
5 files changed, 26 insertions, 80 deletions
diff --git a/inc/log.h b/inc/log.h
index c911278..eb89231 100644
--- a/inc/log.h
+++ b/inc/log.h
@@ -15,8 +15,8 @@
* limitations under the License.
*
******************************************************************/
-#ifndef __CO2_LOG_H__
-#define __CO2_LOG_H__
+#ifndef __LOG_H__
+#define __LOG_H__
#include <dlog.h>
@@ -93,5 +93,5 @@ extern "C" {
}
#endif
-#endif /* __CO2_LOG_H__ */
+#endif /* __LOG_H__ */
diff --git a/inc/sensor-data.h b/inc/sensor-data.h
deleted file mode 100644
index f486551..0000000
--- a/inc/sensor-data.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* ****************************************************************
- *
- * Copyright 2017 Samsung Electronics 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 __SENSOR_DATA_H__
-#define __SENSOR_DATA_H__
-
-#include <stdbool.h>
-
-typedef enum {
- SENSOR_DATA_TYPE_NONE = 0,
- SENSOR_DATA_TYPE_INT,
- SENSOR_DATA_TYPE_UINT,
- SENSOR_DATA_TYPE_BOOL,
- SENSOR_DATA_TYPE_DOUBLE,
- SENSOR_DATA_TYPE_STR,
-} sensor_data_type_e;
-
-typedef struct __sensor_data_s sensor_data;
-
-sensor_data *sensor_data_new(sensor_data_type_e type);
-void sensor_data_free(sensor_data *data);
-
-int sensor_data_set_int(sensor_data *data, int value);
-int sensor_data_set_uint(sensor_data *data, unsigned int value);
-int sensor_data_set_bool(sensor_data *data, bool value);
-int sensor_data_set_double(sensor_data *data, double value);
-int sensor_data_set_string(sensor_data *data, const char *value, unsigned int size);
-
-sensor_data_type_e sensor_data_get_type(sensor_data *data);
-int sensor_data_get_int(sensor_data *data, int *value);
-int sensor_data_get_uint(sensor_data *data, unsigned int *value);
-int sensor_data_get_bool(sensor_data *data, bool *value);
-int sensor_data_get_double(sensor_data *data, double *value);
-int sensor_data_get_string(sensor_data *data, const char **value);
-
-#endif /* __SENSOR_DATA_H__ */
-
diff --git a/inc/smartthings.h b/inc/smartthings.h
index f1b6edc..7206479 100644
--- a/inc/smartthings.h
+++ b/inc/smartthings.h
@@ -1,5 +1,6 @@
- /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+/*****************************************************************
+ *
+ * Copyright (c) 2018 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.
@@ -8,11 +9,13 @@
* 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,
+ * 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 __SAMSUNG_EXPERIENCE_SERVICE_SMARTTHINGS_H__
#define __SAMSUNG_EXPERIENCE_SERVICE_SMARTTHINGS_H__
@@ -163,16 +166,11 @@ typedef struct smartthings_ap_list_s *smartthings_ap_list_h;
/**
* @brief Callback for status of connection to SmartThings Thing agent.
- * @details The following error codes can be received: \n
- #SMARTTHINGS_ERROR_NONE: Success \n
- #SMARTTHINGS_ERROR_PERMISSION_DENIED: Permission denied \n
- #SMARTTHINGS_ERROR_SERVICE_UNAVAILABLE: Service unavailable \n
* @since_ses 1
*
* @remarks The @a handle should not be released.
* @remarks The @a handle is the same object for which the callback was set/added.
* @remarks The @a handle will be released when smartthings_deinitialize() is called.
- * @remarks When callback is called, user can see result as #smartthings_error_e enumeration value.
* @remarks When callback is called, user can see connection status as #smartthings_connection_status_e enumeration value.
*
* @param[in] result The result of connection operation
@@ -182,7 +180,7 @@ typedef struct smartthings_ap_list_s *smartthings_ap_list_h;
*
* @see smartthings_initialize()
*/
-typedef void (*smartthings_connection_status_cb)(smartthings_error_e result, smartthings_h handle, smartthings_connection_status_e status, void *user_data);
+typedef void (*smartthings_connection_status_cb)(smartthings_h handle, smartthings_connection_status_e status, void *user_data);
/**
* @brief Callback for SmartThings Thing status.
diff --git a/inc/smartthings_payload.h b/inc/smartthings_payload.h
index b4612c1..988585d 100644
--- a/inc/smartthings_payload.h
+++ b/inc/smartthings_payload.h
@@ -1,5 +1,6 @@
- /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+/*****************************************************************
+ *
+ * Copyright (c) 2018 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.
@@ -8,11 +9,13 @@
* 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,
+ * 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 __SAMSUNG_EXPERIENCE_SERVICE_SMARTTHINGS_PAYLOAD_H__
#define __SAMSUNG_EXPERIENCE_SERVICE_SMARTTHINGS_PAYLOAD_H__
diff --git a/inc/smartthings_resource.h b/inc/smartthings_resource.h
index 962339b..1968c50 100644
--- a/inc/smartthings_resource.h
+++ b/inc/smartthings_resource.h
@@ -1,5 +1,6 @@
- /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+/*****************************************************************
+ *
+ * Copyright (c) 2018 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.
@@ -8,11 +9,13 @@
* 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,
+ * 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 __SAMSUNG_EXPERIENCE_SERVICE_SMARTTHINGS_RESOURCE_H__
#define __SAMSUNG_EXPERIENCE_SERVICE_SMARTTHINGS_RESOURCE_H__
@@ -80,16 +83,11 @@ typedef struct smartthings_resource_s *smartthings_resource_h;
/**
* @brief Callback for status of connection to SmartThings Thing agent.
- * @details The following error codes can be received: \n
- #SMARTTHINGS_RESOURCE_ERROR_NONE: Success \n
- #SMARTTHINGS_RESOURCE_ERROR_PERMISSION_DENIED: Permission denied \n
- #SMARTTHINGS_RESOURCE_ERROR_SERVICE_UNAVAILABLE: Service unavailable \n
* @since_ses 1
*
* @remarks The @a handle should not be released.
* @remarks The @a handle is the same object for which the callback was set/added.
* @remarks The @a handle will be released when smartthings_deinitialize() is called.
- * @remarks When callback is called, user can see result as #smartthings_resource_error_e enumeration value.
* @remarks When callback is called, user can see connection status as #smartthings_connection_status_e enumeration value.
*
* @param[in] result The result of connection operation
@@ -99,8 +97,7 @@ typedef struct smartthings_resource_s *smartthings_resource_h;
*
* @see smartthings_resource_initialize()
*/
-typedef void (*smartthings_resource_connection_status_cb)(smartthings_resource_error_e result, smartthings_resource_h handle, smartthings_resource_connection_status_e status, void *user_data);
-
+typedef void (*smartthings_resource_connection_status_cb)(smartthings_resource_h handle, smartthings_resource_connection_status_e status, void *user_data);
/**
* @brief Callback for handling request(GET/SET) messages.