SET(provider_deps "glib-2.0 dlog json-glib-1.0 iotcon capi-appfw-app-manager iotcon vconf capi-network-bluetooth capi-network-wifi-direct capi-appfw-application bundle capi-network-connection cynara-creds-gdbus cynara-client cynara-session capi-appfw-package-manager sqlite3 syspopup-caller")
SET(provider_deps "${provider_deps} openssl libwebsockets libcurl nsd-dns-sd")
+
# Mobile profile
IF("${PROFILE}" STREQUAL "mobile")
ADD_DEFINITIONS("-D_MOBILE_")
-# SET(provider_deps "${provider_deps} tapi capi-messaging-messages")
ENDIF("${PROFILE}" STREQUAL "mobile")
# TV profile
IF("${PROFILE}" STREQUAL "tv")
ADD_DEFINITIONS("-D_TV_")
- SET(provider_deps "${provider_deps} acl-proxy-api")
+ IF(${D2D_INTERNAL_ACL} EQUAL 0)
+ SET(provider_deps "${provider_deps} acl-proxy-api")
+ ENDIF(${D2D_INTERNAL_ACL} EQUAL 0)
ENDIF("${PROFILE}" STREQUAL "tv")
+IF(${D2D_INTERNAL_ACL} EQUAL 1)
+ ADD_DEFINITIONS("-D_D2D_INTERNAL_ACL_")
+ENDIF(${D2D_INTERNAL_ACL} EQUAL 1)
+
pkg_check_modules(daemon_pkgs REQUIRED ${provider_deps})
INCLUDE_DIRECTORIES(${daemon_pkgs_INCLUDE_DIRS})
#include "RemoteAppControlServiceProvider.h"
#include "../ClientManager.h"
#include "../Util.h"
-#if defined(_TV_)
-#include <RemoteACLInterface.h>
-#else
+#if defined(_D2D_INTERNAL_ACL_)
#include "../access_control/ACLManager.h"
using namespace conv::acl_manager;
+#else
+#include <RemoteACLInterface.h>
#endif
using namespace std;
_D("UNDECIDED");
policy = CONV_ACCESS_CONTROL_DENIED;
}
-#if !defined(_TV_)
+#if defined(_D2D_INTERNAL_ACL_)
else if (acManagerPolicy == ACMANAGER_POLICY_U2) {
_D("UNDECIDED");
conv::acl_manager::LaunchPasscodeShowPopup(deviceName);
_D("acManagerPolicy:%d", acManagerPolicy);
}
-#if !defined(_TV_)
+#if defined(_D2D_INTERNAL_ACL_)
else if (!strcmp(CONV_ACCESS_CONTROL_PASSCODE_RESPONSE, access_request_type)) {
char *input_passcode;
string ip = conv::util::getIpAddress(hostAddressString);
char macAddress[127] = {0,};
-
IF_FAIL_RETURN_TAG(conv::util::getPeerMac(ip, -1, macAddress), CONV_ERROR_INVALID_PARAMETER, _E, "getPeerMac failed");
_D("Device IP : %s, Mac : %s", ip.c_str(), macAddress);
//callback function handles put command for remote-app-control resource
static int __handle_request(iotcon_representation_h rep, iotcon_request_h request)
{
-#if defined(_TV_)
- // temporarily blocked by security issue
- return CONV_ERROR_INVALID_PARAMETER;
-#else
+#if defined(_D2D_INTERNAL_ACL_)
iotcon_attributes_h attributes;
char *requestType;
}
return CONV_ERROR_INVALID_PARAMETER;
+#else
+ // temporarily blocked by security issue
+ return CONV_ERROR_INVALID_PARAMETER;
#endif
}
return;
}
-#if !defined(_TV_)
+#if defined(_D2D_INTERNAL_ACL_)
else if (!strcmp(CONV_ACCESS_CONTROL_PASSCODE_REQUEST, accessControlResult)) {
_D("__on_access_response PASSCODE REQUEST");
conv::acl_manager::LaunchPasscodeInputPopup(passcode_popup_callback, svcInfo);
}
}
-#if !defined(_TV_)
+#if defined(_D2D_INTERNAL_ACL_)
static void passcode_popup_callback(void *user_data, int result, char *passcode)
{
conv::RemoteAppControlServiceInfo *svcInfo = reinterpret_cast<conv::RemoteAppControlServiceInfo*>(user_data);
Source1002: lib%{name}.manifest
%define BUILD_PROFILE %{?profile}%{!?profile:%{?tizen_profile_name}}
+%define INTERNAL_ACL %{?TIZEN_PROFILE_TV:0}%{!?TIZEN_PROFILE_TV:1}
BuildRequires: cmake
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(json-glib-1.0)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(iotcon)
-#BuildRequires: pkgconfig(security-server)
BuildRequires: pkgconfig(capi-appfw-app-manager)
BuildRequires: pkgconfig(libwebsockets)
BuildRequires: pkgconfig(iotcon)
BuildRequires: libcurl-devel
%if "%{?BUILD_PROFILE}" == "tv"
+%if %{?INTERNAL_ACL} == 0
BuildRequires: pkgconfig(acl-proxy-api)
BuildRequires: pkgconfig(securestorage-client)
%endif
+%endif
%define _userdatadir /opt/usr/data/d2d-conv-manager
%build
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-%cmake . -DMAJORVER=${MAJORVER} -DFULLVER=%{version} -DBIN_INSTALL_DIR:PATH=%{_bindir} -DPROFILE=%{?BUILD_PROFILE}
+%cmake . -DMAJORVER=${MAJORVER} -DFULLVER=%{version} -DBIN_INSTALL_DIR:PATH=%{_bindir} -DPROFILE=%{?BUILD_PROFILE} -DD2D_INTERNAL_ACL=%{?INTERNAL_ACL}
%install