Revert of changes related to privacy popups issue 99/125999/1
authorRadoslaw Bartosiak <r.bartosiak@samsung.com>
Wed, 19 Apr 2017 19:14:03 +0000 (21:14 +0200)
committerRadoslaw Bartosiak <r.bartosiak@samsung.com>
Wed, 19 Apr 2017 19:19:18 +0000 (21:19 +0200)
This commit reverts all commits made after the release 0.1.13
(824473a3621f2345c43c4f1680b72f45fb0d6d06)

Change-Id: I792729175832e0434823db4848357a734fab02b6
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
132 files changed:
CMakeLists.txt
packaging/askuser-notification.manifest [new file with mode: 0644]
packaging/askuser-notification.spec [deleted file]
packaging/askuser-plugins.manifest [new file with mode: 0644]
packaging/askuser-test.manifest [new file with mode: 0644]
packaging/askuser.manifest [new file with mode: 0644]
packaging/askuser.spec
packaging/default.manifest [deleted file]
src/CMakeLists.txt [new file with mode: 0644]
src/agent/CMakeLists.txt
src/agent/main/Agent.cpp
src/agent/main/Policy.cpp [deleted file]
src/agent/main/Policy.h [deleted file]
src/agent/main/PolicyUpdater.cpp
src/agent/notification-daemon/AskUserTalker.cpp [new file with mode: 0644]
src/agent/notification-daemon/AskUserTalker.h [new file with mode: 0644]
src/agent/notification-daemon/CMakeLists.txt
src/agent/notification-daemon/GuiRunner.cpp [new file with mode: 0644]
src/agent/notification-daemon/GuiRunner.h [new file with mode: 0644]
src/agent/notification-daemon/Logic.cpp [deleted file]
src/agent/notification-daemon/Logic.h [deleted file]
src/agent/notification-daemon/ServerCallbacks.cpp [deleted file]
src/agent/notification-daemon/ServerCallbacks.h [deleted file]
src/agent/notification-daemon/event/Event.h [deleted file]
src/agent/notification-daemon/main.cpp
src/agent/notification-daemon/po/CMakeLists.txt
src/agent/notification-daemon/po/ar.po
src/agent/notification-daemon/po/az.po
src/agent/notification-daemon/po/bg.po
src/agent/notification-daemon/po/ca.po
src/agent/notification-daemon/po/cs.po
src/agent/notification-daemon/po/da.po
src/agent/notification-daemon/po/de.po
src/agent/notification-daemon/po/el_GR.po
src/agent/notification-daemon/po/en.po
src/agent/notification-daemon/po/en_PH.po
src/agent/notification-daemon/po/en_US.po
src/agent/notification-daemon/po/es_ES.po
src/agent/notification-daemon/po/es_US.po
src/agent/notification-daemon/po/et.po
src/agent/notification-daemon/po/eu.po
src/agent/notification-daemon/po/fi.po
src/agent/notification-daemon/po/fr.po
src/agent/notification-daemon/po/fr_CA.po
src/agent/notification-daemon/po/ga.po
src/agent/notification-daemon/po/gl.po
src/agent/notification-daemon/po/hi.po
src/agent/notification-daemon/po/hr.po
src/agent/notification-daemon/po/hu.po
src/agent/notification-daemon/po/hy.po
src/agent/notification-daemon/po/is.po
src/agent/notification-daemon/po/it_IT.po
src/agent/notification-daemon/po/ja_JP.po
src/agent/notification-daemon/po/ka.po
src/agent/notification-daemon/po/kk.po
src/agent/notification-daemon/po/ko_KR.po
src/agent/notification-daemon/po/lt.po
src/agent/notification-daemon/po/lv.po
src/agent/notification-daemon/po/mk.po
src/agent/notification-daemon/po/nb.po
src/agent/notification-daemon/po/nl.po
src/agent/notification-daemon/po/pl.po
src/agent/notification-daemon/po/pt_BR.po
src/agent/notification-daemon/po/pt_PT.po
src/agent/notification-daemon/po/ro.po
src/agent/notification-daemon/po/ru_RU.po
src/agent/notification-daemon/po/sk.po
src/agent/notification-daemon/po/sl.po
src/agent/notification-daemon/po/sr.po
src/agent/notification-daemon/po/sv.po
src/agent/notification-daemon/po/tr_TR.po
src/agent/notification-daemon/po/uk.po
src/agent/notification-daemon/po/uz.po
src/agent/notification-daemon/po/zh_CN.po
src/agent/notification-daemon/po/zh_HK.po
src/agent/notification-daemon/po/zh_TW.po
src/agent/notification-daemon/res/popup_custom.edc
src/agent/notification-daemon/ui/Answerable.h [deleted file]
src/agent/notification-daemon/ui/Po.cpp [deleted file]
src/agent/notification-daemon/ui/Po.h [deleted file]
src/agent/notification-daemon/ui/Popup.h [deleted file]
src/agent/notification-daemon/ui/PopupCheck.h [deleted file]
src/agent/notification-daemon/ui/PopupCheckMobile.h [deleted file]
src/agent/notification-daemon/ui/PopupCheckWearable.h [deleted file]
src/agent/notification-daemon/ui/PopupLaunchMobile.h [deleted file]
src/agent/notification-daemon/ui/PopupLaunchWearable.h [deleted file]
src/agent/notification-daemon/ui/Popupper.cpp [deleted file]
src/agent/notification-daemon/ui/Popupper.h [deleted file]
src/agent/notification-daemon/ui/Toast.h [deleted file]
src/agent/notification-daemon/ui/UIElement.h [deleted file]
src/agent/ui/AskUIInterface.h
src/agent/ui/NotificationBackend.cpp
src/agent/ui/NotificationBackend.h
src/common/CMakeLists.txt
src/common/config/PrivacyConfig.h [deleted file]
src/common/policy/PkgInfo.h [deleted file]
src/common/policy/Policy.cpp [new file with mode: 0644]
src/common/policy/Policy.h [new file with mode: 0644]
src/common/policy/PrivilegeInfo.cpp
src/common/protocol/CMakeLists.txt [deleted file]
src/common/protocol/ask-user-client.cpp [deleted file]
src/common/protocol/ask-user-config.cpp [deleted file]
src/common/protocol/ask-user-config.h [deleted file]
src/common/protocol/askuser-notification.pc.in [deleted file]
src/common/protocol/askuser-notification/ask-user-client.h [deleted file]
src/common/protocol/askuser-notification/ask-user-service.h [deleted file]
src/common/protocol/askuser-notification/ask-user-types.h [deleted file]
src/common/protocol/channel.cpp [deleted file]
src/common/protocol/channel.h [deleted file]
src/common/protocol/main.cpp [deleted file]
src/common/protocol/raw-buffer.h [deleted file]
src/common/protocol/sock.cpp [deleted file]
src/common/protocol/sock.h [deleted file]
src/common/translator/GuiTranslator.cpp [deleted file]
src/common/translator/GuiTranslator.h [deleted file]
src/common/translator/Translator.cpp
src/common/translator/Translator.h
src/common/types/NotificationRequest.h
src/common/types/NotificationRequestId.h [deleted file]
src/common/types/NotificationResponse.h
src/plugin/CMakeLists.txt
src/plugin/client/PrivacyPlugin.cpp [deleted file]
src/plugin/service/PrivacyPlugin.cpp [deleted file]
systemd/CMakeLists.txt
systemd/askuser-notification-datagram.socket [deleted file]
systemd/askuser-notification-stream.socket [deleted file]
systemd/askuser-notification.service
systemd/askuser-notification.socket [new file with mode: 0644]
systemd/askuser.service
test/CMakeLists.txt
test/common/translator.cpp
test/tools/CMakeLists.txt

index 289bd389b9cd75115f3c95650516881180a99934..8f4b679b371774f9329045c54f21f3a7fe46bb06 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2014-2017 Samsung Electronics Co., Ltd All Rights Reserved
+# Copyright (c) 2014-2016 Samsung Electronics Co., Ltd All Rights Reserved
 #
 #    Licensed under the Apache License, Version 2.0 (the "License");
 #    you may not use this file except in compliance with the License.
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
 PROJECT("askuser")
-SET(ASKUSER_VERSION 0.1.0)
+set(ASKUSER_VERSION 0.1.0)
 
 ############################# cmake packages ##################################
 
 INCLUDE(FindPkgConfig)
 INCLUDE(CheckCXXCompilerFlag)
 
