From: Jin Yoon Date: Fri, 23 Nov 2018 18:58:20 +0000 (+0900) Subject: Update SmartThings APIs for Tizen 5.0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=HEAD;p=apps%2Fnative%2Fsmart-surveillance-camera.git Update SmartThings APIs for Tizen 5.0 Change-Id: I07122b34fcca4fc63b57a18a10181fac3825459e --- diff --git a/.gitignore b/.gitignore index a781462..1402475 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ Debug/ .sign/ crash-info/ +/SA_Report/ +/res/ 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. diff --git a/lib/libst_thing_master_api.so b/lib/libst_thing_master_api.so index 2e258c9..aef594a 100644 Binary files a/lib/libst_thing_master_api.so and b/lib/libst_thing_master_api.so differ diff --git a/lib/libst_thing_resource_api.so b/lib/libst_thing_resource_api.so index 53b9b44..245093f 100644 Binary files a/lib/libst_thing_resource_api.so and b/lib/libst_thing_resource_api.so differ diff --git a/src/st_thing_master.c b/src/st_thing_master.c index edb1fe4..6f69844 100644 --- a/src/st_thing_master.c +++ b/src/st_thing_master.c @@ -133,11 +133,10 @@ static const char *__master_error_to_str(smartthings_error_e error) } static void -_things_connection_status_cb(smartthings_error_e error, - smartthings_h handle, smartthings_connection_status_e status, +_things_connection_status_cb(smartthings_h handle, smartthings_connection_status_e status, void *user_data) { - _D("result [%s], status = [%d]", __master_error_to_str(error), status); + _D("status = [%d]", status); if (status == SMARTTHINGS_CONNECTION_STATUS_CONNECTED) { int err = 0; diff --git a/src/st_thing_resource.c b/src/st_thing_resource.c index 6dcb842..1f4f441 100644 --- a/src/st_thing_resource.c +++ b/src/st_thing_resource.c @@ -289,11 +289,10 @@ _request_cb(smartthings_resource_h handle, int req_id, } static void -_resource_connection_status_cb(smartthings_resource_error_e error, - smartthings_resource_h handle, +_resource_connection_status_cb(smartthings_resource_h handle, smartthings_resource_connection_status_e status, void *user_data) { - _D("result [%s], status=[%d]", __resource_error_to_str(error), status); + _D("status=[%d]", status); g_conn_status = status;