Development Team/Almanac/Sugar.presence: Difference between revisions
m moved Walter is a wanker 12/Almanac/Sugar.presence to Development Team/Almanac/Sugar.presence over redirect: revert |
|||
| (7 intermediate revisions by 7 users not shown) | |||
| Line 2: | Line 2: | ||
=== How do I setup a D-Bus Tube? === | === How do I setup a D-Bus Tube? === | ||
Let's first look at what conceptually happens to make activity sharing work. The diagram below shows two instances of the same activity: the "Sharing Activity" and the "Joining Activity". The sharing activity is the activity that is initially run and shared with other buddies. The "Joining Activity" refers to other instances of the activity that are created once buddies decide to join an activity that has been shared. You can allow an activity to be shared (making it a sharing activity) by [[ | Let's first look at what conceptually happens to make activity sharing work. The diagram below shows two instances of the same activity: the "Sharing Activity" and the "Joining Activity". The sharing activity is the activity that is initially run and shared with other buddies. The "Joining Activity" refers to other instances of the activity that are created once buddies decide to join an activity that has been shared. You can allow an activity to be shared (making it a sharing activity) by [[Development Team/Almanac/Sugar.presence.presenceservice#How do I share an activity with other buddies in my neighborhood? | including the standard Sugar Activity Toolbar]]. | ||
[[Image:tube-setup.jpg | How Tubes are Setup]] | [[Image:tube-setup.jpg | How Tubes are Setup]] | ||
| Line 110: | Line 110: | ||
def _new_tube_cb(self, id, initiator, type, service, params, state): | def _new_tube_cb(self, id, initiator, type, service, params, state): | ||
if | if type == telepathy.TUBE_TYPE_DBUS and service == SERVICE: | ||
if state == telepathy.TUBE_STATE_LOCAL_PENDING: | if state == telepathy.TUBE_STATE_LOCAL_PENDING: | ||
#Accept the new tube that has been created | #Accept the new tube that has been created | ||
| Line 476: | Line 476: | ||
assert isinstance(addr[0], str) | assert isinstance(addr[0], str) | ||
assert isinstance(addr[1], (int, long)) | assert isinstance(addr[1], (int, long)) | ||
assert | assert 0 < addr[1] < 65536 | ||
port = int(addr[1]) | port = int(addr[1]) | ||
| Line 495: | Line 495: | ||
=== Where do I get more information regarding sugar activity sharing and the technologies that support it? === | === Where do I get more information regarding sugar activity sharing and the technologies that support it? === | ||
* A [[Shared_Sugar_Activities | brief tutorial]] on activity sharing for the OLPC laptop. | * A [[Development Team/Almanac/Shared_Sugar_Activities | brief tutorial]] on activity sharing for the OLPC laptop. | ||
=== I can't get tubes to work. Are there unresolved issues? === | === I can't get tubes to work. Are there unresolved issues? === | ||