=== eu is now known as Guest1946
=== Guest1946 is now known as adorilson
Pandohi. I'm still hacking a bit with the ubuntuone-storage-protocol code (here: https://code.launchpad.net/~ubuntuone-control-tower/ubuntuone-storage-protocol/trunk ) to understand how it works, but I face a new problem17:26
Pandoso following the protocol, I want to download a file on the server, so I send it a GetContent request, which is fine17:27
Pandoit answers fine by the protocol with a NODE_ATTR message, followed by BYTES messages  and ended by  a EOF17:32
Pandobut I fail to understand what 's in the BYTES messages. for example, in the case of an empty file, the BYTES message contains "x\234\003\000\000\000\000\001"17:54
Pandoand I find nothing on google about it because it's so specific17:54
Pandoit seems to be a raw array of bytes of some sort, but what I don't understand is that the content of the bytes message is nowhere near the "real"  content of the file. I think of a kind of encoding, but I'm not sure17:56
Pandoanother example, for a file containing "hahaha\n", the bytes message sent to me by the server contains: "x\234\313H\314\000B.\000\n\265\002f"17:57
Pandoso if anyone knows how it works. any help is appreciated ( dobey ? maybe you know ?)17:58
Pandowhat puzzles me even more is that when I look at the TestBytesProducer class or something on the repo, it seems to just open a file and directly send its content right into a bunch of bytes message, which seems logical18:00
dobeythe BYTES message is a protobuf message18:00
Pandoso I don't know why the server sends me this kind of thing...18:00
dobeyalso i think it might be compressed data18:01
Pandodobey < exactly. what I report is the content of msg.bytes.bytes, following the protocol18:01
dobeyso the actual code will decompress it when writing it to a file18:01
dobeyi don't really recall what that code does exactly though18:01
Pandogiven msg is a protobuf from ParseFromString18:01
Pandoyes I think it might be compressed, but I don't know how to decompress it :-( already tried a lot of things18:02
dobeyit would just be gzip18:03
Pandoah, I didn't try that !18:04
PandoI'll let you know if it works18:05
Pandodobey < do you remember, if that's gzip, if there were any specific options to it ?20:32
dobeyPando: you're writing python code, yes?20:32
Pandowhen I gzip my file, it doesn't give me the same thing than what the u1 server sends me20:32
dobeyPando: why are you trying to reimplement what ubuntuone-storage-protocol is already doing, anyway?20:33
Pandoit's for a school project. we would like to bring ubuntu one support to our application, without having  to add the twisted dependency20:35
dobeywhy not use the REST API then?20:36
Pandobecause the rest api doesn't allow partial down/uploads20:38
Pandoat a given offset in a file, for example20:38
dobeyand you can't just have ubuntuone-syncdaemon running, and just dump files into a directory that it is synchronizing?20:39
dobeyand you want to sync arbitrary data, not simple structured data that can be stored in JSON?20:40
Pandowell it would be a kind of synchronization application that would work with multiple platforms. U1 would be just one of them20:46
Pandothe problem with the rest api is also that we don't have the notifications when something has been uploaded to the server20:46
PandoI've seen the DBus API, but it doesn't seem to allow precise control, like start a file uploading20:48
dobeywell, you start a file uploading by just putting it in a directory that is managed by ubuntuone-syncdaemon20:48
dobeyit gets the file change notification from the OS, and then uploads the file20:49
Pandosorry, phone21:05
Pandoand then, when there is a change on the server, are we able to know what changed and how ?21:05
dobeythere are signals on the dbus API for when a download starts/stops, and such, yes21:07
Pandothat's something we got to think about. I recall that when I attempted to use the dbus api, I faced a problem that made me not use it, but I can't remember what right now. :)21:21
PandoI've got to go. thanks for your help dobey21:22

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!