Editing User:Jaffa/Hermes plugins
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 12: | Line 12: | ||
* Change the "Accounts" dialogue to be like the sharing plugins: a list of icon-containing services which are enabled, with an "Add" button, a "Remove" button, "Move Up/Down" buttons and an "Edit" button which is enabled when an item is selected and further preferences are available. | * Change the "Accounts" dialogue to be like the sharing plugins: a list of icon-containing services which are enabled, with an "Add" button, a "Remove" button, "Move Up/Down" buttons and an "Edit" button which is enabled when an item is selected and further preferences are available. | ||
* Each service needs to provide an interface for opening the preferences for it, if any. For Facebook this'd be "Create birthday-only contacts", an "Authorise"/"Deauthorise" button. | * Each service needs to provide an interface for opening the preferences for it, if any. For Facebook this'd be "Create birthday-only contacts", an "Authorise"/"Deauthorise" button. | ||
- | |||
== Code design == | == Code design == | ||
''See early discussion on [https://bugs.maemo.org/show_bug.cgi?id=6990#c3 #6990].'' | ''See early discussion on [https://bugs.maemo.org/show_bug.cgi?id=6990#c3 #6990].'' | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
A <code>Friend</code> class would be introduced to give better defined access to name, service and picture. This is used in manual mapping, and for communication between the controller and the service. It would also store the contacts to which it was mapped, if any. | A <code>Friend</code> class would be introduced to give better defined access to name, service and picture. This is used in manual mapping, and for communication between the controller and the service. It would also store the contacts to which it was mapped, if any. | ||
Line 64: | Line 50: | ||
all_contacts = get_contacts_as_set() | all_contacts = get_contacts_as_set() | ||
- | |||
updated_contacts = set() | updated_contacts = set() | ||
- | for | + | for contact in all_contacts: |
- | + | ||
- | + | ||
for service in something.get_services_by_prioritisation(): | for service in something.get_services_by_prioritisation(): | ||
if service.process_contact(contact): | if service.process_contact(contact): | ||
updated_contacts.add(contact) | updated_contacts.add(contact) | ||
- | + | save_contact(contact) | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 84: | Line 62: | ||
=== Unanswered questions === | === Unanswered questions === | ||
* Should some <code>X-HERMES-...</code> fields be used to indicate what Hermes can overwrite<ref>[https://bugs.maemo.org/show_bug.cgi?id=5452 #5452] - Don't overwrite pre-existing contact info</ref>; if so, what if the user ''does'' want to overwrite some info? For matching, URLs should be sufficient for most services. | * Should some <code>X-HERMES-...</code> fields be used to indicate what Hermes can overwrite<ref>[https://bugs.maemo.org/show_bug.cgi?id=5452 #5452] - Don't overwrite pre-existing contact info</ref>; if so, what if the user ''does'' want to overwrite some info? For matching, URLs should be sufficient for most services. | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
<references/> | <references/> |
Learn more about Contributing to the wiki.