IF (BUILD_ASKUSER)
SET(TARGET_ASKUSER "askuser")
SET(TARGET_ASKUSER_COMMON "askuser-common")
+ SET(TARGET_ASKUSER_NOTIFICATION_LIB "askuser-notification")
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")
+ SET(TARGET_ASKUSER_NOTIFICATION_TEST "askuser-notification-test")
ADD_SUBDIRECTORY(src/agent)
ADD_SUBDIRECTORY(src/common)
+ ADD_SUBDIRECTORY(src/common/protocol)
ADD_SUBDIRECTORY(src/plugin)
ADD_SUBDIRECTORY(test)
ENDIF (BUILD_ASKUSER)
Source1003: askuser-plugins.manifest
Source1004: askuser-test.manifest
Source1005: privacy-denied-plugins.manifest
+Source1006: libaskuser-notification.manifest
BuildRequires: cmake
BuildRequires: pkgconfig(cynara-agent)
%if %{with_systemd_daemon}
%description -n libaskuser-common
Askuser common library with common functionalities
+%package -n libaskuser-notification
+Summary: Askuser notification protocol library
+
+%description -n libaskuser-notification
+Askuser notification protocol library
+
+%package -n libaskuser-notification-devel
+Summary: Askuser notification protocol library development files
+
+%description -n libaskuser-notification-devel
+Askuser notification protocol library development files
+
%package -n askuser-plugins
BuildRequires: pkgconfig(cynara-plugin)
Requires: cynara
cp -a %{SOURCE1003} .
cp -a %{SOURCE1004} .
cp -a %{SOURCE1005} .
+cp -a %{SOURCE1006} .
%build
%if 0%{?sec_build_binary_debug_enable}
%endif
%post -n libaskuser-common -p /sbin/ldconfig
+%post -n libaskuser-notification -p /sbin/ldconfig
%postun -n libaskuser-common -p /sbin/ldconfig
+%postun -n libaskuser-notification -p /sbin/ldconfig
%files -n %{name}
%manifest %{name}.manifest
%license LICENSE
%{_libdir}/libaskuser-common.so*
+%files -n libaskuser-notification
+%manifest libaskuser-notification.manifest
+%license LICENSE
+%{_libdir}/libaskuser-notification.so.*
+
+%files -n libaskuser-notification-devel
+%{_libdir}/libaskuser-notification.so
+%{_includedir}/askuser-notification
+%{_libdir}/pkgconfig/askuser-notification.pc
+
%files -n askuser-plugins
%manifest askuser-plugins.manifest
%license LICENSE
%license LICENSE
%attr(755,root,root) /usr/bin/askuser-test
%attr(755,root,root) /usr/bin/askuser-tests
+%attr(755,root,root) /usr/bin/askuser-notification-test
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_" />
+ </request>
+</manifest>
-SET(TARGET_PROTOCOL "protocol")
+# 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(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g -ggdb -O0")
+SET(PROTOCOL_PATH ${ASKUSER_PATH}/common/protocol)
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}
- )
+SET(ASKUSER_NOTIFICATION_VERSION_MAJOR 0)
+SET(ASKUSER_NOTIFICATION_VERSION ${ASKUSER_NOTIFICATION_VERSION_MAJOR}.1.0)
-SET(PROTOCOL_SOURCES
- ${PROJECT_SOURCE_DIR}/channel.cpp
- ${PROJECT_SOURCE_DIR}/ask-user-client.cpp
- ${PROJECT_SOURCE_DIR}/sock.cpp
- ${PROJECT_SOURCE_DIR}/ask-user-config.cpp
- )
+SET(PC_FILE "askuser-notification.pc")
-ADD_LIBRARY(${TARGET_PROTOCOL} SHARED ${PROTOCOL_SOURCES})
+INCLUDE_DIRECTORIES(
+ ${PROTOCOL_PATH}
+ )
-TARGET_LINK_LIBRARIES(${TARGET_PROTOCOL})
+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
+ )
-SET(TARGET_PTEST "test")
+ADD_DEFINITIONS("-fvisibility=default")
-SET(TARGET_PTEST_SOURCES
- ${PROJECT_SOURCE_DIR}/main.cpp
- )
+ADD_LIBRARY(${TARGET_ASKUSER_NOTIFICATION_LIB} SHARED ${ASKUSER_NOTIFICATION_SOURCES})
+ADD_EXECUTABLE(${TARGET_ASKUSER_NOTIFICATION_TEST} ${ASKUSER_NOTIFICATION_TEST_SOURCES})
-ADD_EXECUTABLE(${TARGET_PTEST} ${TARGET_PTEST_SOURCES})
+SET_TARGET_PROPERTIES(${TARGET_ASKUSER_NOTIFICATION_LIB}
+ PROPERTIES
+ SOVERSION ${ASKUSER_NOTIFICATION_VERSION_MAJOR}
+ VERSION ${ASKUSER_NOTIFICATION_VERSION}
+ )
-TARGET_LINK_LIBRARIES(${TARGET_PTEST} ${TARGET_PROTOCOL})
+TARGET_LINK_LIBRARIES(${TARGET_ASKUSER_NOTIFICATION_LIB})
+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})
#include <vector>
#include <memory>
-#include <ask-user/ask-user-client.h>
-#include <ask-user/ask-user-service.h>
+#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_runtime(const std::string &pkgName,
- const std::string &appName,
- uid_t uid,
- std::string &privilege,
- int &result)
+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;
}
+++ /dev/null
-/*
- * 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 <ask-user/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
-
+++ /dev/null
-/*
- * 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 <ask-user/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
-
+++ /dev/null
-/*
- * 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_DENY_ONCE 0
-#define ASKUSER_DENY_FOREVER 1
-#define ASKUSER_ALLOW_ONCE 2
-#define ASKUSER_ALLOW_FOREVER 3
-#define ASKUSER_UNKNOWN_ERROR -255
-
-namespace AskUser {
-namespace Protocol {
-
-typedef std::string Privilege;
-typedef std::vector<Privilege> PrivilegeVector;
-
-} // namespace Protocol
-} // AskUser
-
--- /dev/null
+# 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
--- /dev/null
+/*
+ * 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
+
--- /dev/null
+/*
+ * 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
+
--- /dev/null
+/*
+ * 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_DENY_ONCE 0
+#define ASKUSER_DENY_FOREVER 1
+#define ASKUSER_ALLOW_ONCE 2
+#define ASKUSER_ALLOW_FOREVER 3
+#define ASKUSER_UNKNOWN_ERROR -255
+
+namespace AskUser {
+namespace Protocol {
+
+typedef std::string Privilege;
+typedef std::vector<Privilege> PrivilegeVector;
+
+} // namespace Protocol
+} // AskUser
+
#include <sstream>
#include <string>
-#include <ask-user/ask-user-service.h>
+#include <askuser-notification/ask-user-service.h>
#include <ask-user-config.h>
#include <channel.h>
#include <string>
#include <vector>
-#include <ask-user/ask-user-service.h>
+#include <askuser-notification/ask-user-service.h>
+
#include <raw-buffer.h>
#include <sock.h>
#include <poll.h>
#include <unistd.h>
-#include <ask-user/ask-user-client.h>
-#include <ask-user/ask-user-service.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 {
m_sockets[fd] = mask;
}
- virtual void popup_launch(int requestId, const std::string &pkgName, const std::string &appName, uid_t uid, const PrivilegeVector &priv) {
+ 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, const Privilege &privilege) {
+ 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);
}
void stream() {
PrivilegeVector vect = {"one", "two"};
int result;
- int ret = popup_launch("spkg", "sapp", getuid(), vect, result);
+ UNUSED int ret = popup_launch("spkg", "sapp", getuid(), vect, result);
printf("Sended stream. Result: %x\n", result);
}
int main(){
int com;
printf("0 - server, 1 - send stream, 2 - send toust1, 3 - send toust2\n>");
- scanf("%d", &com);
+ UNUSED int ret = scanf("%d", &com);
switch(com) {
case 0:
#include <string>
#include <vector>
-#include <ask-user/ask-user-service.h>
+#include <askuser-notification/ask-user-service.h>
#include <sock.h>
}
int Sock::wait(int mask) {
- pollfd fd = {};
+ pollfd fd = {0, 0, 0};
fd.fd = m_fd;
fd.events = (mask & FdMask::READ ? POLLIN : 0) | (mask & FdMask::WRITE ? POLLOUT : 0);