Andre Moreira Magalhaes wrote: > So changing it won't make much difference from what we have now. We > would have a class with the constructor containing all the default > values. Why let in the constructor? As they can't be changed after creation. > > Ps.: Making the members public accessible is not an option, neither > having setters methods for them, as they can't change after creation.
I didn't envisage the FTProps object sticking around once you call
createFileTransfer(). This was just a proposed way to fake Python-style
keyword arguments, which are really what we want here:
def createFileTransfer(contact, fileName, contentType, size,
contentHashType=-1,
contentHash="",
description="",
lastModificationTime=0,
userActionTime=0,
preferredHandler=""):
# ...
# Now applications can write:
createFileTransfer("[email protected]", "cat.jpg", "image/jpeg", 5000,
lastModificationTime=47547)
# omitting any arguments they don't care about.
So in C++ this would become:
FTProps p("cat.jpg", "image/jpeg", 5000);
p.lastModificationTime(47547);
cr = account.createFileTransfer("[email protected]", p)
// and never use 'p' again.
--
Will
signature.asc
Description: OpenPGP digital signature
_______________________________________________ telepathy mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/telepathy
