Summary: | Add Account and AccountManager interfaces | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Morten Mjelva <morten.mjelva> |
Component: | tp-python | Assignee: | Morten Mjelva <morten.mjelva> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | git master | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
adds Account and AccountManager classes
adds Account and AccountManager classes Made requested changes adds Account and AccountManager classes adds Account and AccountManager classes |
Description
Morten Mjelva
2010-04-19 11:03:11 UTC
Created attachment 35166 [details] [review] adds Account and AccountManager classes Review of attachment 35166 [details] [review]: You also didn't add these new files to client_PYTHON in Makefile.am. ::: src/client/account.py @@ +25,3 @@ +from telepathy.interfaces import ACCOUNT + +DBUS_PROPERTIES = 'org.freedesktop.DBus.Properties' Use dbus.PROPERTIES_IFACE instead. @@ +33,3 @@ + bus = dbus.Bus() + + self.service_name = 'org.freedesktop.Telepathy.AccountManager' telepathy.interfaces.ACCOUNT_MANAGER @@ +36,3 @@ + self.object_path = object_path + self._ready_handler = ready_handler + self.error_cb = error_handler Keep this consistent and call it "_error_cb" instead. @@ +46,3 @@ + error_handler=self.error_cb) + + def get_interfaces_cb(self, interfaces): I'd prefer "_get_interfaces_cb". ::: src/client/accountmgr.py @@ +25,3 @@ +from telepathy.interfaces import ACCOUNT_MANAGER + +DBUS_PROPERTIES = 'org.freedesktop.DBus.Properties' Ditto from account.py. @@ +33,3 @@ + bus = dbus.Bus() + + self.service_name = 'org.freedesktop.Telepathy.AccountManager' Ditto from account.py. @@ +36,3 @@ + self.object_path = '/org/freedesktop/Telepathy/AccountManager' + self._ready_handler = ready_handler + self.error_cb = error_handler Ditto from account.py. @@ +46,3 @@ + error_handler=self.error_cb) + + def get_interfaces_cb(self, interfaces): Ditto from account.py. Please re-add the patch keyword when you've fixed said problems and attached a new patch. Created attachment 35169 [details] [review] Made requested changes Created attachment 35170 [details] [review] adds Account and AccountManager classes Review of attachment 35170 [details] [review]: Just a couple of niggles. It's basically fine and seems to work. ::: src/client/account.py @@ +22,3 @@ +from telepathy.client.interfacefactory import (InterfaceFactory, + default_error_handler, + ) Move this closing bracket to the line before. ::: src/client/accountmgr.py @@ +22,3 @@ +from telepathy.client.interfacefactory import (InterfaceFactory, + default_error_handler, + ) Ditto for account.py. @@ +32,3 @@ + + self.service_name = ACCOUNT_MANAGER + self.object_path = '/' + self.service_name.replace('.', '/') Actually, the object path is hard-coded in the spec, so we should use the '/org/free...AccountManager/' string here. Created attachment 35171 [details] [review] adds Account and AccountManager classes Merged, thanks. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.