Esempio n. 1
0
void FileTransferManager::protocolHandlerChanged(Account account)
{
	auto protocol = account.protocolHandler();
	if (!protocol)
		return;

	auto service = protocol->fileTransferService();
	if (!service)
		return;

	connect(service, SIGNAL(incomingFileTransfer(FileTransfer)),
			this, SLOT(incomingFileTransfer(FileTransfer)));
}
void FileTransferHandlerManager::createHandler(FileTransfer transfer)
{
	if (!transfer || transfer.handler())
		return;

	auto protocol = transfer.peer().contactAccount().protocolHandler();
	if (!protocol)
		return;

	auto service = protocol->fileTransferService();
	if (!service)
		return;

	transfer.setHandler(service->createFileTransferHandler(transfer));
}