Changeset View
Changeset View
Standalone View
Standalone View
mtp/shared/org.kde.kmtp.storage.xml
- This file was added.
1 | <!DOCTYPE node PUBLIC | ||||
---|---|---|---|---|---|
2 | "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" | ||||
3 | "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> | ||||
4 | | ||||
5 | <!-- | ||||
6 | This file is part of the KMTP framework, part of the KDE project. | ||||
7 | | ||||
8 | Copyright (C) 2018 Andreas Krutzler <andreas.krutzler@gmx.net> | ||||
9 | | ||||
10 | This library is free software; you can redistribute it and/or | ||||
11 | modify it under the terms of the GNU Lesser General Public | ||||
12 | License as published by the Free Software Foundation; either | ||||
13 | version 2.1 of the License, or (at your option) version 3, or any | ||||
14 | later version accepted by the membership of KDE e.V. (or its | ||||
15 | successor approved by the membership of KDE e.V.), which shall | ||||
16 | act as a proxy defined in Section 6 of version 3 of the license. | ||||
17 | | ||||
18 | This library is distributed in the hope that it will be useful, | ||||
19 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
21 | Lesser General Public License for more details. | ||||
22 | | ||||
23 | You should have received a copy of the GNU Lesser General Public | ||||
24 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||||
25 | --> | ||||
26 | | ||||
27 | <node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"> | ||||
28 | | ||||
29 | <!-- org.kde.kmtp.Storage: | ||||
30 | @short_description: MTP file, folder and object access API | ||||
31 | | ||||
32 | This D-Bus interface is used to access MTP files, folders and objects. | ||||
33 | --> | ||||
34 | <interface name="org.kde.kmtp.Storage"> | ||||
35 | | ||||
36 | <!-- description: A brief description of this storage. | ||||
37 | --> | ||||
38 | <property name="description" type="s" access="read"/> | ||||
39 | <property name="maxCapacity" type="t" access="read"/> | ||||
40 | <property name="freeSpaceInBytes" type="t" access="read"/> | ||||
41 | | ||||
42 | <!-- getFilesAndFolders | ||||
43 | --> | ||||
44 | <method name="getFilesAndFolders"> | ||||
45 | <arg direction="in" type="s" name="path"/> | ||||
46 | <arg direction="out" type="a(uuustxs)"/> | ||||
47 | <arg direction="out" type="i" name="exists"/> | ||||
48 | <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="KMTPFileList"/> | ||||
49 | </method> | ||||
50 | | ||||
51 | <!-- getFileMetadata | ||||
52 | --> | ||||
53 | <method name="getFileMetadata"> | ||||
54 | <arg direction="in" type="s" name="path"/> | ||||
55 | <arg direction="out" type="(uuustxs)"/> | ||||
56 | <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="KMTPFile"/> | ||||
57 | </method> | ||||
58 | | ||||
59 | <!-- getFileToHandler: TODO. | ||||
60 | --> | ||||
61 | <method name="getFileToHandler"> | ||||
62 | <arg direction="in" type="s" name="path"/> | ||||
63 | <arg direction="out" type="i"/> | ||||
64 | </method> | ||||
65 | | ||||
66 | <!-- getFileToFileDescriptor: Gets a file from the device to a local file. | ||||
67 | @descriptor: The unix file descriptor to copy to | ||||
68 | @sourcePath: Filepath on the device | ||||
69 | @result: The result of the operation. 0 if successful, else not. | ||||
70 | | ||||
71 | This method will return immediately and emits the copyFinished signal when everything is done. | ||||
72 | To track the progress of the operation use the copyProgress signal. | ||||
73 | NOTE: The copyFinished and copyProgress signals are just emitted if @result is 0. | ||||
74 | --> | ||||
75 | <method name="getFileToFileDescriptor"> | ||||
76 | <arg direction="in" type="h" name="descriptor"/> | ||||
77 | <arg direction="in" type="s" name="sourcePath"/> | ||||
78 | <arg direction="out" type="i" name="result"/> | ||||
79 | </method> | ||||
80 | | ||||
81 | <!-- sendFileFromFileDescriptor: Sends a local file to a device by its unix file descriptor. | ||||
82 | @descriptor: The unix file descriptor to copy from | ||||
83 | @destinationPath: Filepath on the device | ||||
84 | @result: The result of the operation. 0 if successful, else not. | ||||
85 | | ||||
86 | This method will return immediately and emits the copyFinished signal when everything is done. | ||||
87 | To track the progress of the operation use the copyProgress signal. | ||||
88 | NOTE: The copyFinished and copyProgress signals are just emitted if @result is 0. | ||||
89 | --> | ||||
90 | <method name="sendFileFromFileDescriptor"> | ||||
91 | <arg direction="in" type="h" name="descriptor"/> | ||||
92 | <arg direction="in" type="s" name="destinationPath"/> | ||||
93 | <arg direction="out" type="i"/> | ||||
94 | </method> | ||||
95 | | ||||
96 | <!-- | ||||
97 | setFileName | ||||
98 | @path: The path of the file. | ||||
99 | @newName: The new name of the file | ||||
100 | @result: The result of the operation. 0 if successful, else not. | ||||
101 | --> | ||||
102 | <method name="setFileName"> | ||||
103 | <arg direction="in" type="s" name="path" /> | ||||
104 | <arg direction="in" type="s" name="newName" /> | ||||
105 | <arg direction="out" type="i" name="result" /> | ||||
106 | </method> | ||||
107 | | ||||
108 | <!-- | ||||
109 | createFolder | ||||
110 | @path: The path of the new folder | ||||
111 | @result: The result of the operation. 0 if successful, else not. | ||||
112 | --> | ||||
113 | <method name="createFolder"> | ||||
114 | <arg direction="in" type="s" name="path"/> | ||||
115 | <arg direction="out" type="u"/> | ||||
116 | </method> | ||||
117 | | ||||
118 | <!-- | ||||
119 | deleteObject | ||||
120 | @path: The path of the object. | ||||
121 | @result: The result of the operation. 0 if successful, else not. | ||||
122 | --> | ||||
123 | <method name="deleteObject"> | ||||
124 | <arg direction="in" type="s" name="path"/> | ||||
125 | <arg direction="out" type="i" name="result" /> | ||||
126 | </method> | ||||
127 | | ||||
128 | <!-- dataReady: TODO. | ||||
129 | --> | ||||
130 | <signal name="dataReady"> | ||||
131 | <arg direction="out" name="data"/> | ||||
132 | <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QByteArray"/> | ||||
133 | </signal> | ||||
134 | | ||||
135 | <!-- | ||||
136 | copyProgress: Signal is emitted when a progress update has been issued by LIBMTP. Applies only to copy operations. | ||||
137 | @transferredBytes: Currently transferred bytes | ||||
138 | @totalBytes: Total number of bytes to transfer | ||||
139 | --> | ||||
140 | <signal name="copyProgress"> | ||||
141 | <arg type="t" name="transferredBytes"/> | ||||
142 | <arg type="t" name="totalBytes"/> | ||||
143 | </signal> | ||||
144 | | ||||
145 | <!-- | ||||
146 | copyFinished: Signal is emitted when a copy operation has finished. | ||||
147 | @result: The result of the operation. 0 if successful, else not. | ||||
148 | --> | ||||
149 | <signal name="copyFinished"> | ||||
150 | <arg type="i" name="result"/> | ||||
151 | </signal> | ||||
152 | | ||||
153 | </interface> | ||||
154 | </node> |