blob: eea9445b0bd19421210edac1a20081a8d760b0e0 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" ?>
<node xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<interface name="org.chromium.Mtpd">
<method name="EnumerateStorages">
<arg name="storageList" type="as" direction="out">
<tp:docstring>
List of storages. Storages are described as Bus:Location:StorageId.
E.g. usb:2,4:1234.
</tp:docstring>
</arg>
</method>
<method name="GetStorageInfo">
<arg name="storageName" type="s" direction="in">
<tp:docstring>
Storage name is in the same format as EnumerateStorages.
</tp:docstring>
</arg>
<arg name="storageInfo" type="ay" direction="out">
</arg>
</method>
<method name="OpenStorage">
<arg name="storageName" type="s" direction="in">
<tp:docstring>
Storage name is in the same format as EnumerateStorages.
</tp:docstring>
</arg>
<arg name="mode" type="s" direction="in">
<tp:docstring>
Mode to open the storage in.
Currently the only valid mode is "readonly".
</tp:docstring>
</arg>
<arg name="handle" type="s" direction="out">
<tp:docstring>
Handle to the storage. Empty on failure.
</tp:docstring>
</arg>
</method>
<method name="CloseStorage">
<arg name="handle" type="s" direction="in">
<tp:docstring>
Handle to the storage from OpenStorage.
</tp:docstring>
</arg>
</method>
<method name="ReadDirectoryEntryIds">
<arg name="handle" type="s" direction="in">
<tp:docstring>
Handle to the storage from OpenStorage.
</tp:docstring>
</arg>
<arg name="fileId" type="u" direction="in">
<tp:docstring>
Id of the directory to read.
</tp:docstring>
</arg>
<arg name="results" type="au" direction="out">
<tp:docstring>
An array of file ids for the directory entries.
</tp:docstring>
</arg>
</method>
<method name="GetFileInfo">
<arg name="handle" type="s" direction="in">
<tp:docstring>
Handle to the storage from OpenStorage.
</tp:docstring>
</arg>
<arg name="fileIds" type="au" direction="in">
<tp:docstring>
Array of file ids to read. Should be at least 1. Trying to read too
many IDs at once may result in a DBus timeout, depending on the speed
of the device. When trying to call GetFileInfo for many file ids, given
the default DBus timeout of 25 seconds, reading 25 entries at once is a
reasonably conservative approach that avoids sending too many DBus
requests and the risk of timeouts.
</tp:docstring>
</arg>
<arg name="info" type="ay" direction="out">
</arg>
</method>
<method name="ReadFileChunk">
<arg name="handle" type="s" direction="in">
<tp:docstring>
Handle to the storage from OpenStorage.
</tp:docstring>
</arg>
<arg name="fileId" type="u" direction="in">
</arg>
<arg name="offset" type="u" direction="in">
<tp:docstring>
The offset into the file in bytes.
</tp:docstring>
</arg>
<arg name="count" type="u" direction="in">
<tp:docstring>
The number of bytes to read. At most 1 MiB.
</tp:docstring>
</arg>
<arg name="data" type="ay" direction="out">
</arg>
</method>
<method name="IsAlive">
<tp:docstring>
Test method to verify that the MTP service is working.
</tp:docstring>
<arg name="result" type="b" direction="out">
<tp:docstring>
Boolean indicating whether the MTP service is alive.
</tp:docstring>
</arg>
</method>
<signal name="MTPStorageAttached">
<arg name="storageName" type="s" direction="out">
<tp:docstring>
Storage name is in the same format as EnumerateStorages.
</tp:docstring>
</arg>
</signal>
<signal name="MTPStorageDetached">
<arg name="storageName" type="s" direction="out">
<tp:docstring>
Storage name is in the same format as EnumerateStorages.
</tp:docstring>
</arg>
</signal>
</interface>
</node>