On Wednesday 14 August 2013 11:53:43 Sven Brauch wrote: > Hi! > > I'm writing a KIO slave for the infinote protocol [1]. The protocol features > push-notifications for connected clients when a file is added or removed, > and it's sort of important for the user to see when files are added. Thus, > I'd like to make the application using the slave (e.g. dolphin) reload the > view when such a notification arrives. In theory, I know I can do this > through the KDirNotify interface, but in practice, there's two problems: > > (1) I have no idea how long slaves are kept alive. Can I bind them to a > specific view (e.g. dolphin window) and prevent them from exiting until > the user closes the window, to make sure notifications are actually being > received?
No, which is why people typically create a kded module for the purpose of such always-running watching and notifying. > (2) I do not know which URL to pass to KDirNotify, since such an URL might > or might not include user name, default port, ... And if the URL format > passed to KDirNotify by the slave differs from the format in e.g. dolphin's > URL bar, the view will not be reloaded. I don't really follow this one. The URLs have to match as you noted. Maybe your kioslaves can register the URLs being used, so that the kdirnotify signals use the right URLs? -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5