summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArron Wang <arron.wang@intel.com>2013-06-04 17:11:58 +0800
committerArron Wang <arron.wang@intel.com>2013-07-02 14:54:43 +0800
commit9919e439658015bdca8bf1c35d4059b65635bfb2 (patch)
tree861fe34aa05fd58ea59861332ad5c57d73a4fb48
parent12e442cdec566ca678b0d95685c230fb89deb3d8 (diff)
downloadnfc-manager-neard-9919e439658015bdca8bf1c35d4059b65635bfb2.tar.gz
nfc-manager-neard-9919e439658015bdca8bf1c35d4059b65635bfb2.tar.bz2
nfc-manager-neard-9919e439658015bdca8bf1c35d4059b65635bfb2.zip
Fix the compatiable issue with upper CAPI
We disable the client/server architecutre, state active/deactive is not need anymore, also we can set the launch state through vconf directly Change-Id: I64654952df0376e361505a3f07e54b44820706d3
-rwxr-xr-xsrc/clientlib/net_nfc_client_nfc.c48
1 files changed, 11 insertions, 37 deletions
diff --git a/src/clientlib/net_nfc_client_nfc.c b/src/clientlib/net_nfc_client_nfc.c
index ce2ff4f..601e2c1 100755
--- a/src/clientlib/net_nfc_client_nfc.c
+++ b/src/clientlib/net_nfc_client_nfc.c
@@ -302,25 +302,12 @@ NET_NFC_EXPORT_API net_nfc_error_e net_nfc_unset_response_callback(void)
NET_NFC_EXPORT_API net_nfc_error_e net_nfc_set_launch_popup_state(int enable)
{
- net_nfc_error_e ret;
- net_nfc_request_set_launch_state_t request = { 0, };
-
- request.length = sizeof(net_nfc_request_set_launch_state_t);
- request.request_type = NET_NFC_MESSAGE_SERVICE_SET_LAUNCH_STATE;
-
- pthread_mutex_lock(&g_client_context.g_client_lock);
- g_client_context.set_launch_popup = enable;
-
- if(enable)
- request.set_launch_popup = NET_NFC_LAUNCH_APP_SELECT;
- else
- request.set_launch_popup = NET_NFC_NO_LAUNCH_APP_SELECT;
-
- pthread_mutex_unlock(&g_client_context.g_client_lock);
-
- ret = net_nfc_client_send_request((net_nfc_request_msg_t *)&request, NULL);
+ if (vconf_set_bool(NET_NFC_DISABLE_LAUNCH_POPUP_KEY, enable) != 0) {
+ DEBUG_CLIENT_MSG("launch state set vconf fail");
+ return NET_NFC_OPERATION_FAIL;
+ }
- return ret;
+ return NET_NFC_OK;
}
NET_NFC_EXPORT_API net_nfc_error_e net_nfc_get_launch_popup_state(int *state)
@@ -416,30 +403,17 @@ NET_NFC_EXPORT_API net_nfc_error_e net_nfc_get_state(int *state)
NET_NFC_EXPORT_API net_nfc_error_e net_nfc_state_activate(void)
{
- net_nfc_error_e ret;
- net_nfc_request_change_client_state_t request = { 0, };
-
- request.length = sizeof(net_nfc_request_change_client_state_t);
- request.request_type = NET_NFC_MESSAGE_SERVICE_CHANGE_CLIENT_STATE;
- request.client_state = NET_NFC_CLIENT_ACTIVE_STATE;
- ret = net_nfc_client_send_request((net_nfc_request_msg_t *)&request, NULL);
-
- return ret;
+ /*
+ * state is used to track whether to execute the client request
+ * can be deprecated with neard base solution
+ */
+ return NET_NFC_OK;
}
NET_NFC_EXPORT_API net_nfc_error_e net_nfc_state_deactivate(void)
{
- net_nfc_error_e ret;
- net_nfc_request_change_client_state_t request = { 0, };
-
- request.length = sizeof(net_nfc_request_change_client_state_t);
- request.request_type = NET_NFC_MESSAGE_SERVICE_CHANGE_CLIENT_STATE;
- request.client_state = NET_NFC_CLIENT_INACTIVE_STATE;
-
- ret = net_nfc_client_send_request((net_nfc_request_msg_t *)&request, NULL);
-
- return ret;
+ return NET_NFC_OK;
}
client_context_t *net_nfc_get_client_context()