[Telepathy] tp-qt4 FileTransfer API proposal

Andre Moreira Magalhaes andre.magalhaes at collabora.co.uk
Tue Sep 1 08:02:05 PDT 2009


Kenneth Rohde Christiansen wrote:
>>    PendingChannelRequest *createFileTransfer(
>>     
>
> Shouldn't this be requestFileTransfer?
>
> The constructors (though with many defaults) seems very scary and
> complex. Is the request immediately, or would be be possible to change
> some of these initialization values to propertie or methods?
>
>   
The problem here is that the properties are immutable, and should be 
provided at creation, so we need to have them here. I don't like methods 
with so many default values also, but either we do that or provide 
overload methods, either case is not ideal :S

> QString fileName() const;
>
> Have you considered QUrl ? But then again QFile has the same method
> :-) Btw, wouldn't it make sense to make this class similar to
> QFile/QFileInfo where possible?
>
>   
This is just a suggested filename for the received.
"For example, if the sender sends the file /home/user/monkey.pdf then 
this property should be set to monkey.pdf."
> FileHashType contentHashType() const;
>
> the method is called *Content*HashType and it returns a
> *File*HashType? Isn't that a bit confusing?
>
>   
The spec defines some types (FileHashType for instance) and we try to 
use them where possible. And in this case the property is called 
contentHashType, that is why I used it.

> void transferredBytesChanged(qulonglong count);
>
> progressChanged?
>
>   
Spec compliant, the signal on the spec is called transferredBytesChanged.

> void initialOffsetDefined(qulonglong offset);
>
> Does this really make sense as a signal?
>
>   
This is needed in case you want to resume a filetransfer, you need to 
use the offset, ...
The spec explains this better.

BR
Andrunko


More information about the telepathy mailing list