static const char *_icd_privileges_network[] = {
/* network */
- "http://tizen.org/privilege/bluetooth",
"http://tizen.org/privilege/network.get",
- "http://tizen.org/privilege/wifidirect",
- NULL,
-};
-
-static const char *_icd_privileges_data[] = {
- /* network */
- "http://tizen.org/privilege/bluetooth",
- "http://tizen.org/privilege/network.get",
- "http://tizen.org/privilege/wifidirect",
/* data */
"http://tizen.org/privilege/d2d.datasharing",
NULL,
};
-static const char *_icd_privileges_device[] = {
- /* network */
- "http://tizen.org/privilege/bluetooth",
- "http://tizen.org/privilege/network.get",
- "http://tizen.org/privilege/wifidirect",
- /* data */
- "http://tizen.org/privilege/d2d.datasharing",
- /* device */
- "http://tizen.org/privilege/systemsettings",
- NULL,
-};
-
#ifdef IOTCON_CYNARA
static cynara *_cynara;
#endif
return ret;
}
-
-int icd_cynara_check_data(GDBusMethodInvocation *invocation)
-{
- int ret;
-
- ret = _icd_cynara_check(invocation, _icd_privileges_data);
- if (IOTCON_ERROR_NONE != ret)
- ERR("_icd_cynara_check() Fail(%d)", ret);
-
- return ret;
-}
-
-
-int icd_cynara_check_device(GDBusMethodInvocation *invocation)
-{
- int ret;
-
- ret = _icd_cynara_check(invocation, _icd_privileges_device);
- if (IOTCON_ERROR_NONE != ret)
- ERR("_icd_cynara_check() Fail(%d)", ret);
-
- return ret;
-}
-
-
int icd_cynara_init();
void icd_cynara_deinit();
int icd_cynara_check_network(GDBusMethodInvocation *invocation);
-int icd_cynara_check_data(GDBusMethodInvocation *invocation);
-int icd_cynara_check_device(GDBusMethodInvocation *invocation);
#endif /*__IOT_CONNECTIVITY_MANAGER_DAEMON_CYNARA_H__*/
int64_t signal_number = 0;
if (true == is_lite) {
- ret = icd_cynara_check_data(invocation);
- if (IOTCON_ERROR_NONE != ret) {
- ERR("icd_cynara_check_data() Fail(%d)", ret);
- ic_dbus_complete_register_resource(object, invocation, signal_number, ret);
- return TRUE;
- }
- } else {
ret = icd_cynara_check_network(invocation);
if (IOTCON_ERROR_NONE != ret) {
ERR("icd_cynara_check_network() Fail(%d)", ret);
/* iotcon_resource_notify()
* iotcon_lite_resource_update_state() */
- ret = icd_cynara_check_data(invocation);
+ ret = icd_cynara_check_network(invocation);
if (IOTCON_ERROR_NONE != ret) {
- ERR("icd_cynara_check_data() Fail(%d)", ret);
+ ERR("icd_cynara_check_network() Fail(%d)", ret);
ic_dbus_complete_notify(object, invocation, ret);
return TRUE;
}
{
int ret;
- ret = icd_cynara_check_data(invocation);
+ ret = icd_cynara_check_network(invocation);
if (IOTCON_ERROR_NONE != ret) {
- ERR("icd_cynara_check_data() Fail(%d)", ret);
+ ERR("icd_cynara_check_network() Fail(%d)", ret);
ic_dbus_complete_send_response(object, invocation, ret);
return TRUE;
}
signal_number = icd_dbus_generate_signal_number();
- ret = icd_cynara_check_device(invocation);
+ ret = icd_cynara_check_network(invocation);
if (IOTCON_ERROR_NONE != ret) {
- ERR("icd_cynara_check_device() Fail(%d)", ret);
+ ERR("icd_cynara_check_network() Fail(%d)", ret);
ic_dbus_complete_get_device_info(object, invocation, signal_number, ret);
return TRUE;
}
signal_number = icd_dbus_generate_signal_number();
- ret = icd_cynara_check_data(invocation);
+ ret = icd_cynara_check_network(invocation);
if (IOTCON_ERROR_NONE != ret) {
- ERR("icd_cynara_check_data() Fail(%d)", ret);
+ ERR("icd_cynara_check_network() Fail(%d)", ret);
ic_dbus_complete_get_platform_info(object, invocation, signal_number, ret);
return TRUE;
}
int ret;
int64_t signal_number = 0;
- ret = icd_cynara_check_data(invocation);
+ ret = icd_cynara_check_network(invocation);
if (IOTCON_ERROR_NONE != ret) {
- ERR("icd_cynara_check_data() Fail(%d)", ret);
+ ERR("icd_cynara_check_network() Fail(%d)", ret);
ic_dbus_complete_start_monitoring(object, invocation, signal_number, ret);
return TRUE;
}
OCConnectivityType oic_conn_type;
OCDevAddr dev_addr = {0};
- ret = icd_cynara_check_data(invocation);
+ ret = icd_cynara_check_network(invocation);
if (IOTCON_ERROR_NONE != ret) {
- ERR("icd_cynara_check_data() Fail(%d)", ret);
+ ERR("icd_cynara_check_network() Fail(%d)", ret);
icd_ioty_complete_error(type, invocation, ret);
return TRUE;
}
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @remarks The length of @a resource_type should be less than or equal to 61.\n
* The @a resource_type must start with a lowercase alphabetic character, followed by a sequence
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] presence_handle The presence handle to be unsubscribed
*
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @remarks The length of @a resource_type should be less than or equal to 61.\n
* The @a resource_type must start with a lowercase alphabetic character, followed by a sequence
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
- * @privilege %http://tizen.org/privilege/systemsettings
* @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] host_address The host address of remote server
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
* @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] host_address The host address of remote server
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @remarks If @a time_to_live is 0, server will set default value as 60 seconds.\n
* If @a time_to_live is very big, server will set maximum value as (60 * 60 * 24) seconds.
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @return 0 on success, otherwise a negative error value.
* @retval #IOTCON_ERROR_NONE Successful
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
* @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @remarks @a uri_path length must be less than or equal 36.\n
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @remarks When a normal variable is used, there are only dbus error and permission\n
* denied error. If the errors of this API are not handled, then you must check\n
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
* @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] resource The handle of the lite resource
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] resource The handle of the resource
* @param[in] observe_policy The type to specify how client wants to observe.
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] resource The handle of the resource
*
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
* @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] resource The handle of the resource
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
* @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] resource The handle of the resource
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
* @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] resource The handle of the resource
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
* @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] resource The handle of the resource
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
* @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] resource The handle of the remote resource to be cached
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] resource The handle of the remote resource
*
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] resource The handle of the remote resource
* @param[in] cb The callback function to add into callback list
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] resource The handle of the remote resource
*
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @remarks @a uri_path length must be less than or equal 36.\n
* You must destroy @a resource by calling iotcon_resource_destroy()
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @remarks When a normal variable is used, there are only dbus error and permission\n
* denied error. If the errors of this API are not handled, then you must check\n
* @details The @a iface could be one of #iotcon_interface_e.
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @remarks Sets only one interface to @a iface. If not, @a iface will be ignored.
*
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @remarks The length of @a resource_type should be less than or equal to 61.\n
* The @a resource_type must start with a lowercase alphabetic character, followed by a sequence
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] parent The handle of the parent resource
* @param[in] child The handle of the child resource to be added to the parent resource
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
+ * @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] parent The handle of the parent resource
* @param[in] child The handle of the child resource to be unbound from the parent resource
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
* @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] resource The handle of the resource
*
* @since_tizen 3.0
* @privlevel public
- * @privilege %http://tizen.org/privilege/bluetooth
* @privilege %http://tizen.org/privilege/network.get
- * @privilege %http://tizen.org/privilege/wifidirect
* @privilege %http://tizen.org/privilege/d2d.datasharing
*
* @param[in] resp The handle of the response to send