18#ifndef LIBJAMI_DATATRANSFERI_H
19#define LIBJAMI_DATATRANSFERI_H
32 const std::map<std::string, std::shared_ptr<CallbackWrapperBase>>&);
68 int64_t totalSize {0};
69 int64_t bytesProgress {0};
107 const std::string& conversationId,
108 const std::string& path,
109 const std::string& displayName,
110 const std::string& replyTo)
noexcept;
121 const std::string& conversationId,
122 const std::string& interactionId,
123 const std::string& fileId,
124 const std::string& path)
noexcept;
139 const std::string& conversationId,
152 const std::string& conversationId,
153 const std::string& fileId,
156 int64_t& progress)
noexcept;
163 constexpr static const char* name =
"DataTransferEvent";
164 using cb_type = void(
const std::string& accountId,
165 const std::string& conversationId,
166 const std::string& interactionId,
167 const std::string& fileId,
enum LIBJAMI_PUBLIC enum LIBJAMI_PUBLIC DataTransferError
DataTransferError cancelDataTransfer(const std::string &accountId, const std::string &conversationId, const std::string &fileId) noexcept
Refuse or abort an outgoing or an incoming file transfer.
enum LIBJAMI_PUBLIC wait_host_acceptance
enum LIBJAMI_PUBLIC finished
enum LIBJAMI_PUBLIC enum LIBJAMI_PUBLIC invalid_argument
DataTransferError fileTransferInfo(const std::string &accountId, const std::string &conversationId, const std::string &fileId, std::string &path, int64_t &total, int64_t &progress) noexcept
Return the amount of sent/received bytes of an existing data transfer.
enum LIBJAMI_PUBLIC unsupported
void sendFile(const std::string &accountId, const std::string &conversationId, const std::string &path, const std::string &displayName, const std::string &replyTo) noexcept
Asynchronously send a file to a peer using given account connection.
bool downloadFile(const std::string &accountId, const std::string &conversationId, const std::string &interactionId, const std::string &fileId, const std::string &path) noexcept
Asks for retransferring a file.
enum LIBJAMI_PUBLIC created
enum LIBJAMI_PUBLIC wait_peer_acceptance
enum LIBJAMI_PUBLIC closed_by_host
enum LIBJAMI_PUBLIC closed_by_peer
enum LIBJAMI_PUBLIC enum LIBJAMI_PUBLIC io
enum LIBJAMI_PUBLIC unjoinable_peer
enum LIBJAMI_PUBLIC timeout_expired
void registerDataXferHandlers(const std::map< std::string, std::shared_ptr< CallbackWrapperBase > > &handlers)
enum LIBJAMI_PUBLIC enum LIBJAMI_PUBLIC unknown
enum LIBJAMI_PUBLIC enum LIBJAMI_PUBLIC enum LIBJAMI_PUBLIC DataTransferFlags
Bit definition for DataTransferInfo.flags field.
enum LIBJAMI_PUBLIC ongoing
enum LIBJAMI_PUBLIC DataTransferEventCode
enum LIBJAMI_PUBLIC invalid_pathname
std::string conversationId
std::string accountId
Identifier of the emiter/receiver account.
std::string mimetype
MimeType of transferred data (https://www.iana.org/assignments/media-types/media-types....
std::string peer
Identifier of the remote peer (in the semantic of the associated account)
std::string displayName
Human oriented transfer name.
std::string path
associated local file path if supported (empty, if not)
void(const std::string &accountId, const std::string &conversationId, const std::string &interactionId, const std::string &fileId, int eventCode) cb_type