Copyright (c) Andrew Flegg <andrew@bleb.org> 2010.
Released under the Artistic Licence."""
+
+ def __init__(self):
+ """Should make initial calls to the service and retrieve a list of friends."""
# -----------------------------------------------------------------------
- def get_friends(self):
- """Return a list of friends from this service, or 'None' if manual mapping
- is not supported."""
+ def get_name(self):
+ """Should return the same name as the provider class - debugging only - REMOVE/FIXME"""
+
+ return None
+
+
+ # -----------------------------------------------------------------------
+ def pre_process_contact(self, contact):
+ """If the contact have an URL (or similar) that proves an existing matching
+ to a friend on this service, then this should be remembered to avoid
+ name collission/mapping the same friend to other contacts with the same
+ name."""
return None
# -----------------------------------------------------------------------
- def process_contact(self, contact, overwrite = False, friend = None):
+ def process_contact(self, contact, friend):
"""Called for each contact in the address book. Any friends linked to
- from the contact should have their matching updated. The backend should
- enrich the contact with any meta-data it can; and return 'True' if any
- information was updated. If 'friend' is provided, the information should
- be retrieved from friend. This will be one of the entries from
- 'get_friends' when manual mapping is being done."""
+ from the contact should have their matching updated. The back end should
+ enrich the friend passed with any meta-data it can."""
pass
# -----------------------------------------------------------------------
+ def get_unmatched_friends(self):
+ """Return a list of friends not matched to a contact, or 'None' if manual mapping
+ is not supported."""
+
+ return None
+
+
+ # -----------------------------------------------------------------------
def finalise(self, updated, overwrite = False):
"""Once all contacts have been processed, allows for any tidy-up/additional
enrichment. If any contacts are updated at this stage, 'updated' should