IF (BUILD_ASKUSER)
SET(TARGET_ASKUSER "askuser")
SET(TARGET_ASKUSER_COMMON "askuser-common")
- SET(TARGET_ASKUSER_NOTIFICATION_LIB "askuser-notification")
+ SET(TARGET_ASKUSER_NOTIFICATION_LIB "askuser-notification-ipc")
SET(TARGET_PLUGIN_SERVICE "askuser-plugin-service")
SET(TARGET_PLUGIN_CLIENT "askuser-plugin-client")
SET(TARGET_PRIVACYDENIED_PLUGIN_CLIENT "privacy-denied-plugin-client")
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(capi-ui-efl-util)
BuildRequires: pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(askuser-notification-ipc)
BuildRequires: coregl
BuildRequires: edje-bin
%files -n libaskuser-notification
%manifest libaskuser-notification.manifest
%license LICENSE
-%{_libdir}/libaskuser-notification.so.*
+%{_libdir}/libaskuser-notification-ipc.so.*
%files -n libaskuser-notification-devel
-%{_libdir}/libaskuser-notification.so
+%{_libdir}/libaskuser-notification-ipc.so
%{_includedir}/askuser-notification
-%{_libdir}/pkgconfig/askuser-notification.pc
+%{_libdir}/pkgconfig/askuser-notification-ipc.pc
%files -n askuser-plugins
%manifest askuser-plugins.manifest
capi-ui-efl-util
capi-system-info
security-privilege-manager
+ askuser-notification-ipc
)
INCLUDE_DIRECTORIES(SYSTEM
SET(ASKUSER_NOTIFICATION_VERSION_MAJOR 0)
SET(ASKUSER_NOTIFICATION_VERSION ${ASKUSER_NOTIFICATION_VERSION_MAJOR}.1.0)
-SET(PC_FILE "askuser-notification.pc")
+SET(PC_FILE "askuser-notification-ipc.pc")
PKG_CHECK_MODULES(ASKUSER_NOTIFICATION_DEP
REQUIRED
INCLUDE_DIRECTORIES(
${PROTOCOL_PATH}
+ SYSTEM
${ASKUSER_NOTIFICATION_DEP_INCLUDE_DIRS}
)
VERSION ${ASKUSER_NOTIFICATION_VERSION}
)
+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})
} // namespace anonymous
std::string getDatagramSocketPath(uid_t uid) {
- return USER_EXT_PATH + std::to_string(uid) + SOCKET_STREAM_NAME;
+ 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_DGRAM_NAME;
+ return USER_EXT_PATH + std::to_string(uid) + SOCKET_STREAM_NAME;
}
Name: askuser-notification
Description: askuser-notification library
Version: @ASKUSER_NOTIFICATION_VERSION@
-Libs: -L${libdir} -laskuser-notification
+Libs: -L${libdir} -laskuser-notification-ipc
Cflags: -I${includedir}/askuser-notification
return;
if (0 == mask) {
- m_socket.erase(it);
m_callbacks->updateFd(fd, 0);
+ m_socket.erase(it);
return;
}
int ret = desc.sock.recv(desc.input);
if (ret <= 0) {
- m_socket.erase(fd);
m_callbacks->updateFd(fd, 0);
+ m_socket.erase(fd);
return;
}
int size = static_cast<int>(desc.output.size());
int result = desc.sock.send(desc.output);
if (result < 0) {
- m_socket.erase(fd);
m_callbacks->updateFd(fd, 0);
+ m_socket.erase(fd);
return;
}
}
void stream() {
- PrivilegeVector vect = {"one", "two"};
+ PrivilegeVector vect = {"http://tizen.org/privilege/camera", "http://tizen.org/privilege/contacts"};
int result;
- UNUSED int ret = popup_launch("spkg", "sapp", getuid(), vect, 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("tpkg1", "sapp1", getuid(), "some_priv");
+ toast_deny("org.tizen.memo", "org.tizen.memo", getuid(), "http://tizen.org/privilege/camera");
printf("sended\n");
}
void toust2() {
- toast_fail_launch("tpkg2", "sapp2", getuid());
+ toast_fail_launch("org.tizen.memo", "org.tizen.memo", getuid());
printf("sended\n");
}
int main(){
int com;
- printf("0 - server, 1 - send stream, 2 - send toust1, 3 - send toust2\n>");
+ printf("0 - server, 1 - send popup, 2 - send toust1, 3 - send toust2\n>");
UNUSED int ret = scanf("%d", &com);
switch(com) {
return 0;
}
-int Sock::getSocketFromSystemD() {
+int Sock::getSocketFromSystemD() const {
#ifdef BUILD_WITH_SYSTEMD_DAEMON
int n = sd_listen_fds(0);
int send(const RawBuffer &buffer);
private:
- int getSocketFromSystemD();
+ int getSocketFromSystemD() const;
Type m_type;
int m_fd;
[Service]
ExecStart=/usr/bin/askuser-notification
Type=notify
-Sockets=askuser-notification.socket
+Sockets=askuser-notification-datagram.socket
+Sockets=askuser-notification-stream.socket
TimeoutStopSec=10
TimeoutStartSec=10