Revice with_info API scope same as 2.4 42/39642/5
authorGukhwan Cho <gh78.cho@samsung.com>
Wed, 20 May 2015 09:03:07 +0000 (18:03 +0900)
committerGukhwan Cho <gh78.cho@samsung.com>
Thu, 21 May 2015 04:52:02 +0000 (13:52 +0900)
Change-Id: Id07315d897c76b0ee0b4756c2d06a83011b0ffca
Signed-off-by: Gukhwan Cho <gh78.cho@samsung.com>
client/ctsvc_client_noti.c
include/contacts_db.h [changed mode: 0755->0644]
include/contacts_db_extension.h [new file with mode: 0644]
include/contacts_extension.h [new file with mode: 0644]

index 13cb678..cea1c7f 100644 (file)
@@ -26,6 +26,7 @@
 #include "ctsvc_ipc_define.h"
 #include "ctsvc_mutex.h"
 #include "ctsvc_client_ipc.h"
+#include "contacts_extension.h"
 
 typedef struct
 {
old mode 100755 (executable)
new mode 100644 (file)
index 3be9f37..1dbe986
@@ -1095,87 +1095,6 @@ int contacts_db_delete_records_async(const char* view_uri, int record_id_array[]
  */
 int contacts_db_replace_records_async( contacts_list_h list, int record_id_array[], int count, contacts_db_result_cb callback, void *user_data );
 
-#ifndef _CONTACTS_NATIVE
-
-/**
- * @internal
- * @brief Called when the designated view changes.
- *
- * @since_tizen 2.3
- *
- * @param[in]   view_uri       The view URI, only _contacts_person and _contacts_phone_log are now supported
- * @param[in]   changes        It includes changes information ("type:id," string is repeated, you should parse it)
- * @param[in]   user_data      The user data passed from the callback registration function
- *
- * @see contacts_db_add_changed_cb_with_info()
- */
-
-typedef void (*contacts_db_change_cb_with_info)(const char* view_uri, char *changes, void* user_data);
-
-/**
- * @internal
- * @brief Registers a callback function.
- * @details Now, support only _contacts_person and _contacts_phone_log view_uri.
- *
- * @since_tizen 2.3
- * @privlevel public
- * @privilege %http://tizen.org/privilege/contact.read
- * @privilege %http://tizen.org/privilege/callhistory.read
- *
- * @remarks %http://tizen.org/privilege/contact.read is needed to get notification whenever record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person is changed, \n
- * %http://tizen.org/privilege/callhistory.read is needed to get notification whenever record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log is changed.
- *
- * @param[in]   view_uri       The view URI of records whose changes are monitored
- * @param[in]   callback       The callback function to register
- * @param[in]  user_data       The user data to be passed to the callback function
- *
- * @return  @c 0 on sucess,
- *          otherwise a negative error value (#contacts_error_e)
- *
- * @retval     #CONTACTS_ERROR_NONE                Successful
- * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY              Out of memory
- * @retval     #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
- * @retval  #CONTACTS_ERROR_IPC                        IPC error
- * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied
- * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
- *
- * @pre                contacts_connect() should be called to open a connection to the contacts service.
- * @post               contacts_db_change_cb_with_info() callback will be called
- *
- * @see contacts_connect()
- * @see contacts_db_changed_cb_with_info()
- * @see contacts_db_remove_changed_cb_with_info()
- */
-int contacts_db_add_changed_cb_with_info(const char* view_uri, contacts_db_change_cb_with_info callback, void* user_data);
-
-/**
- * @internal
- * @brief Unregisters a callback function.
- * @details Now, support only _contacts_person and _contacts_phone_log view_uri.
- *
- * @since_tizen 2.3
- *
- * @param[in]   view_uri       The view URI of records whose changes are monitored
- * @param[in]   callback       The callback function to register
- * @param[in]  user_data       The user data to be passed to the callback function
- *
- * @return  @c 0 on sucess,
- *          otherwise a negative error value (#contacts_error_e)
- *
- * @retval     #CONTACTS_ERROR_NONE                Successful
- * @retval     #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
- * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
- *
- * @pre                contacts_connect() should be called to open a connection to the contacts service.
- *
- * @see contacts_connect()
- * @see contacts_db_changed_cb_with_info()
- * @see contacts_db_add_changed_cb_with_info()
- */
-int contacts_db_remove_changed_cb_with_info(const char* view_uri, contacts_db_change_cb_with_info callback, void* user_data);
-
-#endif
-
 /**
  * @}
  */
diff --git a/include/contacts_db_extension.h b/include/contacts_db_extension.h
new file mode 100644 (file)
index 0000000..caaa58f
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * Contacts Service
+ *
+ * Copyright (c) 2015 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.
+ * 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 __TIZEN_SOCIAL_CONTACTS_DB_EXTENSION_H__
+#define __TIZEN_SOCIAL_CONTACTS_DB_EXTENSION_H__
+
+#ifndef API
+#define API __attribute__ ((visibility("default")))
+#endif
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @file contacts_db_extension.h
+ */
+
+/**
+ * @brief Called when the designated view changes.
+ *
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
+ *
+ * @param[in]   view_uri       The view URI, only _contacts_person and _contacts_phone_log are now supported
+ * @param[in]   changes        It includes changes information ("type:id," string is repeated, you should parse it)
+ * @param[in]   user_data      The user data passed from the callback registration function
+ *
+ * @see contacts_db_add_changed_cb_with_info()
+ */
+
+typedef void (*contacts_db_change_cb_with_info)(const char* view_uri, char *changes, void* user_data);
+
+/**
+ * @brief Registers a callback function.
+ * @details Now, support only _contacts_person and _contacts_phone_log view_uri.
+ *
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/contact.read
+ * @privilege %http://tizen.org/privilege/callhistory.read
+ *
+ * @remarks %http://tizen.org/privilege/contact.read is needed to get notification whenever record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person is changed, \n
+ * %http://tizen.org/privilege/callhistory.read is needed to get notification whenever record which is related to @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_phone_log is changed.
+ *
+ * @param[in]   view_uri       The view URI of records whose changes are monitored
+ * @param[in]   callback       The callback function to register
+ * @param[in]  user_data       The user data to be passed to the callback function
+ *
+ * @return  @c 0 on sucess,
+ *          otherwise a negative error value (#contacts_error_e)
+ *
+ * @retval     #CONTACTS_ERROR_NONE                Successful
+ * @retval  #CONTACTS_ERROR_OUT_OF_MEMORY              Out of memory
+ * @retval     #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
+ * @retval  #CONTACTS_ERROR_IPC                        IPC error
+ * @retval  #CONTACTS_ERROR_PERMISSION_DENIED   Permission denied
+ * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
+ *
+ * @pre                contacts_connect() should be called to open a connection to the contacts service.
+ * @post               contacts_db_change_cb_with_info() callback will be called
+ *
+ * @see contacts_connect()
+ * @see contacts_db_changed_cb_with_info()
+ * @see contacts_db_remove_changed_cb_with_info()
+ */
+int contacts_db_add_changed_cb_with_info(const char* view_uri, contacts_db_change_cb_with_info callback, void* user_data);
+
+/**
+ * @brief Unregisters a callback function.
+ * @details Now, support only _contacts_person and _contacts_phone_log view_uri.
+ *
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.4 @endif
+ *
+ * @param[in]   view_uri       The view URI of records whose changes are monitored
+ * @param[in]   callback       The callback function to register
+ * @param[in]  user_data       The user data to be passed to the callback function
+ *
+ * @return  @c 0 on sucess,
+ *          otherwise a negative error value (#contacts_error_e)
+ *
+ * @retval     #CONTACTS_ERROR_NONE                Successful
+ * @retval     #CONTACTS_ERROR_INVALID_PARAMETER   Invalid parameter
+ * @retval  #CONTACTS_ERROR_NOT_SUPPORTED       Not supported
+ *
+ * @pre                contacts_connect() should be called to open a connection to the contacts service.
+ *
+ * @see contacts_connect()
+ * @see contacts_db_changed_cb_with_info()
+ * @see contacts_db_add_changed_cb_with_info()
+ */
+int contacts_db_remove_changed_cb_with_info(const char* view_uri, contacts_db_change_cb_with_info callback, void* user_data);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __TIZEN_SOCIAL_CONTACTS_DB_EXTENSION_H__ */
+
diff --git a/include/contacts_extension.h b/include/contacts_extension.h
new file mode 100644 (file)
index 0000000..8a36fec
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Contacts Service
+ *
+ * Copyright (c) 2015 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.
+ * 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 __TIZEN_SOCIAL_CONTACTS_EXTENSION_H__
+#define __TIZEN_SOCIAL_CONTACTS_EXTENSION_H__
+
+#include <contacts_db_extension.h>
+
+#endif /* __TIZEN_SOCIAL_CONTACTS_EXTENSION_H__ */
+
+