#4051 NORM First D: sample code of moving a pdf via tubes needed
Zarro Boogs per Child
bugtracker at laptop.org
Mon Oct 8 09:00:19 EDT 2007
#4051: sample code of moving a pdf via tubes needed
---------------------+------------------------------------------------------
Reporter: erikb | Owner: morgs
Type: defect | Status: assigned
Priority: normal | Milestone: First Deployment, V1.0
Component: sugar | Version:
Resolution: | Keywords:
Verified: 0 |
---------------------+------------------------------------------------------
Changes (by morgs):
* status: new => assigned
Comment:
There's really no magic involved. You need to read in the file a section
at a time, and send the chunks as type "ay" (array of bytes).
Assuming you are sending the data using signals - broadcasting them to all
activity participants, you need to make sure you use "byte_arrays=True"
when doing the add_signal_receiver, to get a dbus.ByteArray and not a
dbus.Array of bytes.
Tubes implement Causal Ordering, so the signals will arrive in the order
they were sent. You can check reliability by sending an MD5 hash as well
and reconstructing the hash when you know you have the whole file.
--
Ticket URL: <https://dev.laptop.org/ticket/4051#comment:1>
One Laptop Per Child <https://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list