-###################### choose modules to compile ##############################
-
-SET(BUILD_ASKUSER OFF CACHE BOOL "Build askuser")
-SET(BUILD_ASKUSER_NOTIFICATION OFF CACHE BOOL "Build askuser-notification")
-
-IF (NOT BUILD_ASKUSER AND NOT BUILD_ASKUSER_NOTIFICATION)
-    SET(BUILD_ASKUSER ON)
-    SET(BUILD_ASKUSER_NOTIFICATION ON)
-ENDIF (NOT BUILD_ASKUSER AND NOT BUILD_ASKUSER_NOTIFICATION)
-
 #############################  install dirs  ##################################
 
 SET(BIN_INSTALL_DIR
@@ -71,6 +61,9 @@ ADD_DEFINITIONS("-Wextra")                      # Generate even more extra warni
 # Don't export symbols by default
 ADD_DEFINITIONS("-fvisibility=hidden")
 
+# Pass project name to sources
+ADD_DEFINITIONS("-DPROJECT_NAME=\"${PROJECT_NAME}\"")
+
 IF (CMAKE_BUILD_TYPE MATCHES "DEBUG")
     ADD_DEFINITIONS("-DBUILD_TYPE_DEBUG")
 ENDIF (CMAKE_BUILD_TYPE MATCHES "DEBUG")
@@ -82,34 +75,20 @@ ENDIF (BUILD_WITH_SYSTEMD_DAEMON)
 IF (RES_DIR)
     ADD_DEFINITIONS("-DRES_DIR=\"${RES_DIR}\"")
 ELSE (RES_DIR)
-    ADD_DEFINITIONS("-DRES_DIR=\"/usr/share/askuser-notification/res/\"")
+    ADD_DEFINITIONS("-DRES_DIR=\"/usr/share/askuser/res/\"")
 ENDIF (RES_DIR)
 
-SET(ASKUSER_PATH ${PROJECT_SOURCE_DIR}/src)
-
-IF (BUILD_ASKUSER)
-    SET(TARGET_ASKUSER "askuser")
-    SET(TARGET_ASKUSER_COMMON "askuser-common")
-    SET(TARGET_PLUGIN_SERVICE "askuser-plugin-service")
-    SET(TARGET_PLUGIN_CLIENT "askuser-plugin-client")
-    SET(TARGET_PRIVACYDENIED_PLUGIN_CLIENT "privacy-denied-plugin-client")
-    SET(TARGET_PRIVACYDENIED_PLUGIN_SERVICE "privacy-denied-plugin-service")
-    SET(TARGET_TEST "askuser-test")
-    SET(TARGET_TESTS "askuser-tests")
-    ADD_SUBDIRECTORY(src/agent)
-    ADD_SUBDIRECTORY(src/common)
-    ADD_SUBDIRECTORY(src/plugin)
-    ADD_SUBDIRECTORY(test)
-ENDIF (BUILD_ASKUSER)
-
-IF (BUILD_ASKUSER_NOTIFICATION)
-    SET(TARGET_ASKUSER_NOTIFICATION "askuser-notification")
-    SET(TARGET_ASKUSER_NOTIFICATION_LIB "askuser-notification-ipc")
-    SET(TARGET_ASKUSER_NOTIFICATION_TEST "askuser-notification-test")
-    ADD_SUBDIRECTORY(src/agent/notification-daemon)
-    ADD_SUBDIRECTORY(src/common/protocol)
-ENDIF (BUILD_ASKUSER_NOTIFICATION)
+SET(TARGET_ASKUSER "askuser")
+SET(TARGET_ASKUSER_COMMON "askuser-common")
+SET(TARGET_PLUGIN_SERVICE "askuser-plugin-service")
+SET(TARGET_PLUGIN_CLIENT "askuser-plugin-client")
+SET(TARGET_ASKUSER_NOTIFICATION "askuser-notification")
+
+SET(TARGET_TEST "askuser-test")
+SET(TARGET_TESTS "askuser-tests")
 
+ADD_SUBDIRECTORY(src)
 IF (BUILD_WITH_SYSTEMD_DAEMON)
 ADD_SUBDIRECTORY(systemd)
 ENDIF (BUILD_WITH_SYSTEMD_DAEMON)
+ADD_SUBDIRECTORY(test)
diff --git a/packaging/askuser-notification.manifest b/packaging/askuser-notification.manifest
new file mode 100644 (file)
index 0000000..c00c25b
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+        <request>
+                <domain name="_" />
+        </request>
+</manifest>
diff --git a/packaging/askuser-notification.spec b/packaging/askuser-notification.spec
deleted file mode 100644 (file)
index 6582d20..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-%if !%{defined with_systemd_daemon}
-%define with_systemd_daemon 1
-%endif
-
-Name:       askuser-notification
-Summary:    User daemon which shows popup with privilege request
-Version:    0.1.13
-Release:    1
-Group:      Security/Access Control
-License:    Apache-2.0
-Source0:    %{name}-%{version}.tar.gz
-Source1001:    default.manifest
-BuildRequires: cmake
-BuildRequires: libwayland-egl
-BuildRequires: gettext-tools
-BuildRequires: pkgconfig(elementary)
-BuildRequires: pkgconfig(notification)
-%if %{with_systemd_daemon}
-BuildRequires: pkgconfig(libsystemd)
-%endif
-BuildRequires: pkgconfig(pkgmgr-info)
-BuildRequires: pkgconfig(security-privilege-manager)
-BuildRequires: pkgconfig(glib-2.0)
-BuildRequires: pkgconfig(vconf)
-BuildRequires: pkgconfig(capi-ui-efl-util)
-BuildRequires: pkgconfig(capi-system-info)
-BuildRequires: coregl
-BuildRequires: edje-bin
-
-%if !%{defined build_type}
-%define build_type RELEASE
-%endif
-
-%description
-Daemon allowing user to grant or deny access for given application and privilege
-
-%package libs
-Summary: Askuser notification protocol library
-
-%description libs
-Askuser notification protocol library
-
-%package devel
-Summary: Askuser notification protocol library development files
-
-%description devel
-Askuser notification protocol library development files
-
-%package test
-Summary: Tool for testing askuser-notification
-
-%description test
-Tool for testing askuser-notification
-
-%prep
-%setup -q
-cp -a %{SOURCE1001} .
-
-%build
-%if 0%{?sec_build_binary_debug_enable}
-export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
-%endif
-
-%if %{?build_type} == "DEBUG"
-export CXXFLAGS="$CXXFLAGS -Wp,-U_FORTIFY_SOURCE"
-%endif
-
-export LDFLAGS+="-Wl,--rpath=%{_libdir}"
-
-%cmake . \
-        -DBUILD_ASKUSER_NOTIFICATION=ON \
-        -DCMAKE_BUILD_TYPE=%{?build_type} \
-        -DBUILD_WITH_SYSTEMD_DAEMON=%{?with_systemd_daemon} \
-        -DCMAKE_VERBOSE_MAKEFILE=ON \
-        -DRES_DIR="/usr/share/askuser-notification/res"
-make %{?jobs:-j%jobs}
-
-%install
-rm -rf %{buildroot}
-%make_install
-%find_lang %{name}
-
-%if %{with_systemd_daemon}
-mkdir -p %{buildroot}/%{_unitdir_user}/sockets.target.wants
-ln -s ../askuser-notification-stream.socket %{buildroot}/%{_unitdir_user}/sockets.target.wants/askuser-notification-stream.socket
-ln -s ../askuser-notification-datagram.socket %{buildroot}/%{_unitdir_user}/sockets.target.wants/askuser-notification-datagram.socket
-%endif
-
-%post
-%if %{with_systemd_daemon}
-systemctl daemon-reload
-%endif
-
-%preun
-
-%postun
-
-%post libs -p /sbin/ldconfig
-
-%postun libs -p /sbin/ldconfig
-
-%files -f %{name}.lang
-%manifest default.manifest
-%license LICENSE
-%attr(755,root,root) /usr/bin/askuser-notification
-%if %{with_systemd_daemon}
-%{_unitdir_user}/askuser-notification.service
-%{_unitdir_user}/askuser-notification-stream.socket
-%{_unitdir_user}/askuser-notification-datagram.socket
-%{_unitdir_user}/sockets.target.wants/*
-%endif
-%{_datadir}/askuser-notification/res/*
-
-%files libs
-%manifest default.manifest
-%license LICENSE
-%{_libdir}/libaskuser-notification.so.*
-
-%files devel
-%{_libdir}/libaskuser-notification.so
-%{_includedir}/askuser-notification
-%{_libdir}/pkgconfig/askuser-notification.pc
-
-%files test
-%attr(755,root,root) %{_bindir}/askuser-notification-test
diff --git a/packaging/askuser-plugins.manifest b/packaging/askuser-plugins.manifest
new file mode 100644 (file)
index 0000000..a76fdba
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+       <request>
+               <domain name="_" />
+       </request>
+</manifest>
diff --git a/packaging/askuser-test.manifest b/packaging/askuser-test.manifest
new file mode 100644 (file)
index 0000000..a76fdba
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+       <request>
+               <domain name="_" />
+       </request>
+</manifest>
diff --git a/packaging/askuser.manifest b/packaging/askuser.manifest
new file mode 100644 (file)
index 0000000..a76fdba
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+       <request>
+               <domain name="_" />
+       </request>
+</manifest>
index fe0170ecc1d7b1c0cb15a39071ce4aded6af8b21..2deca5aacd870f5cb5497439712bfdf3dbf28cc9 100644 (file)
@@ -9,17 +9,28 @@ Release:    1
 Group:      Security/Access Control
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
-Source1001:    default.manifest
+Source1001:    %{name}.manifest
+Source1002:    libaskuser-common.manifest
+Source1003:    askuser-plugins.manifest
+Source1004:    askuser-test.manifest
+Source1005:    askuser-notification.manifest
 BuildRequires: cmake
+BuildRequires: libwayland-egl
+BuildRequires: gettext-tools
 BuildRequires: pkgconfig(cynara-agent)
-%if %{with_systemd_daemon}
+BuildRequires: pkgconfig(cynara-creds-socket)
+BuildRequires: pkgconfig(cynara-plugin)
+BuildRequires: pkgconfig(elementary)
 BuildRequires: pkgconfig(libsystemd)
-%endif
 BuildRequires: pkgconfig(security-manager)
 BuildRequires: pkgconfig(security-privilege-manager)
 BuildRequires: pkgconfig(glib-2.0)
 BuildRequires: pkgconfig(pkgmgr-info)
-BuildRequires: askuser-notification-devel
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(capi-ui-efl-util)
+BuildRequires: pkgconfig(capi-system-info)
+BuildRequires: coregl
+BuildRequires: edje-bin
 
 %if !%{defined build_type}
 %define build_type RELEASE
@@ -34,28 +45,35 @@ Summary:    Askuser common library
 %description -n libaskuser-common
 Askuser common library with common functionalities
 
-%package plugins
-BuildRequires: pkgconfig(cynara-plugin)
+%package -n askuser-notification
+Summary: User daemon which shows popup with privilege request
+
+%description -n askuser-notification
+User daemon which shows popup with privilege request
+
+%package -n askuser-plugins
 Requires:   cynara
 Requires:   libcynara-client
 Summary:    Askuser cynara plugins
 
-%description plugins
+%description -n askuser-plugins
 Askuser plugin library with cynara service and client side plugins
 
-%package test
-BuildRequires: pkgconfig(cynara-agent)
-BuildRequires: pkgconfig(cynara-client)
+%package -n askuser-test
 BuildRequires: pkgconfig(cynara-admin)
 BuildRequires: pkgconfig(gmock)
 Summary: Tool for testing askuser packages and unit tests for askuser
 
-%description test
+%description -n askuser-test
 Tool for testing askuser packages and unit tests for askuser
 
 %prep
 %setup -q
 cp -a %{SOURCE1001} .
+cp -a %{SOURCE1002} .
+cp -a %{SOURCE1003} .
+cp -a %{SOURCE1004} .
+cp -a %{SOURCE1005} .
 
 %build
 %if 0%{?sec_build_binary_debug_enable}
@@ -69,32 +87,34 @@ export CXXFLAGS="$CXXFLAGS -Wp,-U_FORTIFY_SOURCE"
 export LDFLAGS+="-Wl,--rpath=%{_libdir}"
 
 %cmake . \
-        -DBUILD_ASKUSER=ON \
         -DCMAKE_BUILD_TYPE=%{?build_type} \
         -DBUILD_WITH_SYSTEMD_DAEMON=%{?with_systemd_daemon} \
-        -DCMAKE_VERBOSE_MAKEFILE=ON
+        -DCMAKE_VERBOSE_MAKEFILE=ON \
+        -DRES_DIR="/usr/share/askuser/res"
 make %{?jobs:-j%jobs}
 
 %install
 rm -rf %{buildroot}
 %make_install
-rm -f %{buildroot}/%{_libdir}/libaskuser-common.so
-
-%if %{with_systemd_daemon}
-mkdir -p %{buildroot}/%{_unitdir}/multi-user.target.wants
-mkdir -p %{buildroot}/%{_unitdir}/cynara.service.wants
-ln -s ../askuser.service %{buildroot}/%{_unitdir}/multi-user.target.wants/askuser.service
-ln -s ../askuser.service %{buildroot}/%{_unitdir}/cynara.service.wants/askuser.service
-%endif
+%find_lang %{name}
 
 %post
 %if %{with_systemd_daemon}
+# todo properly use systemd --user
+ln -s /lib/systemd/user/askuser-notification.service \
+/usr/lib/systemd/user/default.target.wants/askuser-notification.service
+ln -s /lib/systemd/user/askuser-notification.socket \
+/usr/lib/systemd/user/sockets.target.wants/askuser-notification.socket
+ln -s /usr/lib/systemd/system/askuser.service \
+/usr/lib/systemd/system/multi-user.target.wants/askuser.service
+
 systemctl daemon-reload
 
 systemctl restart askuser.service
-systemctl restart cynara.service
 %endif
 
+systemctl restart cynara.service
+
 %preun
 %if %{with_systemd_daemon}
 if [ $1 = 0 ]; then
@@ -107,37 +127,48 @@ fi
 if [ $1 = 0 ]; then
     systemctl daemon-reload
 fi
+%endif
 
 systemctl restart cynara.service
-%endif
 
 %post -n libaskuser-common -p /sbin/ldconfig
 
 %postun -n libaskuser-common -p /sbin/ldconfig
 
-%files
-%manifest default.manifest
+%files -f %{name}.lang
+%manifest %{name}.manifest
 %license LICENSE
-%attr(755, root, root) %{_bindir}/askuser
+%attr(755, root, root) /usr/bin/askuser
 %if %{with_systemd_daemon}
-%{_unitdir}/askuser.service
-%{_unitdir}/multi-user.target.wants/*
-%{_unitdir}/cynara.service.wants/*
+/usr/lib/systemd/system/askuser.service
 %endif
 
+%files -n askuser-notification
+%manifest askuser-notification.manifest
+%license LICENSE
+%attr(755,root,root) /usr/bin/askuser-notification
+%if %{with_systemd_daemon}
+/usr/lib/systemd/user/askuser-notification.service
+/usr/lib/systemd/user/askuser-notification.socket
+%endif
+#/usr/share/locale/en/LC_MESSAGES/askuser.mo
+#/usr/share/locale/pl/LC_MESSAGES/askuser.mo
+/usr/share/askuser/res/*
+
 %files -n libaskuser-common
-%manifest default.manifest
+%manifest libaskuser-common.manifest
 %license LICENSE
-%{_libdir}/libaskuser-common.so.*
+%{_libdir}/libaskuser-common.so*
 
-%files plugins
-%manifest default.manifest
+%files -n askuser-plugins
+%manifest askuser-plugins.manifest
 %license LICENSE
 %{_libdir}/cynara/plugin/client/*
 %{_libdir}/cynara/plugin/service/*
 
-%files test
-%manifest default.manifest
+%files -n askuser-test
+%manifest askuser-test.manifest
 %license LICENSE
-%attr(755,root,root) %{_bindir}/askuser-test
-%attr(755,root,root) %{_bindir}/askuser-tests
+%attr(755,root,root) /usr/bin/askuser-test
+%attr(755,root,root) /usr/bin/askuser-tests
+
diff --git a/packaging/default.manifest b/packaging/default.manifest
deleted file mode 100644 (file)
index a76fdba..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<manifest>
-       <request>
-               <domain name="_" />
-       </request>
-</manifest>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644 (file)
index 0000000..edb8f35
--- /dev/null
@@ -0,0 +1,23 @@
+# Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+#
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#    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.
+#
+# @file        CMakeLists.txt
+# @author      Adam Malinowski <a.malinowsk2@partner.samsung.com>
+#
+
+SET(ASKUSER_PATH ${PROJECT_SOURCE_DIR}/src)
+
+ADD_SUBDIRECTORY(agent)
+ADD_SUBDIRECTORY(common)
+ADD_SUBDIRECTORY(plugin)
index 17f0dd707d235b4c96b2edbd729b9b89f197ebf9..e65bcccb9c0f154f22fad86808a9985617dad109 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2014-2017 Samsung Electronics Co., Ltd All Rights Reserved
+# Copyright (c) 2014-2016 Samsung Electronics Co., Ltd All Rights Reserved
 #
 #    Licensed under the Apache License, Version 2.0 (the "License");
 #    you may not use this file except in compliance with the License.
@@ -20,9 +20,8 @@ PKG_CHECK_MODULES(AGENT_DEP
     REQUIRED
     cynara-agent
     cynara-plugin
+    cynara-creds-socket
     libsystemd
-    security-manager
-    pkgmgr-info
     )
 
 SET(ASKUSER_AGENT_PATH ${ASKUSER_PATH}/agent)
@@ -32,7 +31,6 @@ SET(ASKUSER_SOURCES
     ${ASKUSER_AGENT_PATH}/main/CynaraTalker.cpp
     ${ASKUSER_AGENT_PATH}/main/main.cpp
     ${ASKUSER_AGENT_PATH}/main/PolicyUpdater.cpp
-    ${ASKUSER_AGENT_PATH}/main/Policy.cpp
     ${ASKUSER_AGENT_PATH}/ui/NotificationBackend.cpp
     ${ASKUSER_AGENT_PATH}/ui/FdNotifyObject.cpp
     )
@@ -48,9 +46,12 @@ ADD_EXECUTABLE(${TARGET_ASKUSER} ${ASKUSER_SOURCES})
 
 TARGET_LINK_LIBRARIES(${TARGET_ASKUSER}
     ${AGENT_DEP_LIBRARIES}
+    ${ASKUSER_DEP_LIBRARIES}
     ${TARGET_ASKUSER_COMMON}
     "-pthread"
     "-pie"
     )
 
 INSTALL(TARGETS ${TARGET_ASKUSER} DESTINATION ${BIN_INSTALL_DIR})
+
+ADD_SUBDIRECTORY(notification-daemon)
index eb1b7ba465e26f51c80cf02d5ed565b985df354c..8217fbb13c6f334647be33ce61b4c0bb6adae136 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2017 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014-2015 Samsung Electronics Co., Ltd All Rights Reserved
  *
  *    Licensed under the Apache License, Version 2.0 (the "License");
  *    you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@
 #include <utility>
 
 #include <attributes/attributes.h>
+#include <policy/Policy.h>
 #include <translator/Translator.h>
 #include <types/AgentErrorMsg.h>
 #include <types/SupportedTypes.h>
@@ -36,7 +37,6 @@
 #include <log/alog.h>
 
 #include "Agent.h"
-#include "Policy.h"
 
 namespace AskUser {
 
@@ -229,11 +229,7 @@ bool Agent::startUIForRequest(Request *request) {
     auto handler = [&](RequestId requestId, UIResponseType resultType) -> void {
                        UIResponseHandler(requestId, resultType);
                    };
-
-    std::string appId, pkgLabel;
-    identifyApp(data.client, data.user, appId, pkgLabel);
-
-    bool ret = ui->start(data.client, pkgLabel, data.user, data.privilege, request->id(), handler);
+    bool ret = ui->start(data.client, data.user, data.privilege, request->id(), handler);
     if (ret) {
         m_UIs.insert(std::make_pair(request->id(), std::move(ui)));
     }
diff --git a/src/agent/main/Policy.cpp b/src/agent/main/Policy.cpp
deleted file mode 100644 (file)
index e63faa7..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- *  Copyright (c) 2016-2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/main/Policy.cpp
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Implementation of Policy wrappers
- */
-
-#include <memory>
-
-#include <security-manager.h>
-
-#include <exception/Exception.h>
-#include <log/alog.h>
-
-#include <policy/PkgInfo.h>
-#include "Policy.h"
-
-namespace {
-inline void throwOnSMError(std::string err, int ret)
-{
-    if (ret != SECURITY_MANAGER_SUCCESS)
-        throw AskUser::Exception(err + " : " + std::to_string(ret));
-}
-}
-
-namespace AskUser {
-
-void identifyApp(const std::string &client, const std::string &user,
-                 std::string &appId, std::string &pkgLabel)
-{
-    char *pkgName = nullptr;
-    char *appName = nullptr;
-
-    int ret = security_manager_identify_app_from_cynara_client(client.c_str(), &pkgName, &appName);
-    std::unique_ptr<char, decltype(free)*> pkg_name_p(pkgName, free);
-    std::unique_ptr<char, decltype(free)*> app_name_p(appName, free);
-    throwOnSMError("security_manager_identify_app_from_cynara_client", ret);
-
-    if (!pkgName) {
-        ALOGE("Couldn't identify clients package id");
-        return;
-    }
-
-    uid_t uid = std::strtoul(user.c_str(), nullptr, 10);
-    PkgInfo pkgInfo(pkgName, uid);
-    if (!appName)
-        appId = pkgInfo.mainAppId();
-
-    pkgLabel = pkgInfo.pkgLabel();
-}
-
-PolicyEntry::PolicyEntry() {
-    throwOnSMError("security_manager_policy_entry_new",
-                                  security_manager_policy_entry_new(&m_entry));
-}
-
-PolicyEntry::PolicyEntry(PolicyEntry &&other) : m_entry(std::move(other.m_entry)) {
-    other.m_entry = nullptr;
-}
-
-PolicyEntry::~PolicyEntry() {
-    security_manager_policy_entry_free(m_entry);
-}
-
-void PolicyEntry::setApp(const std::string &appId) {
-    throwOnSMError("security_manager_policy_entry_set_application",
-                   security_manager_policy_entry_set_application(m_entry, appId.c_str()));
-}
-
-void PolicyEntry::setUser(const std::string &user) {
-    throwOnSMError("security_manager_policy_entry_set_user",
-                   security_manager_policy_entry_set_user(m_entry, user.c_str()));
-}
-
-void PolicyEntry::setPrivilege(const std::string &privilege) {
-    throwOnSMError("security_manager_policy_entry_set_privilege",
-                   security_manager_policy_entry_set_privilege(m_entry, privilege.c_str()));
-}
-
-void PolicyEntry::setLevel(const std::string &level) {
-    throwOnSMError("security_manager_policy_entry_admin_set_level",
-                   security_manager_policy_entry_set_level(m_entry, level.c_str()));
-}
-
-PolicyRequest::PolicyRequest() {
-    throwOnSMError("security_manager_policy_update_req_new",
-                   security_manager_policy_update_req_new(&m_req));
-}
-
-PolicyRequest::~PolicyRequest() {
-    m_entries.clear();
-    security_manager_policy_update_req_free(m_req);
-}
-
-void PolicyRequest::addEntry(PolicyEntry &&entry) {
-    throwOnSMError("security_manager_policy_update_req_add_entry",
-                   security_manager_policy_update_req_add_entry(m_req, entry.get()));
-    m_entries.emplace_back(std::move(entry));
-}
-
-void PolicyRequest::updatePolicy() {
-    throwOnSMError("security_manager_policy_update_send",
-                   security_manager_policy_update_send(m_req));
-}
-
-} /* namespace AskUser */
diff --git a/src/agent/main/Policy.h b/src/agent/main/Policy.h
deleted file mode 100644 (file)
index 66bf8d9..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- *  Copyright (c) 2016-2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/main/Policy.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Definition of Policy wrappers
- */
-
-#pragma once
-
-#include <string>
-#include <vector>
-
-struct policy_entry;
-struct policy_update_req;
-
-namespace AskUser {
-
-void identifyApp(const std::string &client, const std::string &user,
-                 std::string &appId, std::string &pkgLabel);
-
-class PolicyEntry {
-public:
-    PolicyEntry();
-    PolicyEntry(PolicyEntry &&other);
-    ~PolicyEntry();
-    void setApp(const std::string &appId);
-    void setUser(const std::string &user);
-    void setPrivilege(const std::string &privilege);
-    void setLevel(const std::string &level);
-
-    policy_entry *get() const { return m_entry; }
-
-private:
-    policy_entry *m_entry;
-};
-
-class PolicyRequest {
-public:
-    PolicyRequest();
-    ~PolicyRequest();
-    void addEntry(PolicyEntry &&entry);
-    void updatePolicy();
-
-private:
-    policy_update_req *m_req;
-    std::vector<PolicyEntry> m_entries;
-};
-
-} /* namespace AskUser */
index a9fbd910348670d05c64213b36d86876ca2b9c28..b7e6d86d22ac75c53d0873f969d3eb702314beff 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2017 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
  *
  *    Licensed under the Apache License, Version 2.0 (the "License");
  *    you may not use this file except in compliance with the License.
 
 #include <exception/Exception.h>
 #include <log/alog.h>
-
+#include <policy/Policy.h>
 #include <policy/PrivilegeInfo.h>
 
-#include "Policy.h"
 #include "PolicyUpdater.h"
 
 namespace AskUser {
diff --git a/src/agent/notification-daemon/AskUserTalker.cpp b/src/agent/notification-daemon/AskUserTalker.cpp
new file mode 100644 (file)
index 0000000..19c93a9
--- /dev/null
@@ -0,0 +1,299 @@
+/*
+ *  Copyright (c) 2016 Samsung Electronics Co.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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
+ */
+/**
+ * @file        src/agent/notification-daemon/AskUserTalker.cpp
+ * @author      Oskar Ĺšwitalski <o.switalski@samsung.com>
+ * @author      Zofia Abramowska <z.abramowska@samsung.com>
+ * @brief       Definition of AskUserTalker class
+ */
+
+#include "AskUserTalker.h"
+
+#include <signal.h>
+#include <string>
+#include <sys/signalfd.h>
+
+#include <policy/Policy.h>
+#include <policy/PrivilegeInfo.h>
+#include <socket/Socket.h>
+#include <socket/Poll.h>
+#include <types/NotificationResponse.h>
+#include <types/NotificationRequest.h>
+#include <exception/ErrnoException.h>
+#include <exception/Exception.h>
+#include <translator/Translator.h>
+#include <config/Path.h>
+
+#ifdef BUILD_WITH_SYSTEMD_DAEMON
+#include <systemd/sd-daemon.h>
+#endif
+
+namespace AskUser {
+
+namespace Notification {
+
+namespace {
+
+} /* namespace */
+
+void AskUserTalker::dissmissCb(int fd, void *data) {
+    AskUserTalker *talker = static_cast<AskUserTalker*>(data);
+    if (fd == talker->m_currentPeerSocket.getFd()) {
+        ALOGD("Client behaved incorrectly");
+        // I would close client socket here but ecore loop doesn't like closing fd while in handler
+    } else if (fd == talker->m_signalSocket.getFd()) {
+        ALOGD("Got signal to close");
+        talker->m_running = false;
+    }
+}
+
+AskUserTalker::AskUserTalker()
+    : m_poller(2),
+      m_signalSocket(Socket::PeerType::SIGNAL),
+      m_serverSocket(Socket::PeerType::SERVER),
+      m_currentPeerSocket(Socket::PeerType::PEER)
+{}
+
+void AskUserTalker::setSignalDescriptor() {
+    sigset_t mask;
+    sigemptyset(&mask);
+    sigaddset(&mask, SIGTERM);
+
+    if (pthread_sigmask(SIG_BLOCK, &mask, NULL) < 0) {
+        throw ErrnoException("Couldn't set signal mask");
+    }
+
+    int signalFd = signalfd(-1, &mask, 0);
+    if (signalFd < 0) {
+        throw ErrnoException("Couldn't create signalfd");
+    }
+
+    m_signalSocket.setFd(signalFd);
+    m_poller.setEvents(m_signalSocket.getFd(), POLLIN);
+
+    ALOGD("Signal descriptor set for " << m_signalSocket.getFd());
+}
+
+void AskUserTalker::init() {
+#ifdef BUILD_WITH_SYSTEMD_DAEMON
+        int systemdFdCount = sd_listen_fds(0);
+        if (systemdFdCount < 0) {
+            ALOGE("Error in sd_listen_fds");
+            throw Exception("Couldn't setup systemd socket");
+        }
+        if (systemdFdCount > 1) {
+            ALOGE("Systemd passed to many sockets");
+            throw Exception("Too many sockets passed");
+        }
+
+        m_serverSocket.setFd(SD_LISTEN_FDS_START);
+        if (m_serverSocket.getFd() == -1) {
+            ALOGE("Failed to set socket fd from systemd");
+            throw Exception("Cannot set socket from systemd");
+        }
+
+        int ret = sd_notify(0, "READY=1");
+        if (ret == 0) {
+            ALOGW("Agent was not configured to notify its status");
+        } else if (ret < 0) {
+            ALOGE("sd_notify failed: [" << ret << "]");
+        }
+#else
+        m_serverSocket.bindAndListen(Path::getUserSocketPath(getuid()));
+#endif
+        m_poller.setEvents(m_serverSocket.getFd(), POLLIN);
+        setSignalDescriptor();
+        m_gui.setLocale();
+        m_gui.initialize();
+        ALOGD("Initialized");
+}
+
+bool AskUserTalker::fetchRequest(NotificationRequest &request) {
+    std::string requestData;
+
+    if (!m_currentPeerSocket.recv(requestData)) {
+        ALOGI("Failed fetching request, closing...");
+        return false;
+    }
+
+    request = Translator::Gui::dataToNotificationRequest(requestData);
+    ALOGD("Recieved data " << request.data.client << " " << request.data.privilege);
+
+    return true;
+}
+
+bool AskUserTalker::sendResponse(const NotificationResponse &response) {
+    if (!m_currentPeerSocket.send(static_cast<int>(response.id))) {
+        ALOGI("Askuserd closed connection, closing...");
+        return false;
+    }
+    if (!m_currentPeerSocket.send(static_cast<int>(response.response))) {
+        ALOGI("Askuserd closed connection, closing...");
+        return false;
+    }
+    return true;
+}
+
+void AskUserTalker::handlePeer() {
+    NotificationRequest request;
+    if (!fetchRequest(request)) {
+        ALOGE("Couldn't fetch request, closing...");
+        return;
+    }
+
+    m_gui.addDismissFd(m_currentPeerSocket.getFd(), AskUserTalker::dissmissCb, this);
+
+    NotificationResponse response;
+    m_gui.setLocale();
+    response.response = m_gui.popupRun(request.data.client,
+            PrivilegeInfo::getPrivacyDisplayName(request.data.privilege));
+
+    m_gui.delDismissFd(m_currentPeerSocket.getFd());
+
+    response.id = request.id;
+    if (response.response == NResponseType::None) {
+        return;
+    }
+
+    if (!sendResponse(response)) {
+        ALOGE("Couldn't send response, closing...");
+        return;
+    }
+
+    switch (response.response) {
+    case NResponseType::Error:
+        ALOGE("Error in user interface : " << m_gui.getErrorMsg());
+        break;
+    case NResponseType::AllowAlways:
+    case NResponseType::DenyAlways:
+    case NResponseType::Deny:
+    case NResponseType::None:
+        ALOGD("Sending response " << static_cast<int>(response.response));
+        break;
+    default:
+        ALOGW("Unknown response type returned");
+        break;
+    }
+    return;
+}
+
+void AskUserTalker::activateCurrentClient() {
+    ALOGD("Activating current peer : " << m_currentPeerSocket.getFd());
+    m_poller.setEvents(m_currentPeerSocket.getFd(), POLLIN | POLLHUP | POLLERR);
+}
+void AskUserTalker::deactivateCurrentClient() {
+    ALOGD("Deactivating current peer : " << m_currentPeerSocket.getFd());
+    m_poller.unset(m_currentPeerSocket.getFd());
+}
+
+void AskUserTalker::switchToNextClient() {
+    deactivateCurrentClient();
+    m_currentPeerSocket.close();
+    if (m_pendingPeers.empty()) {
+        ALOGD("No pending peers");
+        return;
+    }
+    m_currentPeerSocket = std::move(m_pendingPeers.front());
+    m_pendingPeers.pop_front();
+    activateCurrentClient();
+    ALOGD("Setting current peer : " << m_currentPeerSocket.getFd());
+}
+
+void AskUserTalker::addNewClient(Socket &&newPeer) {
+    if (m_currentPeerSocket.getFd() == -1) {
+        ALOGD("Setting current peer : " << newPeer.getFd());
+        m_currentPeerSocket = std::move(newPeer);
+        activateCurrentClient();
+    } else {
+        m_pendingPeers.emplace_back(std::move(newPeer));
+        ALOGD("Pushing peer to queue : " << newPeer.getFd());
+    }
+}
+
+void AskUserTalker::run()
+{
+    m_running = true;
+    m_gui.addDismissFd(m_signalSocket.getFd(), AskUserTalker::dissmissCb, this);
+    while(m_running) {
+        int ret = m_poller.wait(1);
+        if (ret == -1) {
+            ALOGE_ERRNO("Poll failed: ");
+            break;
+        }
+        if (ret == 0) {
+            ALOGD("Poll timeouted...");
+            break;
+        }
+
+        ALOGD("Poll returned " << ret << " events");
+        // signal fd
+        if (m_poller.getEvents(m_signalSocket.getFd()) & POLLIN) {
+            signalfd_siginfo si;
+            if (!m_signalSocket.recv(si)) {
+                ALOGE_ERRNO("Reading signal info failed");
+                break;
+            }
+            if (si.ssi_signo == SIGTERM) {
+                ALOGD("Got signal to exit, closing...");
+                break;
+            } else {
+                ALOGW("Unknown signal caught, ignoring...");
+            }
+        }
+        // listen fd
+        if (m_poller.getEvents(m_serverSocket.getFd()) & POLLIN) {
+            ALOGD("New peer connected");
+            Socket newPeer = std::move(m_serverSocket.accept());
+            if (newPeer.getFd() == -1) {
+                throw ErrnoException("Failed to accept new peer");
+            }
+
+            addNewClient(std::move(newPeer));
+            continue;
+        }
+        // client fd
+        if ((m_poller.getEvents(m_currentPeerSocket.getFd()) & POLLHUP)
+            || (m_poller.getEvents(m_currentPeerSocket.getFd()) & POLLERR)) {
+            LOGW("Peer disconnected or error");
+            switchToNextClient();
+            continue;
+        }
+        if (m_poller.getEvents(m_currentPeerSocket.getFd()) & POLLIN) {
+            // Handle client then switch to next accepted client
+            ALOGD("Fetching request from client");
+            handlePeer();
+            switchToNextClient();
+        }
+    }
+    m_running = false;
+    stop();
+}
+
+void AskUserTalker::stop()
+{
+    m_gui.delDismissFd(m_currentPeerSocket.getFd());
+    m_gui.delDismissFd(m_signalSocket.getFd());
+    m_gui.stop();
+    m_currentPeerSocket.close();
+    for (auto &peer: m_pendingPeers) {
+        peer.close();
+    }
+    m_serverSocket.close();
+}
+
+} /* namespace Notification */
+
+} /* namespace AskUser */
diff --git a/src/agent/notification-daemon/AskUserTalker.h b/src/agent/notification-daemon/AskUserTalker.h
new file mode 100644 (file)
index 0000000..fc7c9f0
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ *  Copyright (c) 2016 Samsung Electronics Co.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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
+ */
+/**
+ * @file        src/agent/notification-daemon/AskUserTalker.h
+ * @author      Oskar Ĺšwitalski <o.switalski@samsung.com>
+ * @author      Zofia Abramowska <z.abramowska@samsung.com>
+ * @brief       Declaration of AskUserTalker class
+ */
+
+#pragma once
+
+#include <list>
+
+#include "GuiRunner.h"
+
+#include <socket/Poll.h>
+#include <socket/Socket.h>
+#include <types/NotificationRequest.h>
+#include <types/NotificationResponse.h>
+
+namespace AskUser {
+
+namespace Notification {
+
+class AskUserTalker
+{
+public:
+      AskUserTalker();
+
+      void init();
+      void run();
+      void stop();
+
+private:
+      static void dissmissCb(int fd, void *data);
+      void setSignalDescriptor();
+      void activateCurrentClient();
+      void deactivateCurrentClient();
+      void addNewClient(Socket &&newPeer);
+      void switchToNextClient();
+      void handlePeer();
+      bool fetchRequest(NotificationRequest &request);
+      bool sendResponse(const NotificationResponse &response);
+      Poll m_poller;
+      Socket m_signalSocket;
+      Socket m_serverSocket;
+      Socket m_currentPeerSocket;
+      GuiRunner m_gui;
+      std::list<Socket> m_pendingPeers;
+      bool m_dismissPopup = false;
+      bool m_running = false;
+};
+
+} /* namespace Notification */
+
+} /* namespace AskUser */
index 83040675b9a0c88f76354b6927ccbb58039b867e..6b9f25b06ab9d7cc85047ba6ccac4a2e4867dc18 100644 (file)
@@ -1,20 +1,13 @@
 SET(NOTIF_PATH ${PROJECT_SOURCE_DIR}/src/agent/notification-daemon/)
 
-PROJECT("askuser-notification")
-# Pass project name to sources
-ADD_DEFINITIONS("-DPROJECT_NAME=\"${PROJECT_NAME}\"")
-
 PKG_CHECK_MODULES(ASKUSER_NOTIFICATION_DEP
     REQUIRED
     elementary
+    cynara-agent
     libsystemd
-    notification
     vconf
-    pkgmgr-info
-    glib-2.0
     capi-ui-efl-util
     capi-system-info
-    security-privilege-manager
 )
 
 INCLUDE_DIRECTORIES(SYSTEM
@@ -23,20 +16,15 @@ INCLUDE_DIRECTORIES(SYSTEM
 INCLUDE_DIRECTORIES(
     ${ASKUSER_PATH}
     ${ASKUSER_PATH}/common
-    ${ASKUSER_PATH}/common/protocol
-    ${ASKUSER_PATH}/agent/notification-daemon
 )
 
 SET(ASKUSER_NOTIFICATION_SOURCES
     ${NOTIF_PATH}/main.cpp
-    ${NOTIF_PATH}/Logic.cpp
-    ${NOTIF_PATH}/ServerCallbacks.cpp
-    ${NOTIF_PATH}/ui/Po.cpp
-    ${ASKUSER_PATH}/common/log/alog.cpp
-    ${ASKUSER_PATH}/common/policy/PrivilegeInfo.cpp
-    ${NOTIF_PATH}/ui/Popupper.cpp
+    ${NOTIF_PATH}/GuiRunner.cpp
+    ${NOTIF_PATH}/AskUserTalker.cpp
    )
 
+
 ADD_EXECUTABLE(${TARGET_ASKUSER_NOTIFICATION} ${ASKUSER_NOTIFICATION_SOURCES})
 
 SET_TARGET_PROPERTIES(${TARGET_ASKUSER_NOTIFICATION} PROPERTIES
@@ -47,7 +35,6 @@ SET_TARGET_PROPERTIES(${TARGET_ASKUSER_NOTIFICATION} PROPERTIES
 TARGET_LINK_LIBRARIES(${TARGET_ASKUSER_NOTIFICATION}
     ${ASKUSER_NOTIFICATION_DEP_LIBRARIES}
     ${TARGET_ASKUSER_COMMON}
-    ${TARGET_ASKUSER_NOTIFICATION_LIB}
     -pie
 )
 
@@ -55,7 +42,7 @@ ADD_CUSTOM_TARGET(popup_custom.edj
     COMMAND edje_cc -no-save res/popup_custom.edc res/popup_custom.edj
     DEPENDS res/popup_custom.edc
     )
-ADD_DEPENDENCIES(${TARGET_ASKUSER_NOTIFICATION} popup_custom.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} popup_custom.edj)
 
 INSTALL(TARGETS ${TARGET_ASKUSER_NOTIFICATION} DESTINATION ${BIN_INSTALL_DIR})
 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/ DESTINATION ${RES_DIR} FILES_MATCHING PATTERN "*.png")
diff --git a/src/agent/notification-daemon/GuiRunner.cpp b/src/agent/notification-daemon/GuiRunner.cpp
new file mode 100644 (file)
index 0000000..46745f5
--- /dev/null
@@ -0,0 +1,392 @@
+/*
+ *  Copyright (c) 2016 Samsung Electronics Co.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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
+ */
+/**
+ * @file        src/agent/notification-daemon/GuiRunner.cpp
+ * @author      Oskar Ĺšwitalski <o.switalski@samsung.com>
+ * @author      Zofia Abramowska <z.abramowska@samsung.com>
+ * @brief       Definition of GuiRunner class
+ */
+
+#include "GuiRunner.h"
+
+#include <exception/ErrnoException.h>
+#include <exception/Exception.h>
+#include <policy/Policy.h>
+#include <translator/Translator.h>
+#include <libintl.h>
+#include <vconf.h>
+#include <efl_util.h>
+#include <system_info.h>
+
+#include <unistd.h>
+
+namespace AskUser {
+
+namespace Notification {
+
+void GuiRunner::unfocused(void *data, Evas_Object *, void *)
+{
+    ALOGD("Unfocused");
+    GuiRunner *runner = static_cast<GuiRunner*>(data);
+
+    if (runner->m_shouldRaise) {
+        evas_object_show(runner->m_win);
+    } else {
+        for (auto &fdCbData : runner->m_fdCbDataMap) {
+            ecore_main_fd_handler_del(fdCbData.second.handler);
+        }
+        ecore_main_loop_iterate();
+        elm_exit();
+    }
+
+}
+
+void GuiRunner::winClose()
+{
+    ALOGD("Window close");
+    m_shouldRaise = false;
+    evas_object_hide(m_win);
+}
+
+// responseMap[allow][always]
+const NResponseType responseMap[2][2] = {
+    { NResponseType::Deny, NResponseType::DenyAlways },
+    { NResponseType::AllowAlways, NResponseType::AllowAlways }
+};
+
+void GuiRunner::answer(bool allow)
+{
+    Eina_Bool always = EINA_FALSE;
+
+    if (!m_hwKeyClicked)
+        always = elm_check_state_get(m_checkbox);
+    else
+        m_hwKeyClicked = false;
+
+    m_popupResponse = responseMap[allow][always];
+
+    ALOGD("User selected: " + Translator::Gui::responseToString(m_popupResponse));
+
+    winClose();
+}
+
+void GuiRunner::allowAnswerCb(void *data, Evas_Object *, void *)
+{
+    GuiRunner* runner = static_cast<GuiRunner*>(data);
+    runner->answer(true);
+}
+
+void GuiRunner::denyAnswerCb(void *data, Evas_Object *, void *)
+{
+    GuiRunner* runner = static_cast<GuiRunner*>(data);
+    runner->answer(false);
+}
+
+Eina_Bool GuiRunner::hwKeyClickedCb(void *data, int type, void *event)
+{
+    Ecore_Event_Key *ev = (Ecore_Event_Key*)event;
+    GuiRunner* runner = static_cast<GuiRunner*>(data);
+    ALOGD("HW button pressed. type <" << type << "> pressed key is <" << ev->key << ">");
+    runner->m_hwKeyClicked = true;
+    if (!strcmp("XF86Home", ev->key) || !strcmp("XF86Back", ev->key)) {
+        ALOGD("Close the window and respond as deny once.");
+        runner->m_shouldRaise = false;
+        runner->answer(false);
+    }
+    return EINA_TRUE;
+}
+
+Eina_Bool GuiRunner::dismissFdCb(void *data, Ecore_Fd_Handler *handler) {
+    ALOGD("Dismiss fd awoken");
+    GuiRunner *runner = static_cast<GuiRunner*>(data);
+
+    int fd = ecore_main_fd_handler_fd_get(handler);
+    if (fd == -1) {
+        ALOGE("Failed to fetch fd from handler");
+        return ECORE_CALLBACK_CANCEL;
+    }
+
+    ALOGD("Dismiss descriptor " << fd << " is active, closing window...");
+    auto fdIt = runner->m_fdCbDataMap.find(fd);
+    if (fdIt == runner->m_fdCbDataMap.end())
+        return ECORE_CALLBACK_CANCEL;
+
+    auto cbData = fdIt->second;
+    cbData.userCb(fd, cbData.userData);
+    runner->m_fdCbDataMap.erase(fdIt);
+
+    runner->winClose();
+    return ECORE_CALLBACK_CANCEL;
+}
+
+GuiRunner::~GuiRunner()
+{
+    for (auto &fdCbData : m_fdCbDataMap) {
+        ecore_main_fd_handler_del(fdCbData.second.handler);
+    }
+}
+
+void GuiRunner::delDismissFd(int fd)
+{
+    auto fdIt = m_fdCbDataMap.find(fd);
+    if (fdIt == m_fdCbDataMap.end())
+        return;
+    ecore_main_fd_handler_del(fdIt->second.handler);
+    m_fdCbDataMap.erase(fdIt);
+}
+
+void GuiRunner::addDismissFd(int fd, DissmissCb cb, void *data)
+{
+    delDismissFd(fd);
+
+    auto handler = ecore_main_fd_handler_add(fd,
+                                             // Thank you efl for this ugly code
+                                             static_cast<Ecore_Fd_Handler_Flags>(ECORE_FD_READ | ECORE_FD_ERROR),
+                                             &GuiRunner::dismissFdCb, this,
+                                             nullptr, nullptr);
+    if (handler == nullptr) {
+        throw Exception("Couldn't set fd handler");
+    }
+
+    m_fdCbDataMap[fd] = CbData{cb, data, handler};
+}
+
+void GuiRunner::initialize()
+{
+    char *popupTitle = dgettext(PROJECT_NAME, "IDS_IDLE_HEADER_PRIVACY_REQUEST");
+    char *checkBoxText = dgettext(PROJECT_NAME, "IDS_ST_OPT_DONT_SHOW_AGAIN");
+    elm_init(0, NULL);
+
+    m_win = elm_win_add(NULL, popupTitle, ELM_WIN_NOTIFICATION);
+    if (!m_win) {
+        ALOGE("EFL : Failed to add window");
+        throw Exception("Elementary failed");
+    }
+    efl_util_set_notification_window_level(m_win, EFL_UTIL_NOTIFICATION_LEVEL_TOP);
+
+    if (elm_win_wm_rotation_supported_get(m_win)) {
+        int rots[4] = { 0, 90, 180, 270 };
+        elm_win_wm_rotation_available_rotations_set(m_win, (const int *)(&rots), 4);
+    }
+
+    elm_win_autodel_set(m_win, EINA_TRUE);
+    elm_win_override_set(m_win, EINA_TRUE);
+    elm_win_alpha_set(m_win, EINA_TRUE);
+
+    char *profileName = nullptr;
+    system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
+    if (!profileName) {
+        ALOGE("profileName is NULL");
+        throw Exception("get profileName failed");
+    }
+    std::unique_ptr<char, decltype(free)*> profileNamePtr(profileName, free);
+    if (*profileName != 'w' && *profileName != 'W') {
+        // popup
+        m_popup = elm_popup_add(m_win);
+        if (!m_popup) {
+            ALOGE("EFL : Failed to add popup");
+            throw Exception("Elementary failed");
+        }
+        elm_popup_align_set(m_popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
+        elm_object_part_text_set(m_popup, "title,text", popupTitle);
+        evas_object_size_hint_weight_set(m_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+        // layout
+        m_layout = elm_layout_add(m_popup);
+        elm_layout_file_set(m_layout, RES_DIR"/popup_custom.edj", "popup_checkview_layout_mobile");
+        evas_object_size_hint_weight_set(m_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+        // content
+        m_content = elm_label_add(m_layout);
+        if (!m_content) {
+            ALOGE("EFL : Failed to add content");
+            throw Exception("Enlightement failed");
+        }
+        elm_object_style_set(m_content, "popup/default");
+        elm_label_line_wrap_set(m_content, ELM_WRAP_MIXED);
+        evas_object_size_hint_weight_set(m_content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+        evas_object_size_hint_align_set(m_content, EVAS_HINT_FILL, EVAS_HINT_FILL);
+        elm_object_part_content_set(m_layout, "elm.swallow.content", m_content);
+
+        // checkbox
+        m_checkbox = elm_check_add(m_layout);
+        if (!m_checkbox) {
+            ALOGE("EFL : Failed to add checkbox");
+            throw Exception("Enlightement failed");
+        }
+        elm_object_part_content_set(m_layout, "elm.swallow.end", m_checkbox);
+        elm_object_text_set(m_checkbox, checkBoxText);
+        elm_check_state_set(m_checkbox, EINA_FALSE);
+        evas_object_show(m_checkbox);
+
+        // buttons
+        m_denyButton = elm_button_add(m_popup);
+        if (!m_denyButton) {
+            ALOGE("EFL : Failed to add deny button");
+            throw Exception("Enlightement failed");
+        }
+        elm_object_part_content_set(m_popup, "button1", m_denyButton);
+        elm_object_text_set(m_denyButton, dgettext(PROJECT_NAME,
+                                               "IDS_IDLE_BUTTON_DENY"));
+
+        m_allowButton = elm_button_add(m_popup);
+        if (!m_allowButton) {
+            ALOGE("EFL : Failed to add allow button");
+            throw Exception("Enlightement failed");
+        }
+        elm_object_part_content_set(m_popup, "button2", m_allowButton);
+        elm_object_text_set(m_allowButton, dgettext(PROJECT_NAME,
+                                                "IDS_IDLE_BUTTON_ALLOW_ABB7"));
+        elm_object_content_set(m_popup, m_layout);
+        evas_object_show(m_popup);
+
+    } else {
+        Evas_Object *icon;
+
+        m_popup = elm_popup_add(m_win);
+        elm_object_style_set(m_popup, "circle");
+
+        m_layout = elm_layout_add(m_popup);
+        elm_layout_theme_set(m_layout, "layout", "popup", "content/circle/buttons2");
+        elm_object_part_text_set(m_layout, "elm.text.title", popupTitle);
+        elm_object_content_set(m_popup, m_layout);
+
+        m_layoutInner = elm_layout_add(m_layout);
+        elm_layout_file_set(m_layoutInner, RES_DIR"/popup_custom.edj", "popup_checkview_internal");
+        evas_object_size_hint_weight_set(m_layoutInner, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+        elm_object_part_content_set(m_layout, "elm.swallow.content", m_layoutInner);
+
+        m_content = elm_label_add(m_layoutInner);
+        elm_object_style_set(m_content, "popup/default");
+        elm_label_line_wrap_set(m_content, ELM_WRAP_MIXED);
+        evas_object_size_hint_weight_set(m_content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+        evas_object_size_hint_align_set(m_content, EVAS_HINT_FILL, EVAS_HINT_FILL);
+        elm_object_part_content_set(m_layoutInner, "label", m_content);
+
+
+        m_checkbox = elm_check_add(m_popup);
+        elm_object_style_set(m_checkbox, "popup");
+        elm_object_text_set(m_checkbox, checkBoxText);
+        elm_check_state_set(m_checkbox, EINA_FALSE);
+        evas_object_size_hint_align_set(m_checkbox, EVAS_HINT_FILL, 0.0);
+        elm_object_part_content_set(m_layoutInner, "elm.swallow.end", m_checkbox);
+        evas_object_show(m_checkbox);
+
+        m_allowButton = elm_button_add(m_popup);
+        elm_object_style_set(m_allowButton, "popup/circle/right");
+        elm_object_part_content_set(m_popup, "button2", m_allowButton);
+
+        icon = elm_image_add(m_allowButton);
+        elm_image_file_set(icon, RES_DIR"/tw_ic_popup_btn_check.png", NULL);
+        evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+        elm_object_part_content_set(m_allowButton, "elm.swallow.content", icon);
+        evas_object_show(icon);
+
+        m_denyButton = elm_button_add(m_popup);
+        elm_object_style_set(m_denyButton, "popup/circle/left");
+        elm_object_part_content_set(m_popup, "button1", m_denyButton);
+
+        icon = elm_image_add(m_denyButton);
+        elm_image_file_set(icon, RES_DIR"/tw_ic_popup_btn_delete.png", NULL);
+        elm_object_part_content_set(m_denyButton, "elm.swallow.content", icon);
+        evas_object_show(icon);
+
+        evas_object_show(m_popup);
+    }
+    // callbacks
+    elm_win_indicator_opacity_set(m_win, ELM_WIN_INDICATOR_OPAQUE);
+    elm_win_indicator_mode_set(m_win, ELM_WIN_INDICATOR_SHOW);
+    evas_object_smart_callback_add(m_win, "unfocused", &GuiRunner::unfocused, this);
+    evas_object_smart_callback_add(m_allowButton, "clicked", &GuiRunner::allowAnswerCb, this);
+    evas_object_smart_callback_add(m_denyButton, "clicked", &GuiRunner::denyAnswerCb, this);
+    elm_win_keygrab_set(m_win, "XF86Home", 0, 0, 0, ELM_WIN_KEYGRAB_SHARED);
+    elm_win_keygrab_set(m_win, "XF86Back", 0, 0, 0, ELM_WIN_KEYGRAB_TOPMOST);
+    ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, &GuiRunner::hwKeyClickedCb, this);
+
+    m_initialized = true;
+}
+
+void GuiRunner::setLocale()
+{
+    char *lang = vconf_get_str(VCONFKEY_LANGSET);
+    if (lang)
+    {
+        elm_language_set(lang);
+        free(lang);
+    }
+    else
+        ALOGE("language_set failed.");
+}
+
+NResponseType GuiRunner::popupRun(const std::string &app, const std::string &perm)
+{
+    try {
+        setLocale();
+        initialize();
+
+        m_running = true;
+        m_hwKeyClicked = false;
+
+        std::string appId;
+        std::string pkgLabel;
+        identifyApp(app, std::to_string(getuid()), appId, pkgLabel);
+
+        // create message
+        char *messageFormat = dgettext(PROJECT_NAME, "IDS_IDLE_POP_ALLOW_P1SS_TO_ACCESS_YOUR_P2SS_Q");
+        char buf[BUFSIZ];
+        int ret = std::snprintf(buf, sizeof(buf), messageFormat,
+                                pkgLabel.c_str(),
+                                perm.c_str());
+
+        if (ret < 0)
+            throw ErrnoException("snprintf failed", errno);
+
+        m_popupResponse = NResponseType::None;
+
+        m_shouldRaise = true;
+
+        elm_object_text_set(m_content, buf);
+
+        evas_object_show(m_popup);
+        evas_object_show(m_win);
+
+        ALOGD("Showing popup");
+        elm_run();
+        ALOGD("Popup closed");
+
+        m_running = false;
+        m_shouldRaise = false;
+        elm_win_keygrab_unset(m_win, "XF86Home", 0, 0);
+        elm_win_keygrab_unset(m_win, "XF86Back", 0, 0);
+
+        evas_object_del(m_win);
+        m_win = nullptr;
+    } catch (const std::exception &e) {
+        m_popupResponse = NResponseType::Error;
+        m_errorMsg = std::move(e.what());
+    }
+
+    return m_popupResponse;
+}
+
+void GuiRunner::stop()
+{
+
+}
+
+} /* namespace Notification */
+
+} /* namespace AskUser */
diff --git a/src/agent/notification-daemon/GuiRunner.h b/src/agent/notification-daemon/GuiRunner.h
new file mode 100644 (file)
index 0000000..dfa90d6
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ *  Copyright (c) 2016 Samsung Electronics Co.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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
+ */
+/**
+ * @file        src/agent/notification-daemon/GuiRunner.h
+ * @author      Oskar Ĺšwitalski <o.switalski@samsung.com>
+ * @author      Zofia Abramowska <z.abramowska@samsung.com>
+ * @brief       Declaration of GuiRunner class
+ */
+
+#pragma once
+
+#include <Elementary.h>
+#include <functional>
+#include <map>
+#include <string>
+
+#include <types/NotificationResponse.h>
+#include <log/alog.h>
+
+namespace AskUser {
+
+namespace Notification {
+
+class GuiRunner {
+public:
+    typedef std::function<void(int, void*)> DissmissCb;
+
+    GuiRunner() = default;
+    void initialize();
+    void setLocale();
+    void addDismissFd(int fd, DissmissCb cb, void *data);
+    void delDismissFd(int fd);
+    ~GuiRunner();
+
+    NResponseType popupRun(const std::string &app, const std::string &perm);
+    void stop();
+
+    std::string getErrorMsg() { return m_errorMsg; }
+
+private:
+    static Eina_Bool dismissFdCb(void *data, Ecore_Fd_Handler *handler);
+    static void unfocused(void *data, Evas_Object *, void *);
+    static void allowAnswerCb(void *data, Evas_Object *, void *);
+    static void denyAnswerCb(void *data, Evas_Object *, void *);
+    static Eina_Bool hwKeyClickedCb(void *data, int type, void *event);
+
+    void answer(bool allow);
+    void winClose();
+
+    struct CbData {
+        DissmissCb userCb;
+        void *userData;
+        Ecore_Fd_Handler *handler;
+    };
+
+    std::map<int, CbData> m_fdCbDataMap;
+    NResponseType m_popupResponse = NResponseType::Error;
+
+    Evas_Object *m_win = nullptr;
+    Evas_Object *m_popup = nullptr;
+    Evas_Object *m_layout = nullptr;
+    Evas_Object *m_layoutInner = nullptr;
+    Evas_Object *m_content = nullptr;
+    Evas_Object *m_checkbox = nullptr;
+    Evas_Object *m_allowButton = nullptr;
+    Evas_Object *m_denyButton = nullptr;
+
+    bool m_running = false;
+    bool m_initialized = false;
+    bool m_shouldRaise = false;
+    bool m_hwKeyClicked = false;
+
+    std::string m_errorMsg;
+};
+
+} /* namespace Notification */
+
+} /* namespace AskUser */
diff --git a/src/agent/notification-daemon/Logic.cpp b/src/agent/notification-daemon/Logic.cpp
deleted file mode 100644 (file)
index e55730e..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/Service.cpp
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Declaration of Popupper class
- */
-
-#include "Logic.h"
-
-#include <algorithm>
-#include <signal.h>
-#include <string>
-#include <sys/signalfd.h>
-#include <vconf.h>
-#include <Elementary.h>
-
-#include <exception/Exception.h>
-#include <exception/ErrnoException.h>
-#include "ServerCallbacks.h"
-
-namespace AskUser {
-
-namespace Notification {
-
-void Logic::addChannelFd(int fd, Ecore_Fd_Handler_Flags flags) {
-    auto it = m_fdInfo.find(fd);
-    if (it != m_fdInfo.end()) {
-        m_fdInfo[fd].status = FdChange::CHANGE;
-        ecore_main_fd_handler_del(m_fdInfo[fd].handler);
-    }
-
-    auto handler = ecore_main_fd_handler_add(fd, flags, &Logic::clientChHandler, this, nullptr, nullptr);
-    if (handler == nullptr) {
-        ALOGE("Couldn't set fd handler");
-        return;
-    }
-    m_fdInfo[fd].handler = handler;
-    m_fdInfo[fd].status = FdChange::NONE;
-}
-
-void Logic::removeChannelFd(int fd) {
-    auto it = m_fdInfo.find(fd);
-    if (it == m_fdInfo.end()) {
-        return;
-    }
-    it->second.status = FdChange::DEL;
-    ecore_main_fd_handler_del(it->second.handler);
-}
-
-Eina_Bool Logic::clientChHandler(void *data, Ecore_Fd_Handler *handler) {
-    Logic *service = static_cast<Logic *>(data);
-    int fd = ecore_main_fd_handler_fd_get(handler);
-    if (fd == -1) {
-        ALOGE("Failed to fetch fd from handler");
-        return ECORE_CALLBACK_CANCEL;
-    }
-    int mask = 0;
-    if (ecore_main_fd_handler_active_get(handler, ECORE_FD_READ)) {
-        mask = AskUser::Protocol::READ;
-    } else if (ecore_main_fd_handler_active_get(handler, ECORE_FD_WRITE)) {
-        mask = AskUser::Protocol::WRITE;
-    }
-    return service->processChannel(fd, mask);
-}
-
-Eina_Bool Logic::processChannel(int fd, int mask) {
-    m_fdInfo[fd].status = FdChange::NONE;
-    updateChannel(fd, mask);
-
-    switch (m_fdInfo[fd].status) {
-    case FdChange::NONE:
-        return ECORE_CALLBACK_RENEW;
-    case FdChange::DEL: {
-        // Remove all pending events from this fd
-        auto queueIt = std::remove_if(m_pendingEvents.begin(), m_pendingEvents.end(), [fd](const FdEvent &fdEvent) {return fdEvent.fd == fd;});
-        m_pendingEvents.erase(queueIt, m_pendingEvents.end());
-
-        // Handle next event if removed active fd
-        if (fd == m_currentFd) {
-            finishCurrentEvent();
-            processEvents();
-        }
-        m_fdInfo.erase(fd);
-        return ECORE_CALLBACK_CANCEL;
-    }
-    case FdChange::CHANGE:
-        return ECORE_CALLBACK_CANCEL;
-    default:
-        ALOGE("Unexpected fd change value : " << static_cast<int>(m_fdInfo[fd].status));
-        return ECORE_CALLBACK_CANCEL;
-    }
-}
-
-void Logic::addEvent(IUIEvent *event) {
-    FdEvent fdEvent{m_currentFd, std::unique_ptr<IUIEvent>(event)};
-    m_pendingEvents.emplace_back(std::move(fdEvent));
-    processEvents();
-}
-
-bool Logic::isEventProcessed() {
-    return m_currentEventId != -1;
-}
-
-void Logic::finishCurrentEvent() {
-    m_popupper.popupClose(m_currentEventId);
-    m_currentEventId = -1;
-    m_currentFd = -1;
-}
-
-void Logic::processEvents() {
-    // Active event processing
-    if (isEventProcessed())
-        return;
-
-    // No pending events
-    if (m_pendingEvents.empty())
-        return;
-
-    FdEvent fdEvent = std::move(m_pendingEvents.front());
-    m_currentFd = fdEvent.fd;
-    m_currentEventId = fdEvent.event->getId();
-    m_pendingEvents.pop_front();
-
-    fdEvent.event->process();
-}
-
-void Logic::registerSignalFd() {
-    // TODO use ecore event EXIT?
-    sigset_t mask;
-    sigemptyset(&mask);
-    sigaddset(&mask, SIGTERM);
-
-    if (pthread_sigmask(SIG_BLOCK, &mask, NULL) < 0) {
-        throw ErrnoException("Couldn't set signal mask");
-    }
-
-    int signalFd = signalfd(-1, &mask, 0);
-    if (signalFd < 0) {
-        throw ErrnoException("Couldn't create signalfd");
-    }
-    auto handler = ecore_main_fd_handler_add(signalFd, ECORE_FD_READ, &Logic::signalHandler, this, nullptr, nullptr);
-    if (handler == nullptr) {
-        throw Exception("Couldn't set fd handler");
-    }
-}
-
-void Logic::stop() {
-    if (isEventProcessed())
-        finishCurrentEvent();
-    m_popupper.stop();
-}
-
-Eina_Bool Logic::signalHandler(void *data, Ecore_Fd_Handler *) {
-    Logic *logic = static_cast<Logic*>(data);
-    logic->stop();
-    return ECORE_CALLBACK_CANCEL;
-}
-
-void Logic::prepareChannel() {
-    m_clientChannel = AskUser::Protocol::createChannel(
-            std::unique_ptr<AskUser::Protocol::IServerCallbacks>(new AskUser::Protocol::ServerCallbacks(this, &m_popupper)));
-}
-
-void Logic::updateChannel(int fd, int mask) {
-    // TODO errors?
-    m_clientChannel->process(fd, mask);
-}
-
-void Logic::init() {
-    init_agent_log();
-    m_popupper.setLocale();
-    m_popupper.initialize();
-    m_popupper.registerPopupResponseHandler([&](int popupId, NResponseType response) { popupResponse(popupId, response);});
-    m_popupper.registerToastFinishedHandler([&](int toastId) {toastFinished(toastId);});
-
-    registerSignalFd();
-
-    prepareChannel();
-}
-
-void Logic::run() {
-    // TODO ensure we won't throw inside ecore loop
-    m_popupper.start();
-    m_popupper.shutdown();
-}
-
-void Logic::popupResponse(int popupId, NResponseType response) {
-    if (popupId != m_currentEventId) {
-        ALOGD("Got different popup id than is being processed");
-        return;
-    }
-    int clientResponse;
-    // TODO translate ui response to policy result
-    switch (response) {
-    case NResponseType::Deny:
-        clientResponse = ASKUSER_DENY_ONCE;
-        break;
-    case NResponseType::DenyAlways:
-        clientResponse = ASKUSER_DENY_FOREVER;
-        break;
-    case NResponseType::Allow:
-        clientResponse = ASKUSER_ALLOW_ONCE;
-        break;
-    case NResponseType::AllowAlways:
-        clientResponse = ASKUSER_ALLOW_FOREVER;
-        break;
-    case NResponseType::None:
-        clientResponse = ASKUSER_NONE;
-        break;
-    case NResponseType::Error:
-        clientResponse = -255;
-        break;
-    default:
-        clientResponse = -255; // error
-    }
-    m_clientChannel->popupResponse(popupId, clientResponse);
-    finishCurrentEvent();
-    processEvents();
-}
-
-void Logic::toastFinished(int toastId) {
-    if (toastId != m_currentEventId) {
-        ALOGD("Got different toast id than is being processed");
-        return;
-    }
-    finishCurrentEvent();
-    processEvents();
-}
-
-} // namespace Notification
-
-} // namepsace AskUser
diff --git a/src/agent/notification-daemon/Logic.h b/src/agent/notification-daemon/Logic.h
deleted file mode 100644 (file)
index 95fe8bc..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/Service.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Declaration of Popupper class
- */
-
-#pragma once
-
-#include <map>
-#include <deque>
-#include <askuser-notification/ask-user-service.h>
-#include <event/Event.h>
-
-namespace AskUser {
-
-namespace Notification {
-
-class Logic {
-public:
-    class Exception : public std::exception {
-    public:
-        Exception(std::string &&s) : m_msg(std::move(s)) {}
-        const char *what() const throw () {
-            return m_msg.c_str();
-        }
-    private:
-        std::string m_msg;
-    };
-    Logic() : m_currentFd(-1), m_currentEventId(-1), m_isFdDeleted(false) {}
-    void init();
-    void run();
-    void stop();
-
-    void addChannelFd(int fd, Ecore_Fd_Handler_Flags flags);
-    void removeChannelFd(int fd);
-
-    void addEvent(IUIEvent *event);
-
-    ~Logic() {}
-private:
-    //Initialization
-    void registerSignalFd();
-    void prepareChannel();
-    void updateChannel(int fd, int mask);
-
-    // Descriptor handlers
-    static Eina_Bool clientChHandler(void *data, Ecore_Fd_Handler *handler);
-    static Eina_Bool signalHandler(void *data, Ecore_Fd_Handler *handler);
-    //static Eina_Bool signalHandler(void *data, int type, void *event);
-
-    Eina_Bool processChannel(int fd, int mask);
-    void processEvents();
-    bool isEventProcessed();
-    void finishCurrentEvent();
-    void popupResponse(int popupId, NResponseType response);
-    void toastFinished(int toastId);
-
-    AskUser::Protocol::ChannelPtr m_clientChannel;
-    Popupper m_popupper;
-
-    struct FdEvent {
-        int fd;
-        std::unique_ptr<IUIEvent> event;
-    };
-
-    // Workaround for no information about to which fd event belongs to
-    int m_currentFd;
-    int m_currentEventId;
-    int m_isFdDeleted;
-    std::deque<FdEvent> m_pendingEvents;
-
-    enum class FdChange {
-        NONE,
-        ADD,
-        CHANGE,
-        DEL
-    };
-    struct FdInfo {
-        Ecore_Fd_Handler* handler;
-        FdChange status;
-    };
-
-    std::map<int, FdInfo> m_fdInfo;
-};
-
-} // namespace Notification
-
-} // namespace AskUser
diff --git a/src/agent/notification-daemon/ServerCallbacks.cpp b/src/agent/notification-daemon/ServerCallbacks.cpp
deleted file mode 100644 (file)
index 97ac799..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/ServerCallbacks.cpp
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Implementation ServerCallbacks classes
- */
-#include <unistd.h>
-
-#include "ServerCallbacks.h"
-#include "event/Event.h"
-
-namespace {
-Ecore_Fd_Handler_Flags maskToFlags(int mask) {
-    int flags = ECORE_FD_ERROR;
-    if (mask & AskUser::Protocol::READ)
-        flags |= static_cast<int>(ECORE_FD_READ);
-    if (mask & AskUser::Protocol::WRITE)
-        flags |= static_cast<int>(ECORE_FD_WRITE);
-    return static_cast<Ecore_Fd_Handler_Flags>(flags);
-}
-}
-
-namespace AskUser {
-namespace Protocol {
-
-void ServerCallbacks::updateFd(int fd, int mask) {
-    if (mask == 0)
-        m_service->removeChannelFd(fd);
-    else
-        m_service->addChannelFd(fd, maskToFlags(mask));
-}
-
-void ServerCallbacks::popup_launch(int requestId, const std::string &pkgName,
-                                   const std::string &appName, uid_t,
-                                   const AskUser::Protocol::PrivilegeVector &privileges)
-{
-    m_service->addEvent(new AskUser::Notification::EventPopupLaunch(m_popupper, requestId, appName, pkgName, privileges));
-}
-void ServerCallbacks::toast_deny(const std::string &pkgName, const std::string &appName,
-                                  uid_t, const AskUser::Protocol::Privilege &privilege)
-{
-    m_service->addEvent(new AskUser::Notification::EventToastDeny(m_popupper, 0, appName, pkgName, privilege));
-}
-void ServerCallbacks::toast_fail_launch(const std::string &pkgName, const std::string &appName,
-                                         uid_t)
-{
-    m_service->addEvent(new AskUser::Notification::EventToastFail(m_popupper, 0, appName, pkgName));
-}
-
-} /* namespace Notification */
-} /* namespace Askuser */
diff --git a/src/agent/notification-daemon/ServerCallbacks.h b/src/agent/notification-daemon/ServerCallbacks.h
deleted file mode 100644 (file)
index f8ca6fb..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/ServerCallbacks.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Declaration of ServerCallbacks classes
- */
-#pragma once
-
-#include <memory>
-
-#include <askuser-notification/ask-user-service.h>
-
-#include "Logic.h"
-#include "ui/Popupper.h"
-
-namespace AskUser {
-namespace Protocol {
-
-class ServerCallbacks : public IServerCallbacks {
-public:
-    ServerCallbacks(AskUser::Notification::Logic *logic, AskUser::Notification::Popupper *popupper)
-        : m_service(logic), m_popupper(popupper)
-    {}
-    virtual void updateFd(int fd, int mask);
-    virtual void popup_launch(int requestId, const std::string &pkgName,
-                              const std::string &appName, uid_t uid,
-                              const AskUser::Protocol::PrivilegeVector &privileges);
-    virtual void toast_deny(const std::string &pkgName, const std::string &appName,
-                            uid_t uid, const AskUser::Protocol::Privilege &privilege);
-    virtual void toast_fail_launch(const std::string &pkgName, const std::string &appName,
-                                   uid_t uid);
-    virtual ~ServerCallbacks() {}
-private:
-    AskUser::Notification::Logic *m_service;
-    AskUser::Notification::Popupper *m_popupper;
-};
-
-} /* namespace Notification */
-} /* namespace Askuser */
-
diff --git a/src/agent/notification-daemon/event/Event.h b/src/agent/notification-daemon/event/Event.h
deleted file mode 100644 (file)
index 0aac5ec..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/event/Event.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Declaration of main loop Event classes
- */
-
-#pragma once
-
-#include <string>
-#include <vector>
-
-#include <ui/Popupper.h>
-
-namespace AskUser {
-namespace Notification {
-
-class IUIEvent {
-public:
-    IUIEvent(Popupper *popupper) : m_popupper(popupper), m_eventId(-1) {}
-    virtual void process() = 0;
-    void setId(int id) { m_eventId = id; }
-    int getId() { return m_eventId; }
-    virtual ~IUIEvent() {}
-protected:
-    Popupper *m_popupper;
-    int m_eventId;
-};
-
-class EventPopupCheck : public IUIEvent {
-public:
-    EventPopupCheck(Popupper *popupper, int popupId, const std::string &appName,
-               const std::string &pkgName, const std::string &privilege)
-        : IUIEvent(popupper), m_popupId(popupId), m_appName(appName),
-          m_pkgName(pkgName), m_privilege(privilege)
-    {
-        setId(popupId);
-    }
-
-    virtual void process() {
-        m_popupper->popupCheck(m_popupId, m_appName, m_pkgName, m_privilege);
-    }
-private:
-    int m_popupId;
-    std::string m_appName;
-    std::string m_pkgName;
-    std::string m_privilege;
-};
-
-class EventPopupLaunch : public IUIEvent {
-public:
-    EventPopupLaunch(Popupper *popupper, int popupId, const std::string &appName,
-                     const std::string &pkgName, const std::vector<std::string> &privileges)
-        : IUIEvent(popupper), m_popupId(popupId), m_appName(appName),
-          m_pkgName(pkgName), m_privileges(privileges)
-    {
-        setId(popupId);
-    }
-
-    virtual void process() {
-        m_popupper->popupLaunch(m_popupId, m_appName, m_pkgName, m_privileges);
-    }
-private:
-    int m_popupId;
-    std::string m_appName;
-    std::string m_pkgName;
-    std::vector<std::string> m_privileges;
-};
-
-class EventToastDeny : public IUIEvent {
-public:
-    EventToastDeny(Popupper *popupper, int toastId, const std::string &appName,
-               const std::string &pkgName, const std::string &privilege)
-        : IUIEvent(popupper), m_toastId(toastId), m_appName(appName),
-          m_pkgName(pkgName), m_privilege(privilege)
-    {
-        setId(toastId);
-    }
-
-    virtual void process() {
-        m_popupper->toastDeny(m_toastId, m_appName, m_pkgName, m_privilege);
-    }
-private:
-    int m_toastId;
-    std::string m_appName;
-    std::string m_pkgName;
-    std::string m_privilege;
-};
-
-class EventToastFail : public IUIEvent {
-public:
-    EventToastFail(Popupper *popupper, int toastId, const std::string &appName,
-               const std::string &pkgName)
-        : IUIEvent(popupper), m_toastId(toastId), m_appName(appName),
-          m_pkgName(pkgName)
-    {
-        setId(toastId);
-    }
-
-    virtual void process() {
-        m_popupper->toastFail(m_toastId, m_appName, m_pkgName);
-    }
-private:
-    int m_toastId;
-    std::string m_appName;
-    std::string m_pkgName;
-};
-
-} //namespace AskUser
-} //namespace Notification
-
-
index 948dfb8fdc59ad00c678a1cf5209d14731b19f18..d178768e165d5f7f8c7f79fa6c1ffb73bd4c1760 100644 (file)
  * @brief       Main askuser notification daemon file
  */
 
+#include <clocale>
+#include <csignal>
+#include <cstdlib>
+#include <string>
+#include <thread>
+#include <unistd.h>
+#include <vconf.h>
+
 #ifdef BUILD_WITH_SYSTEMD_DAEMON
 #include <systemd/sd-daemon.h>
 #endif
 
-#include <exception>
 #include <exception/Exception.h>
 #include <log/alog.h>
 
-#include "Logic.h"
+#include "GuiRunner.h"
+#include "AskUserTalker.h"
 
 int main()
 {
     using namespace AskUser::Notification;
+    init_agent_log();
+    char *lang = vconf_get_str(VCONFKEY_LANGSET);
+    if (lang)
+    {
+        elm_language_set(lang);
+        free(lang);
+    }
+    else
+        ALOGE("language_set failed.");
+
     try {
-        Logic logic;
-        logic.init();
+        AskUserTalker askUserTalker;
+        askUserTalker.init();
 
 #ifdef BUILD_WITH_SYSTEMD_DAEMON
         int ret = sd_notify(0, "READY=1");
@@ -45,7 +63,7 @@ int main()
         }
 #endif
 
-        logic.run();
+        askUserTalker.run();
     } catch (std::exception &e) {
         ALOGE("Askuser-notification stopped because of: <" << e.what() << ">.");
     } catch (...) {
index e99ed32dd2a85ddbec59f4e3b5e4d260969efe87..2621a1a34ecf52074f24a002f782743d2b5c9789 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2015-2017 Samsung Electronics Co., Ltd All Rights Reserved
+# Copyright (c) 2015-2016 Samsung Electronics Co., Ltd All Rights Reserved
 #
 #    Licensed under the Apache License, Version 2.0 (the "License");
 #    you may not use this file except in compliance with the License.
@@ -86,7 +86,7 @@ FOREACH(pofile ${POFILES})
         DEPENDS ${absPofile}
     )
     INSTALL(FILES ${moFile}
-        DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${TARGET_ASKUSER_NOTIFICATION}.mo)
+        DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
     SET(moFiles ${moFiles} ${moFile})
 ENDFOREACH(pofile)
 
index c8d348f1479ef9ede0488faaf82dfc852a39ce62..53798aaece4b33f8e41e79b4d2d5fb7343843c8e 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "عدم Ř§Ů„ؼظهاع Ů…؏دداً"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "غير Ů…ŘłŮ…ŮˆŘ­ Ů„Ů€ %1$s Ř¨Ř§ŘłŘŞŘŽŘŻŘ§Ů… %2$s. Ř­ŘŻŘŻ ŘśŘ¨Řˇ Ř§Ů„ŘŽŘľŮˆŘľŮŠŘŠ ŮŮŠ Ř§Ů„ŘśŘ¨Řˇ > Ř§Ů„ŘŽŘľŮˆŘľŮŠŘŠ ŮˆŘ§Ů„حماي؊."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "طلب Ř§Ů„ŘŽŘľŮˆŘľŮŠŘŠ"
 
@@ -16,9 +13,3 @@ msgstr "السماح"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "عف؜"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "ثمة ŘˇŮ„ب Ů…ن %s Ů„Ů„Ř­ŘľŮˆŮ„ ŘšŮ„ى ŘĽŘ°Ů† Ů„Ů„ŮˆŘľŮˆŮ„ ŘĽŮ„ى Ř§Ů„ؚناؾع Ř§Ů„تالي؊:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "اسمح Ř¨ŮƒŮ„ Ř§Ů„ŘŁŘ°ŮˆŮ†Ř§ŘŞ Ř°Ř§ŘŞ Ř§Ů„ŘľŮ„ŘŠ Ů„است؎دام Ř§Ů„تءبيق."
-
index 50ab98db401306ecfef071a4118a0affb3e9a678..36423ef6e4ea28d08682149384f34bd4f4a33a79 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Bir daha gĂśstərmə"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s-yə %2$s-dən istifadə icazəsi verilməmişdir. Parametrlər > Məxfilik və təhlĂźkəsilikdən Məxfilik parametrlərini seçin."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Məxfilik sorğusu"
 
@@ -16,9 +13,3 @@ msgstr "İcazə ver"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Rədd et"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s aşağıdakÄą elementlərə Ă§Äąxış icazəsi istəyir:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Proqramdan istifadə etmək ĂźĂ§Ăźn bĂźtĂźn mĂźvafiq icazələri verin."
-
index 1ecac00eda4273e27317f0e5178eb1640257ae93..48d82e8286d6ad80f665b5696f1ee060a4d2806c 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Да Đ˝Đľ ŃĐľ ĐżĐžĐşĐ°ĐˇĐ˛Đ° ĐżĐžĐ˛ĐľŃ‡Đľ"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s Đ˝ŃĐźĐ° ĐżŃ€Đ°Đ˛Đž Đ´Đ° Đ¸ĐˇĐżĐžĐťĐˇĐ˛Đ° %2$s. Đ˜ĐˇĐąĐľŃ€ĐľŃ‚Đľ â€žĐĐ°ŃŃ‚рОКки ĐˇĐ° ĐżĐžĐ˛ĐľŃ€Đ¸Ń‚ĐľĐťĐ˝ĐžŃŃ‚â€œ Đ˛ ĐĐ°ŃŃ‚рОКки > ĐŸĐžĐ˛ĐľŃ€Đ¸Ń‚оНнОст Đ¸ ĐˇĐ°Ń‰Đ¸Ń‚а."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Заявка ĐˇĐ° ĐżĐžĐ˛ĐľŃ€Đ¸Ń‚оНна Đ¸Đ˝Ń„ĐžŃ€ĐźĐ°Ń†Đ¸Ń"
 
@@ -16,9 +13,3 @@ msgstr "Позволяв."
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Отказ"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s Đ¸ŃĐşĐ° Ń€Đ°ĐˇŃ€ĐľŃˆĐľĐ˝Đ¸Đľ ĐˇĐ° Đ´ĐžŃŃ‚ŃŠĐż Đ´Đž ŃĐťĐľĐ´Đ˝Đ¸Ń‚Đľ ĐľĐťĐľĐźĐľĐ˝Ń‚и:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "За Đ´Đ° Đ¸ĐˇĐżĐžĐťĐˇĐ˛Đ°Ń‚Đľ ĐżŃ€Đ¸ĐťĐžĐśĐľĐ˝Đ¸ĐľŃ‚Đž, ĐżĐžĐˇĐ˛ĐžĐťĐľŃ‚Đľ Đ˛ŃĐ¸Ń‡ĐşĐ¸ ŃĐ˛ŃŠŃ€ĐˇĐ°Đ˝Đ¸ Ń€Đ°ĐˇŃ€ĐľŃˆĐľĐ˝Đ¸Ń."
-
index dcff3ceddba5327e39b06a1aa02d88bfc62b24ee..93bf53bd98bdf895c36fa8b4b03f51e9d25b7e0e 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "No tornar a mostrar"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s no tĂŠ permĂ­s per utilitzar %2$s. Seleccioni Ajustaments de privadesa a Ajustaments > Privadesa i seguretat."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Sol¡licitud de privadesa"
 
@@ -16,9 +13,3 @@ msgstr "Permetre"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Denegar"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s estĂ  demanant permĂ­s per accedir als elements segĂźents:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Per utilitzar l'aplicaciĂł, concedeixi tots els permisos corresponents."
-
index 472184a5b2c91ba5b7b639910ec5152290fc217b..603391f678874dd17d0d90927259b42b9d69a46e 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Znovu nezobrazovat"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s nesmĂ­ pouŞívat %2$s. Vyberte NastavenĂ­ soukromĂ­ v NastavenĂ­ > Ochrana osobnĂ­ch ĂşdajĹŻ a zabezpečenĂ­."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "PoĹžadavek na ochranu osobnĂ­ch ĂşdajĹŻ"
 
@@ -16,9 +13,3 @@ msgstr "Povolit"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "OdmĂ­tnout"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s vyĹžaduje přístup k nĂĄsledujĂ­cĂ­m poloĹžkĂĄm:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Chcete-li pouŞít aplikaci, povolte vĹĄechna přísluĹĄnĂĄ oprĂĄvněnĂ­."
-
index efdcc0f7152c179cc93a6b342faa6c5d1ee9366f..ad2077a433de1d7481f0bd569a5816f973992bf8 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Vis ikke igen"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s mĂĽ ikke bruge %2$s. VĂŚlg Fortrolighedsindstillinger under Indstillinger > Fortrolighed og sikkerhed."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Fortrolighedsanmodning"
 
@@ -16,9 +13,3 @@ msgstr "Tillad"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Afvis"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s anmoder om tilladelse til at fĂĽ adgang til følgende elementer:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Hvis du vil bruge appen, skal du aktivere alle relevante tilladelser."
-
index 54ee639d52dbb9e5e5a5713367a8d5ed10684f36..04f4b2023c99f9be28e685cf35d97997c8c39c49 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Nicht erneut anzeigen"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s darf %2$s nicht nutzen. Wählen Sie unter â€žEinstellungen > Gerätesicherheit“ die Option â€žDatenschutz“ aus."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Datenschutzanfrage"
 
@@ -16,9 +13,3 @@ msgstr "Zulassen"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Ablehnen"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s benĂśtigt eine Berechtigung, um auf die folgenden Elemente zuzugreifen:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Erteilen Sie alle relevanten Genehmigungen, um die App zu verwenden."
-
index 9244ff441d82f1a98842f32e6120a98bc7ff7e58..bec769fd37329a65fd32e2c84bc5a5179200e98e 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Να ÎźÎˇÎ˝ ÎľÎźĎ†ÎąÎ˝ÎšĎƒĎ„ξί ÎžÎąÎ˝ÎŹ"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "Η ÎľĎ†ÎąĎÎźÎżÎłÎŽ %1$s Î´ÎľÎ˝ ÎľĎ€ÎšĎ„ρέπξτιΚ Î˝Îą Ď‡ĎÎˇĎƒÎšÎźÎżĎ€ÎżÎšÎŽĎƒÎľÎš Ď„Ρ ÎťÎľÎšĎ„ουργίι %2$s. ÎœÎľĎ„ιβξίτξ ĎƒĎ„Κς ÎĄĎ…Î¸ÎźÎŻĎƒÎľÎšĎ‚ > Î‘Ď€ĎŒĎĎÎˇĎ„Îż ÎşÎąÎš ÎąĎƒĎ†ÎŹÎťÎľÎšÎą ÎşÎąÎš ÎľĎ€ÎšÎťÎ­ÎžĎ„Îľ ÂŤÎĄĎ…Î¸ÎźÎŻĎƒÎľÎšĎ‚ ÎąĎ€ĎŒĎĎÎˇĎ„ου."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Αίτηση ÎąĎ€ÎżĎĎÎŽĎ„ου"
 
@@ -16,9 +13,3 @@ msgstr "Να ÎľĎ€ÎšĎ„ρέπ."
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Απόρριψη"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "Η ÎľĎ†ÎąĎÎźÎżÎłÎŽ %s ÎśÎˇĎ„ΏξΚ Ď€ĎĎŒĎƒÎ˛ÎąĎƒÎˇ ĎƒĎ„Îą Ď€ÎąĎÎąÎşÎŹĎ„ω ĎƒĎ„οΚχξίι:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Για Î˝Îą Ď‡ĎÎˇĎƒÎšÎźÎżĎ€ÎżÎšÎŽĎƒÎľĎ„Îľ Ď„Ρν ÎľĎ†ÎąĎÎźÎżÎłÎŽ, Ď€ÎąĎÎąĎ‡Ď‰ĎÎŽĎƒĎ„Îľ ĎŒÎťÎą Ď„Îą ĎƒĎ‡ÎľĎ„ΚκΏ Î´ÎšÎşÎąÎšĎŽÎźÎąĎ„Îą."
-
index c757995093cd0b4422bae7e3a4d9040bf49e010c..d2bc0055bf2a470577eba2cced9ec3138ead70e9 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Don't show again"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s not allowed to use %2$s. Select Privacy settings in Settings > Privacy and security."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Privacy request"
 
@@ -16,9 +13,3 @@ msgstr "Allow"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Deny"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s is requesting permission to access the following items:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "To use app, allow all relevant permissions."
-
index c757995093cd0b4422bae7e3a4d9040bf49e010c..d2bc0055bf2a470577eba2cced9ec3138ead70e9 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Don't show again"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s not allowed to use %2$s. Select Privacy settings in Settings > Privacy and security."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Privacy request"
 
@@ -16,9 +13,3 @@ msgstr "Allow"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Deny"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s is requesting permission to access the following items:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "To use app, allow all relevant permissions."
-
index c757995093cd0b4422bae7e3a4d9040bf49e010c..d2bc0055bf2a470577eba2cced9ec3138ead70e9 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Don't show again"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s not allowed to use %2$s. Select Privacy settings in Settings > Privacy and security."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Privacy request"
 
@@ -16,9 +13,3 @@ msgstr "Allow"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Deny"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s is requesting permission to access the following items:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "To use app, allow all relevant permissions."
-
index 164c4bae5a1bf8eecf6743d3e6bab342ccc60cf8..b1a5103bd4581a606bd9fa5721d144a485c10aa2 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "No volver a mostrar"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s no estĂĄ autorizado para utilizar %2$s. Seleccione Ajustes de privacidad en Ajustes > Privacidad y seguridad."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Solicitud de privacidad"
 
@@ -16,9 +13,3 @@ msgstr "Permitir"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Rechazar"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s estĂĄ solicitando permiso para acceder a los siguientes elementos:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Para usar la aplicaciĂłn, conceda todos los permisos correspondientes."
-
index 7a330def9599dd2e99f877f6a573a5a690cb2e4e..348497c96bcb3d18bd2e624b2083fbe84e88b77a 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "No mostrar de nuevo"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s no tiene permiso para usar %2$s. Seleccione Ajustes de privacidad en Ajustes > Privacidad y seguridad."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Solicitud de privacidad"
 
@@ -16,9 +13,3 @@ msgstr "Permitir"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Rechazar"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s estĂĄ solicitando permiso para acceder a los siguientes elementos:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Para usar la aplicaciĂłn, otorgue todos los permisos necesarios."
-
index 20e6661a5269a3be4f6389ee27594b6d9292f8a4..b8c6c257e9f98ff6efc598a2199c322aa8f0aa46 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Ära näita enam"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "Üksusel %1$s pole lubatud rakendust %2$s kasutada. Valige privaatsuse seaded menßßs Seaded > Privaatsus ja turvalisus."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Privaatsustaotlus"
 
@@ -16,9 +13,3 @@ msgstr "Luba"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Keela"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s taotleb luba järgmistele Ăźksustele juurdepääsemiseks:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Kinnitage rakenduse kasutamiseks kĂľik vajalikud Ăľigused."
-
index 34bf445b6ce24070900042044ad3aae3d7eaa6ee..8260646fa42c2a4861fc008bc4bacf79a08d4b4a 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Ez erakutsi berriz"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s aplikazioak ez du %2$s erabiltzeko baimenik. Ezarpenak > Pribatutasuna eta segurtasuna atalean, hautatu Pribatutasun ezarpenak."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Pribatutasun eskaera"
 
@@ -16,9 +13,3 @@ msgstr "Baimendu"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Ukatu"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "Hauetan sartzeko baimena eskatzen ari zaizu %s:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Aplikazioa erabiltzeko, eman beharrezko baimenak."
-
index ce0ea09ed6bf4187eb1a1228c7a0e158066b0d97..1d32c3a3f1d5f673fe40e95efd48c8892c21312c 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Älä näytä uudelleen"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s ei salli resurssien %2$s käyttÜä. Valitse Asetukset > Yksityisyys ja tietoturva ja sitten Tietosuoja-asetukset."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "TietosuojapyyntĂś"
 
@@ -16,9 +13,3 @@ msgstr "Salli"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Estä"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s pyytää lupaa seuraavien kohteiden käyttÜÜn:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Jos haluat käyttää sovellusta, myĂśnnä kaikki tarvittavat käyttĂśoikeudet."
-
index a97e6e96cf873d268d51b3a13faf7039e325ceaf..6c5903cc6749899f10703fc33b5fcac904068add 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Ne plus afficher"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "L'application %1$s n'est pas autorisĂŠe Ă  utiliser %2$s. SĂŠlectionnez Paramètres de confidentialitĂŠ dans Paramètres > ConfidentialitĂŠ et sĂŠcuritĂŠ."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Demande de confidentialitĂŠ"
 
@@ -16,9 +13,3 @@ msgstr "Autoriser"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Refuser"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s demande l'autorisation d'accĂŠder aux ĂŠlĂŠments suivants :"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Pour utiliser l'application, accordez toutes les autorisations appropriĂŠes."
-
index a97e6e96cf873d268d51b3a13faf7039e325ceaf..6c5903cc6749899f10703fc33b5fcac904068add 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Ne plus afficher"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "L'application %1$s n'est pas autorisĂŠe Ă  utiliser %2$s. SĂŠlectionnez Paramètres de confidentialitĂŠ dans Paramètres > ConfidentialitĂŠ et sĂŠcuritĂŠ."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Demande de confidentialitĂŠ"
 
@@ -16,9 +13,3 @@ msgstr "Autoriser"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Refuser"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s demande l'autorisation d'accĂŠder aux ĂŠlĂŠments suivants :"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Pour utiliser l'application, accordez toutes les autorisations appropriĂŠes."
-
index 06c91dbf950b3072707985653ea6884ee0780142..5c0733d268ba19404a4df9f60d0b93dd74dee72c 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "NĂĄ taispeĂĄin arĂ­s"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "NĂ­ cheadaĂ­tear do %1$s %2$s a ĂşsĂĄid. Roghnaigh Socruithe prĂ­obhĂĄide i Socruithe > PrĂ­obhĂĄid agus slĂĄndĂĄil."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Iarratas prĂ­obhĂĄide"
 
@@ -16,9 +13,3 @@ msgstr "Ceadaigh"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "DiĂşltaigh"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "TĂĄ %s ag iarraidh ceada leis na mĂ­reanna seo a leanas a rochtain:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Leis an bhfeidhmchlĂĄr a ĂşsĂĄid, ceadaigh na ceadanna ĂĄbhartha uile."
-
index 501ce8a6ddf635300f7ff8d6d086bf2f992ca34e..e8fce3312b60d8d614856d2741c05c913efdb827 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Non mostrar de novo"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s non pode utilizar %2$s. Selecciona Axustes de privacidade en Axustes > Privacidade e seguridade."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Solicitude de privacidade"
 
@@ -16,9 +13,3 @@ msgstr "Permitir"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Denegar"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s estĂĄ solicitando permiso para acceder aos seguintes elementos:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Para usar a aplicaciĂłn, concede todos os permisos correspondentes."
-
index c8b850b8c808049d1d1affdc0ffb08a1a90b1a85..4f0c3dfafd427e53e00801f3bde6abc8395c7645 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "ऍिर ŕ¤¸ŕĽ‡ ŕ¤¨ ŕ¤Śŕ¤żŕ¤–ाएँ"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s ŕ¤•་ %2$s ŕ¤•ञ ŕ¤‰ŕ¤Şŕ¤ŻŕĽ‹ŕ¤— ŕ¤•रन༇ ŕ¤•ༀ ŕ¤…न༁ऎति ŕ¤¨ŕ¤šŕĽ€ŕ¤‚ ŕ¤šŕĽˆŕĽ¤ ŕ¤¸ŕĽ‡ŕ¤Ÿŕ¤żŕ¤‚ŕ¤—ŕĽŕ¤¸ > ŕ¤—་पनༀयतञ ŕ¤”र ŕ¤¸ŕĽŕ¤°ŕ¤•्षा ŕ¤ŽŕĽ‡ŕ¤‚ ŕ¤—་पनༀयतञ ŕ¤¸ŕĽ‡ŕ¤Ÿŕ¤żŕ¤‚ŕ¤—ŕĽŕ¤¸ ŕ¤šŕĽŕ¤¨ŕĽ‡ŕ¤‚༤"
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "गोपनीयता ŕ¤…न༁र་ध"
 
@@ -16,9 +13,3 @@ msgstr "अनुमति ŕ¤ŚŕĽ‡ŕ¤‚"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "अस्वीकारें"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s ŕ¤¨ŕ¤żŕ¤ŽŕĽŕ¤¨ ŕ¤Žŕ¤ŚŕĽ‡ŕ¤‚ ŕ¤ŕ¤•ŕĽŕ¤¸ŕĽ‡ŕ¤¸ ŕ¤•रन༇ ŕ¤•ༀ ŕ¤…न༁ऎति ŕ¤•ञ ŕ¤…न༁र་ध ŕ¤•र ŕ¤°ŕ¤šŕ¤ž ŕ¤šŕĽˆ:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "एप ŕ¤•ञ ŕ¤‰ŕ¤Şŕ¤ŻŕĽ‹ŕ¤— ŕ¤•रन༇ ŕ¤•༇ ŕ¤˛ŕ¤żŕ¤, ŕ¤¸ŕ¤­ŕĽ€ ŕ¤¸ŕ¤‚एंधित ŕ¤…न༁ऎतिय་ं ŕ¤•ༀ ŕ¤…न༁ऎति ŕ¤ŚŕĽ‡ŕ¤‚༤"
-
index 7879a97247c45d7cbf82da8acaa06d6aa2f9d7d6..47ecfde554c5681234d803542bb6a3bc0b580270 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Ne prikazuj viĹĄe"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "Aplikaciji %1$s nije dopuĹĄtena uporaba %2$s. Odaberite Postavke privatnosti u izborniku Postavke > Privatnost i sigurnost."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Zahtjev za pristup privatnim podacima"
 
@@ -16,9 +13,3 @@ msgstr "Dopusti"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Odbij"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s traĹži dopuĹĄtenje za pristup sljedećim stavkama:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Da biste upotrebljavali aplikaciju, odobrite sva odgovarajuća dopuĹĄtenja."
-
index 45b2d665f76119b912905a087045086dbc5b08c4..e8c43a63d7907c9ce2f9cce33b05eed28962fcc1 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Ne jelenjen meg Ăşjra"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "A(z) %1$s nem rendelkezik engedĂŠllyel a(z) %2$s hasznĂĄlatĂĄhoz. LĂŠpjen be a BeĂĄllĂ­tĂĄsok > AdatvĂŠdelem ĂŠs biztonsĂĄg menĂźpontba, ĂŠs vĂĄlassza az AdatvĂŠdelmi beĂĄllĂ­tĂĄsok lehetősĂŠget."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "AdatvĂŠdelmi kĂŠrĂŠs"
 
@@ -16,9 +13,3 @@ msgstr "Enged"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Tilt"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "A(z) %s hozzĂĄ szeretne fĂŠrni a kĂśvetkező elemekhez:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Az alkalmazĂĄs hasznĂĄlatĂĄhoz adja meg az Ăśsszes megfelelő engedĂŠlyt."
-
index ad7f2a101b9bcd75fe217784e11114835b4b3eea..12406d3b70153c686446e40a14380c14129f44a9 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Այլևս ÖŐ¸Ö‚վց ŐšŐżŐĄŐŹ"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s-ŐŤŐś ŐšŐŤ ŐŠŐ¸Ö‚ŐľŐŹŐĄŐżÖ€ŐžŐ¸Ö‚Ő´ Ö…ŐŁŐżŐĄŐŁŐ¸Ö€ŐŽŐĽŐŹ %2$s: Ô¸ŐśŐżÖ€ŐĽÖ„ ÔłŐĄŐ˛ŐżŐśŐŤŐ¸Ö‚ŐŠŐľŐĄŐś Ő¤Ö€ŐžŐĄŐŽÖ„ŐśŐĽÖ€Ő ŐŁŐśŐĄŐŹŐ¸Őž Ô´Ö€ŐžŐĄŐŽÖ„ŐśŐĽÖ€ > ÔłŐĄŐ˛ŐżŐśŐŤŐ¸Ö‚ŐŠŐľŐ¸Ö‚Őś Ö‡ ŐĄŐśŐžŐżŐĄŐśŐŁŐ¸Ö‚ŐŠŐľŐ¸Ö‚Őś:"
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Գաղտնիության ŐşŐĄŐ°ŐĄŐśŐť"
 
@@ -16,9 +13,3 @@ msgstr "Թույլ ŐżŐĄŐŹ"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Մերժել"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s-Ő¨ Ő°ŐĄÖ€ÖŐśŐ¸Ö‚Ő´ Ő§ Ő°ŐĽŐżÖ‡ŐľŐĄŐŹ ŐżŐĄÖ€Ö€ŐĽÖ€Ő¨ Ő´Ő¸Ö‚ŐżÖ„ ŐŁŐ¸Ö€ŐŽŐĽŐŹŐ¸Ö‚ ŐŠŐ¸Ö‚ŐľŐŹŐżŐžŐ¸Ö‚ŐŠŐľŐ¸Ö‚ŐśŐ"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Ծրագիրն Ö…ŐŁŐżŐĄŐŁŐ¸Ö€ŐŽŐĽŐŹŐ¸Ö‚ Ő°ŐĄŐ´ŐĄÖ€ ŐżŐžŐĽÖ„ Ő˘Ő¸ŐŹŐ¸Ö€ Ő°ŐĄŐ´ŐĄŐşŐĄŐżŐĄŐ˝Ő­ŐĄŐś ŐŠŐ¸Ö‚ŐľŐŹŐżŐžŐ¸Ö‚ŐŠŐľŐ¸Ö‚ŐśŐśŐĽÖ€Ő¨:"
-
index 436c96967961d2ba4d2c1fe5961006a9a651e3e8..3ee4800bd354231b7d4e8a0d9456f4cc5b6f625d 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Ekki sĂ˝na aftur"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s hefur ekki leyfi til að nota %2$s. Veldu â€žPersĂłnuverndarstillingar“ Ă­ â€žStillingar > PersĂłnuvernd og Ăśryggi“."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "PersĂłnuverndarbeiðni"
 
@@ -16,9 +13,3 @@ msgstr "Leyfa"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Hafna"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s biður um leyfi til að fĂĄ aðgang að eftirfarandi hlutum:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Til að nota forritið skaltu gefa allar viðeigandi heimildir."
-
index fc292863a1eb123a3137c0a12504752f98785273..827fa2855b7cd99ade1ecc25018d4b6f327311ed 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Non mostrare piĂš"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "L'applicazione %1$s non Ă¨ autorizzata a utilizzare %2$s. Selezionate le impostazioni sulla privacy in Impostazioni > Privacy e protezione."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Richiesta sulla privacy"
 
@@ -16,9 +13,3 @@ msgstr "Consenti"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Nega"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s sta chiedendo l'autorizzazione per accedere a questi elementi:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Per utilizzare l'applicazione, concedete tutte le autorizzazioni pertinenti."
-
index 05e67a1b57bc6279c4e16e97fd271ddb5501dacb..ae224caa6cc8d37958a1a436555347a08b262801 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "今後表示しない"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$sは、%2$sを使用できません。[設定] > [プライバシーとセキュリティ]で[プライバシー設定]を選択してください。"
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "プライバシーの要求"
 
@@ -16,9 +13,3 @@ msgstr "許可"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "拒否"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%sが以下のアイテムにアクセスする権限を要求しています。"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "アプリを使用するには、関連する全ての権限を許可してください。"
-
index 441545eab3b170814e91f65f920e2827f76441c2..80d9f212e9add6ea0fb903176730ce6c8ecab9b9 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "ა჌არ áƒ›áƒáƒŠáƒ•ენო"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s-ქ áƒáƒ  áƒáƒĽáƒ•áƒĄ áƒŁáƒ¤áƒšáƒ”ბა, áƒ’áƒáƒ›áƒáƒ˜áƒ§áƒ”áƒœáƒáƒĄ %2$s. áƒ’áƒáƒŽáƒĄáƒ”áƒœáƒ˜áƒ— â€žáƒžáƒáƒ áƒáƒ›áƒ”áƒ˘áƒ áƒ”áƒ‘áƒ˜â€œ > â€žáƒ™áƒáƒœáƒ¤áƒ˜áƒ“áƒ”áƒœáƒŞáƒ˜áƒáƒšáƒŁáƒ áƒáƒ‘áƒ áƒ“ა áƒŁáƒĄáƒáƒ¤áƒ áƒ—჎ოება“ áƒ“ა áƒáƒ˜áƒ áƒŠáƒ˜áƒ”თ â€žáƒžáƒ˜áƒ áƒáƒ“ი áƒžáƒáƒ áƒáƒ›áƒ”áƒ˘áƒ áƒ”áƒ‘áƒ˜â€œ."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "კონფიდენციალურობის áƒ›áƒáƒ—჎ოვნა"
 
@@ -16,9 +13,3 @@ msgstr "ნებართვა"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "უარყოფა"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s áƒ˜áƒ—áƒŽáƒáƒ•áƒĄ áƒŹáƒ•áƒ“áƒáƒ›áƒ˜áƒĄ áƒœáƒ”áƒ‘áƒáƒ áƒ—áƒ•áƒáƒĄ áƒ¨áƒ”მდეგზე:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "აპლიკაცია áƒ áƒáƒ› áƒ’ამოიყენოთ, áƒ›áƒ˜áƒ”áƒŞáƒ˜áƒ— áƒĄáƒáƒ—ანადო áƒœáƒ”ბართვები."
-
index 94d39322a835b25618e66bf94a9ba2d612500a86..6e6f4c71b86e3fff1cfbd9ebf363653fdc5bc922 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Қайта ĐşÓŠŃ€ŃĐľŃ‚ĐżĐľŃƒ"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s ŇŻŃˆŃ–Đ˝ %2$s ĐżĐ°ĐšĐ´Đ°ĐťĐ°Đ˝ŃƒŇ“а Ń€ŇąŇ›ŃĐ°Ń‚ ĐąĐľŃ€Ń–НПогон. ĐŸĐ°Ń€Đ°ĐźĐľŃ‚рНор > ŇšŇąĐżĐ¸ŃĐťŃ‹ĐťŃ‹Ň› ĐśÓ™Đ˝Đľ Ň›Đ°ŃƒŃ–псіСдік Ń‚арПағында ŇšŇąĐżĐ¸ŃĐťŃ‹ĐťŃ‹Ň› ĐżĐ°Ń€Đ°ĐźĐľŃ‚рНорін Ń‚аңдаңыС."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Құпиялылық ŃŇąŃ€Đ°ŃƒŃ‹"
 
@@ -16,9 +13,3 @@ msgstr "Рұқсат ĐľŃ‚Ńƒ"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Бас Ń‚Đ°Ń€Ń‚Ńƒ"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s ĐşĐľĐťĐľŃŃ– ŃĐťĐľĐźĐľĐ˝Ń‚торго Ň›Đ°Ń‚Ń‹Đ˝Đ°ŃŃƒ Ń€ŇąŇ›ŃĐ°Ń‚ын ŃŇąŃ€Đ°ŃƒĐ´Đ°:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Қолданбаны ĐżĐ°ĐšĐ´Đ°ĐťĐ°Đ˝Ńƒ ŇŻŃˆŃ–Đ˝, ĐąĐ°Ń€ĐťŃ‹Ň› Ń‚иісті Ń€ŇąŇ›ŃĐ°Ń‚тарды ĐąĐľŃ€Ń–ңіС."
-
index a567a7e5a1d1eabbac5b211a1d1fe69e482b6e26..7173b5adb54549c51bc9cab927e17c2d7217d0bd 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "다시 ëł´ě§€ ě•Šę¸°"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s ě•ąě€ %2$s í•­ëŞŠě„ ě‚ŹěšŠí•  ěˆ˜ ě—†ěŠľë‹ˆë‹¤. [설정 > ę°œě¸ě •ëł´ ëł´í˜¸]에서 [개인정보 ě„¤ě •]을 ě„ íƒí•˜ě„¸ěš”."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "개인정보 ěš”청"
 
@@ -16,9 +13,3 @@ msgstr "허용"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "허용 ě•ˆ í•¨"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s ě•ąě—ě„œ ë‹¤ěŒ í•­ëŞŠě— ě ‘ęˇźě„ ěš”ě˛­í•Šë‹ˆë‹¤."
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "앱을 ě‚ŹěšŠí•˜ë ¤ëŠ´ ëި든 ę´€ë ¨ ęśŒí•œě„ í—ˆěšŠí•˜ě„¸ěš”."
-
index 2780a3e1aef40d0ae8c3f69b818a8819d474d711..c6e6886fab8c26bc0eaa10776dda5ab54c548473 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Neberodyti"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s neleido naudoti %2$s. Pasirinkite privatumo nustatymus eidami ÄŻ Nustatymai > Privatumas ir sauga."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Privatumo uĹžklausa"
 
@@ -16,9 +13,3 @@ msgstr "Leisti"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Atmesti"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s praĹĄo leidimo pasiekti ĹĄiuos elementus:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Jei norite naudoti programą, suteikite visus reikiamus leidimus."
-
index 0588893d4d44881ef719eea007969791c2667dc3..aea8233a8d8934f5fb9423099f89feee78abb6fe 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Vairs nerādÄŤt"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "Programmai %1$s nav atÄźauts lietot %2$s. Izvēlnē IestatÄŤjumi izvēlieties Konfidencialitātes iestatÄŤjumi > Konfidencialitāte un droĹĄÄŤba."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Konfidencialitātes pieprasÄŤjums"
 
@@ -16,9 +13,3 @@ msgstr "AtÄźaut"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "NoraidÄŤt"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s pieprasa atÄźauju piekğōt ĹĄÄdiem objektiem:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Lai izmantotu programmu, pieťġiriet visas nepiecieĹĄamās atÄźaujas."
-
index 9e6308d411580eb630bbef269f9eb4c76acb19b4..1401f0ce42b7a2638b8dad73f7799d18259a3715 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Не ĐżŃ€Đ¸ĐşĐ°ĐśŃƒĐ˛Đ°Ń˜ ĐżĐžĐ˛Ń‚ОрнО"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s Đ˝Đľ ŃĐźĐľĐľ Đ´Đ° ĐşĐžŃ€Đ¸ŃŃ‚и %2$s. Đ˜ĐˇĐąĐľŃ€ĐľŃ‚Đľ ĐŸĐžŃŃ‚Đ°Đ˛ŃƒĐ˛Đ°ŃšĐ° ĐˇĐ° ĐżŃ€Đ¸Đ˛Đ°Ń‚нОст Đ˛Đž ĐŸĐžŃŃ‚Đ°Đ˛ŃƒĐ˛Đ°ŃšĐ° > ĐŸŃ€Đ¸Đ˛Đ°Ń‚нОст Đ¸ ĐąĐľĐˇĐąĐľĐ´Đ˝ĐžŃŃ‚."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Барање ĐˇĐ° ĐżŃ€Đ¸Đ˛Đ°Ń‚нОст"
 
@@ -16,9 +13,3 @@ msgstr "Дозволи"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Отфрли"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s ĐąĐ°Ń€Đ° Đ´ĐžĐˇĐ˛ĐžĐťĐ° Đ´Đ° ĐżŃ€Đ¸ŃŃ‚апи Đ´Đž ŃĐťĐľĐ´Đ˝Đ¸Đ˛Đľ ĐˇĐ°ĐżĐ¸ŃĐ¸:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "За Đ´Đ° Ń˜Đ° ĐşĐžŃ€Đ¸ŃŃ‚ито Đ°ĐżĐťĐ¸ĐşĐ°Ń†Đ¸Ń˜Đ°Ń‚а, ĐžĐ˛ĐžĐˇĐźĐžĐśĐľŃ‚Đľ ĐłĐ¸ ŃĐ¸Ń‚Đľ Ń€ĐľĐťĐľĐ˛Đ°Đ˝Ń‚ни Đ´ĐžĐˇĐ˛ĐžĐťĐ¸."
-
index cb4a803719921598f67dc4a2852d994387d636a9..202bf6ce007ce5832a77dad3c522f479f6b49753 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Ikke vis igjen"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s er ikke tillatt ĂĽ bruke %2$s. Velg Personverninnstillinger i Innstillinger > Personvern og sikkerhet."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Personvernforespørsel"
 
@@ -16,9 +13,3 @@ msgstr "Tillat"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "AvslĂĽ"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s ber om tillatelse til ĂĽ fĂĽ tilgang til følgende elementer:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "For ĂĽ bruke appen mĂĽ du gi alle de relevante tillatelsene."
-
index 0af69b983d7199464ad99fccc67451bb8cccff35..79c281d267a51b5d29e1dac0b64f81c765be9512 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Niet opnieuw weergeven"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s mag %2$s niet gebruiken. Selecteer Privacy-instellingen in Instellingen > Privacy en beveiliging."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Verzoek om privacy"
 
@@ -16,9 +13,3 @@ msgstr "Toestaan"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Weigeren"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s vraagt toestemming om de volgende items te openen:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Als u de app wilt gebruiken, staat u alle relevante machtigingen toe."
-
index 1808014f81568c1a72afc5859abfb883e71b3473..9cd541f0683388be552d979b5673795448566582 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Nie pokazuj ponownie"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "Aplikacja %1$s nie ma uprawnień do uĹźywania zasobĂłw %2$s. PrzejdĹş do opcji Ustawienia prywatności w menu Ustawienia > Prywatność i bezpieczeństwo."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Żądanie związane z prywatnością"
 
@@ -16,9 +13,3 @@ msgstr "ZezwĂłl"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "OdmĂłw"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "Urządzenie %s ĹźÄ…da uprawnienia dostępu następujących elementĂłw:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "W celu uĹźywania aplikacji zezwĂłl na wszystkie odpowiednie uprawnienia."
-
index 920ff5302742842d5e0f816e28a8944537dd35ab..160cac5f7cfde9348fa19415494696cb3613397f 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "NĂŁo exibir novamente"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s nĂŁo permitiu usar %2$s. Selecione Configuraçþes de privacidade em Configuraçþes > Privacidade e segurança."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Solicitação de privacidade"
 
@@ -16,9 +13,3 @@ msgstr "Permitir"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Negar"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s estĂĄ solicitando permissĂŁo para acessar os seguintes itens:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Para usar o aplicativo, conceda todas as permissĂľes relevantes."
-
index b20f665f7f2fc77f60b5c1875a3216990e6f5634..3b7cf251b3e34e6d6e3a61bc22c2b87fff9214ca 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "NĂŁo voltar a mostrar"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s nĂŁo estĂĄ autorizado a utilizar %2$s. Seleccione Definiçþes de privacidade em Definiçþes > Privacidade e segurança."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Pedido de privacidade"
 
@@ -16,9 +13,3 @@ msgstr "Permitir"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Recusar"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s estĂĄ a pedir permissĂŁo para aceder aos seguintes itens:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Para utilizar a aplicação, autorize todas as permissĂľes relevantes."
-
index cc6d8e3cf791446966432e6cd40466dfdee42cae..9776e7efa99e1694e5d126f67f6814162812414a 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Nu se mai afișează"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s nu are permisiunea să utilizeze %2$s. Selectați Setări confidențialitate din meniul Setări > Confidențialitate Č™i securitate."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Solicitare confidențialitate"
 
@@ -16,9 +13,3 @@ msgstr "Permitere"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Refuz"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s solicită permisiunea de a accesa următoarele elemente:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Pentru a utiliza aplicația, acordați toate permisiunile corespunzătoare."
-
index ed357436bc7f9d063ef49219af24c989b0625d78..f4159c0a05b4702cb57b0d98d6f20398beebe02c 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Больше Đ˝Đľ ĐżĐžĐşĐ°ĐˇŃ‹Đ˛Đ°Ń‚ŃŒ"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "Пользователю %1$s Đ˝Đľ Ń€Đ°ĐˇŃ€ĐľŃˆĐľĐ˝Đž Đ¸ŃĐżĐžĐťŃŒĐˇĐžĐ˛Đ°Ń‚ŃŒ %2$s. Đ—адаКто ĐżĐ°Ń€Đ°ĐźĐľŃ‚ры ĐşĐžĐ˝Ń„Đ¸Đ´ĐľĐ˝Ń†Đ¸Đ°ĐťŃŒĐ˝ĐžŃŃ‚Đ¸ Đ˛ ĐźĐľĐ˝ŃŽ â€œĐĐ°ŃŃ‚Ń€ĐžĐšĐşĐ¸â€ > â€œĐšĐžĐ˝Ń„Đ¸Đ´ĐľĐ˝Ń†Đ¸Đ°ĐťŃŒĐ˝ĐžŃŃ‚ŃŒ Đ¸ ĐąĐľĐˇĐžĐżĐ°ŃĐ˝ĐžŃŃ‚ŃŒâ€."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Запрос Đ˝Đ° ĐżŃ€ĐľĐ´ĐžŃŃ‚авНонио ĐşĐžĐ˝Ń„Đ¸Đ´ĐľĐ˝Ń†Đ¸Đ°ĐťŃŒĐ˝Ń‹Ń… Đ´Đ°Đ˝Đ˝Ń‹Ń…"
 
@@ -16,9 +13,3 @@ msgstr "Разрешить"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Запретить"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s ĐˇĐ°ĐżŃ€Đ°ŃˆĐ¸Đ˛Đ°ĐľŃ‚ Ń€Đ°ĐˇŃ€ĐľŃˆĐľĐ˝Đ¸Đľ Đ˝Đ° Đ´ĐžŃŃ‚ŃƒĐż Đş ŃĐťĐľĐ´ŃƒŃŽŃ‰Đ¸Đź ŃĐťĐľĐźĐľĐ˝Ń‚аП:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Для Đ¸ŃĐżĐžĐťŃŒĐˇĐžĐ˛Đ°Đ˝Đ¸Ń ĐżŃ€Đ¸ĐťĐžĐśĐľĐ˝Đ¸Ń ĐżŃ€ĐľĐ´ĐžŃŃ‚Đ°Đ˛ŃŒŃ‚Đľ Đ˛ŃĐľ Đ˝ĐľĐžĐąŃ…ОдиПыо Ń€Đ°ĐˇŃ€ĐľŃˆĐľĐ˝Đ¸Ń."
-
index 05bee16a7741d758153bc85cdceaf6931f5c78e9..d5fe3ffefb22f1eea486257dce4ade83271976ec 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "UĹž nezobrazovaĹĽ"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s nemĂĄ povolenĂŠ pouŞívaĹĽ %2$s. Vyberte poloĹžku Nastavenia sĂşkromia v menu Nastavenia > Ochrana osobnĂ˝ch Ăşdajov a zabezpečenie."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Ĺ˝iadosĹĽ o ochranu osobnĂ˝ch Ăşdajov"
 
@@ -16,9 +13,3 @@ msgstr "PovoliĹĽ"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "ZamietnuĹĽ"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s Ĺžiada o povolenie na prĂ­stup k nasledujĂşcim poloĹžkĂĄm:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Ak chcete pouŞívaĹĽ tĂşto aplikĂĄciu, udeÄžte vĹĄetky prĂ­sluĹĄnĂŠ povolenia."
-
index 418a00fed85d062cb4fab2a98bcf97c58070129d..9a15db5f4dcc6bb4fdd8e2ebbc41b1f88e13d9c2 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Ne pokaĹži znova"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s ne sme uporabljati %2$s. V meniju nastavitve > Zasebnost in varnost izberite Nastavitve zasebnosti."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Zahteva za zasebnost"
 
@@ -16,9 +13,3 @@ msgstr "Dovoli"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Zavrni"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "Aplikacija %s zahteva dovoljenje za dostop do naslednjih elementov:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Če Ĺželite uporabljati aplikacijo, omogočite vsa ustrezna dovoljenja."
-
index 92b34221867d97b7a633dd10e4a26c919e826e21..63e27b155e5c971219c411bc6dc9c80b83deba4a 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Ne prikazuj ponovo"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s ne sme da koristi %2$s. Izaberite opciju PodeĹĄavanja privatnosti u okviru PodeĹĄavanja > Privatnost i bezbednost."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Zahtev za privatnim informacijama"
 
@@ -16,9 +13,3 @@ msgstr "Dozvoli"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Odbij"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "Aplikacija %s traĹži dozvolu da pristupi sledećim stavkama:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Da biste koristili aplikaciju, dozvolite sve odgovarajuće dozvole."
-
index 2f55495f59b69b4da802807552839f9207484668..19f8bf0d33b9fcfb2af3305bfbaf6f8b7fa6a803 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Visa inte igen"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s har inte tillĂĽtelse att använda %2$s. Ă–ppna Sekretessinställningar i Inställningar > Sekretess och säkerhet."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Sekretessbegäran"
 
@@ -16,9 +13,3 @@ msgstr "TillĂĽt"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Neka"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s begär att fĂĽ komma ĂĽt dessa objekt:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "TillĂĽt alla relevanta behĂśrigheter om du vill använda programmet."
-
index 6962853b85657660e870f504e11ede114652d3b8..e27f841a1f3d27a9d18d5c977e18b44ee0752c7b 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Tekrar gĂśsterme"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s için %2$s ĂśÄŸesini kullanma izni yok. Ayarlar > Gizlilik ve gĂźvenlik bĂślĂźmĂźnde Gizlilik ayarlarÄąnÄą seçin."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Gizlilik isteği"
 
@@ -16,9 +13,3 @@ msgstr "İzin ver"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Reddet"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s, aşağıdaki ĂśÄŸelere erişim izni istiyor:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "UygulamayÄą kullanmak için ilgili izinlerin tĂźmĂźnĂź verin."
-
index b2daf0cec0b33755fa498b2c4038be4c9f4b1b32..3c80661dcc938d975862db398da2a2226543de1a 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Більше Đ˝Đľ ĐżĐžĐşĐ°ĐˇŃƒĐ˛Đ°Ń‚и"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "Користувач %1$s Đ˝Đľ ĐźĐ°Ń” Đ´ĐžĐˇĐ˛ĐžĐťŃƒ Đ˝Đ° Đ˛Đ¸ĐşĐžŃ€Đ¸ŃŃ‚ання %2$s. Đ—ĐźŃ–Đ˝Ń–Ń‚ŃŒ ĐżĐ°Ń€Đ°ĐźĐľŃ‚ри Ńƒ Ń€ĐžĐˇĐ´Ń–Ні ÂŤĐĐ°ĐťĐ°ŃˆŃ‚ŃƒĐ˛Đ°Đ˝Đ˝ŃÂť > ÂŤĐšĐžĐ˝Ń„Ń–Đ´ĐľĐ˝Ń†Ń–ĐšĐ˝Ń–ŃŃ‚ŃŒ Ń‚а ĐąĐľĐˇĐżĐľĐşĐ°Âť."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Запит Đ˝Đ° Đ˝Đ°Đ´Đ°Đ˝Đ˝Ń ĐşĐžĐ˝Ń„ідонціКних Đ´Đ°Đ˝Đ¸Ń…"
 
@@ -16,9 +13,3 @@ msgstr "Дозволити"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Заборонити"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "Програма %s ĐˇĐ°ĐżĐ¸Ń‚ŃƒŃ” Đ´ĐžĐˇĐ˛Ń–Đť Đ˝Đ° ĐžŃ‚Ń€Đ¸ĐźĐ°Đ˝Đ˝Ń Đ´ĐžŃŃ‚ŃƒĐżŃƒ Đ´Đž Đ˝Đ°ŃŃ‚ŃƒĐżĐ˝Đ¸Ń… ĐžĐąâ€™Ń”ктів:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Для Đ˛Đ¸ĐşĐžŃ€Đ¸ŃŃ‚ання ĐżŃ€ĐžĐłŃ€Đ°ĐźĐ¸ Đ˝Đ°Đ´Đ°ĐšŃ‚Đľ Đ˛ŃŃ– Đ˛Ń–дпОвідні Đ´ĐžĐˇĐ˛ĐžĐťĐ¸."
-
index eecff992ec69df81ea5732bdd7eff0282e6fef5d..b8e0d0f29747e255e1c132b73c9e4d7bf5643f5f 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "Qayta ko‘rsatilmasin"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s’ga %2$s’dan foydalanish uchun ruxsat berilmagan. Parametrlar > Maxfiylik va xavfsizlik menyusida Maxfiylik parametrlarini tanlang."
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "Maxfiylik so‘rovi"
 
@@ -16,9 +13,3 @@ msgstr "Ruxsat ber"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "Rad etish"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s quyidagi elementlarga kirish uchun ruxsat so‘ramoqda:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "Ilovadan foydalanish uchun barcha tegishli ruxsatlarga ijozat bering."
-
index 79bb1bc2e4eeb4360d95424a6b8329e7abbe2d06..1fb98b06aedceee467aa7ef721ad7f7143e97dd6 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "不再显示"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s ä¸ĺ…čŽ¸ä˝żç”¨ %2$s。请进入【设置】>【隐私和安全】并选择【隐私设置】。"
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "隐私请求"
 
@@ -16,9 +13,3 @@ msgstr "允许"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "拒绝"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s正在请求访问以下内容的许可:"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "若要使用应用程序,请允许全部相关权限。"
-
index 0c07b8761abf252a494925a2925d4a9055b33dde..a9fbc4ad31badbae3360437cc4e446a281ef8069 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "不再顯示"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "%1$s ä¸ĺ…č¨ąä˝żç”¨ %2$s。請在 [設定] > [隱私與安全] ä¸­é¸ć“‡ [隱私設定]。"
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "私隱請求"
 
@@ -16,9 +13,3 @@ msgstr "允許"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "拒絕"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s ć­Łĺœ¨čŤ‹ćą‚ĺ­˜ĺ–äťĽä¸‹é …ç›Žçš„ćŹŠé™ďźš"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "若要使用應用程式,請允許相關權限。"
-
index 11af87f9cc3db68d546b74a33b61fdcf17a66c4e..31186844b6035977a6630a9106b05821c619cde2 100755 (executable)
@@ -1,9 +1,6 @@
 msgid "IDS_ST_OPT_DONT_SHOW_AGAIN"
 msgstr "不要再顯示"
 
-msgid "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"
-msgstr "不允許 %1$s ä˝żç”¨ %2$s。請前往 [設定] > [隱私與安全性],然後選擇 [隱私設定]。"
-
 msgid "IDS_IDLE_HEADER_PRIVACY_REQUEST"
 msgstr "隱私權要求"
 
@@ -16,9 +13,3 @@ msgstr "允許"
 msgid "IDS_IDLE_BUTTON_DENY"
 msgstr "拒絕"
 
-msgid "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"
-msgstr "%s ć­Łĺœ¨čŚćą‚ĺ­˜ĺ–ä¸‹ĺˆ—é …ç›Žçš„ćŹŠé™ďźš"
-
-msgid "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"
-msgstr "若要使用應用程式,請允許相關權限。"
-
index 3773e829df1dbdaa5ef58705f9019795cad1c310..d128d222daa1d1852ae44def0a816e85d28f8c6b 100644 (file)
@@ -128,7 +128,6 @@ group { "popup_checkview_layout_mobile";
          scale: 1;
          desc { "default";
             align: 0.5 0.5;
-            fixed: 0 1;
             rel1.relative: 0.00 0.00;
             rel2.relative: 1.00 0.04;
          }
@@ -137,7 +136,6 @@ group { "popup_checkview_layout_mobile";
          scale: 1;
          desc { "default";
             align: 0.5 0.5;
-            fixed: 0 1;
             rel1.relative: 0.00 0.94;
             rel2.relative: 1.00 1.00;
          }
@@ -146,7 +144,6 @@ group { "popup_checkview_layout_mobile";
          scale: 1;
          desc { "default";
             align: 0.5 0.5;
-            fixed: 1 0;
             rel1.to_y: "spacer_t";
             rel2.to_y: "spacer_b";
             rel1.relative: 0.91 1.00;
@@ -157,7 +154,6 @@ group { "popup_checkview_layout_mobile";
          scale: 1;
          desc { "default";
             align: 0.5 0.5;
-            fixed: 1 0;
             rel1.to_y: "spacer_t";
             rel2.to_y: "spacer_b";
             rel1.relative: 0.00 1.00;
@@ -181,7 +177,6 @@ group { "popup_checkview_layout_mobile";
          desc { "default";
             visible: 1;
             align: 0.5 0.5;
-            fixed: 0 1;
             rel1.to_x: "spacer_r";
             rel1.to_y: "elm.swallow.content";
             rel2.to_x: "spacer_l";
@@ -194,87 +189,6 @@ group { "popup_checkview_layout_mobile";
          scale: 1;
          desc { "default";
             align: 0.5 0.5;
-            fixed: 1 0;
-            rel1.to_y: "spacer_t";
-            rel2.to_y: "spacer_b";
-            rel1.relative: 0.00 1.00;
-            rel2.relative: 0.05 0.00;
-         }
-      }
-      spacer { "spacer_ll";
-         scale: 1;
-         desc { "default";
-            align: 0.5 0.5;
-            fixed: 1 0;
-            rel1.to_y: "spacer_t";
-            rel2.to_y: "spacer_b";
-            rel1.relative: 0.95 1.00;
-            rel2.relative: 1.00 0.00;
-         }
-      }
-   }
-}
-
-group { "popup_layout_mobile";
-   parts {
-      spacer { "spacer_t";
-         scale: 1;
-         desc { "default";
-            align: 0.5 0.5;
-            fixed: 0 1;
-            rel1.relative: 0.00 0.00;
-            rel2.relative: 1.00 0.04;
-         }
-      }
-      spacer { "spacer_b";
-         scale: 1;
-         desc { "default";
-            align: 0.5 0.5;
-            fixed: 0 1;
-            rel1.relative: 0.00 0.94;
-            rel2.relative: 1.00 1.00;
-         }
-      }
-      spacer { "spacer_l";
-         scale: 1;
-         desc { "default";
-            align: 0.5 0.5;
-            fixed: 1 0;
-            rel1.to_y: "spacer_t";
-            rel2.to_y: "spacer_b";
-            rel1.relative: 0.91 1.00;
-            rel2.relative: 1.00 0.00;
-         }
-      }
-      spacer { "spacer_r";
-         scale: 1;
-         desc { "default";
-            align: 0.5 0.5;
-            fixed: 1 0;
-            rel1.to_y: "spacer_t";
-            rel2.to_y: "spacer_b";
-            rel1.relative: 0.00 1.00;
-            rel2.relative: 0.09 0.00;
-         }
-      }
-      swallow { "elm.swallow.content";
-         scale: 1;
-         desc { "default";
-            visible: 1;
-            align: 0.5 0.5;
-            rel1.to_x: "spacer_rr";
-            rel1.to_y: "spacer_t";
-            rel2.to_x: "spacer_ll";
-            rel2.to_y: "spacer_b";
-            rel1.relative: 1.00 1.00;
-            rel2.relative: 0.00 0.64;
-         }
-      }
-      spacer { "spacer_rr";
-         scale: 1;
-         desc { "default";
-            align: 0.5 0.5;
-            fixed: 1 0;
             rel1.to_y: "spacer_t";
             rel2.to_y: "spacer_b";
             rel1.relative: 0.00 1.00;
@@ -285,7 +199,6 @@ group { "popup_layout_mobile";
          scale: 1;
          desc { "default";
             align: 0.5 0.5;
-            fixed: 1 0;
             rel1.to_y: "spacer_t";
             rel2.to_y: "spacer_b";
             rel1.relative: 0.95 1.00;
diff --git a/src/agent/notification-daemon/ui/Answerable.h b/src/agent/notification-daemon/ui/Answerable.h
deleted file mode 100644 (file)
index f610d70..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/ui/Answerable.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Implementation Answerable button pressed events classes
- */
-#pragma once
-
-#include "PopupCheck.h"
-#include "Popup.h"
-
-#include <types/NotificationResponse.h>
-
-namespace AskUser {
-namespace Notification {
-
-class IAnswerable {
-public:
-    enum class Button {
-        ALLOW,
-        DENY
-    };
-    typedef std::function<void(int, NResponseType)> AnswerHandler;
-
-    IAnswerable(AnswerHandler handler) : m_handler(handler) {}
-    virtual void process(enum Button) const = 0;
-    virtual ~IAnswerable() {}
-protected:
-    AnswerHandler m_handler;
-};
-
-class AnswerablePopupCheck : public IAnswerable {
-public:
-    AnswerablePopupCheck(PopupCheck *popup, AnswerHandler handler)
-        : IAnswerable(handler), m_popup(popup) {}
-    virtual void process(enum Button button) const {
-        NResponseType answer;
-        switch (button) {
-        case IAnswerable::Button::ALLOW:
-            if (m_popup->getCheckboxState())
-                answer = NResponseType::AllowAlways;
-            else
-                answer = NResponseType::Allow;
-            break;
-        case IAnswerable::Button::DENY:
-            if (m_popup->getCheckboxState())
-                answer = NResponseType::DenyAlways;
-            else
-                answer = NResponseType::Deny;
-            break;
-        default:
-            answer = NResponseType::Error;
-        }
-        m_handler(m_popup->getId(), answer);
-    }
-private:
-    PopupCheck *m_popup;
-};
-
-class AnswerablePopupLaunch : public IAnswerable {
-public:
-    AnswerablePopupLaunch(Popup *popup, AnswerHandler handler)
-        : IAnswerable(handler), m_popup(popup) {}
-    virtual void process(enum Button button) const {
-        NResponseType answer;
-        switch (button) {
-        case IAnswerable::Button::ALLOW:
-            answer = NResponseType::AllowAlways;
-            break;
-        case IAnswerable::Button::DENY:
-            answer = NResponseType::DenyAlways;
-            break;
-        default:
-            answer = NResponseType::Error;
-        }
-        m_handler(m_popup->getId(), answer);
-    }
-private:
-    Popup *m_popup;
-};
-
-} // namespace AskUser
-} // namespace Notification
diff --git a/src/agent/notification-daemon/ui/Po.cpp b/src/agent/notification-daemon/ui/Po.cpp
deleted file mode 100644 (file)
index 220f3bb..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/ui/Po.cpp
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Declaration of Po message generation class
- */
-
-#include <cstdio>
-#include <cstdlib>
-#include <libintl.h>
-#include <map>
-#include <memory>
-#include <string>
-#include <unistd.h>
-#include <vconf.h>
-#include <Elementary.h>
-
-#include "Po.h"
-
-#include <exception/ErrnoException.h>
-#include <policy/PkgInfo.h>
-#include <policy/PrivilegeInfo.h>
-
-namespace AskUser {
-
-namespace {
-enum class MsgType {
-    MSG_POPUP_TITLE,
-
-    MSG_POPUP_TEXT,
-    MSG_POPUP_LAUNCH_TEXT,
-
-    MSG_POPUP_CHECKBOX,
-    MSG_POPUP_ALLOW_BTN,
-    MSG_POPUP_DENY_BTN,
-
-    MSG_TOAST_DENY_TEXT,
-    MSG_TOAST_FAIL_TEXT,
-};
-
-std::map<MsgType, const char*> MSG_PO = {
-        {MsgType::MSG_POPUP_TITLE, "IDS_IDLE_HEADER_PRIVACY_REQUEST"},
-        {MsgType::MSG_POPUP_TEXT, "IDS_IDLE_POP_ALLOW_P1SS_TO_ACCESS_YOUR_P2SS_Q"},
-        {MsgType::MSG_POPUP_LAUNCH_TEXT, "IDS_IDLE_POP_PS_IS_REQUESTING_PERMISSION_TO_ACCESS_THE_FOLLOWING_ITEMS_C"},
-        {MsgType::MSG_POPUP_CHECKBOX, "IDS_ST_OPT_DONT_SHOW_AGAIN"},
-        {MsgType::MSG_POPUP_ALLOW_BTN,"IDS_IDLE_BUTTON_ALLOW_ABB7"},
-        {MsgType::MSG_POPUP_DENY_BTN, "IDS_IDLE_BUTTON_DENY"},
-        {MsgType::MSG_TOAST_DENY_TEXT, "IDS_ST_TPOP_P1SS_NOT_ALLOWED_TO_USE_P2SS_SELECT_PRIVACY_SETTINGS_IN_SETTINGS_PRIVACY_AND_SECURITY"},
-        {MsgType::MSG_TOAST_FAIL_TEXT, "IDS_IDLE_TPOP_TO_USE_APP_ALLOW_ALL_RELEVANT_PERMISSIONS"}
-};
-
-void setLocale() {
-    char *lang = vconf_get_str(VCONFKEY_LANGSET);
-    if (lang)
-    {
-        elm_language_set(lang);
-        free(lang);
-    } else {
-        ALOGE("Couldn't fetch language from vconf failed.");
-    }
-}
-
-template <typename ...Args>
-std::string makeFromFormat(const char *format, Args... args) {
-    char *buf;
-    int ret = asprintf(&buf, format, args...);
-    if (ret == -1) {
-        throw ErrnoException("asprintf failed");
-    }
-    std::unique_ptr<char, decltype(std::free) *> bufPtr(buf, std::free);
-    return std::string(buf);
-}
-
-const char *getFormat(enum MsgType type) {
-    setLocale();
-    return dgettext(PROJECT_NAME, MSG_PO[type]);
-}
-
-std::string getPkgLabel(const std::string &pkgName) {
-    PkgInfo pkgInfo(pkgName, geteuid());
-    return pkgInfo.pkgLabel();
-}
-
-std::string getPrivacyList(const std::vector<std::string> &privs) {
-    setLocale();
-    std::string privacyList = "";
-    for (auto &priv : privs) {
-        std::string privacyName = PrivilegeInfo::getPrivacyDisplayName(priv);
-        if (privacyList.find(privacyName) == std::string::npos) {
-            privacyList.append("<br/>");
-            privacyList.append(privacyName);
-        }
-    }
-    return privacyList;
-}
-} // namespace anonymous
-
-namespace Notification {
-namespace Po {
-std::string createPopupCheckMsg(const std::string &, const std::string &pkgName, const std::string &priv) {
-    return makeFromFormat(getFormat(MsgType::MSG_POPUP_TEXT), getPkgLabel(pkgName).c_str(),
-                          PrivilegeInfo::getPrivacyDisplayName(priv).c_str());
-}
-std::string createPopupLaunchMsg(const std::string &, const std::string &pkgName, const std::vector<std::string> &privs) {
-    std::string launchTextFormat = makeFromFormat(getFormat(MsgType::MSG_POPUP_LAUNCH_TEXT), getPkgLabel(pkgName).c_str());
-    return makeFromFormat("%s%s", launchTextFormat.c_str(), getPrivacyList(privs).c_str());
-}
-
-std::string createToastDenyMsg(const std::string &, const std::string &pkgName, const std::string &priv) {
-    return makeFromFormat(getFormat(MsgType::MSG_TOAST_DENY_TEXT), getPkgLabel(pkgName).c_str(),
-                          PrivilegeInfo::getPrivacyDisplayName(priv).c_str());
-}
-std::string createToastFailMsg(const std::string &, const std::string &pkgName) {
-    return makeFromFormat(getFormat(MsgType::MSG_TOAST_FAIL_TEXT), getPkgLabel(pkgName).c_str());
-}
-
-std::string getPopupTitleMsg() {
-    return makeFromFormat("%s", getFormat(MsgType::MSG_POPUP_TITLE));
-}
-std::string getAllowButtonMsg() {
-    return makeFromFormat("%s", getFormat(MsgType::MSG_POPUP_ALLOW_BTN));
-}
-std::string getDenyButtonMsg() {
-    return makeFromFormat("%s", getFormat(MsgType::MSG_POPUP_DENY_BTN));
-}
-std::string getCheckBoxMsg() {
-    return makeFromFormat("%s", getFormat(MsgType::MSG_POPUP_CHECKBOX));
-}
-
-} //namespace Po
-} //namepace Notification
-} //namespace AskUser
diff --git a/src/agent/notification-daemon/ui/Po.h b/src/agent/notification-daemon/ui/Po.h
deleted file mode 100644 (file)
index 983cbcd..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/ui/Po.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Declaration of Po message generation class
- */
-
-#include <string>
-#include <vector>
-
-namespace AskUser {
-namespace Notification {
-namespace Po {
-
-std::string createPopupCheckMsg(const std::string &appName, const std::string &pkgName, const std::string &priv);
-std::string createPopupLaunchMsg(const std::string &appName, const std::string &pkgName, const std::vector<std::string> &privs);
-std::string createPrivilegeDescr(const std::string &priv);
-std::string createToastDenyMsg(const std::string &appName, const std::string &pkgName, const std::string &priv);
-std::string createToastFailMsg(const std::string &appName, const std::string &pkgName);
-
-std::string getPopupTitleMsg();
-std::string getAllowButtonMsg();
-std::string getDenyButtonMsg();
-std::string getCheckBoxMsg();
-
-} // namespace Po
-} // namespace Notification
-} // namespace AskUser
diff --git a/src/agent/notification-daemon/ui/Popup.h b/src/agent/notification-daemon/ui/Popup.h
deleted file mode 100644 (file)
index 72baada..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/ui/Popup.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Declaration of Popup class
- */
-
-#pragma once
-
-#include <string>
-
-#include <log/alog.h>
-#include <exception/Exception.h>
-#include <Elementary.h>
-
-#include "UIElement.h"
-
-namespace AskUser {
-namespace Notification {
-
-class Popup : public UIElement {
-public:
-    Popup(Evas_Object *parent, const std::string &msg)
-    : UIElement(parent), m_msg(msg)
-    {
-        m_popup = elm_popup_add(m_parent);
-        if (m_popup == nullptr) {
-            ALOGE("Failed to add popup");
-            throw Exception("Enlightenment failed");
-        }
-    }
-
-    Popup(const Popup &other) = delete;
-    Popup& operator=(const Popup &other) = delete;
-
-    Evas_Object *getAllowButton() const { return m_allowButton; }
-    Evas_Object *getDenyButton() const { return m_denyButton; }
-
-    virtual ~Popup() {
-        evas_object_del(m_popup);
-    }
-protected:
-    Evas_Object *m_popup = nullptr;
-    Evas_Object *m_allowButton = nullptr;
-    Evas_Object *m_denyButton = nullptr;
-
-    std::string m_msg;
-};
-
-} /* namespace Notification */
-} /* namespace Askuser */
-
diff --git a/src/agent/notification-daemon/ui/PopupCheck.h b/src/agent/notification-daemon/ui/PopupCheck.h
deleted file mode 100644 (file)
index 936fd5e..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/ui/PopupCheck.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Declaration of PopupCheck class
- */
-
-#pragma once
-
-#include <string>
-
-#include <Elementary.h>
-
-#include "Popup.h"
-
-namespace AskUser {
-namespace Notification {
-
-class PopupCheck : public Popup {
-public:
-    PopupCheck(Evas_Object *parent, const std::string &msg)
-        : Popup(parent, msg)
-    {}
-
-    Evas_Object *getCheckBox() const { return m_checkBox; }
-    bool getCheckboxState() const {
-        if (m_checkBox == nullptr)
-            return false;
-        return elm_check_state_get(m_checkBox);
-    }
-
-    virtual ~PopupCheck() {}
-
-protected:
-    Evas_Object *m_checkBox = nullptr;
-};
-
-} /* namespace Notification */
-} /* namespace Askuser */
-
diff --git a/src/agent/notification-daemon/ui/PopupCheckMobile.h b/src/agent/notification-daemon/ui/PopupCheckMobile.h
deleted file mode 100644 (file)
index 5ba7380..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/ui/PopupCheckMobile.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Declaration of PopupCheckMobile class
- */
-
-#pragma once
-
-#include <Elementary.h>
-
-#include <exception/Exception.h>
-#include "Po.h"
-#include "PopupCheck.h"
-
-namespace AskUser {
-namespace Notification {
-
-class PopupCheckMobile : public PopupCheck {
-public:
-    PopupCheckMobile(Evas_Object *parent, int popupId, const std::string &msg)
-        : PopupCheck(parent, msg)
-    {
-        setId(popupId);
-    }
-    virtual void create() {
-        // popup
-        elm_popup_align_set(m_popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
-        elm_object_part_text_set(m_popup, "title,text", Po::getPopupTitleMsg().c_str());
-        evas_object_size_hint_weight_set(m_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-        // layout
-        m_layout = elm_layout_add(m_popup);
-        if (m_layout == nullptr) {
-            ALOGE("EFL : Failed to add layout");
-            throw Exception("Enlightenment failed");
-        }
-        elm_layout_file_set(m_layout, RES_DIR"/popup_custom.edj", "popup_checkview_layout_mobile");
-        evas_object_size_hint_weight_set(m_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-        // content
-        m_content = elm_label_add(m_layout);
-        if (!m_content) {
-            ALOGE("EFL : Failed to add content");
-            throw Exception("Enlightenment failed");
-        }
-        elm_object_text_set(m_content, m_msg.c_str());
-        elm_object_style_set(m_content, "popup/default");
-        elm_label_line_wrap_set(m_content, ELM_WRAP_MIXED);
-        evas_object_size_hint_weight_set(m_content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-        evas_object_size_hint_align_set(m_content, EVAS_HINT_FILL, EVAS_HINT_FILL);
-        elm_object_part_content_set(m_layout, "elm.swallow.content", m_content);
-
-        // checkbox
-        m_checkBox = elm_check_add(m_layout);
-        if (!m_checkBox) {
-            ALOGE("EFL : Failed to add checkbox");
-            throw Exception("Enlightenment failed");
-        }
-        elm_object_part_content_set(m_layout, "elm.swallow.end", m_checkBox);
-        elm_object_text_set(m_checkBox, Po::getCheckBoxMsg().c_str());
-        elm_check_state_set(m_checkBox, EINA_FALSE);
-        evas_object_show(m_checkBox);
-
-        // buttons
-        m_denyButton = elm_button_add(m_popup);
-        if (!m_denyButton) {
-            ALOGE("EFL : Failed to add deny button");
-            throw Exception("Enlightenment failed");
-        }
-        elm_object_part_content_set(m_popup, "button1", m_denyButton);
-        elm_object_text_set(m_denyButton, Po::getDenyButtonMsg().c_str());
-
-        m_allowButton = elm_button_add(m_popup);
-        if (!m_allowButton) {
-            ALOGE("EFL : Failed to add allow button");
-            throw Exception("Enlightenment failed");
-        }
-        elm_object_part_content_set(m_popup, "button2", m_allowButton);
-        elm_object_text_set(m_allowButton, Po::getAllowButtonMsg().c_str());
-        elm_object_content_set(m_popup, m_layout);
-        evas_object_show(m_popup);
-    }
-    virtual ~PopupCheckMobile() {
-
-    }
-private:
-    Evas_Object *m_content = nullptr;
-    Evas_Object *m_layout = nullptr;
-    Evas_Object *m_layoutInner = nullptr;
-};
-
-} /* namespace Notification */
-} /* namespace Askuser */
-
diff --git a/src/agent/notification-daemon/ui/PopupCheckWearable.h b/src/agent/notification-daemon/ui/PopupCheckWearable.h
deleted file mode 100644 (file)
index 74fe9ef..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/ui/PopupCheckWearable.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Declaration of PopupCheckWearable class
- */
-
-#pragma once
-
-#include <Elementary.h>
-
-#include <exception/Exception.h>
-#include "Po.h"
-#include "PopupCheck.h"
-
-namespace AskUser {
-namespace Notification {
-
-class PopupCheckWearable : public PopupCheck {
-public:
-    PopupCheckWearable(Evas_Object *parent, int popupId, const std::string msg)
-        : PopupCheck(parent, msg)
-    {
-        setId(popupId);
-    }
-    ~PopupCheckWearable() {}
-
-    virtual void create() {
-        elm_object_style_set(m_popup, "circle");
-
-        m_layout = elm_layout_add(m_popup);
-        if (m_layout == nullptr) {
-            ALOGE("EFL : Failed to add layout");
-            throw Exception("Enlightenment failed");
-        }
-        elm_layout_theme_set(m_layout, "layout", "popup", "content/circle/buttons2");
-        elm_object_part_text_set(m_layout, "elm.text.title", Po::getPopupTitleMsg().c_str());
-        elm_object_content_set(m_popup, m_layout);
-
-        m_layoutInner = elm_layout_add(m_layout);
-        if (m_layoutInner == nullptr) {
-            ALOGE("EFL : Failed to add layout");
-            throw Exception("Enlightenment failed");
-        }
-        elm_layout_file_set(m_layoutInner, RES_DIR"/popup_custom.edj", "popup_checkview_internal");
-        evas_object_size_hint_weight_set(m_layoutInner, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-        elm_object_part_content_set(m_layout, "elm.swallow.content", m_layoutInner);
-
-        m_content = elm_label_add(m_layoutInner);
-        if (m_content == nullptr) {
-            ALOGE("EFL : Failed to add content");
-            throw Exception("Enlightenment failed");
-        }
-        elm_object_text_set(m_content, m_msg.c_str());
-        elm_object_style_set(m_content, "popup/default");
-        elm_label_line_wrap_set(m_content, ELM_WRAP_MIXED);
-        evas_object_size_hint_weight_set(m_content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-        evas_object_size_hint_align_set(m_content, EVAS_HINT_FILL, EVAS_HINT_FILL);
-        elm_object_part_content_set(m_layoutInner, "label", m_content);
-
-        m_checkBox = elm_check_add(m_popup);
-        if (m_checkBox == nullptr) {
-            ALOGE("EFL : Failed to add checkbox");
-            throw Exception("Enlightenment failed");
-        }
-        elm_object_style_set(m_checkBox, "popup");
-        elm_object_text_set(m_checkBox, Po::getCheckBoxMsg().c_str());
-        elm_check_state_set(m_checkBox, EINA_FALSE);
-        evas_object_size_hint_align_set(m_checkBox, EVAS_HINT_FILL, 0.0);
-        elm_object_part_content_set(m_layoutInner, "elm.swallow.end", m_checkBox);
-        evas_object_show(m_checkBox);
-
-        m_allowButton = elm_button_add(m_popup);
-        if (m_allowButton == nullptr) {
-            ALOGE("EFL : Failed to add allow button");
-            throw Exception("Enlightenment failed");
-        }
-        elm_object_style_set(m_allowButton, "popup/circle/right");
-        elm_object_part_content_set(m_popup, "button2", m_allowButton);
-
-        Evas_Object *icon;
-        icon = elm_image_add(m_allowButton);
-        if (icon == nullptr) {
-            ALOGE("EFL : Failed to add allow button icon");
-            throw Exception("Enlightenment failed");
-        }
-        elm_image_file_set(icon, RES_DIR"/tw_ic_popup_btn_check.png", NULL);
-        evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-        elm_object_part_content_set(m_allowButton, "elm.swallow.content", icon);
-        evas_object_show(icon);
-
-        m_denyButton = elm_button_add(m_popup);
-        if (m_denyButton == nullptr) {
-            ALOGE("EFL : Failed to add deny button");
-            throw Exception("Enlightenment failed");
-        }
-        elm_object_style_set(m_denyButton, "popup/circle/left");
-        elm_object_part_content_set(m_popup, "button1", m_denyButton);
-
-        icon = elm_image_add(m_denyButton);
-        if (icon == nullptr) {
-            ALOGE("EFL : Failed to add deny button icon");
-            throw Exception("Enlightenment failed");
-        }
-        elm_image_file_set(icon, RES_DIR"/tw_ic_popup_btn_delete.png", NULL);
-        elm_object_part_content_set(m_denyButton, "elm.swallow.content", icon);
-        evas_object_show(icon);
-
-        evas_object_show(m_popup);
-    }
-private:
-    Evas_Object *m_content = nullptr;
-    Evas_Object *m_layout = nullptr;
-    Evas_Object *m_layoutInner = nullptr;
-};
-
-} /* namespace Notification */
-} /* namespace Askuser */
-
diff --git a/src/agent/notification-daemon/ui/PopupLaunchMobile.h b/src/agent/notification-daemon/ui/PopupLaunchMobile.h
deleted file mode 100644 (file)
index 1422ed2..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/ui/PopupLaunchMobile.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Declaration of PopupLaunchMobile class
- */
-
-#pragma once
-
-#include <Elementary.h>
-
-#include <exception/Exception.h>
-#include "Po.h"
-#include "Popup.h"
-
-namespace AskUser {
-namespace Notification {
-
-class PopupLaunchMobile : public Popup {
-public:
-    PopupLaunchMobile(Evas_Object *parent, int popupId, const std::string &msg)
-        : Popup(parent, msg)
-    {
-        setId(popupId);
-    }
-    virtual ~PopupLaunchMobile() {}
-
-    virtual void create() {
-        // popup
-        elm_popup_align_set(m_popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
-        elm_object_part_text_set(m_popup, "title,text", Po::getPopupTitleMsg().c_str());
-        evas_object_size_hint_weight_set(m_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-        // layout
-        m_layout = elm_layout_add(m_popup);
-        if (m_layout == nullptr) {
-            ALOGE("EFL : Failed to add layout");
-            throw Exception("Enlightenment failed");
-        }
-        elm_layout_file_set(m_layout, RES_DIR"/popup_custom.edj", "popup_layout_mobile");
-        evas_object_size_hint_weight_set(m_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-        // content
-        m_content = elm_label_add(m_layout);
-        if (!m_content) {
-            ALOGE("EFL : Failed to add content");
-            throw Exception("Enlightement failed");
-        }
-        elm_object_text_set(m_content, m_msg.c_str());
-        elm_object_style_set(m_content, "popup/default");
-        elm_label_line_wrap_set(m_content, ELM_WRAP_MIXED);
-        evas_object_size_hint_weight_set(m_content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-        evas_object_size_hint_align_set(m_content, EVAS_HINT_FILL, EVAS_HINT_FILL);
-        elm_object_part_content_set(m_layout, "elm.swallow.content", m_content);
-
-        // buttons
-        m_denyButton = elm_button_add(m_popup);
-        if (!m_denyButton) {
-            ALOGE("EFL : Failed to add deny button");
-            throw Exception("Enlightement failed");
-        }
-        elm_object_part_content_set(m_popup, "button1", m_denyButton);
-        elm_object_text_set(m_denyButton, Po::getDenyButtonMsg().c_str());
-
-        m_allowButton = elm_button_add(m_popup);
-        if (!m_allowButton) {
-            ALOGE("EFL : Failed to add allow button");
-            throw Exception("Enlightement failed");
-        }
-        elm_object_part_content_set(m_popup, "button2", m_allowButton);
-        elm_object_text_set(m_allowButton, Po::getAllowButtonMsg().c_str());
-        elm_object_content_set(m_popup, m_layout);
-        evas_object_show(m_popup);
-    }
-private:
-    Evas_Object *m_content = nullptr;
-    Evas_Object *m_layout = nullptr;
-    Evas_Object *m_layoutInner = nullptr;
-};
-
-} /* namespace Notification */
-} /* namespace Askuser */
-
diff --git a/src/agent/notification-daemon/ui/PopupLaunchWearable.h b/src/agent/notification-daemon/ui/PopupLaunchWearable.h
deleted file mode 100644 (file)
index 4ca51a2..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/ui/PopupLaunchWearable.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Declaration of PopupLaunchWearableper class
- */
-
-#pragma once
-
-#include <Elementary.h>
-
-#include <exception/Exception.h>
-#include "Po.h"
-#include "Popup.h"
-
-namespace AskUser {
-namespace Notification {
-
-class PopupLaunchWearable : public Popup {
-public:
-    PopupLaunchWearable(Evas_Object *parent, int popupId, const std::string msg)
-        : Popup(parent, msg)
-    {
-        setId(popupId);
-    }
-    virtual ~PopupLaunchWearable() {}
-
-    virtual void create() {
-        Evas_Object *icon;
-        elm_object_style_set(m_popup, "circle");
-
-        m_layout = elm_layout_add(m_popup);
-        if (m_layout == nullptr) {
-            ALOGE("EFL : Failed to add layout");
-            throw Exception("Enlightenment failed");
-        }
-        elm_layout_theme_set(m_layout, "layout", "popup", "content/circle/buttons2");
-        elm_object_part_text_set(m_layout, "elm.text.title", Po::getPopupTitleMsg().c_str());
-        elm_object_content_set(m_popup, m_layout);
-
-        m_layoutInner = elm_layout_add(m_layout);
-        if (m_layoutInner == nullptr) {
-            ALOGE("EFL : Failed to add layout");
-            throw Exception("Enlightenment failed");
-        }
-        elm_layout_file_set(m_layoutInner, RES_DIR"/popup_custom.edj", "popup_checkview_internal");
-        evas_object_size_hint_weight_set(m_layoutInner, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-        elm_object_part_content_set(m_layout, "elm.swallow.content", m_layoutInner);
-
-        m_content = elm_label_add(m_layoutInner);
-        if (m_content == nullptr) {
-            ALOGE("EFL : Failed to add content");
-            throw Exception("Enlightenment failed");
-        }
-        elm_object_text_set(m_content, m_msg.c_str());
-        elm_object_style_set(m_content, "popup/default");
-        elm_label_line_wrap_set(m_content, ELM_WRAP_MIXED);
-        evas_object_size_hint_weight_set(m_content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-        evas_object_size_hint_align_set(m_content, EVAS_HINT_FILL, EVAS_HINT_FILL);
-        elm_object_part_content_set(m_layoutInner, "label", m_content);
-
-        m_allowButton = elm_button_add(m_popup);
-        if (m_allowButton == nullptr) {
-            ALOGE("EFL : Failed to add allow button");
-            throw Exception("Enlightenment failed");
-        }
-        elm_object_style_set(m_allowButton, "popup/circle/right");
-        elm_object_part_content_set(m_popup, "button2", m_allowButton);
-
-        icon = elm_image_add(m_allowButton);
-        if (icon == nullptr) {
-            ALOGE("EFL : Failed to add allow button icon");
-            throw Exception("Enlightenment failed");
-        }
-        elm_image_file_set(icon, RES_DIR"/tw_ic_popup_btn_check.png", NULL);
-        evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-        elm_object_part_content_set(m_allowButton, "elm.swallow.content", icon);
-        evas_object_show(icon);
-
-        m_denyButton = elm_button_add(m_popup);
-        if (m_denyButton == nullptr) {
-            ALOGE("EFL : Failed to add deny button");
-            throw Exception("Enlightenment failed");
-        }
-        elm_object_style_set(m_denyButton, "popup/circle/left");
-        elm_object_part_content_set(m_popup, "button1", m_denyButton);
-
-        icon = elm_image_add(m_denyButton);
-        if (icon == nullptr) {
-            ALOGE("EFL : Failed to add deny button icon");
-            throw Exception("Enlightenment failed");
-        }
-        elm_image_file_set(icon, RES_DIR"/tw_ic_popup_btn_delete.png", NULL);
-        elm_object_part_content_set(m_denyButton, "elm.swallow.content", icon);
-        evas_object_show(icon);
-
-        evas_object_show(m_popup);
-    }
-private:
-    std::vector<std::string> m_privs;
-    Evas_Object *m_content = nullptr;
-    Evas_Object *m_layout = nullptr;
-    Evas_Object *m_layoutInner = nullptr;
-};
-
-} /* namespace Notification */
-} /* namespace Askuser */
-
diff --git a/src/agent/notification-daemon/ui/Popupper.cpp b/src/agent/notification-daemon/ui/Popupper.cpp
deleted file mode 100644 (file)
index 2bd70cb..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/Popupper.cpp
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Definition of Popupper class
- */
-
-#include "Popupper.h"
-
-#include "Answerable.h"
-#include "Po.h"
-#include "PopupLaunchMobile.h"
-#include "PopupLaunchWearable.h"
-#include "PopupCheckMobile.h"
-#include "PopupCheckWearable.h"
-#include "Toast.h"
-
-#include <exception/ErrnoException.h>
-#include <exception/Exception.h>
-#include <log/alog.h>
-#include <libintl.h>
-#include <vconf.h>
-#include <efl_util.h>
-#include <system_info.h>
-
-#include <unistd.h>
-
-namespace AskUser {
-
-namespace Notification {
-
-namespace {
-    std::string getProfileName() {
-        char *profileName = nullptr;
-        system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
-        if (!profileName) {
-            ALOGE("profileName is NULL");
-            throw Exception("get profileName failed");
-        }
-        std::unique_ptr<char, decltype(free)*> profileNamePtr(profileName, free);
-        return std::string(profileName);
-    }
-}
-
-
-void Popupper::registerPopupResponseHandler(PopupHandler handler) {
-    m_popupResponseHandler = handler;
-}
-
-void Popupper::registerToastFinishedHandler(ToastHandler handler) {
-    m_toastFinishedHandler = handler;
-}
-
-void Popupper::unfocusedCb(void *data, Evas_Object *, void *)
-{
-    ALOGD("Unfocused");
-    Popupper *popupper = static_cast<Popupper*>(data);
-
-    if (popupper->m_shouldRaise) {
-        evas_object_show(popupper->m_win);
-    }
-}
-
-void Popupper::popupClose(int popupId)
-{
-    ALOGD("Window close");
-    m_shouldRaise = false;
-
-    if (!m_elementPtr || popupId == -1 || popupId != m_elementPtr->getId())
-        ALOGD("Closing non-existing popup");
-
-    m_elementPtr.reset(nullptr);
-    m_answerablePtr.reset(nullptr);
-    evas_object_hide(m_win);
-}
-
-
-void Popupper::allowPressedCb(void *data, Evas_Object *, void *)
-{
-    IAnswerable *answerable = static_cast<IAnswerable *>(data);
-    answerable->process(IAnswerable::Button::ALLOW);
-}
-
-void Popupper::denyPressedCb(void *data, Evas_Object *, void *)
-{
-    IAnswerable *answerable = static_cast<IAnswerable *>(data);
-    answerable->process(IAnswerable::Button::DENY);
-}
-
-Eina_Bool Popupper::hwKeyClickedCb(void *data, int type, void *event)
-{
-    Ecore_Event_Key *ev = static_cast<Ecore_Event_Key*>(event);
-    Popupper* runner = static_cast<Popupper*>(data);
-    ALOGD("HW button pressed. type <" << type << "> pressed key is <" << ev->key << ">");
-    if ((!strcmp("XF86Home", ev->key) || !strcmp("XF86Back", ev->key)) && runner->m_elementPtr) {
-        ALOGD("Respond as deny once.");
-        runner->m_popupResponseHandler(runner->m_elementPtr->getId(), NResponseType::None);
-    }
-    return EINA_TRUE;
-}
-
-void Popupper::timeoutToastCb(void *data, Evas_Object *, void *) {
-    Popupper *popupper = static_cast<Popupper*>(data);
-    popupper->m_toastFinishedHandler(popupper->m_elementPtr->getId());
-}
-
-Popupper::~Popupper()
-{}
-
-void Popupper::initialize()
-{
-    elm_init(0, NULL);
-    m_win = elm_win_add(NULL, Po::getPopupTitleMsg().c_str(), ELM_WIN_NOTIFICATION);
-    if (!m_win) {
-        ALOGE("EFL : Failed to add window");
-        throw Exception("Elementary failed");
-    }
-    efl_util_set_notification_window_level(m_win, EFL_UTIL_NOTIFICATION_LEVEL_TOP);
-
-    if (elm_win_wm_rotation_supported_get(m_win)) {
-        int rots[4] = { 0, 90, 180, 270 };
-        elm_win_wm_rotation_available_rotations_set(m_win, (const int *)(&rots), 4);
-    }
-
-    elm_win_autodel_set(m_win, EINA_TRUE);
-    elm_win_override_set(m_win, EINA_TRUE);
-    elm_win_alpha_set(m_win, EINA_TRUE);
-
-    // callbacks
-    elm_win_indicator_opacity_set(m_win, ELM_WIN_INDICATOR_OPAQUE);
-    elm_win_indicator_mode_set(m_win, ELM_WIN_INDICATOR_SHOW);
-    evas_object_smart_callback_add(m_win, "unfocused", &Popupper::unfocusedCb, this);
-
-    elm_win_keygrab_set(m_win, "XF86Home", 0, 0, 0, ELM_WIN_KEYGRAB_SHARED);
-    elm_win_keygrab_set(m_win, "XF86Back", 0, 0, 0, ELM_WIN_KEYGRAB_TOPMOST);
-    ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, &Popupper::hwKeyClickedCb, this);
-}
-
-void Popupper::setLocale()
-{
-    char *lang = vconf_get_str(VCONFKEY_LANGSET);
-    if (lang)
-    {
-        elm_language_set(lang);
-        free(lang);
-    } else {
-        ALOGE("Couldn't fetch language from vconf failed.");
-    }
-}
-
-void Popupper::show() {
-    evas_object_show(m_win);
-}
-
-void Popupper::popupCheck(int popupId, const std::string &appId, const std::string &pkgId, const std::string &priv) {
-    std::string profileName = getProfileName();
-    PopupCheck *popup;
-    try {
-        if (profileName[0] != 'w' && profileName[0] != 'W') {
-            // Not wearable
-            popup = new PopupCheckMobile(m_win, popupId, Po::createPopupCheckMsg(appId, pkgId, priv));
-        } else {
-            // Wearable
-            popup = new PopupCheckWearable(m_win, popupId, Po::createPopupCheckMsg(appId, pkgId, priv));
-        }
-        popup->create();
-    } catch (const std::exception &e) {
-        ALOGE("Failed to create popup check : " << e.what());
-        m_popupResponseHandler(popupId, NResponseType::Error);
-        return;
-    }
-
-    m_answerablePtr.reset(new AnswerablePopupCheck(popup, m_popupResponseHandler));
-    evas_object_smart_callback_add(popup->getAllowButton(), "clicked", &Popupper::allowPressedCb,
-                                   m_answerablePtr.get());
-    evas_object_smart_callback_add(popup->getDenyButton(), "clicked", &Popupper::denyPressedCb,
-                                   m_answerablePtr.get());
-
-    m_elementPtr.reset(popup);
-    show();
-
-}
-void Popupper::popupLaunch(int popupId, const std::string &appId, const std::string &pkgId, const std::vector<std::string> &privs) {
-    std::string profileName = getProfileName();
-    Popup *popup;
-    try {
-        if (profileName[0] != 'w' && profileName[0] != 'W') {
-            // Not wearable
-            popup = new PopupLaunchMobile(m_win, popupId, Po::createPopupLaunchMsg(appId, pkgId, privs));
-        } else {
-            // Wearable
-            popup = new PopupLaunchWearable(m_win, popupId, Po::createPopupLaunchMsg(appId, pkgId, privs));
-        }
-        popup->create();
-    } catch (const std::exception &e) {
-        ALOGE("Failed to create popup launch : " << e.what());
-        m_popupResponseHandler(popupId, NResponseType::Error);
-        return;
-    }
-
-    m_answerablePtr.reset(new AnswerablePopupLaunch(popup, m_popupResponseHandler));
-    evas_object_smart_callback_add(popup->getAllowButton(), "clicked", &Popupper::allowPressedCb,
-                                   m_answerablePtr.get());
-    evas_object_smart_callback_add(popup->getDenyButton(), "clicked", &Popupper::denyPressedCb,
-                                   m_answerablePtr.get());
-
-    m_elementPtr.reset(popup);
-    show();
-}
-void Popupper::toastDeny(int toastId, const std::string &appId, const std::string &pkgId, const std::string &priv) {
-    try {
-        Toast *toast = new Toast(m_win, toastId, Po::createToastDenyMsg(appId, pkgId, priv));
-        toast->create();
-        m_elementPtr.reset(toast);
-    } catch (const std::exception &e) {
-        ALOGE("Failed to create toast deny : " << e.what());
-        return;
-    }
-    m_toastFinishedHandler(toastId);
-}
-void Popupper::toastFail(int toastId, const std::string &appId, const std::string &pkgId) {
-    try {
-        Toast *toast = new Toast(m_win, toastId, Po::createToastFailMsg(appId, pkgId));
-        toast->create();
-        m_elementPtr.reset(toast);
-    } catch (const std::exception &e) {
-        ALOGE("Failed to create toast fail : " << e.what());
-        return;
-    }
-    m_toastFinishedHandler(toastId);
-}
-
-void Popupper::start()
-{
-    elm_run();
-}
-
-void Popupper::stop()
-{
-    m_shouldRaise = false;
-    elm_win_keygrab_unset(m_win, "XF86Home", 0, 0);
-    elm_win_keygrab_unset(m_win, "XF86Back", 0, 0);
-    m_elementPtr.reset(nullptr);
-    m_answerablePtr.reset(nullptr);
-    evas_object_del(m_win);
-    m_win = nullptr;
-    elm_exit();
-}
-
-void Popupper::shutdown() {
-    elm_shutdown();
-}
-
-} /* namespace Notification */
-
-} /* namespace AskUser */
diff --git a/src/agent/notification-daemon/ui/Popupper.h b/src/agent/notification-daemon/ui/Popupper.h
deleted file mode 100644 (file)
index a8e5b4e..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/Popupper.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Declaration of Popupper class
- */
-
-#pragma once
-
-#include <Elementary.h>
-#include <functional>
-#include <map>
-#include <memory>
-#include <string>
-#include <vector>
-
-#include "Answerable.h"
-#include "Popup.h"
-#include "Toast.h"
-#include <types/NotificationResponse.h>
-#include <log/alog.h>
-
-namespace AskUser {
-
-namespace Notification {
-
-class Popupper {
-public:
-    typedef std::function<void(int, NResponseType)> PopupHandler;
-    typedef std::function<void(int)> ToastHandler;
-
-    Popupper() = default;
-    void initialize();
-    void setLocale();
-    void registerPopupResponseHandler(PopupHandler handler);
-    void registerToastFinishedHandler(ToastHandler handler);
-    void start();
-
-    void popupCheck(int popupId, const std::string &appId, const std::string &pkgId, const std::string &priv);
-    void popupLaunch(int popupId, const std::string &appId, const std::string &pkgId, const std::vector<std::string> &privs);
-    void toastDeny(int toastId, const std::string &appId, const std::string &pkgId, const std::string &priv);
-    void toastFail(int toastId, const std::string &appId, const std::string &pkgId);
-
-    void popupClose(int popupId);
-    void stop();
-    void shutdown();
-
-    ~Popupper();
-private:
-    static void unfocusedCb(void *data, Evas_Object *, void *);
-    static void allowPressedCb(void *data, Evas_Object *, void *);
-    static void denyPressedCb(void *data, Evas_Object *, void *);
-    static void timeoutToastCb(void *data, Evas_Object *, void *);
-    static Eina_Bool hwKeyClickedCb(void *data, int type, void *event);
-
-    void show();
-
-    PopupHandler m_popupResponseHandler;
-    ToastHandler m_toastFinishedHandler;
-
-    Evas_Object *m_win = nullptr;
-    std::unique_ptr<UIElement> m_elementPtr;
-    std::unique_ptr<IAnswerable> m_answerablePtr;
-
-    bool m_shouldRaise = false;
-};
-
-} /* namespace Notification */
-
-} /* namespace AskUser */
diff --git a/src/agent/notification-daemon/ui/Toast.h b/src/agent/notification-daemon/ui/Toast.h
deleted file mode 100644 (file)
index d5602e0..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/ui/Toast.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Declaration of Toast class
- */
-
-#pragma once
-
-#include <exception>
-#include <string>
-
-#include <notification_status.h>
-#include <notification_error.h>
-
-#include <log/alog.h>
-#include "UIElement.h"
-
-namespace AskUser {
-namespace Notification {
-
-class Toast : public UIElement {
-public:
-    Toast(Evas_Object *m_parentWindow, int toastId, const std::string msg) : UIElement(m_parentWindow), m_msg(msg)
-    {
-        setId(toastId);
-    }
-    virtual void create() {
-        int ret = notification_status_message_post(m_msg.c_str());
-        if (ret != NOTIFICATION_ERROR_NONE) {
-            ALOGE("notification_status_message_post failed with " << ret);
-            throw std::runtime_error("notification_status_message_post failed with " + std::to_string(ret));
-        }
-    }
-private:
-    std::string m_msg;
-};
-
-} /* namespace Notification */
-} /* namespace Askuser */
-
diff --git a/src/agent/notification-daemon/ui/UIElement.h b/src/agent/notification-daemon/ui/UIElement.h
deleted file mode 100644 (file)
index 998b8e6..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/agent/notification-daemon/UIElement.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Declaration of UIElement class
- */
-
-#pragma once
-
-#include <Elementary.h>
-
-namespace AskUser {
-namespace Notification {
-
-class UIElement {
-public:
-    explicit UIElement(Evas_Object *parent) : m_parent(parent), m_elementId(-1) {}
-    void setId(int id) { m_elementId = id;}
-    int getId() { return m_elementId; }
-    virtual void create() = 0;
-    virtual ~UIElement() {}
-protected:
-    Evas_Object *m_parent;
-    int m_elementId;
-};
-
-} /* namespace Notification */
-} /* namespace Askuser */
-
index 09e8240ce385f31697b2af3704374dc13365473a..ee23e7fb4b76707b32a9b0a9c7bb363eaf776534 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2015-2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *  Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -48,9 +48,8 @@ class AskUIInterface {
 public:
     virtual ~AskUIInterface() {};
 
-    virtual bool start(const std::string &client, const std::string &pkgLabel,
-                       const std::string &user, const std::string &privilege,
-                       RequestId requestId, UIResponseCallback) = 0;
+    virtual bool start(const std::string &client, const std::string &user,
+                       const std::string &privilege, RequestId requestId, UIResponseCallback) = 0;
     virtual bool setOutdated() = 0;
     virtual bool dismiss() = 0;
     virtual bool isDismissing() const = 0;
index 269375a7272a234f42e76d1a9dde1334f1a080c2..2519ff79ca1922975ba4a1832aef750c3982b7b3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2016-2017 Samsung Electronics Co.
+ *  Copyright (c) 2016 Samsung Electronics Co.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -29,7 +29,6 @@
 #include <socket/Poll.h>
 #include <socket/Socket.h>
 #include <translator/Translator.h>
-#include <translator/GuiTranslator.h>
 #include <config/Path.h>
 
 namespace AskUser {
@@ -56,19 +55,18 @@ namespace {
     }
 }
 
-bool NotificationBackend::start(const std::string &client, const std::string &pkgLabel,
-                                const std::string &user, const std::string &privilege,
-                                RequestId requestId, UIResponseCallback responseCb) {
+bool NotificationBackend::start(const std::string &client, const std::string &user,
+                               const std::string &privilege, RequestId requestId,
+                               UIResponseCallback responseCb) {
     if (!m_notify.init()) {
         ALOGW("Couldn't initialize notification object.");
         return false;
     }
     m_responseHandler = responseCb;
-    m_request.id = static_cast<NotificationRequestId>(requestId);
+    m_request.id = requestId;
     m_request.data.client = client;
     m_request.data.user = user;
     m_request.data.privilege = privilege;
-    m_request.pkgLabel = pkgLabel;
 
     m_thread = std::thread(&NotificationBackend::run, this);
     return true;
@@ -92,14 +90,13 @@ NotificationBackend::~NotificationBackend() {
 }
 
 void NotificationBackend::reportError() {
-    m_responseHandler(static_cast<RequestId>(m_request.id), NResponseTypeToUI(NResponseType::Error));
+    m_responseHandler(m_request.id, NResponseTypeToUI(NResponseType::Error));
 }
 
 bool NotificationBackend::sendRequest()
 {
     std::string data = Translator::Gui::notificationRequestToData(m_request.id,
                                                                   m_request.data.client,
-                                                                  m_request.pkgLabel,
                                                                   m_request.data.privilege);
     return m_clientSocket.send(data);
 }
@@ -127,7 +124,7 @@ bool NotificationBackend::recvResponse(NotificationResponse &response)
         ALOGE("Failed to fetch response");
         return false;
     }
-    response.id = static_cast<NotificationRequestId>(requestId);
+    response.id = static_cast<RequestId>(requestId);
     response.response = static_cast<NResponseType>(responseType);
     return true;
 }
@@ -186,7 +183,7 @@ bool NotificationBackend::mainLoop() {
                 ALOGE("Incorrect response received");
                 return false;
             }
-            m_responseHandler(static_cast<RequestId>(m_request.id), NResponseTypeToUI(response.response));
+            m_responseHandler(m_request.id, NResponseTypeToUI(response.response));
             return true;
         }
 
index efbfa76e0fa0f71398a17077f5d1c2b68713e9ed..cb0975bce163206a6c45b1b99b44ffeeaaa228dd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2016-2017 Samsung Electronics Co.
+ *  Copyright (c) 2016 Samsung Electronics Co.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -44,8 +44,8 @@ public:
     NotificationBackend() : m_poller(2), m_clientSocket(Socket::PeerType::CLIENT), m_running(false) {}
     virtual ~NotificationBackend();
 
-    virtual bool start(const std::string &client, const std::string &pkgLabel,
-                       const std::string &user, const std::string &privilege, RequestId requestId,
+    virtual bool start(const std::string &client, const std::string &user,
+                       const std::string &privilege, RequestId requestId,
                        UIResponseCallback responseCb);
     virtual bool setOutdated();
     virtual bool dismiss();
index bce110ed90fd32a7c037a0d7bf06c4a9d3600a3e..193868c78f1e36d967c5eb1448e9e737de1681b6 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2014-2017 Samsung Electronics Co., Ltd All Rights Reserved
+# Copyright (c) 2014-2016 Samsung Electronics Co., Ltd All Rights Reserved
 #
 #    Licensed under the Apache License, Version 2.0 (the "License");
 #    you may not use this file except in compliance with the License.
 # @file        CMakeLists.txt
 # @author      Adam Malinowski <a.malinowsk2@partner.samsung.com>
 #
-
 PKG_CHECK_MODULES(COMMON_DEP
     REQUIRED
     cynara-plugin
     cynara-agent
     glib-2.0
     libsystemd
+    pkgmgr-info
+    security-manager
     security-privilege-manager
     )
 
@@ -40,11 +41,11 @@ INCLUDE_DIRECTORIES(
 
 SET(COMMON_SOURCES
     ${COMMON_PATH}/log/alog.cpp
+    ${COMMON_PATH}/policy/Policy.cpp
     ${COMMON_PATH}/policy/PrivilegeInfo.cpp
     ${COMMON_PATH}/socket/Socket.cpp
     ${COMMON_PATH}/socket/Poll.cpp
     ${COMMON_PATH}/translator/Translator.cpp
-    ${COMMON_PATH}/translator/GuiTranslator.cpp
     ${COMMON_PATH}/types/AgentErrorMsg.cpp
     ${COMMON_PATH}/util/SafeFunction.cpp
     ${COMMON_PATH}/config/Limits.cpp
diff --git a/src/common/config/PrivacyConfig.h b/src/common/config/PrivacyConfig.h
deleted file mode 100644 (file)
index 1527839..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        PrivacyConfig.h
- * @author
- * @brief       Implementation of PrivacyDenied plugin.
- */
-#pragma once
-
-#include <cynara-plugin.h>
-
-namespace PrivacyDeniedPlugin {
-namespace Config {
-
-// this code is used in security-manager as information
-// that it should show popup at application launch
-const Cynara::PolicyType ASK_USER_LEGACY = 48; // 0x30
-// this policy is used to trigger toast during runtime
-const Cynara::PolicyType PRIVACY_DENY = 49; // 0x31
-
-} // namespace Config
-} // namespace PrivacyDeniedPlugin
-
diff --git a/src/common/policy/PkgInfo.h b/src/common/policy/PkgInfo.h
deleted file mode 100644 (file)
index e2f9e59..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        src/common/policy/PkgInfo.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @brief       Definition of pkgmgr-info wrappers
- */
-
-#pragma once
-
-#include <string>
-#include <sys/types.h>
-#include <pkgmgr-info.h>
-
-#include <log/alog.h>
-
-struct PkgInfo {
-    PkgInfo(const std::string &pkgId, uid_t uid) : m_handle(nullptr) {
-        int ret = pkgmgrinfo_pkginfo_get_usr_pkginfo(pkgId.c_str(), uid, &m_handle);
-        if (ret != PMINFO_R_OK) {
-            ALOGE("pkgmgrinfo_pkginfo_get_usr_pkginfo failed for " << pkgId  << " with " << ret);
-            m_handle = nullptr;
-        }
-    }
-    ~PkgInfo() {
-        if (m_handle)
-            pkgmgrinfo_pkginfo_destroy_pkginfo(m_handle);
-    }
-    const std::string mainAppId(){
-        if (!m_handle) {
-            return "";
-        }
-        char *mainAppId;
-        int ret = pkgmgrinfo_pkginfo_get_mainappid(m_handle, &mainAppId);
-        if (ret != PMINFO_R_OK) {
-            ALOGE("pkgmgrinfo_pkginfo_get_mainappid failed  with " << ret);
-            return "";
-        }
-        return mainAppId ? mainAppId : "";
-    }
-    const std::string pkgLabel() {
-        if (!m_handle) {
-            return "";
-        }
-        char *pkgLabel;
-        int ret = pkgmgrinfo_pkginfo_get_label(m_handle, &pkgLabel);
-        if (ret != PMINFO_R_OK) {
-            ALOGE("pkgmgrinfo_pkginfo_get_label failed  with " << ret);
-            return "";
-        }
-        return pkgLabel ? pkgLabel : "";
-    }
-    pkgmgrinfo_pkginfo_h m_handle;
-};
diff --git a/src/common/policy/Policy.cpp b/src/common/policy/Policy.cpp
new file mode 100644 (file)
index 0000000..73145d6
--- /dev/null
@@ -0,0 +1,159 @@
+/*
+ *  Copyright (c) 2016 Samsung Electronics Co.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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
+ */
+/**
+ * @file        src/agent/notification-daemon/Policy.cpp
+ * @author      Zofia Abramowska <z.abramowska@samsung.com>
+ * @brief       Implementation of Policy wrappers
+ */
+
+#include <memory>
+
+#include <pkgmgr-info.h>
+#include <security-manager.h>
+
+#include <exception/Exception.h>
+#include <log/alog.h>
+
+#include "Policy.h"
+
+namespace {
+inline void throwOnSMError(std::string err, int ret)
+{
+    if (ret != SECURITY_MANAGER_SUCCESS)
+        throw AskUser::Exception(err + " : " + std::to_string(ret));
+}
+
+struct PkgInfo {
+    PkgInfo(const std::string &pkgId, uid_t uid) : m_handle(nullptr) {
+        int ret = pkgmgrinfo_pkginfo_get_usr_pkginfo(pkgId.c_str(), uid, &m_handle);
+        if (ret != PMINFO_R_OK) {
+            ALOGE("pkgmgrinfo_pkginfo_get_usr_pkginfo failed for " << pkgId  << " with " << ret);
+            m_handle = nullptr;
+        }
+    }
+    ~PkgInfo() {
+        if (m_handle)
+            pkgmgrinfo_pkginfo_destroy_pkginfo(m_handle);
+    }
+    const std::string mainAppId(){
+        if (!m_handle) {
+            return "";
+        }
+        char *mainAppId;
+        int ret = pkgmgrinfo_pkginfo_get_mainappid(m_handle, &mainAppId);
+        if (ret != PMINFO_R_OK) {
+            ALOGE("pkgmgrinfo_pkginfo_get_mainappid failed  with " << ret);
+            return "";
+        }
+        return mainAppId ? mainAppId : "";
+    }
+    const std::string pkgLabel() {
+        if (!m_handle) {
+            return "";
+        }
+        char *pkgLabel;
+        int ret = pkgmgrinfo_pkginfo_get_label(m_handle, &pkgLabel);
+        if (ret != PMINFO_R_OK) {
+            ALOGE("pkgmgrinfo_pkginfo_get_label failed  with " << ret);
+            return "";
+        }
+        return pkgLabel ? pkgLabel : "";
+    }
+    pkgmgrinfo_pkginfo_h m_handle;
+};
+}
+
+namespace AskUser {
+
+void identifyApp(const std::string &client, const std::string &user,
+                 std::string &appId, std::string &pkgLabel)
+{
+    char *pkgName = nullptr;
+    char *appName = nullptr;
+
+    int ret = security_manager_identify_app_from_cynara_client(client.c_str(), &pkgName, &appName);
+    std::unique_ptr<char, decltype(free)*> pkg_name_p(pkgName, free);
+    std::unique_ptr<char, decltype(free)*> app_name_p(appName, free);
+    throwOnSMError("security_manager_identify_app_from_cynara_client", ret);
+
+    if (!pkgName) {
+        ALOGE("Couldn't identify clients package id");
+        return;
+    }
+
+    uid_t uid = std::strtoul(user.c_str(), nullptr, 10);
+    PkgInfo pkgInfo(pkgName, uid);
+    if (!appName)
+        appId = pkgInfo.mainAppId();
+
+    pkgLabel = pkgInfo.pkgLabel();
+}
+
+PolicyEntry::PolicyEntry() {
+    throwOnSMError("security_manager_policy_entry_new",
+                                  security_manager_policy_entry_new(&m_entry));
+}
+
+PolicyEntry::PolicyEntry(PolicyEntry &&other) : m_entry(std::move(other.m_entry)) {
+    other.m_entry = nullptr;
+}
+
+PolicyEntry::~PolicyEntry() {
+    security_manager_policy_entry_free(m_entry);
+}
+
+void PolicyEntry::setApp(const std::string &appId) {
+    throwOnSMError("security_manager_policy_entry_set_application",
+                   security_manager_policy_entry_set_application(m_entry, appId.c_str()));
+}
+
+void PolicyEntry::setUser(const std::string &user) {
+    throwOnSMError("security_manager_policy_entry_set_user",
+                   security_manager_policy_entry_set_user(m_entry, user.c_str()));
+}
+
+void PolicyEntry::setPrivilege(const std::string &privilege) {
+    throwOnSMError("security_manager_policy_entry_set_privilege",
+                   security_manager_policy_entry_set_privilege(m_entry, privilege.c_str()));
+}
+
+void PolicyEntry::setLevel(const std::string &level) {
+    throwOnSMError("security_manager_policy_entry_admin_set_level",
+                   security_manager_policy_entry_set_level(m_entry, level.c_str()));
+}
+
+PolicyRequest::PolicyRequest() {
+    throwOnSMError("security_manager_policy_update_req_new",
+                   security_manager_policy_update_req_new(&m_req));
+}
+
+PolicyRequest::~PolicyRequest() {
+    m_entries.clear();
+    security_manager_policy_update_req_free(m_req);
+}
+
+void PolicyRequest::addEntry(PolicyEntry &&entry) {
+    throwOnSMError("security_manager_policy_update_req_add_entry",
+                   security_manager_policy_update_req_add_entry(m_req, entry.get()));
+    m_entries.emplace_back(std::move(entry));
+}
+
+void PolicyRequest::updatePolicy() {
+    throwOnSMError("security_manager_policy_update_send",
+                   security_manager_policy_update_send(m_req));
+}
+
+} /* namespace AskUser */
diff --git a/src/common/policy/Policy.h b/src/common/policy/Policy.h
new file mode 100644 (file)
index 0000000..9b9db55
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ *  Copyright (c) 2016 Samsung Electronics Co.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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
+ */
+/**
+ * @file        src/agent/notification-daemon/Policy.h
+ * @author      Zofia Abramowska <z.abramowska@samsung.com>
+ * @brief       Definition of Policy wrappers
+ */
+
+#pragma once
+
+#include <string>
+#include <vector>
+
+struct policy_entry;
+struct policy_update_req;
+
+namespace AskUser {
+
+void identifyApp(const std::string &client, const std::string &user,
+                 std::string &appId, std::string &pkgLabel);
+
+class PolicyEntry {
+public:
+    PolicyEntry();
+    PolicyEntry(PolicyEntry &&other);
+    ~PolicyEntry();
+    void setApp(const std::string &appId);
+    void setUser(const std::string &user);
+    void setPrivilege(const std::string &privilege);
+    void setLevel(const std::string &level);
+
+    policy_entry *get() const { return m_entry; }
+
+private:
+    policy_entry *m_entry;
+};
+
+class PolicyRequest {
+public:
+    PolicyRequest();
+    ~PolicyRequest();
+    void addEntry(PolicyEntry &&entry);
+    void updatePolicy();
+
+private:
+    policy_update_req *m_req;
+    std::vector<PolicyEntry> m_entries;
+};
+
+} /* namespace AskUser */
index 06d65b74440fe6201fec2fff09a028d3afc5e10a..1ab529e39d52d85e5cb190a71c24dceb404bbdc7 100644 (file)
@@ -49,7 +49,7 @@ std::string getPrivacyDisplayName(const std::string &privilege) {
         return privilege;
     }
     std::unique_ptr<char, decltype(free)*> displaNamePtr(displayName, free);
-    return std::string(displayName);
+    return displayName;
 }
 
 std::string getPrivacyName(const std::string &privilege) {
@@ -57,20 +57,19 @@ std::string getPrivacyName(const std::string &privilege) {
     int ret = privilege_info_get_privacy_by_privilege(privilege.c_str(), &privacyName);
     if (ret != PRVMGR_ERR_NONE || !privacyName) {
         ALOGE("Unable to get privacy group for privilege: <" << privilege << ">, err: <" << ret << ">");
-        return privilege;
+        throw Exception("Can't get privacy group name for privilege " + privilege);
     }
 
     std::unique_ptr<char, decltype(free) *> privacyNamePtr(privacyName, free);
-    return std::string(privacyName);
+    return privacyName;
 }
-
 std::vector<std::string> getPrivacyPrivileges(const std::string &privacy) {
     GList *privilegeList = nullptr;
 
     int ret = privilege_info_get_privilege_list_by_privacy(privacy.c_str(), &privilegeList);
     if (ret != PRVMGR_ERR_NONE || !privilegeList) {
         ALOGE("Unable to get privacy group list of privileges; err: <" << ret <<  ">" );
-        return {privacy};
+        return {};
     }
 
     GListWrap privList(privilegeList);
diff --git a/src/common/protocol/CMakeLists.txt b/src/common/protocol/CMakeLists.txt
deleted file mode 100644 (file)
index 805c753..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#        http://www.apache.org/licenses/LICENSE-2.0
-#
-#    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.
-#
-# @file        CMakeLists.txt
-# @author      Dariusz Michaluk <d.michaluk@samsung.com>
-#
-
-SET(PROTOCOL_PATH ${ASKUSER_PATH}/common/protocol)
-
-SET(ASKUSER_NOTIFICATION_VERSION_MAJOR 0)
-SET(ASKUSER_NOTIFICATION_VERSION ${ASKUSER_NOTIFICATION_VERSION_MAJOR}.1.0)
-
-SET(PC_FILE "askuser-notification.pc")
-
-PKG_CHECK_MODULES(ASKUSER_NOTIFICATION_DEP
-    REQUIRED
-    libsystemd
-    )
-
-INCLUDE_DIRECTORIES(
-    ${PROTOCOL_PATH}
-    SYSTEM
-    ${ASKUSER_NOTIFICATION_DEP_INCLUDE_DIRS}
-  )
-
-SET(ASKUSER_NOTIFICATION_SOURCES
-    ${PROTOCOL_PATH}/channel.cpp
-    ${PROTOCOL_PATH}/ask-user-client.cpp
-    ${PROTOCOL_PATH}/sock.cpp
-    ${PROTOCOL_PATH}/ask-user-config.cpp
-   )
-
-SET(ASKUSER_NOTIFICATION_TEST_SOURCES
-    ${PROTOCOL_PATH}/main.cpp
-   )
-
-ADD_DEFINITIONS("-fvisibility=default")
-
-ADD_LIBRARY(${TARGET_ASKUSER_NOTIFICATION_LIB} SHARED ${ASKUSER_NOTIFICATION_SOURCES})
-ADD_EXECUTABLE(${TARGET_ASKUSER_NOTIFICATION_TEST} ${ASKUSER_NOTIFICATION_TEST_SOURCES})
-
-SET_TARGET_PROPERTIES(${TARGET_ASKUSER_NOTIFICATION_LIB}
-    PROPERTIES
-        SOVERSION ${ASKUSER_NOTIFICATION_VERSION_MAJOR}
-        VERSION ${ASKUSER_NOTIFICATION_VERSION}
-        OUTPUT_NAME "askuser-notification"
-    )
-
-LINK_DIRECTORIES(${ASKUSER_NOTIFICATION_DEP_LIBRARY_DIRS})
-
-TARGET_LINK_LIBRARIES(${TARGET_ASKUSER_NOTIFICATION_LIB} ${ASKUSER_NOTIFICATION_DEP_LIBRARIES})
-TARGET_LINK_LIBRARIES(${TARGET_ASKUSER_NOTIFICATION_TEST} ${TARGET_ASKUSER_NOTIFICATION_LIB})
-
-INSTALL(TARGETS     ${TARGET_ASKUSER_NOTIFICATION_LIB}
-        DESTINATION ${LIB_INSTALL_DIR})
-
-CONFIGURE_FILE(${PC_FILE}.in ${PROTOCOL_PATH}/${PC_FILE} @ONLY)
-INSTALL(FILES       ${PROTOCOL_PATH}/${PC_FILE}
-        DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-
-FILE(GLOB HEADERS   ${PROTOCOL_PATH}/askuser-notification/*.h)
-INSTALL(FILES       ${HEADERS}
-        DESTINATION ${INCLUDE_INSTALL_DIR}/askuser-notification)
-
-INSTALL(TARGETS     ${TARGET_ASKUSER_NOTIFICATION_TEST}
-        DESTINATION ${BIN_INSTALL_DIR})
diff --git a/src/common/protocol/ask-user-client.cpp b/src/common/protocol/ask-user-client.cpp
deleted file mode 100644 (file)
index f29ad1a..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        ipc-client.cpp
- * @author      Bartlomiej Grzelewski <b.grzelewski@samsung.com>
- * @brief
- */
-#include <sstream>
-#include <string>
-#include <vector>
-#include <memory>
-
-#include <askuser-notification/ask-user-client.h>
-#include <askuser-notification/ask-user-service.h>
-
-#include <ask-user-config.h>
-#include <sock.h>
-
-#define UNUSED __attribute__((unused))
-
-namespace AskUser {
-namespace Protocol {
-
-int popup_launch(const std::string &pkgName,
-                 const std::string &appName,
-                 uid_t uid,
-                 const PrivilegeVector &privileges,
-                 int &result)
-{
-    try {
-        Sock s(Sock::CLI_STREAM);
-        if (0 > s.connect(getStreamSocketPath(uid)))
-            return -1;
-
-        std::stringstream ss;
-        ss << MSGID_POPUP << " " << pkgName << " " << appName << " " << uid;
-        for (auto &e : privileges) {
-            ss << " " << e;
-        }
-
-        std::string str = ss.str();
-
-        if (0 > s.send(RawBuffer(str.begin(), str.end())))
-            return -1;
-
-        RawBuffer resp;
-        if (0 > s.wait(FdMask::READ))
-            return -1;
-        if (0 > s.recv(resp))
-            return -1;
-
-        std::string input(resp.begin(), resp.end());
-        std::stringstream sss(input);
-        sss >> result;
-
-        return 0;
-    } catch (const std::exception &) {
-        return -1;
-    }
-}
-
-int popup_runtime(UNUSED const std::string &pkgName,
-                  UNUSED const std::string &appName,
-                  UNUSED uid_t uid,
-                  UNUSED std::string &privilege,
-                  UNUSED int &result)
-{
-    return -1;
-}
-
-
-int toast_deny(const std::string &pkgName,
-               const std::string &appName,
-               uid_t uid,
-               const std::string &privilege)
-{
-    try {
-        Sock s(Sock::CLI_DGRAM);
-        if (0 > s.connect(getDatagramSocketPath(uid)))
-            return -1;
-
-        std::string str = std::to_string(MSGID_TOAST1) + " " + pkgName + " " + appName + " " + std::to_string(uid) + " " + privilege;
-
-        return s.send(RawBuffer(str.begin(), str.end()));
-    } catch (const std::exception &) {
-        return -1;
-    }
-}
-
-int toast_fail_launch(const std::string &pkgName, const std::string &appName, uid_t uid) {
-    try {
-        Sock s(Sock::CLI_DGRAM);
-        if (0 > s.connect(getDatagramSocketPath(uid)))
-            return -1;
-
-        std::string str = std::to_string(MSGID_TOAST2) + " " + pkgName + " " + appName + " " + std::to_string(uid);
-
-        return s.send(RawBuffer(str.begin(), str.end()));
-    } catch (const std::exception &) {
-        return -1;
-    }
-}
-
-} // namespace Protocol
-} // namespace AskUser
-
-
diff --git a/src/common/protocol/ask-user-config.cpp b/src/common/protocol/ask-user-config.cpp
deleted file mode 100644 (file)
index 19f9364..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        ask-user-config.cpp
- * @author      Bartlomiej Grzelewski <b.grzelewski@samsung.com>
- * @brief
- */
-#include <ask-user-config.h>
-
-namespace {
-const std::string USER_EXT_PATH("/run/user_ext/");
-const std::string SOCKET_STREAM_NAME("/askuser-notification-stream.socket");
-const std::string SOCKET_DGRAM_NAME("/askuser-notification-datagram.socket");
-} // namespace anonymous
-
-std::string getDatagramSocketPath(uid_t uid) {
-    return USER_EXT_PATH + std::to_string(uid) + SOCKET_DGRAM_NAME;
-}
-
-std::string getStreamSocketPath(uid_t uid) {
-    return USER_EXT_PATH + std::to_string(uid) + SOCKET_STREAM_NAME;
-}
-
diff --git a/src/common/protocol/ask-user-config.h b/src/common/protocol/ask-user-config.h
deleted file mode 100644 (file)
index 7b77be4..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        ask-user-config.h
- * @author      Bartlomiej Grzelewski <b.grzelewski@samsung.com>
- * @brief
- */
-#pragma once
-
-#include <string>
-#include <sys/types.h>
-
-// We want to use it constat expressions (this is the reason why it's not in cpp file
-const int MSGID_POPUP = 1;
-const int MSGID_TOAST1 = 2;
-const int MSGID_TOAST2 = 3;
-
-std::string getDatagramSocketPath(uid_t uid);
-std::string getStreamSocketPath(uid_t uid);
-
diff --git a/src/common/protocol/askuser-notification.pc.in b/src/common/protocol/askuser-notification.pc.in
deleted file mode 100644 (file)
index dca3398..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-# Package Information for pkg-config
-
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_INSTALL_DIR@
-includedir=@INCLUDE_INSTALL_DIR@
-
-Name: askuser-notification
-Description: askuser-notification library
-Version: @ASKUSER_NOTIFICATION_VERSION@
-Libs: -L${libdir} -laskuser-notification
-Cflags: -I${includedir}/askuser-notification
diff --git a/src/common/protocol/askuser-notification/ask-user-client.h b/src/common/protocol/askuser-notification/ask-user-client.h
deleted file mode 100644 (file)
index a98602f..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        ask-user-client.h
- * @author      Bartlomiej Grzelewski <b.grzelewski@samsung.com>
- * @brief
- */
-#pragma once
-
-#include <sys/types.h>
-
-#include <string>
-#include <vector>
-#include <memory>
-#include <askuser-notification/ask-user-types.h>
-
-namespace AskUser {
-namespace Protocol {
-/**
- * Synchronous request for showing popup.
- *
- * \param[in] pkgName    Application package name.
- * \param[in] appName    Application name.
- * \param[in] uid        Information about user that should see popup.
- * \param[in] privileges List of privileges that should be shown to user.
- * \param[out] result    Result returned by ask-user application.
- *
- * \return Value less that 0 means ipc error.
- */
- int popup_launch(const std::string &pkgName, const std::string &appName, uid_t uid, const PrivilegeVector &privileges, int &result);
-
- /**
-  * Synchronous request for showing popup.
-  *
-  * \param[in] pkgName    Application package name.
-  * \param[in] appName    Application name.
-  * \param[in] uid        Information about user that should see popup.
-  * \param[in] privilege  Privilege that should be shown to user.
-  * \param[out] result    Result returned by ask-user application.
-  *
-  * \return Value less that 0 means ipc error.
-  */
- int popup_runtime(const std::string &pkgName, const std::string &appName, uid_t uid, std::string &privilege, int &result);
-
-/**
- * Nonblocking request for showing toast.
- *
- * \param[in] pkgName    Application package name.
- * \param[in] appName    Application name.
- * \param[in] uid        Information about user that should see popup.
- * \param[in] privilege  Name of privilege that was denied.
- *
- * \return Value less that 0 means ipc error.
- */
-int toast_deny(const std::string &pkgName, const std::string &appName, uid_t uid, const std::string &privilege);
-
-/**
- * Nonblocking request for showing toast.
- *
- * \param[in] pkgName    Application package name.
- * \param[in] appName    Application name.
- * \param[in] uid        Information about user that should see popup.
- *
- * \return Value less that 0 means ipc error.
- */
-int toast_fail_launch(const std::string &pkgName, const std::string &appName, uid_t uid);
-
-} // namespace Protocol
-} // namespace AskUser
-
diff --git a/src/common/protocol/askuser-notification/ask-user-service.h b/src/common/protocol/askuser-notification/ask-user-service.h
deleted file mode 100644 (file)
index 3761d07..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        ask-user-service.h
- * @author      Bartlomiej Grzelewski <b.grzelewski@samsung.com>
- * @brief
- */
-#pragma once
-
-#include <sys/types.h>
-
-#include <string>
-#include <vector>
-#include <memory>
-
-#include <askuser-notification/ask-user-types.h>
-
-namespace AskUser {
-namespace Protocol {
-
-enum FdMask {
-    READ = 1,
-    WRITE = 2,
-};
-
-/**
- * IServiceCallbacks defines set of callbacks that must be implemented in service.
- */
-
-struct IServerCallbacks {
-
-    virtual ~IServerCallbacks(){}
-    /**
-     * This function gives you number of descriptor that should be watched by poll/select.
-     *
-     * \param[in] fd   Number of opened descriptor.
-     * \param[in] mask Type of acction that is required on this descriptor.
-     *           mask == 0 remove descriptor fd from watched pool
-     *           mask == 1 watch descriptor for READ
-     *           mask == 2 watch descriptor for WRITE
-     *           maks == 3 watch descriptor for READ and WRITE
-     */
-    virtual void updateFd(int fd, int mask) = 0;
-    /**
-     * some client called popup function with parameters.
-     */
-    virtual void popup_launch(int requestId, const std::string &pkgName, const std::string &appName, uid_t uid, const PrivilegeVector &privileges) = 0;
-    /**
-     * some client called test_deny function with parameters.
-     */
-     virtual void toast_deny(const std::string &pkgName, const std::string &appName, uid_t uid, const Privilege &privilege) = 0;
-    /**
-     * some client called toast_fail_launch function with parameters.
-     */
-     virtual void toast_fail_launch(const std::string &pkgName, const std::string &appName, uid_t uid) = 0;
-};
-
-struct IChannel {
-    virtual ~IChannel(){}
-
-    /**
-     * Process function should be called each time some event is reported by poll/select on
-     * descriptor.
-     *
-     * \param[in] fd    Number of descriptor.
-     * \param[in] mask  Information about event that is waiting on descriptor
-     *                 (FdMask::READ or FdMask::WRITE). If you pass 0 for some reason
-     *                 the descriptor will be closed and callback updateFd will be called
-     *                 with mask = 0
-     */
-    virtual void process(int fd, int mask) = 0;
-
-    /**
-     * Information about action that was choosed by user.
-     *
-     * \param[in] requestId  Request number.
-     * \param[in] response   Information about action choosed by user.
-     */
-    virtual void popupResponse(int requestId, int response) = 0;
-};
-
-typedef std::unique_ptr<IChannel> ChannelPtr;
-typedef std::unique_ptr<IServerCallbacks> ServerCallbacksPtr;
-
-ChannelPtr createChannel(ServerCallbacksPtr ptr);
-
-} // namespace Protocol
-} // namespace AskUser
-
diff --git a/src/common/protocol/askuser-notification/ask-user-types.h b/src/common/protocol/askuser-notification/ask-user-types.h
deleted file mode 100644 (file)
index 8641df3..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        ask-user-types.h
- * @author      Bartlomiej Grzelewski <b.grzelewski@samsung.com>
- * @brief
- */
-#pragma once
-
-#define ASKUSER_NONE 0
-#define ASKUSER_DENY_ONCE 1
-#define ASKUSER_DENY_FOREVER 2
-#define ASKUSER_ALLOW_ONCE 3
-#define ASKUSER_ALLOW_FOREVER 4
-#define ASKUSER_UNKNOWN_ERROR -255
-
-namespace AskUser {
-namespace Protocol {
-
-typedef std::string Privilege;
-typedef std::vector<Privilege> PrivilegeVector;
-
-} // namespace Protocol
-} // AskUser
-
diff --git a/src/common/protocol/channel.cpp b/src/common/protocol/channel.cpp
deleted file mode 100644 (file)
index 3b9c46d..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        channel.cpp
- * @author      Bartlomiej Grzelewski <b.grzelewski@samsung.com>
- * @brief
- */
-#include <string>
-
-#include <askuser-notification/ask-user-service.h>
-
-#include <ask-user-config.h>
-#include <channel.h>
-#include <sock.h>
-
-namespace AskUser {
-namespace Protocol {
-
-void Channel::init() {
-    Sock stream(Sock::SRV_STREAM);
-    Sock datagram(Sock::SRV_DGRAM);
-
-    stream.connect(getStreamSocketPath(getuid()));
-    datagram.connect(getDatagramSocketPath(getuid()));
-
-    int fd1 = stream.getFd();
-    int fd2 = datagram.getFd();
-
-    m_socket[fd1] = SockDesc(std::move(stream));
-    m_socket[fd2] = SockDesc(std::move(datagram));
-
-    m_callbacks->updateFd(fd1, FdMask::READ);
-    m_callbacks->updateFd(fd2, FdMask::READ);
-}
-
-void Channel::parse(const std::string &data, std::vector<std::string> &parsedData)
-{
-    size_t begin = 0;
-
-    while (begin < data.size()) {
-        size_t end = data.find(' ', begin);
-
-        if (end == std::string::npos) {
-            parsedData.push_back(data.substr(begin));
-            return;
-        }
-
-        parsedData.push_back(data.substr(begin, end - begin));
-        begin = end + 1;
-    }
-}
-
-void Channel::process(int fd, int mask) {
-    try {
-        auto it = m_socket.find(fd);
-        if (it == m_socket.end())
-            return;
-
-        if (0 == mask) {
-            m_callbacks->updateFd(fd, 0);
-            m_socket.erase(it);
-            return;
-        }
-
-        auto &desc = it->second;
-
-        if (desc.sock.getType() == Sock::SRV_STREAM) {
-            Sock client = desc.sock.accept();
-            int fd = client.getFd();
-            if (fd < 0)
-                return;
-            m_socket[fd] = SockDesc(std::move(client));
-            m_callbacks->updateFd(fd, FdMask::READ);
-            return;
-        }
-
-        if (mask & FdMask::READ) {
-            int ret = desc.sock.recv(desc.input);
-
-            if (ret <= 0) {
-                m_callbacks->updateFd(fd, 0);
-                m_socket.erase(fd);
-                return;
-            }
-
-            std::vector<std::string> params;
-            parse(std::string(desc.input.begin(), desc.input.end()), params);
-            desc.input.clear();
-
-            int command = std::stoi(params[0]);
-            std::string &pkgName = params[1];
-            std::string &appName = params[2];
-            uid_t uid = std::stoi(params[3]);
-
-            switch (command) {
-            case MSGID_POPUP:
-                {
-                    PrivilegeVector vect(params.begin() + 4, params.end());
-                    m_callbacks->popup_launch(fd, pkgName, appName, uid, vect);
-                    break;
-                }
-            case MSGID_TOAST1:
-                {
-                    std::string &privilege = params[4];
-                    m_callbacks->toast_deny(pkgName, appName, uid, privilege);
-                    break;
-                }
-            case MSGID_TOAST2:
-                {
-                    m_callbacks->toast_fail_launch(pkgName, appName, uid);
-                    break;
-                }
-            }
-        }
-
-        if (mask & FdMask::WRITE) {
-            int size = static_cast<int>(desc.output.size());
-            int result = desc.sock.send(desc.output);
-            if (result < 0) {
-                m_callbacks->updateFd(fd, 0);
-                m_socket.erase(fd);
-                return;
-            }
-
-            if (result == size) {
-                desc.output.clear();
-                m_callbacks->updateFd(fd, FdMask::READ);
-            }
-
-            if (result < size) {
-                desc.output.erase(desc.output.begin(), desc.output.begin()+result);
-            }
-        }
-    } catch (const std::exception &){}
-}
-
-void Channel::popupResponse(int requestId, int response) {
-    try {
-        auto it = m_socket.find(requestId);
-        if (it == m_socket.end())
-            return;
-
-        auto &desc = it->second;
-
-        std::string o = std::to_string(response);
-        std::copy(o.begin(), o.end(), std::back_inserter(desc.output));
-        m_callbacks->updateFd(requestId, FdMask::READ | FdMask::WRITE);
-    } catch (const std::exception &){}
-}
-
-Channel::~Channel() {
-    for (auto &e : m_socket)
-        m_callbacks->updateFd(e.first, 0);
-}
-
-ChannelPtr createChannel(ServerCallbacksPtr ptr) {
-    try {
-        Channel *c = new Channel(std::move(ptr));
-        c->init();
-        return ChannelPtr(c);
-    } catch (const std::exception &) {
-        return ChannelPtr(nullptr);
-    }
-}
-
-} // namespace Protocol
-} // namespace AskUser
-
diff --git a/src/common/protocol/channel.h b/src/common/protocol/channel.h
deleted file mode 100644 (file)
index 9ed90aa..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        channel.h
- * @author      Bartlomiej Grzelewski <b.grzelewski@samsung.com>
- * @brief
- */
-#pragma once
-
-#include <map>
-#include <memory>
-#include <string>
-#include <vector>
-
-#include <askuser-notification/ask-user-service.h>
-
-#include <raw-buffer.h>
-#include <sock.h>
-
-
-namespace AskUser {
-namespace Protocol {
-
-struct SockDesc {
-    SockDesc(Sock psock)
-      : sock(std::move(psock))
-    {}
-    SockDesc(){}
-    Sock sock;
-    RawBuffer input;
-    RawBuffer output;
-};
-
-typedef std::map<int, SockDesc> SocketMap;
-
-class Channel : public IChannel {
-public:
-    Channel(ServerCallbacksPtr ptr)
-      : m_callbacks(std::move(ptr))
-    {}
-
-    void init();
-    virtual void process(int fd, int mask);
-    virtual void popupResponse(int requestId, int response);
-    virtual ~Channel();
-
-private:
-    virtual void parse(const std::string &data, std::vector<std::string> &parsedData);
-
-    ServerCallbacksPtr m_callbacks;
-    SocketMap m_socket;
-};
-
-} // namespace Protocol
-} // namespace AskUser
-
diff --git a/src/common/protocol/main.cpp b/src/common/protocol/main.cpp
deleted file mode 100644 (file)
index 5d2f31f..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        main.cpp
- * @author      Bartlomiej Grzelewski <b.grzelewski@samsung.com>
- * @brief
- */
-#include <map>
-
-#include <poll.h>
-#include <unistd.h>
-
-#include <askuser-notification/ask-user-client.h>
-#include <askuser-notification/ask-user-service.h>
-
-std::map<int, int> m_sockets;
-
-#define UNUSED __attribute__((unused))
-
-using namespace AskUser::Protocol;
-
-struct Callbacks : public IServerCallbacks {
-    Callbacks() : m_channel(nullptr) {}
-
-    virtual void updateFd(int fd, int mask) {
-        printf("call updateFd %d %d\n", fd, mask);
-        if (mask == 0) {
-            m_sockets.erase(fd);
-            return;
-        }
-        m_sockets[fd] = mask;
-    }
-
-    virtual void popup_launch(int requestId, const std::string &pkgName, const std::string &appName, uid_t uid, UNUSED const PrivilegeVector &priv) {
-        printf("call popup %s %s %d\n", pkgName.c_str(), appName.c_str(), uid);
-        if (m_channel)
-            m_channel->popupResponse(requestId, 0xdeadbeef);
-    }
-
-    virtual void toast_deny(const std::string &pkgName, const std::string &appName, uid_t uid, UNUSED const Privilege &privilege) {
-        printf("call toast_deny %s %s %d\n", pkgName.c_str(), appName.c_str(), uid);
-    }
-
-    virtual void toast_fail_launch(const std::string &pkgName, const std::string &appName, uid_t uid) {
-        printf("call toast_fail_launch %s %s %d\n", pkgName.c_str(), appName.c_str(), uid);
-    }
-
-    void setChannel(IChannel *ptr) {
-        m_channel = ptr;
-    }
-
-private:
-    IChannel *m_channel;
-};
-
-void server(void) {
-    Callbacks *c = new Callbacks;
-    ChannelPtr ptr = createChannel(ServerCallbacksPtr(c));
-    c->setChannel(ptr.get());
-
-    pollfd fd[100];
-
-    while(1) {
-        int last = 0;
-        for (auto &e : m_sockets) {
-            fd[last].fd = e.first;
-            fd[last].revents = 0;
-            fd[last].events = ((e.second & FdMask::READ) ? POLLIN : 0) | ((e.second & FdMask::WRITE) ? POLLOUT : 0);
-            last++;
-        }
-        if (-1 == poll(fd, last, -1)) {
-            printf("Error in poll. Quit\n");
-            return;
-        }
-        for (int i=0; i<last; ++i) {
-            if (fd[i].revents & POLLIN)
-                ptr->process(fd[i].fd, FdMask::READ);
-            if (fd[i].revents & POLLOUT)
-                ptr->process(fd[i].fd, FdMask::WRITE);
-        }
-    }
-}
-
-void stream() {
-    PrivilegeVector vect = {"http://tizen.org/privilege/camera", "http://tizen.org/privilege/contacts"};
-    int result;
-    UNUSED int ret = popup_launch("org.tizen.memo", "org.tizen.memo", getuid(), vect, result);
-    printf("Sended stream. Result: %x\n", result);
-}
-
-void toust1() {
-    toast_deny("org.tizen.memo", "org.tizen.memo", getuid(), "http://tizen.org/privilege/camera");
-    printf("sended\n");
-}
-
-void toust2() {
-    toast_fail_launch("org.tizen.memo", "org.tizen.memo", getuid());
-    printf("sended\n");
-}
-
-int main(){
-    int com;
-    printf("0 - server, 1 - send popup, 2 - send toust1, 3 - send toust2\n>");
-    UNUSED int ret = scanf("%d", &com);
-
-    switch(com) {
-    case 0:
-        server();
-        break;
-    case 1:
-        stream();
-        break;
-    case 2:
-        toust1();
-        break;
-    case 3:
-        toust2();
-        break;
-    }
-
-    return 0;
-}
diff --git a/src/common/protocol/raw-buffer.h b/src/common/protocol/raw-buffer.h
deleted file mode 100644 (file)
index 8c2c779..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        raw-buffer.h
- * @author      Bartlomiej Grzelewski <b.grzelewski@samsung.com>
- * @brief
- */
-#pragma once
-
-#include <vector>
-
-namespace AskUser {
-namespace Protocol {
-
-typedef std::vector<unsigned char> RawBuffer;
-
-} // namespace Protocol
-} // namespace AskUser
-
diff --git a/src/common/protocol/sock.cpp b/src/common/protocol/sock.cpp
deleted file mode 100644 (file)
index 850c853..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        Sock.cpp
- * @author      Bartlomiej Grzelewski <b.grzelewski@samsung.com>
- * @brief       Implementation of Sock methods
- */
-#include <poll.h>
-#include <stdexcept>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <unistd.h>
-
-#ifdef BUILD_WITH_SYSTEMD_DAEMON
-#include <systemd/sd-daemon.h>
-#endif // BUILD_WITH_SYSTEMD_DAEMON
-
-#include <string>
-#include <vector>
-
-#include <askuser-notification/ask-user-service.h>
-
-#include <sock.h>
-
-namespace AskUser {
-namespace Protocol {
-
-Sock::Sock(Sock &&second)
-  : m_type(second.m_type)
-  , m_fd(second.m_fd)
-{
-    second.m_fd = -1;
-}
-
-Sock::Sock(Sock::Type type, int fd)
-  : m_type(type)
-  , m_fd(fd)
-{}
-
-Sock& Sock::operator=(Sock &&second) {
-    if (this == &second)
-        return *this;
-
-    close();
-
-    m_fd = second.m_fd;
-    m_type = second.m_type;
-
-    second.m_fd = -1;
-
-    return *this;
-}
-
-
-int Sock::getUnixSockType() const {
-    switch(m_type) {
-    case SRV_DGRAM:
-    case CLI_DGRAM:
-        return SOCK_DGRAM;
-    case SRV_STREAM:
-    case CLI_STREAM:
-        return SOCK_STREAM;
-    }
-    return 0;
-}
-
-int Sock::getSocketFromSystemD() const {
-#ifdef BUILD_WITH_SYSTEMD_DAEMON
-    int n = sd_listen_fds(0);
-
-    if (n < 0)
-        return -1;
-
-    for (int fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START+n; ++fd)
-        if (0 < sd_is_socket_unix(fd, getUnixSockType(), -1, m_path.c_str(), 0))
-            return fd;
-#endif // BUILD_WITH_SYSTEMD_DAEMON
-    return -1;
-}
-
-int Sock::connect(const std::string &path) {
-    if (m_fd != -1)
-        return -1;
-
-    m_path = path;
-
-    bool policySystemD = true;
-    bool policyUnlink  = true;
-    bool policySocket  = true;
-    bool policyBind    = true;
-    bool policyListen  = true;
-    bool policyConnect = true;
-
-    switch(m_type) {
-    case SRV_STREAM:
-        policyConnect = false;
-        break;
-    case CLI_STREAM:
-        policySystemD = false;
-        policyUnlink  = false;
-        policyBind    = false;
-        policyListen  = false;
-        break;
-    case SRV_DGRAM:
-        policyListen  = false;
-        policyConnect = false;
-        break;
-    case CLI_DGRAM:
-        policySystemD = false;
-        policyUnlink  = false;
-        policyBind    = false;
-        policyListen  = false;
-        policyConnect = false;
-        break;
-    }
-
-    if (m_fd != -1) {
-        return -1;
-    }
-
-    if (policySystemD) {
-        m_fd = getSocketFromSystemD();
-        if (m_fd >= 0) {
-            policyUnlink = false;
-            policySocket = false;
-            policyBind = false;
-        }
-    }
-
-    if (policyUnlink)
-        ::unlink(m_path.c_str());  // we ignore return value by design
-
-    if (policySocket)
-        m_fd = ::socket(AF_UNIX, getUnixSockType(), 0);
-
-    if (m_fd < 0)
-        return -1;
-
-    // remote is used in bind and in connect
-    sockaddr_un remote;
-    auto length = sizeof(sockaddr_un);
-    if (policyBind || policyConnect) {
-        remote.sun_family = AF_UNIX;
-        if (path.size() >= sizeof(remote.sun_path)) {
-            close();
-            return -1;
-        }
-        memcpy(remote.sun_path, path.c_str(), path.size()+1);
-    }
-
-    if (policyBind && (-1 == ::bind(m_fd, reinterpret_cast<sockaddr *>(&remote), sizeof(remote)))) {
-        close();
-        return -1;
-    }
-
-    if (policyListen && (-1 == ::listen(m_fd, 5))) {
-        close();
-        return -1;
-    }
-
-    if (policyConnect && (-1 == TEMP_FAILURE_RETRY(::connect(m_fd, reinterpret_cast<sockaddr *>(&remote), static_cast<socklen_t>(length)))))
-    {
-        close();
-        return -1;
-    }
-    return 0;
-}
-
-Sock Sock::accept() {
-    int retFd = TEMP_FAILURE_RETRY(::accept(m_fd, nullptr, nullptr));
-    if (retFd < 0) {
-        return Sock(CLI_STREAM, -1);
-    }
-    return Sock(CLI_STREAM, retFd);
-}
-
-int Sock::send(const RawBuffer &buffer) {
-    static const int flags = MSG_NOSIGNAL | MSG_DONTWAIT;
-    if (m_fd < 0)
-        return -1;
-
-    switch(m_type) {
-    default:
-        return -1;
-    case CLI_STREAM:
-        {
-            return static_cast<int>(
-                TEMP_FAILURE_RETRY(::send(m_fd, buffer.data(), buffer.size(), flags)));
-        }
-    case CLI_DGRAM:
-        {
-            struct sockaddr_un addr;
-            memset(&addr, 0, sizeof(addr));
-            addr.sun_family = AF_UNIX;
-            memcpy(addr.sun_path, m_path.data(), m_path.size());
-            return static_cast<int>(
-                TEMP_FAILURE_RETRY(::sendto(m_fd, buffer.data(), buffer.size(), flags,
-                            reinterpret_cast<const struct sockaddr*>(&addr), sizeof(addr))));
-        }
-    }
-}
-
-int Sock::wait(int mask) {
-    pollfd fd = {0, 0, 0};
-
-    fd.fd = m_fd;
-    fd.events = (mask & FdMask::READ ? POLLIN : 0) | (mask & FdMask::WRITE ? POLLOUT : 0);
-
-    if (fd.events == 0)
-        return -1;
-
-    if (0 > ::poll(&fd, 1, -1))
-        return -1;
-    return 0;
-}
-
-int Sock::recv(RawBuffer &output) {
-    if (m_fd < 0)
-        return -1;
-
-    switch(m_type) {
-    default:
-        return -1;
-    case CLI_STREAM:
-    case SRV_DGRAM:
-        {
-            RawBuffer buffer(4096);
-            int result = TEMP_FAILURE_RETRY(::recv(m_fd, buffer.data(), buffer.size(), MSG_DONTWAIT));
-            if (result > 0)
-                std::copy(buffer.begin(), buffer.begin()+result, std::back_inserter(output));
-            return static_cast<int>(result);
-        }
-    }
-}
-
-void Sock::close() {
-    if (m_fd >= 0)
-        ::close(m_fd);
-    m_fd = -1;
-}
-
-} // namespace Protocol
-} // namespace AskUser
-
diff --git a/src/common/protocol/sock.h b/src/common/protocol/sock.h
deleted file mode 100644 (file)
index 6aff31b..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        Sock.cpp
- * @author      Bartlomiej Grzelewski <b.grzelewski@samsung.com>
- * @brief       Declaration of client/server Sock wrapper
- */
-
-#pragma once
-
-#include <string>
-#include <unistd.h>
-
-#include <raw-buffer.h>
-
-namespace AskUser {
-namespace Protocol {
-
-class Sock {
-public:
-    enum Type {
-        SRV_STREAM,      // server side STREAM socket (you may call accept on it)
-                         // accept will always return CLI_STREAM
-        CLI_STREAM,      // client side STREAM socket
-        SRV_DGRAM,       // server side DATAGRAM socket
-        CLI_DGRAM,       // client side DATAGRAM socket
-    };
-
-    Sock(Type type = SRV_STREAM, int fd = -1);
-
-    Sock(const Sock &other) = delete;
-    Sock &operator=(const Sock &other) = delete;
-
-    Sock(Sock &&other);
-    Sock &operator=(Sock &&other);
-
-    virtual ~Sock() { close(); }
-
-    int getFd() const { return m_fd; }
-    int getType() const { return m_type; }
-    int getUnixSockType() const;
-
-    int connect(const std::string &path);
-    Sock accept();
-    void close();
-
-    int wait(int mask);
-    int recv(RawBuffer &buffer);
-    int send(const RawBuffer &buffer);
-
-private:
-    int getSocketFromSystemD() const;
-
-    Type m_type;
-    int m_fd;
-    std::string m_path;
-};
-
-} // namespace Protocol
-} // namespace AskUser
-
diff --git a/src/common/translator/GuiTranslator.cpp b/src/common/translator/GuiTranslator.cpp
deleted file mode 100644 (file)
index 8e8f0cf..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- *  Copyright (c) 2014-2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        GuiTranslator.cpp
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @author      Oskar Ĺšwitalski <o.switalski@samsung.com>
- * @brief       Implementation of GuiTranslator methods
- */
-
-#include "GuiTranslator.h"
-
-#include <sstream>
-#include <vector>
-
-namespace AskUser {
-namespace Translator {
-namespace Gui {
-
-std::string responseToString(NResponseType response)
-{
-    switch (response) {
-    case NResponseType::Allow:
-        return "Allow once";
-    case NResponseType::Deny:
-        return "Deny once";
-    case NResponseType::AllowAlways:
-        return "Allow always";
-    case NResponseType::DenyAlways:
-        return "Deny always";
-    case NResponseType::Error:
-        return "Error";
-    default:
-        return "None";
-    }
-}
-
-NotificationRequest dataToNotificationRequest(const std::string &data) {
-    std::stringstream stream(data);
-    std::size_t strSize;
-    char separator;
-
-    NotificationRequestId id;
-    std::string members[3];
-
-    stream >> id;
-    stream.read(&separator, 1);
-
-    for (auto &member : members) {
-        stream >> strSize;
-        std::vector<char> buffer(strSize, '\0');
-        char separator;
-        //Consume separator
-        stream.read(&separator, 1);
-        stream.read(buffer.data(), strSize);
-        //read doesn't append null
-        member.assign(buffer.begin(), buffer.end());
-    }
-
-    return NotificationRequest({id, std::move(members[0]), std::move(members[1]), "", std::move(members[2])});
-}
-
-std::string notificationRequestToData(NotificationRequestId id, const std::string &client,
-                                      const std::string &pkgLabel, const std::string &privilege)
-{
-    const char separator = ' ';
-    return std::to_string(id) + separator +
-         std::to_string(client.length()) + separator + client + separator +
-         std::to_string(pkgLabel.length()) + separator + pkgLabel + separator +
-         std::to_string(privilege.length()) + separator + privilege + separator + separator;
-}
-
-} //namespace Gui
-} //namespace Translator
-} //namespace AskUser
diff --git a/src/common/translator/GuiTranslator.h b/src/common/translator/GuiTranslator.h
deleted file mode 100644 (file)
index 857d885..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- *  Copyright (c) 2014-2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        GuiTranslator.h
- * @author      Zofia Abramowska <z.abramowska@samsung.com>
- * @author      Oskar Ĺšwitalski <o.switalski@samsung.com>
- * @brief       Definition of GuiTranslator methods
- */
-
-#pragma once
-
-#include <types/NotificationRequest.h>
-#include <types/NotificationResponse.h>
-#include <types/NotificationRequestId.h>
-
-#include <string>
-
-namespace AskUser {
-namespace Translator {
-namespace Gui {
-
-std::string responseToString(NResponseType response);
-NotificationRequest dataToNotificationRequest(const std::string &data);
-std::string notificationRequestToData(NotificationRequestId id, const std::string &client,
-                                      const std::string &pkgLabel, const std::string &privilege);
-} // namespace Gui
-} // namespace Translator
-} // namespace AskUser
index 6bd043417d095de96343563b261728efb21a5b56..470e4a48c6e3d0a88b5929ea01192164f057be96 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2014-2017 Samsung Electronics Co.
+ *  Copyright (c) 2014-2016 Samsung Electronics Co.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -27,7 +27,6 @@
 #include <limits>
 #include <stdexcept>
 #include <sstream>
-#include <vector>
 
 namespace AskUser {
 namespace Translator {
@@ -93,5 +92,60 @@ Cynara::PluginData requestToData(const std::string &client,
 }
 
 } //namespace Plugin
+
+namespace Gui {
+std::string responseToString(NResponseType response)
+{
+    switch (response) {
+    case NResponseType::Allow:
+        return "Allow once";
+    case NResponseType::Deny:
+        return "Deny once";
+    case NResponseType::AllowAlways:
+        return "Allow always";
+    case NResponseType::DenyAlways:
+        return "Deny always";
+    case NResponseType::Error:
+        return "Error";
+    default:
+        return "None";
+    }
+}
+
+NotificationRequest dataToNotificationRequest(const std::string &data) {
+    std::stringstream stream(data);
+    std::size_t strSize;
+    char separator;
+
+    cynara_agent_req_id id;
+    std::string members[2];
+
+    stream >> id;
+    stream.read(&separator, 1);
+
+    for (auto &member : members) {
+        stream >> strSize;
+        std::vector<char> buffer(strSize, '\0');
+        char separator;
+        //Consume separator
+        stream.read(&separator, 1);
+        stream.read(buffer.data(), strSize);
+        //read doesn't append null
+        member.assign(buffer.begin(), buffer.end());
+    }
+
+    return NotificationRequest({id, std::move(members[0]), "", std::move(members[1])});
+}
+
+std::string notificationRequestToData(RequestId id, const std::string &client,
+                                      const std::string &privilege)
+{
+    const char separator = ' ';
+    return std::to_string(id) + separator +
+         std::to_string(client.length()) + separator + client + separator +
+         std::to_string(privilege.length()) + separator + privilege + separator + separator;
+}
+
+} //namespace Gui
 } //namespace Translator
 } //namespace AskUser
index ed5fa4539dd5f86ac351f90b1b9692c29331c264..3b8efdc372f9d96c2ec5f1d2558fa350ee6800c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2014-2017 Samsung Electronics Co.
+ *  Copyright (c) 2014-2016 Samsung Electronics Co.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -22,6 +22,8 @@
 
 #pragma once
 
+#include <types/NotificationRequest.h>
+#include <types/NotificationResponse.h>
 #include <types/RequestData.h>
 #include <types/SupportedTypes.h>
 #include <cynara-plugin.h>
@@ -54,6 +56,13 @@ namespace Plugin {
                                      const std::string &privilege);
 } // namespace Plugin
 
+namespace Gui {
+
+std::string responseToString(NResponseType response);
+NotificationRequest dataToNotificationRequest(const std::string &data);
+std::string notificationRequestToData(RequestId id, const std::string &client,
+                                      const std::string &privilege);
+} // namespace Gui
 } // namespace Translator
 } // namespace AskUser
 
index 454360bc4139053cec722a124ec3f4ce03564b1e..35e9e653e21f9ce8dcec41a545c55cad1e72b34f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- *  Copyright (c) 2016-2017 Samsung Electronics Co.
+ *  Copyright (c) 2016 Samsung Electronics Co.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
  *  limitations under the License
  */
 /**
- * @file        src/common/types/NotificationRequest.h
+ * @file        src/common/types/NotificationResponse.h
  * @author      Oskar Ĺšwitalski <o.switalski@samsung.com>
  * @brief       Definition of common types and consts
  */
 
 #pragma once
 
-#include <string>
-#include <types/NotificationRequestId.h>
+#include <types/RequestId.h>
 #include <types/RequestData.h>
 
 namespace AskUser {
 
 struct NotificationRequest {
     NotificationRequest() : id(-1) {};
-    NotificationRequest(NotificationRequestId id_) : id(id_) {};
-    NotificationRequest(NotificationRequestId id_, std::string client, std::string pkgLabel,
-                        std::string user, std::string privilege)
+    NotificationRequest(RequestId id_) : id(id_) {};
+    NotificationRequest(RequestId id_, std::string client, std::string user, std::string privilege)
     : id(id_),
-      data{std::move(client), std::move(user), std::move(privilege)},
-      pkgLabel(std::move(pkgLabel))
+      data{std::move(client), std::move(user), std::move(privilege)}
     {}
-    NotificationRequestId id;
+    RequestId id;
     RequestData data;
-    std::string pkgLabel;
 };
 
 } // namespace AskUser
diff --git a/src/common/types/NotificationRequestId.h b/src/common/types/NotificationRequestId.h
deleted file mode 100644 (file)
index 7d4613c..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        NotificationRequestId.h
- * @author      Dariusz Michaluk <d.michaluk@samsung.com>
- * @brief       NotificationRequestId typedef
- */
-
-#pragma once
-
-#include <cstdint>
-
-namespace AskUser {
-
-typedef uint16_t NotificationRequestId;
-
-} // namespace AskUser
index 8f6f21ff7af134a90bed00aaba052ddf9f264bae..bdfd170e26726d9efa9d06945dd514ef987f70e9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- *  Copyright (c) 2016-2017 Samsung Electronics Co.
+ *  Copyright (c) 2016 Samsung Electronics Co.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -22,7 +22,8 @@
 
 #pragma once
 
-#include <types/NotificationRequestId.h>
+#include <cynara-agent.h>
+#include <types/RequestId.h>
 
 namespace AskUser {
 
@@ -37,7 +38,7 @@ enum class NResponseType
 };
 
 struct NotificationResponse {
-    NotificationRequestId id;
+    RequestId id;
     NResponseType response;
 };
 
index 27a2f3e89eeb99f199070ed6ded45293da64a643..8e649bacc08033595b4f89de20a87aa442047932 100644 (file)
@@ -55,39 +55,3 @@ INSTALL(TARGETS ${TARGET_PLUGIN_SERVICE}
     DESTINATION ${LIB_INSTALL_DIR}/cynara/plugin/service/)
 INSTALL(TARGETS ${TARGET_PLUGIN_CLIENT}
     DESTINATION ${LIB_INSTALL_DIR}/cynara/plugin/client/)
-
-########################## PRIVACY DENIED PLUGINS ##############################
-
-PKG_CHECK_MODULES(PDP_DEP
-    REQUIRED
-    cynara-plugin
-    security-manager
-    askuser-notification
-    )
-
-INCLUDE_DIRECTORIES(
-    ${ASKUSER_PATH}/common/config
-    SYSTEM
-    ${PDP_DEP_INCLUDE_DIRS}
-    )
-
-SET(PDP_CLIENT_SOURCES
-    ${PLUGIN_PATH}/client/PrivacyPlugin.cpp
-    )
-
-SET(PDP_SERVICE_SOURCES
-    ${PLUGIN_PATH}/service/PrivacyPlugin.cpp
-    )
-
-LINK_DIRECTORIES(${PDP_DEP_LIBRARY_DIRS})
-
-ADD_LIBRARY(${TARGET_PRIVACYDENIED_PLUGIN_SERVICE} SHARED ${PDP_SERVICE_SOURCES})
-ADD_LIBRARY(${TARGET_PRIVACYDENIED_PLUGIN_CLIENT} SHARED ${PDP_CLIENT_SOURCES})
-
-TARGET_LINK_LIBRARIES(${TARGET_PRIVACYDENIED_PLUGIN_SERVICE} ${PDP_DEP_LIBRARIES})
-TARGET_LINK_LIBRARIES(${TARGET_PRIVACYDENIED_PLUGIN_CLIENT} ${PDP_DEP_LIBRARIES})
-
-INSTALL(TARGETS ${TARGET_PRIVACYDENIED_PLUGIN_SERVICE}
-    DESTINATION ${LIB_INSTALL_DIR}/cynara/plugin/service/)
-INSTALL(TARGETS ${TARGET_PRIVACYDENIED_PLUGIN_CLIENT}
-    DESTINATION ${LIB_INSTALL_DIR}/cynara/plugin/client/)
diff --git a/src/plugin/client/PrivacyPlugin.cpp b/src/plugin/client/PrivacyPlugin.cpp
deleted file mode 100644 (file)
index f1722e7..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        PrivacyPlugin.cpp
- * @author
- * @brief       Implementation of cynara client side PrivacyDenied plugin.
- */
-
-#include <vector>
-#include <cynara-client-plugin.h>
-#include <cynara-error.h>
-
-#include <attributes/attributes.h>
-#include <PrivacyConfig.h>
-
-using namespace Cynara;
-
-namespace PrivacyDeniedPlugin {
-const std::vector<PolicyDescription> clientDescriptions = {
-    { Config::ASK_USER_LEGACY, "ASK_USER_LEGACY" },
-    { Config::PRIVACY_DENY, "PRIVACY_DENY" }
-};
-
-class ClientPlugin : public ClientPluginInterface {
-public:
-    const std::vector<PolicyDescription> &getSupportedPolicyDescr() {
-        return clientDescriptions;
-    }
-
-    bool isCacheable(const ClientSession &session UNUSED, const PolicyResult &result UNUSED) {
-        return true;
-    }
-
-    bool isUsable(const ClientSession &session,
-                  const ClientSession &prevSession,
-                  bool &updateSession,
-                  PolicyResult &result UNUSED)
-    {
-        updateSession = false;
-        return (session.compare(prevSession) == 0);
-    }
-
-    void invalidate() {}
-
-    int toResult(const ClientSession &session UNUSED, PolicyResult &result UNUSED) {
-        return CYNARA_API_ACCESS_DENIED;
-    }
-};
-
-} // namespace PrivacyDeniedPlugin
-
-extern "C" {
-
-ExternalPluginInterface *create(void) {
-    return new PrivacyDeniedPlugin::ClientPlugin();
-}
-
-void destroy(ExternalPluginInterface *ptr) {
-    delete ptr;
-}
-
-} // extern "C"
diff --git a/src/plugin/service/PrivacyPlugin.cpp b/src/plugin/service/PrivacyPlugin.cpp
deleted file mode 100644 (file)
index 2478814..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- *  Copyright (c) 2017 Samsung Electronics Co.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  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
- */
-/**
- * @file        PrivacyPlugin.cpp
- * @author
- * @brief       Implementation of cynara service side PrivacyDenied plugin.
- */
-
-#include <memory>
-#include <string>
-#include <vector>
-#include <cynara-plugin.h>
-
-#include <app-runtime.h>
-#include <attributes/attributes.h>
-#include <PrivacyConfig.h>
-#include <askuser-notification/ask-user-client.h>
-
-using namespace Cynara;
-
-namespace PrivacyDeniedPlugin {
-
-const std::vector<PolicyDescription> serviceDescriptions = {
-    { Config::ASK_USER_LEGACY, "ASK_USER_LEGACY" },
-    { Config::PRIVACY_DENY, "PRIVACY_DENY" }
-};
-
-class ServicePlugin : public ServicePluginInterface {
-public:
-    ServicePlugin() {}
-
-    const std::vector<PolicyDescription> &getSupportedPolicyDescr() {
-        return serviceDescriptions;
-    }
-
-    PluginStatus check(const std::string &client,
-                       const std::string &user,
-                       const std::string &privilege,
-                       PolicyResult &result UNUSED,
-                       AgentType &requiredAgent UNUSED,
-                       PluginData &pluginData UNUSED) noexcept
-    {
-        toast(client, user, privilege);
-        return PluginStatus::ANSWER_READY;
-    }
-
-    PluginStatus update(const std::string &client UNUSED,
-                        const std::string &user UNUSED,
-                        const std::string &privilege UNUSED,
-                        const PluginData &agentData UNUSED,
-                        PolicyResult &result UNUSED) noexcept
-    {
-        // This function should be never called
-        return PluginStatus::ERROR;
-    }
-
-    void invalidate() {}
-
-private:
-    void toast(const std::string &client, const std::string &user, const std::string &privilege) {
-        char *pkgName = nullptr, *appName = nullptr;
-        int ret = security_manager_identify_app_from_cynara_client(client.c_str(), &pkgName, &appName);
-        if (ret != SECURITY_MANAGER_SUCCESS || pkgName == nullptr)
-            return;
-
-        std::unique_ptr<char, decltype(free)*> pkgNamePtr(pkgName, free);
-        std::unique_ptr<char, decltype(free)*> appNamePtr(appName, free);
-        AskUser::Protocol::toast_deny(pkgName, (appName ? appName : ""), std::stoi(user), privilege);
-    }
-};
-
-} // namespace PrivacyDeniedPlugin
-
-extern "C" {
-ExternalPluginInterface *create(void) {
-    return new PrivacyDeniedPlugin::ServicePlugin();
-}
-
-void destroy(ExternalPluginInterface *ptr) {
-    delete ptr;
-}
-} // extern "C"
index 334c3c748252f2e6ca9f88a445a6beeaa1cf29d6..62f890312fdfea6a3168983c73b48919418616d9 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2014-2017 Samsung Electronics Co., Ltd All Rights Reserved
+# Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
 #
 #    Licensed under the Apache License, Version 2.0 (the "License");
 #    you may not use this file except in compliance with the License.
 # @author      Adam Malinowski <a.malinowsk2@partner.samsung.com>
 #
 
-IF (BUILD_ASKUSER)
 INSTALL(FILES
-    ${CMAKE_SOURCE_DIR}/systemd/askuser.service
+    ${CMAKE_SOURCE_DIR}/systemd/${PROJECT_NAME}.service
     DESTINATION
     lib/systemd/system
 )
-ENDIF (BUILD_ASKUSER)
 
-IF (BUILD_ASKUSER_NOTIFICATION)
 INSTALL(FILES
     ${CMAKE_SOURCE_DIR}/systemd/askuser-notification.service
-    ${CMAKE_SOURCE_DIR}/systemd/askuser-notification-stream.socket
-    ${CMAKE_SOURCE_DIR}/systemd/askuser-notification-datagram.socket
+    ${CMAKE_SOURCE_DIR}/systemd/askuser-notification.socket
     DESTINATION
     lib/systemd/user
 )
-ENDIF (BUILD_ASKUSER_NOTIFICATION)
diff --git a/systemd/askuser-notification-datagram.socket b/systemd/askuser-notification-datagram.socket
deleted file mode 100644 (file)
index 924250c..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-[Socket]
-ListenDatagram=/run/user_ext/%U/askuser-notification-datagram.socket
-SocketMode=0777
-
-Service=askuser-notification.service
-
-[Install]
-WantedBy=sockets.target
diff --git a/systemd/askuser-notification-stream.socket b/systemd/askuser-notification-stream.socket
deleted file mode 100644 (file)
index 2e932e0..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-[Socket]
-ListenStream=/run/user_ext/%U/askuser-notification-stream.socket
-SocketMode=0777
-
-Service=askuser-notification.service
-
-[Install]
-WantedBy=sockets.target
index 5f4d4143aae067c632d3e880ff07e616dd489fba..65cd23db3de24fc3ba3ee5e4e3f8588b587881db 100644 (file)
@@ -4,8 +4,7 @@ Description=Ask user notification
 [Service]
 ExecStart=/usr/bin/askuser-notification
 Type=notify
-Sockets=askuser-notification-datagram.socket
-Sockets=askuser-notification-stream.socket
+Sockets=askuser-notification.socket
 TimeoutStopSec=10
 TimeoutStartSec=10
 
diff --git a/systemd/askuser-notification.socket b/systemd/askuser-notification.socket
new file mode 100644 (file)
index 0000000..194ab60
--- /dev/null
@@ -0,0 +1,9 @@
+[Socket]
+ListenStream=/run/user_ext/%U/askuser-notification.socket
+SocketMode=0770
+
+Service=askuser-notification.service
+ExecStartPost=/usr/bin/chmod 0666 /run/user_ext/%U/askuser-notification.socket
+
+[Install]
+WantedBy=sockets.target
index 6cc5bd057c17ff98642ea3fa10b4002ce7073136..2e3647063b3e934a2ab9726f657891153aaa63a1 100644 (file)
@@ -1,5 +1,6 @@
 [Unit]
 Description=Ask user agent
+Before=dbus.service
 
 [Service]
 ExecStart=/usr/bin/askuser
@@ -17,4 +18,4 @@ Group=security_fw
 #Environment="ASKUSER_LOG_LEVEL=LOG_DEBUG"
 
 [Install]
-WantedBy=multi-user.target cynara.service
+WantedBy=multi-user.target
index 31059a16bcecf009284864047af6f9c3ae636053..7299b5e38048e9f550c6ce79be000bdc0e4e1912 100644 (file)
@@ -4,11 +4,17 @@ FIND_PACKAGE(Threads REQUIRED) # Required by gmock
 
 PKG_CHECK_MODULES(TESTS_DEP
     QUIET gmock
-    cynara-agent
+    cynara-client
+    cynara-creds-socket
+    cynara-admin
+    libsystemd-daemon
 )
 
 INCLUDE_DIRECTORIES(
-    ${ASKUSER_PATH}/common
+    ${PROJECT_SOURCE_DIR}/src
+    ${PROJECT_SOURCE_DIR}/src/common
+    ${PROJECT_SOURCE_DIR}/src/agent
+    ${PROJECT_SOURCE_DIR}/src/agent/main
     ${gmock_INCLUDE_DIRS}
 )
 
@@ -16,6 +22,14 @@ SET(TESTS_SOURCES
     ${TESTS_PATH}/main.cpp
     ${TESTS_PATH}/common/exception.cpp
     ${TESTS_PATH}/common/translator.cpp
+
+    ${PROJECT_SOURCE_DIR}/src/common/config/Limits.cpp
+    ${PROJECT_SOURCE_DIR}/src/common/config/Path.cpp
+    ${PROJECT_SOURCE_DIR}/src/common/log/alog.cpp
+    ${PROJECT_SOURCE_DIR}/src/common/socket/Socket.cpp
+    ${PROJECT_SOURCE_DIR}/src/common/socket/Poll.cpp
+    ${PROJECT_SOURCE_DIR}/src/common/translator/Translator.cpp
+    ${PROJECT_SOURCE_DIR}/src/common/types/AgentErrorMsg.cpp
    )
 
 ADD_DEFINITIONS(${TESTS_DEP_CFLAGS})
@@ -29,9 +43,8 @@ SET_TARGET_PROPERTIES(${TARGET_TESTS} PROPERTIES
 
 TARGET_LINK_LIBRARIES(${TARGET_TESTS}
     ${TESTS_DEP_LIBRARIES}
-    ${TARGET_ASKUSER_COMMON}
-    ${gmock_LDFLAGS}
-    ${gmock_LIBRARIES}
+        ${gmock_LDFLAGS}
+        ${gmock_LIBRARIES}
     -pie
 )
 
index 9b91dc3270f02b90228bc05e4fae242a6281106b..667d18c8c33c814ad16b1a6d480ab4d666293bf5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2017 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
  *
  *    Licensed under the Apache License, Version 2.0 (the "License");
  *    you may not use this file except in compliance with the License.
@@ -26,7 +26,6 @@
 #include <gtest/gtest.h>
 
 #include <translator/Translator.h>
-#include <translator/GuiTranslator.h>
 
 using namespace AskUser;
 
@@ -44,16 +43,14 @@ TEST(TranslatorTest, PluginData_Strings) {
 }
 
 TEST(TranslatorTest, NotificationRequest) {
-    NotificationRequestId id = 1234;
-    std::string client = "lorem ipsum dolor est amet";
-    std::string pkgLabel = "My app";
+    cynara_agent_req_id id = 1234;
+    std::string app = "lorem ipsum dolor est amet";
     std::string privilege = "http://example.com/permissions/example";
 
-    auto data = Translator::Gui::notificationRequestToData(id, client, pkgLabel, privilege);
+    auto data = Translator::Gui::notificationRequestToData(id, app, privilege);
     auto request = Translator::Gui::dataToNotificationRequest(data);
 
     ASSERT_EQ(id, request.id);
-    ASSERT_EQ(client, request.data.client);
+    ASSERT_EQ(app, request.data.client);
     ASSERT_EQ(privilege, request.data.privilege);
-    ASSERT_EQ(pkgLabel, request.pkgLabel);
 }
index a607dfbb764ab100af336155e26a5fcaa61f9add..0345392eeb62b78bcc2f41789cb4120109411729 100644 (file)
@@ -6,7 +6,8 @@ PKG_CHECK_MODULES(TEST_DEP
 )
 
 INCLUDE_DIRECTORIES(
-    ${ASKUSER_PATH}/common
+    ${PROJECT_SOURCE_DIR}/src
+    ${PROJECT_SOURCE_DIR}/src/common
 )
 
 SET(TEST_SOURCES