Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add daemon to delegate file operations to
- Loading branch information
1 parent
39a6b87
commit 5c3343c
Showing
10 changed files
with
614 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[D-BUS Service] | ||
Name=org.nemomobile.FileOperations | ||
Exec=/usr/bin/invoker -s --type=qt5 /usr/bin/fileoperationsd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<node name="/org/nemomobile/FileOperations"> | ||
<interface name="org.nemomobile.FileOperations"> | ||
<method name="Copy"> | ||
<annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> | ||
<arg type="as" name="paths" direction="in" /> | ||
<arg type="s" name="destination" direction="in" /> | ||
<arg type="u" name="handle" direction="out" /> | ||
</method> | ||
|
||
<method name="Move"> | ||
<annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> | ||
<arg type="as" name="paths" direction="in" /> | ||
<arg type="s" name="destination" direction="in" /> | ||
<arg type="u" name="handle" direction="out" /> | ||
</method> | ||
|
||
<method name="Delete"> | ||
<annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> | ||
<arg type="as" name="paths" direction="in" /> | ||
<arg type="u" name="handle" direction="out" /> | ||
</method> | ||
|
||
<method name="Mkdir"> | ||
<annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> | ||
<arg type="s" name="path" direction="in" /> | ||
<arg type="s" name="destination" direction="in" /> | ||
<arg type="u" name="handle" direction="out" /> | ||
</method> | ||
|
||
<method name="Rename"> | ||
<annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> | ||
<arg type="s" name="oldPath" direction="in" /> | ||
<arg type="s" name="newPath" direction="in" /> | ||
<arg type="u" name="handle" direction="out" /> | ||
</method> | ||
|
||
<method name="SetPermissions"> | ||
<annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> | ||
<arg type="s" name="path" direction="in" /> | ||
<arg type="u" name="mask" direction="in" /> | ||
<arg type="u" name="handle" direction="out" /> | ||
</method> | ||
|
||
<method name="Cancel"> | ||
<arg type="u" name="handle" direction="in" /> | ||
</method> | ||
|
||
<signal name="Succeeded"> | ||
<arg type="u" name="handle" /> | ||
<arg type="as" name="paths" /> | ||
</signal> | ||
|
||
<signal name="Failed"> | ||
<arg type="u" name="handle" /> | ||
<arg type="as" name="paths" /> | ||
<arg type="u" name="errorCode" /> | ||
</signal> | ||
|
||
<signal name="Finished"> | ||
<arg type="u" name="handle" /> | ||
</signal> | ||
</interface> | ||
</node> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
TEMPLATE = app | ||
TARGET = fileoperationsd | ||
|
||
QT += dbus | ||
CONFIG += c++11 | ||
|
||
CONFIG += link_pkgconfig link_prl | ||
|
||
packagesExist(qt5-boostable) { | ||
DEFINES += HAS_BOOSTER | ||
PKGCONFIG += qt5-boostable | ||
} else { | ||
warning("qt5-boostable not available; startup times will be slower") | ||
} | ||
|
||
system(qdbusxml2cpp -c FileOperationsAdaptor -a fileoperationsadaptor.h:fileoperationsadaptor.cpp ../../dbus/org.nemomobile.FileOperations.xml) | ||
|
||
HEADERS =\ | ||
fileoperationsadaptor.h \ | ||
fileoperationsservice.h | ||
|
||
SOURCES =\ | ||
fileoperationsadaptor.cpp \ | ||
fileoperationsservice.cpp \ | ||
main.cpp | ||
|
||
INCLUDEPATH += ../plugin | ||
|
||
SERVICE_FILE = ../../dbus/org.nemomobile.FileOperations.service | ||
INTERFACE_FILE = ../../dbus/org.nemomobile.FileOperations.xml | ||
OTHER_FILES += $$SERVICE_FILE $$INTERFACE_FILE | ||
|
||
service.files = $$SERVICE_FILE | ||
service.path = /usr/share/dbus-1/services/ | ||
|
||
interface.files = $$INTERFACE_FILE | ||
interface.path = /usr/share/dbus-1/interfaces/ | ||
|
||
target.path = /usr/bin | ||
|
||
INSTALLS += service interface target |
Oops, something went wrong.