Commit 61838868 authored by Guillaume Roguez's avatar Guillaume Roguez Committed by Anthony Léonard

datatransfer: more D-Bus API

Expose more data transfer API to D-Bus binding:
* acceptFileTransfer
* cancelDataTransfer

Change-Id: Ida42caf775d1a411ac640276140ac6d69b6eebc7
Reviewed-by: default avatarAnthony Léonard <anthony.leonard@savoirfairelinux.com>
parent 73dea6d8
......@@ -1434,6 +1434,22 @@
</arg>
</method>
<method name="acceptFileTransfer" tp:name-for-bindings="acceptFileTransfer">
<tp:added version="4.2.0"/>
<arg type="t" name="DataTransferId" direction="in">
</arg>
<arg type="s" name="file_path" direction="in">
</arg>
<arg type="t" name="offset" direction="in">
</arg>
</method>
<method name="cancelDataTransfer" tp:name-for-bindings="cancelDataTransfer">
<tp:added version="4.2.0"/>
<arg type="t" name="DataTransferId" direction="in">
</arg>
</method>
<signal name="mediaParametersChanged" tp:name-for-bindings="mediaParametersChanged">
<tp:added version="2.3.0"/>
<tp:docstring>
......
......@@ -638,11 +638,23 @@ DBusConfigurationManager::dataTransferInfo(const DRing::DataTransferId& id)
uint64_t
DBusConfigurationManager::dataTransferBytesSent(const uint64_t& id)
{
return DRing::dataTransferBytesSent(id);;
return DRing::dataTransferBytesSent(id);
}
auto
DBusConfigurationManager::dataTransferList() -> decltype(DRing::dataTransferList())
{
return DRing::dataTransferList();;
return DRing::dataTransferList();
}
void
DBusConfigurationManager::acceptFileTransfer(const uint64_t& id, const std::string& file_path, const uint64_t& offset)
{
DRing::acceptFileTransfer(id, file_path, offset);
}
void
DBusConfigurationManager::cancelDataTransfer(const uint64_t& id)
{
DRing::cancelDataTransfer(id);
}
......@@ -158,6 +158,8 @@ class DBusConfigurationManager :
DBus::Struct<bool, uint32_t, uint64_t, uint64_t, std::string, std::string> dataTransferInfo(const DRing::DataTransferId& id);
uint64_t dataTransferBytesSent(const uint64_t& id);
std::vector<uint64_t> dataTransferList();
void acceptFileTransfer(const uint64_t& id, const std::string& file_path, const uint64_t& offset);
void cancelDataTransfer(const uint64_t& id);
};
#endif // __RING_DBUSCONFIGURATIONMANAGER_H__
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment