#define CONV_RESOURCE_TYPE_TIZEN_D2D_SERVICE "x.org.tizen.d2d-service"
#define CONV_URI_SMARTVIEW_APP_COMMUNICATION "/tizen/app-communication"
-#define CONV_URI_SMARTVIEW_REMOTE_APP_CONTROL "/tizen/remote-app-control"
-#define CONV_URI_SMARTVIEW_TIZEN_D2D_SERVICE "/tizen/d2d-service"
+#define CONV_URI_REMOTE_APP_CONTROL "/tizen/remote-app-control"
+#define CONV_URI_TIZEN_D2D_SERVICE "/tizen/d2d-service"
#define CONV_PRIVILEGE_INTERNET "internet"
#define CONV_PRIVILEGE_BLUETOOTH "bluetooth"
#define CONV_JSON_APP_CONTROL "app_control"
#define CONV_JSON_REPLY "reply"
+#define CONV_SETTING_VALUE_SERVICE_APP_TO_APP_COMMUNICATION 0x0001
+#define CONV_SETTING_VALUE_SERVICE_REMOTE_APP_CONTROL 0x0002
+
#endif
#include <iotcon.h>
static conv::service_manager_impl *_instance;
-static iotcon_resource_h iotcon_resource;
+static iotcon_resource_h iotcon_resource = NULL;
using namespace std;
{
}
+int conv::service_manager_impl::handle_vconf_update(keynode_t *node)
+{
+ activation_state = vconf_keynode_get_int(node);
+
+ if ( activation_state == 1 ) {
+ register_discovery_info();
+ } else {
+ unregister_discovery_info();
+ }
+
+ return CONV_ERROR_NONE;
+}
+
+static void vconf_update_cb(keynode_t *node, void* user_data)
+{
+ conv::service_manager_impl* instance = static_cast<conv::service_manager_impl*>(user_data);
+ IF_FAIL_VOID_TAG(instance, _E, "static_cast failed");
+
+ instance->handle_vconf_update(node);
+}
+
int conv::service_manager_impl::init()
{
register_provider(new(std::nothrow) conv::app_comm_service_provider());
register_provider(new(std::nothrow) conv::remote_app_control_service_provider());
- register_discovery_info();
+ int error = vconf_get_int(VCONFKEY_SETAPPL_D2D_CONVERGENCE, &activation_state);
+
+ if ( error < 0 ) {
+ _E("vconf error (%d)", error);
+ // temporary code
+ activation_state = 1;
+ }
+
+ if ( activation_state == 1 ) {
+ register_discovery_info();
+ } else {
+ unregister_discovery_info();
+ }
+
+ error = vconf_notify_key_changed(VCONFKEY_SETAPPL_D2D_CONVERGENCE, vconf_update_cb, this);
+// IF_FAIL_RETURN_TAG(error >= 0, CONV_ERROR_INVALID_OPERATION, _E, "vconf error (%d)", error);
+
return CONV_ERROR_NONE;
}
int conv::service_manager_impl::release()
{
- int error = iotcon_resource_destroy(iotcon_resource);
- IF_FAIL_RETURN_TAG(error == IOTCON_ERROR_NONE, CONV_ERROR_INVALID_OPERATION, _E, "resource destroy failed");
- iotcon_resource = NULL;
+ unregister_discovery_info();
for (service_provider_list_t::iterator it = provider_list.begin(); it != provider_list.end(); ++it) {
(*it)->release();
if ( (*it)->get_type().compare(type) == 0 )
{
_D("found service provider");
+ error = (*it)->check_activation_state();
+ IF_FAIL_CATCH_TAG(error == CONV_ERROR_NONE, _E, "service provider is not activated");
error = (*it)->load_service_info(request_obj);
IF_FAIL_CATCH_TAG(error == CONV_ERROR_NONE, _E, "%d, service_info load error", error);
return CONV_ERROR_INVALID_PARAMETER;
}
- if (provider->init() != CONV_ERROR_NONE) {
- _E("Provider initialization failed");
- delete provider;
- return CONV_ERROR_INVALID_OPERATION;
+ if (provider->check_activation_state() == CONV_ERROR_NONE) {
+ if (provider->init() != CONV_ERROR_NONE) {
+ _E("Provider initialization failed");
+ delete provider;
+ return CONV_ERROR_INVALID_OPERATION;
+ }
+ } else {
+ _D("provider is not activated. init pending");
}
provider_list.push_back(provider);
int conv::service_manager_impl::register_discovery_info()
{
+ IF_FAIL_RETURN_TAG(iotcon_resource == NULL, CONV_ERROR_INVALID_PARAMETER, _E, "resource for discovery is already registered");
+
// register resource
int properties;
iotcon_resource_interfaces_h resource_ifaces = NULL;
iotcon_resource_interfaces_add(resource_ifaces, IOTCON_INTERFACE_DEFAULT);
- error = iotcon_resource_create(CONV_URI_SMARTVIEW_TIZEN_D2D_SERVICE, resource_types, resource_ifaces, properties, iotcon_request_cb, this, &iotcon_resource);
+ error = iotcon_resource_create(CONV_URI_TIZEN_D2D_SERVICE, resource_types, resource_ifaces, properties, iotcon_request_cb, this, &iotcon_resource);
IF_FAIL_RETURN_TAG(error == IOTCON_ERROR_NONE, CONV_ERROR_INVALID_OPERATION, _E, "resource creation failed");
_D("device info registered as resource");
return CONV_ERROR_NONE;
}
+int conv::service_manager_impl::unregister_discovery_info()
+{
+ IF_FAIL_RETURN_TAG(iotcon_resource != NULL, CONV_ERROR_INVALID_PARAMETER, _E, "resource for discovery is already unregistered");
+
+ int error = iotcon_resource_destroy(iotcon_resource);
+ IF_FAIL_RETURN_TAG(error == IOTCON_ERROR_NONE, CONV_ERROR_INVALID_OPERATION, _E, "resource destroy failed");
+ iotcon_resource = NULL;
+
+
+ _D("device info unregistered");
+ return CONV_ERROR_NONE;
+}
+
#include <iotcon.h>
#include <glib.h>
#include <vector>
+#include <vconf.h>
#include "manager_iface.h"
#include "request.h"
#include "service_provider_base.h"
int handle_request(request* request_obj);
int get_service_info_for_discovery(json* service_json);
+ int handle_vconf_update(keynode_t *node);
private:
+ int activation_state;
+
typedef std::list<service_provider_base*> service_provider_list_t;
int register_provider(service_provider_base *provider_base);
int register_discovery_info();
+ int unregister_discovery_info();
service_provider_list_t provider_list;
};
* limitations under the License.
*/
+#include <net_connection.h>
#include "app_comm_service_provider.h"
#include "../client_mgr_impl.h"
-#include <net_connection.h>
+#include "../util.h"
using namespace std;
+static void vconf_update_cb(keynode_t *node, void* user_data)
+{
+ conv::app_comm_service_provider* instance = static_cast<conv::app_comm_service_provider*>(user_data);
+ IF_FAIL_VOID_TAG(instance, _E, "static_cast failed");
+
+ instance->handle_vconf_update(node);
+}
+
conv::app_comm_service_provider::app_comm_service_provider()
{
_type = CONV_SERVICE_TYPE_SMARTVIEW_APP_COMMUNICATION;
_resource_type = CONV_RESOURCE_TYPE_SMARTVIEW_APP_COMMUNICATION;
_uri = CONV_URI_SMARTVIEW_APP_COMMUNICATION;
+ if (conv::util::is_service_activated(CONV_SETTING_VALUE_SERVICE_APP_TO_APP_COMMUNICATION))
+ _activation_state = 1;
+ else
+ _activation_state = 0;
+
+ vconf_notify_key_changed(VCONFKEY_SETAPPL_D2D_CONVERGENCE_SERVICE, vconf_update_cb, this);
+}
+
+int conv::app_comm_service_provider::handle_vconf_update(keynode_t *node)
+{
+ int current_state = vconf_keynode_get_int(node);
+
+ if ((CONV_SETTING_VALUE_SERVICE_APP_TO_APP_COMMUNICATION & current_state) > 0) {
+ _activation_state = 1;
+ init();
+ } else {
+ _activation_state = 0;
+ release();
+ }
+
+ return CONV_ERROR_NONE;
}
conv::app_comm_service_provider::~app_comm_service_provider()
int conv::app_comm_service_provider::release()
{
+ _D("app_comm_service_provider release done");
return CONV_ERROR_NONE;
}
int conv::app_comm_service_provider::load_service_info(request* request_obj)
{
+ IF_FAIL_RETURN_TAG(_activation_state == 1, CONV_ERROR_INVALID_OPERATION, _E, "service provider is not activated");
+
string client;
conv::client* client_obj = NULL;
int is_local = 0;
int conv::app_comm_service_provider::start_request(request* request_obj)
{
+ IF_FAIL_RETURN_TAG(_activation_state == 1, CONV_ERROR_INVALID_OPERATION, _E, "service provider is not activated");
+
_D("communcation/start requested");
app_comm_service_info *svc_info = reinterpret_cast<app_comm_service_info*>(request_obj->service_info);
int conv::app_comm_service_provider::stop_request(request* request_obj)
{
+ IF_FAIL_RETURN_TAG(_activation_state == 1, CONV_ERROR_INVALID_OPERATION, _E, "service provider is not activated");
+
_D("communcation/stop requested");
app_comm_service_info *svc_info = reinterpret_cast<app_comm_service_info*>(request_obj->service_info);
int conv::app_comm_service_provider::get_request(request* request_obj)
{
+ IF_FAIL_RETURN_TAG(_activation_state == 1, CONV_ERROR_INVALID_OPERATION, _E, "service provider is not activated");
+
_D("communcation/get requested");
app_comm_service_info *svc_info = reinterpret_cast<app_comm_service_info*>(request_obj->service_info);
int conv::app_comm_service_provider::set_request(request* request_obj)
{
+ IF_FAIL_RETURN_TAG(_activation_state == 1, CONV_ERROR_INVALID_OPERATION, _E, "service provider is not activated");
+
_D("communcation/set requested");
app_comm_service_info *svc_info = reinterpret_cast<app_comm_service_info*>(request_obj->service_info);
int conv::app_comm_service_provider::register_request(request* request_obj)
{
+ IF_FAIL_RETURN_TAG(_activation_state == 1, CONV_ERROR_INVALID_OPERATION, _E, "service provider is not activated");
+
_D("communcation/recv requested");
app_comm_service_info *svc_info = reinterpret_cast<app_comm_service_info*>(request_obj->service_info);
int conv::app_comm_service_provider::get_service_info_for_discovery(json* json_obj)
{
+ IF_FAIL_RETURN_TAG(_activation_state == 1, CONV_ERROR_NOT_SUPPORTED, _E, "service provider is not activated");
+
json_obj->set(NULL, CONV_JSON_DISCOVERY_SERVICE_TYPE, CONV_SERVICE_APP_TO_APP_COMMUNICATION);
// set data for service handle
#include <iotcon.h>
#include <glib.h>
#include <vector>
+#include <vconf.h>
#include "../service_provider_base.h"
#include "app_comm_service_info.h"
int register_request(request* request_obj);
int load_service_info(request* request_obj);
int get_service_info_for_discovery(json* json_obj);
+ int handle_vconf_update(keynode_t *node);
private:
int send_response(json payload, request* request_obj);
#include <app_control_internal.h>
#include "remote_app_control_service_provider.h"
#include "../client_mgr_impl.h"
+#include "../util.h"
using namespace std;
static std::map<int, app_control_cb_info_s> app_control_cb_map;
static std::map<int, response_cb_info_s> response_cb_map;
+static void vconf_update_cb(keynode_t *node, void* user_data)
+{
+ conv::remote_app_control_service_provider* instance = static_cast<conv::remote_app_control_service_provider*>(user_data);
+ IF_FAIL_VOID_TAG(instance, _E, "static_cast failed");
+
+ instance->handle_vconf_update(node);
+}
+
conv::remote_app_control_service_provider::remote_app_control_service_provider()
{
_type = CONV_SERVICE_TYPE_REMOTE_APP_CONTROL;
_resource_type = CONV_RESOURCE_TYPE_REMOTE_APP_CONTROL;
- _uri = CONV_URI_SMARTVIEW_REMOTE_APP_CONTROL;
+ _uri = CONV_URI_REMOTE_APP_CONTROL;
+ iotcon_resource = NULL;
+ if (conv::util::is_service_activated(CONV_SETTING_VALUE_SERVICE_REMOTE_APP_CONTROL))
+ _activation_state = 1;
+ else
+ _activation_state = 0;
+
+ vconf_notify_key_changed(VCONFKEY_SETAPPL_D2D_CONVERGENCE_SERVICE, vconf_update_cb, this);
}
conv::remote_app_control_service_provider::~remote_app_control_service_provider()
response_cb_map.clear();
}
+int conv::remote_app_control_service_provider::handle_vconf_update(keynode_t *node)
+{
+ int current_state = vconf_keynode_get_int(node);
+
+ if ((CONV_SETTING_VALUE_SERVICE_REMOTE_APP_CONTROL & current_state) > 0) {
+ _activation_state = 1;
+ init();
+ } else {
+ _activation_state = 0;
+ release();
+ }
+
+ return CONV_ERROR_NONE;
+}
+
static int _send_response(iotcon_request_h request, iotcon_representation_h repr,
iotcon_response_result_e result)
{
int conv::remote_app_control_service_provider::init()
{
- // register resource
- int properties;
- iotcon_resource_interfaces_h resource_ifaces = NULL;
- iotcon_resource_types_h resource_types = NULL;
- int error;
+ if (iotcon_resource == NULL) {
+ // register resource
+ int properties;
+ iotcon_resource_interfaces_h resource_ifaces = NULL;
+ iotcon_resource_types_h resource_types = NULL;
+ int error;
- properties = IOTCON_RESOURCE_DISCOVERABLE | IOTCON_RESOURCE_OBSERVABLE;
+ properties = IOTCON_RESOURCE_DISCOVERABLE | IOTCON_RESOURCE_OBSERVABLE;
- error = iotcon_resource_types_create(&resource_types);
- IF_FAIL_RETURN_TAG(error == IOTCON_ERROR_NONE, CONV_ERROR_INVALID_OPERATION, _E, "rt creation failed");
+ error = iotcon_resource_types_create(&resource_types);
+ IF_FAIL_RETURN_TAG(error == IOTCON_ERROR_NONE, CONV_ERROR_INVALID_OPERATION, _E, "rt creation failed");
- iotcon_resource_types_add(resource_types, _resource_type.c_str());
+ iotcon_resource_types_add(resource_types, _resource_type.c_str());
- error = iotcon_resource_interfaces_create(&resource_ifaces);
+ error = iotcon_resource_interfaces_create(&resource_ifaces);
- IF_FAIL_RETURN_TAG(error == IOTCON_ERROR_NONE, CONV_ERROR_INVALID_OPERATION, _E, "ri creation failed");
+ IF_FAIL_RETURN_TAG(error == IOTCON_ERROR_NONE, CONV_ERROR_INVALID_OPERATION, _E, "ri creation failed");
- iotcon_resource_interfaces_add(resource_ifaces, IOTCON_INTERFACE_DEFAULT);
+ iotcon_resource_interfaces_add(resource_ifaces, IOTCON_INTERFACE_DEFAULT);
- error = iotcon_resource_create(CONV_URI_SMARTVIEW_REMOTE_APP_CONTROL, resource_types, resource_ifaces, properties, iotcon_request_cb, NULL, &iotcon_resource);
- IF_FAIL_RETURN_TAG(error == IOTCON_ERROR_NONE, CONV_ERROR_INVALID_OPERATION, _E, "resource creation failed");
+ error = iotcon_resource_create(CONV_URI_REMOTE_APP_CONTROL, resource_types, resource_ifaces, properties, iotcon_request_cb, NULL, &iotcon_resource);
+ IF_FAIL_RETURN_TAG(error == IOTCON_ERROR_NONE, CONV_ERROR_INVALID_OPERATION, _E, "resource creation failed");
- iotcon_resource_types_destroy(resource_types);
- iotcon_resource_interfaces_destroy(resource_ifaces);
+ iotcon_resource_types_destroy(resource_types);
+ iotcon_resource_interfaces_destroy(resource_ifaces);
- _D("remote_app_control_service_provider init done");
+ _D("remote_app_control_service_provider init done");
+ } else {
+ _D("remote_app_control_service_provider is already initiated");
+ }
return CONV_ERROR_NONE;
}
int conv::remote_app_control_service_provider::release()
{
- // unregister resource
- int error = iotcon_resource_destroy(iotcon_resource);
- IF_FAIL_RETURN_TAG(error == IOTCON_ERROR_NONE, CONV_ERROR_INVALID_OPERATION, _E, "resource destroy failed");
- iotcon_resource = NULL;
+ if (iotcon_resource == NULL) {
+ _D("remote_app_control_service_provider is already released");
+ } else {
+ // unregister resource
+ int error = iotcon_resource_destroy(iotcon_resource);
+ IF_FAIL_RETURN_TAG(error == IOTCON_ERROR_NONE, CONV_ERROR_INVALID_OPERATION, _E, "resource destroy failed");
+ iotcon_resource = NULL;
+ }
return CONV_ERROR_NONE;
}
int conv::remote_app_control_service_provider::start_request(request* request_obj)
{
+ IF_FAIL_RETURN_TAG(_activation_state == 1, CONV_ERROR_INVALID_OPERATION, _E, "service provider is not activated");
+
_D("communcation/start requested");
int error;
int conv::remote_app_control_service_provider::stop_request(request* request_obj)
{
+ IF_FAIL_RETURN_TAG(_activation_state == 1, CONV_ERROR_INVALID_OPERATION, _E, "service provider is not activated");
+
_D("communcation/stop requested");
remote_app_control_service_info *svc_info = reinterpret_cast<remote_app_control_service_info*>(request_obj->service_info);
int conv::remote_app_control_service_provider::get_request(request* request_obj)
{
+ IF_FAIL_RETURN_TAG(_activation_state == 1, CONV_ERROR_INVALID_OPERATION, _E, "service provider is not activated");
+
return CONV_ERROR_NONE;
}
int conv::remote_app_control_service_provider::set_request(request* request_obj)
{
+ IF_FAIL_RETURN_TAG(_activation_state == 1, CONV_ERROR_INVALID_OPERATION, _E, "service provider is not activated");
+
remote_app_control_service_info *svc_info = reinterpret_cast<remote_app_control_service_info*>(request_obj->service_info);
int error;
int conv::remote_app_control_service_provider::register_request(request* request_obj)
{
+ IF_FAIL_RETURN_TAG(_activation_state == 1, CONV_ERROR_INVALID_OPERATION, _E, "service provider is not activated");
+
_D("communcation/recv requested");
remote_app_control_service_info *svc_info = reinterpret_cast<remote_app_control_service_info*>(request_obj->service_info);
int conv::remote_app_control_service_provider::load_service_info(request* request_obj)
{
+ IF_FAIL_RETURN_TAG(_activation_state == 1, CONV_ERROR_INVALID_OPERATION, _E, "service provider is not activated");
+
string client;
conv::client* client_obj = NULL;
svc_info->device_address = device_address;
svc_info->iotcon_info_obj.address = device_address;
- svc_info->iotcon_info_obj.uri = CONV_URI_SMARTVIEW_REMOTE_APP_CONTROL;
+ svc_info->iotcon_info_obj.uri = CONV_URI_REMOTE_APP_CONTROL;
svc_info->iotcon_info_obj.resource_type = _resource_type;
//save service info
int conv::remote_app_control_service_provider::get_service_info_for_discovery(json* json_obj)
{
+ IF_FAIL_RETURN_TAG(_activation_state == 1, CONV_ERROR_NOT_SUPPORTED, _E, "service provider is not activated");
+
json_obj->set(NULL, CONV_JSON_DISCOVERY_SERVICE_TYPE, CONV_SERVICE_REMOTE_APP_CONTROL);
// set data for service handle
#include <iotcon.h>
#include <glib.h>
#include <vector>
+#include <vconf.h>
#include "../service_provider_base.h"
#include "remote_app_control_service_info.h"
int register_request(request* request_obj);
int load_service_info(request* request_obj);
int get_service_info_for_discovery(json* json_obj);
+ int handle_vconf_update(keynode_t *node);
private:
iotcon_resource_h iotcon_resource;
virtual int register_request(request* request_obj) = 0;
virtual int load_service_info(request* request_obj) = 0;
virtual int get_service_info_for_discovery(json* json_obj) = 0;
+ int check_activation_state() {
+ if (_activation_state == 1) {
+ return CONV_ERROR_NONE;
+ } else {
+ return CONV_ERROR_INVALID_OPERATION;
+ }
+ }
std::string get_type() {
return _type;
std::string _type;
std::string _resource_type;
std::string _uri;
+ int _activation_state;
}; /* class service_provider_base */
}
return g_device_id;
}
+
+bool conv::util::is_service_activated(int service_value)
+{
+ int current_state;
+ int error = vconf_get_int(VCONFKEY_SETAPPL_D2D_CONVERGENCE_SERVICE, ¤t_state);
+
+ if (error != 0) {
+ _D("vconf_get_int failed %d", error);
+ return false;
+ }
+
+ if ((service_value & current_state) > 0) {
+ return true;
+ } else {
+ return false;
+ }
+}
std::string get_device_name();
std::string get_p2p_mac_address();
std::string get_device_id();
+ bool is_service_activated(int service_value);
typedef void (*timer_function)(void *data);
void* misc_start_timer(timer_function function, unsigned int interval, void *data);
#include <map>
#include <string>
#include <cstring>
+#include <vconf.h>
#include "common.h"
#include "d2d_conv_service.h"
//LCOV_EXCL_STOP
}
+EXTAPI int conv_internal_set_activation_state(int activation_state)
+{
+ int error = vconf_set_int(VCONFKEY_SETAPPL_D2D_CONVERGENCE, activation_state);
+ IF_FAIL_RETURN_TAG(error >= 0, CONV_ERROR_INVALID_OPERATION, _E, "vconf error (%d)", error);
+
+ return CONV_ERROR_NONE;
+}
+
+EXTAPI int conv_internal_get_activation_state(int* activation_state)
+{
+ int error = vconf_get_int(VCONFKEY_SETAPPL_D2D_CONVERGENCE, activation_state);
+ IF_FAIL_RETURN_TAG(error >= 0, CONV_ERROR_INVALID_OPERATION, _E, "vconf error (%d)", error);
+
+ return CONV_ERROR_NONE;
+}
+
+EXTAPI int conv_internal_set_service_activation_state(int activation_state)
+{
+ int error = vconf_set_int(VCONFKEY_SETAPPL_D2D_CONVERGENCE_SERVICE, activation_state);
+ IF_FAIL_RETURN_TAG(error >= 0, CONV_ERROR_INVALID_OPERATION, _E, "vconf error (%d)", error);
+
+ return CONV_ERROR_NONE;
+}
+
+EXTAPI int conv_internal_get_service_activation_state(int* activation_state)
+{
+ int error = vconf_get_int(VCONFKEY_SETAPPL_D2D_CONVERGENCE_SERVICE, activation_state);
+ IF_FAIL_RETURN_TAG(error >= 0, CONV_ERROR_INVALID_OPERATION, _E, "vconf error (%d)", error);
+
+ return CONV_ERROR_NONE;
+}
*/
/**
+ * @brief The internal value to set app-to-app communication service
+ * @since_tizen 3.0
+ */
+#define CONV_INTERNAL_SERVICE_APP_TO_APP_COMMUNICATION 0x0001
+
+/**
+ * @brief The internal value to set remote app-control service
+ * @since_tizen 3.0
+ */
+#define CONV_INTERNAL_SERVICE_REMOTE_APP_CONTROL 0x0002
+
+/**
* @brief Exports json string from channel.
* @since_tizen 3.0
* @remarks The @a value must be released using free().
*/
int conv_payload_internal_export_to_string(conv_payload_h handle, char** value);
+/**
+ * @brief Set D2D convergence activation state
+ * @since_tizen 3.0
+ *
+ * @param[in] activation_state The activation state to set
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #CONV_ERROR_NONE Successful
+ * @retval #CONV_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CONV_ERROR_NOT_SUPPORTED Not supported
+ * @retval #CONV_ERROR_NO_DATA No Data
+ * @retval #CONV_ERROR_OUT_OF_MEMORY Out of memory
+ *
+ */
+int conv_internal_set_activation_state(int activation_state);
+
+/**
+ * @brief Get D2D convergence activation state
+ * @since_tizen 3.0
+ *
+ * @param[out] activation_state The current activation state
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #CONV_ERROR_NONE Successful
+ * @retval #CONV_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CONV_ERROR_NOT_SUPPORTED Not supported
+ * @retval #CONV_ERROR_NO_DATA No Data
+ * @retval #CONV_ERROR_OUT_OF_MEMORY Out of memory
+ *
+ */
+int conv_internal_get_activation_state(int* activation_state);
+
+/**
+ * @brief Set D2D convergence activation state of services
+ * @since_tizen 3.0
+ *
+ * @param[in] activation_state The activation state to set
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #CONV_ERROR_NONE Successful
+ * @retval #CONV_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CONV_ERROR_NOT_SUPPORTED Not supported
+ * @retval #CONV_ERROR_NO_DATA No Data
+ * @retval #CONV_ERROR_OUT_OF_MEMORY Out of memory
+ *
+ */
+int conv_internal_set_service_activation_state(int activation_state);
+
+/**
+ * @brief Get D2D convergence activation state of services
+ * @since_tizen 3.0
+ *
+ * @param[in] activation_state The activation state to set
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #CONV_ERROR_NONE Successful
+ * @retval #CONV_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CONV_ERROR_NOT_SUPPORTED Not supported
+ * @retval #CONV_ERROR_NO_DATA No Data
+ * @retval #CONV_ERROR_OUT_OF_MEMORY Out of memory
+ *
+ */
+int conv_internal_get_service_activation_state(int* activation_state);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */