Private
Public Access
1
0

better d-bus interface for attachments

This commit is contained in:
2025-05-26 16:19:26 -07:00
parent 831e490eb4
commit 2b5df53cc3
5 changed files with 88 additions and 53 deletions

View File

@@ -78,22 +78,45 @@
<!-- Attachments -->
<method name="GetAttachment">
<method name="GetAttachmentInfo">
<arg type="s" name="attachment_id" direction="in"/>
<arg type="o" name="attachment_obj" direction="out"/>
<arg type="(sbu)" name="attachment_info" direction="out"/>
<annotation name="org.freedesktop.DBus.DocString"
value="Returns a D-Bus object path for accessing the requested attachment."/>
</method>
</interface>
<interface name="net.buzzert.kordophone.Attachment">
<property name="FilePath" type="s" access="readonly" />
<property name="Downloaded" type="b" access="readonly" />
<method name="Delete">
value="Returns attachment info: (file_path: string, downloaded: bool, file_size: uint64)"/>
</method>
<signal name="DownloadedStateChanged" />
<method name="DownloadAttachment">
<arg type="s" name="attachment_id" direction="in"/>
<annotation name="org.freedesktop.DBus.DocString"
value="Initiates download of the specified attachment if not already downloaded."/>
</method>
<signal name="AttachmentDownloadStarted">
<arg type="s" name="attachment_id"/>
<annotation name="org.freedesktop.DBus.DocString"
value="Emitted when an attachment download begins."/>
</signal>
<signal name="AttachmentDownloadProgress">
<arg type="s" name="attachment_id"/>
<arg type="d" name="progress"/>
<annotation name="org.freedesktop.DBus.DocString"
value="Emitted during attachment download. Progress is a value from 0.0 to 1.0."/>
</signal>
<signal name="AttachmentDownloadCompleted">
<arg type="s" name="attachment_id"/>
<arg type="s" name="file_path"/>
<annotation name="org.freedesktop.DBus.DocString"
value="Emitted when an attachment download completes successfully."/>
</signal>
<signal name="AttachmentDownloadFailed">
<arg type="s" name="attachment_id"/>
<arg type="s" name="error_message"/>
<annotation name="org.freedesktop.DBus.DocString"
value="Emitted when an attachment download fails."/>
</signal>
</interface>
<interface name="net.buzzert.kordophone.Settings">