#2157 closed enhancement (fixed)
reimplement sugar.presence so it doesn't use the Presence Service
Reported by: | tomeu | Owned by: | erikos |
---|---|---|---|
Priority: | Immediate | Milestone: | |
Component: | Sugar | Version: | Unspecified |
Severity: | Unspecified | Keywords: | |
Cc: | Distribution/OS: | Unspecified | |
Bug Status: | Assigned |
Description
As part of http://wiki.sugarlabs.org/go/Features/RemovePresenceService, activities need to be able to use collaboration without the Presence Service being present.
This makes so without requiring activities to make any changes.
Change History (10)
comment:1 Changed 13 years ago by tomeu
- Keywords r? added
comment:2 Changed 13 years ago by erikos
- Bug Status changed from Unconfirmed to Assigned
- Milestone changed from Unspecified by Release Team to 0.90
- Priority changed from Unspecified by Maintainer to Immediate
First of all, thanks for doing that awesome task!
A few first words while reading:
- please adjust the copyright in all the files you touch
- as discussed on irc: the debug logs are ok for now when we do heavy testing, I would like to remove them later and/or make them produce more accessible data
activity/activity.py:
- set_up one word: _set_up_sharing
- SUGAR_CLIENT_PATH = '/org/freedesktop/Telepathy/Client/Sugar' is unused
- self._handle.handle_invite: maybe call it 'invited'?
more to come...
comment:3 Changed 13 years ago by tomeu
Done, thanks!
comment:4 Changed 13 years ago by erikos
activity.py:
There are 4 cases we have to handle in the constructor: invited, join, share_previously_shared and the private case. I would probably put that into private methods and reflect that in the naming. Like:
if shared_instance is not None: self._join_instance() elif share_scope != SCOPE_PRIVATE: self._share_previously_shared_instance(...) else: self.__initialize_journal_object(...)
if handle.invited: does speak for itself. And as we nearly touch all mesh_instance cases please rename it :)
comment:5 follow-up: ↓ 6 Changed 13 years ago by erikos
- Keywords r! added; r? removed
src/sugar/activity/activityhandle.py
- thanks for changing it to handle.invited
src/sugar/activity/activityservice.py
- (please add a comment that it is deprecated)
def Invite(self, buddy_key):
raise NotImplementedError
In the shell (jarabe.view.buddymenu) you are trying to call it:
logging.warning('Trying deprecated Activity.Invite')
service.Invite(self._buddy.props.key)
Does this handle cases where old Sugar versions share with new ones?
src/sugar/datastore/datastore.py
- self._object_id = None just a pylint fix, right?
src/sugar/presence/connectionmanager.py
- can you add a doc what it does and mark it unstable API as it is only of use to the sugar-PS?
src/sugar/presence/presenceservice.py
- please adjust the line: "UI class to access system-level presence object"
- please adjust the docstring: "UI-side interface to the dbus presence service..."
- remove the class OfflineInterface (not used anymore)
- remove the 'activity-disappeared' etc signals as the shell does not listen to them anymore. From the s\
ignals only 'activity-shared' seems to be in use.
Btw, all the approach looks really good!
comment:6 in reply to: ↑ 5 Changed 13 years ago by tomeu
- Keywords r? added; r! removed
Replying to erikos:
src/sugar/activity/activityhandle.py
- thanks for changing it to handle.invited
src/sugar/activity/activityservice.py
- (please add a comment that it is deprecated)
def Invite(self, buddy_key):
raise NotImplementedError
Removed it, as all python activities will be using InviteContact.
In the shell (jarabe.view.buddymenu) you are trying to call it:
logging.warning('Trying deprecated Activity.Invite')
service.Invite(self._buddy.props.key)
Does this handle cases where old Sugar versions share with new ones?
That's there only for Etoys, which hasn't moved to the new API yet. All python activities are going to be using the new InviteContact.
src/sugar/datastore/datastore.py
- self._object_id = None just a pylint fix, right?
Yup.
src/sugar/presence/connectionmanager.py
- can you add a doc what it does and mark it unstable API as it is only of use to the sugar-PS?
src/sugar/presence/presenceservice.py
- please adjust the line: "UI class to access system-level presence object"
- please adjust the docstring: "UI-side interface to the dbus presence service..."
Done
- remove the class OfflineInterface (not used anymore)
- remove the 'activity-disappeared' etc signals as the shell does not listen to them anymore. From the s\
ignals only 'activity-shared' seems to be in use.
Done
Btw, all the approach looks really good!
Thanks for the review!
comment:7 Changed 13 years ago by erikos
- Keywords r+ added; r? removed
Ok, great! The integration bugs we will find when testing it in builds. Please help remembering to clean up the debug logs before hard code freeze.
comment:8 Changed 13 years ago by tomeu
- Component changed from sugar-toolkit to sugar-datastore
- Keywords r+ removed
- Resolution set to fixed
- Status changed from new to closed
Merged, thanks!
comment:9 Changed 10 years ago by dnarvaez
- Component changed from sugar-datastore to Sugar
Recently rebased: http://git.sugarlabs.org/projects/sugar-toolkit/repos/nops