--- /dev/null
+net_nfc_gdbus.*
#SET(ARM_CFLAGS "-mabi=aapcs-linux -fno-common")
-FIND_PROGRAM(UNAME NAMES uname)
-EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
-IF("${ARCH}" MATCHES "^arm.*")
+IF(ARM_TARGET)
ADD_DEFINITIONS("-DTARGET")
MESSAGE("add -DTARGET")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARM_CFLAGS}")
-ENDIF("${ARCH}" MATCHES "^arm.*")
+ENDIF(ARM_TARGET)
SET(CMAKE_SHARED_LINKER_FLAGS " -Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
-SET(CMAKE_EXE_LINKER_FLAGS " -Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
+SET(CMAKE_EXE_LINKER_FLAGS " -Wl,--as-needed -Wl,--hash-style=both")
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+++ /dev/null
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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.
- */
-
-#include <stddef.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <stdarg.h>
-#include <string.h>
-#include <fcntl.h>
-
-#include "net_nfc_debug_internal.h"
-
-int net_nfc_util_get_va_list_length(va_list list)
-{
- int length = 0;
-
- while (va_arg(list, void *) != 0)
- {
- length += (sizeof(int) + va_arg(list, int));
- }
-
- return length;
-}
-
-int net_nfc_util_fill_va_list(uint8_t *buffer, int length, va_list list)
-{
- uint8_t *data = NULL;
- int len = 0;
- int current = 0;
-
- while (current < length && (data = va_arg(list, void *)) != NULL)
- {
- if ((len = va_arg(list, int)) > 0)
- {
- memcpy(buffer + current, &len, sizeof(len));
- current += sizeof(len);
-
- memcpy(buffer + current, data, len);
- current += len;
- }
- }
-
- return current;
-}
-
-void net_nfc_util_set_non_block_socket(int socket)
-{
- NFC_DBG("set non block socket");
-
- int flags = fcntl(socket, F_GETFL);
- flags |= O_NONBLOCK;
-
- if (fcntl(socket, F_SETFL, flags) < 0)
- {
- NFC_ERR("fcntl, executing nonblock error");
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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 __NET_NFC_UTIL_IPC_H__
-#define __NET_NFC_UTIL_IPC_H__
-
-#define NET_NFC_SERVER_ADDRESS "127.0.0.1"
-#define NET_NFC_SERVER_PORT 3000
-#define NET_NFC_SERVER_DOMAIN "/tmp/nfc-manager-server-domain"
-
-#define NET_NFC_MAX_MESSAGE_LENGTH (1024 * 512)
-
-#define NET_NFC_FLAGS_SYNC_CALL (1 << 0)
-#define NET_NFC_FLAGS_NO_RESPONSE (1 << 1)
-
-#define NET_NFC_IS_FLAGS_SET(__var, __flag) (((__var) & (__flag)) == (__flag))
-#define NET_NFC_SET_FLAGS(__var, __flag) (__var) |= (__flag)
-#define NET_NFC_UNSET_FLAGS(__var, __flag) (__var) &= ~(__flag)
-
-#define NET_NFC_FLAGS_SET_SYNC_CALL(__var) NET_NFC_SET_FLAGS(__var, NET_NFC_FLAGS_SYNC_CALL)
-#define NET_NFC_FLAGS_UNSET_SYNC_CALL(__var) NET_NFC_UNSET_FLAGS(__var, NET_NFC_FLAGS_SYNC_CALL)
-#define NET_NFC_FLAGS_IS_SYNC_CALL(__var) NET_NFC_IS_FLAGS_SET(__var, NET_NFC_FLAGS_SYNC_CALL)
-
-#define NET_NFC_FLAGS_SET_NO_RESPONSE(__var) NET_NFC_SET_FLAGS(__var, NET_NFC_FLAGS_NO_RESPONSE)
-#define NET_NFC_FLAGS_UNSET_NO_RESPONSE(__var) NET_NFC_UNSET_FLAGS(__var, NET_NFC_FLAGS_NO_RESPONSE)
-#define NET_NFC_FLAGS_IS_NO_RESPONSE(__var) NET_NFC_IS_FLAGS_SET(__var, NET_NFC_FLAGS_NO_RESPONSE)
-
-int net_nfc_util_get_va_list_length(va_list list);
-int net_nfc_util_fill_va_list(uint8_t *buffer, int length, va_list list);
-void net_nfc_util_set_non_block_socket(int socket);
-
-#endif //__NET_NFC_UTIL_IPC_H__
FILE(GLOB DAEMON_SRCS *.c)
-IF("${ARCH}" MATCHES "^arm.*")
+IF(ARM_TARGET)
pkg_check_modules(daemon_pkgs REQUIRED aul glib-2.0 gio-unix-2.0 security-server
vconf dlog tapi appsvc libcurl bluetooth-api libssl svi capi-media-wav-player
- pkgmgr pkgmgr-info capi-network-wifi wifi-direct ecore-x pmapi)
-ELSE()
+ pkgmgr pkgmgr-info capi-network-wifi ecore-x pmapi wifi-direct)
+ELSE(ARM_TARGET)
pkg_check_modules(daemon_pkgs REQUIRED aul glib-2.0 gio-unix-2.0 security-server
vconf dlog tapi appsvc libcurl bluetooth-api libssl svi capi-media-wav-player
pkgmgr pkgmgr-info capi-network-wifi ecore-x pmapi)
-ENDIF()
+ENDIF(ARM_TARGET)
FOREACH(flag ${daemon_pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
}
pw_length = wifi_direct_get_passphrase(&password);
-
- NFC_ERR("wifi_direct_get_passphrase[%s]", password);
+ NFC_DBG("wifi_direct_get_passphrase[%s]", password);
net_nfc_util_add_carrier_config_group_property(
cred_config,
return err;
}
+ return err;
}
static gboolean _net_nfc_handover_bss_wfd_get_carrier_record(
Name: nfc-manager
Summary: NFC framework manager
-Version: 0.1.2
+Version: 0.1.3
Release: 0
Group: Network & Connectivity/NFC
License: Flora
BuildRequires: pkgconfig(tapi)
BuildRequires: pkgconfig(bluetooth-api)
BuildRequires: pkgconfig(capi-network-wifi)
-%ifarch %arm
-BuildRequires: pkgconfig(wifi-direct)
-%endif
BuildRequires: pkgconfig(mm-sound)
BuildRequires: pkgconfig(appsvc)
BuildRequires: pkgconfig(svi)
BuildRequires: python
BuildRequires: python-xml
BuildRequires: gettext-tools
+%ifarch %arm
+BuildRequires: pkgconfig(wifi-direct)
+%global ARM_DEF "-DARM_TARGET=Y"
+%endif
+
Requires(post): /sbin/ldconfig
Requires(post): /usr/bin/vconftool
Requires(postun): /sbin/ldconfig
%build
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-%cmake . -DMAJORVER=${MAJORVER} -DFULLVER=%{version}
+%cmake . -DMAJORVER=${MAJORVER} -DFULLVER=%{version} %{?ARM_DEF}
%install