X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fnull_backend.py;h=c07f724b073a1ea9dddffa013e3aa8c76af61f6a;hb=0f33d720e11cb73b7da2e25b456e97b28e2f4b24;hp=2121878d93992c2cac85a66e1143ccfd56f8a42c;hpb=f068a6505b97a6d2d3d445c9b8837fcdf0e8fd3e;p=gc-dialer diff --git a/src/null_backend.py b/src/null_backend.py index 2121878..c07f724 100644 --- a/src/null_backend.py +++ b/src/null_backend.py @@ -37,6 +37,9 @@ class NullDialer(object): def dial(self, number): return True + def send_sms(self, number, message): + raise NotImplementedError("SMS Is Not Supported") + def clear_caches(self): pass @@ -89,3 +92,43 @@ class NullDialer(object): def get_messages(self): return () + + +class NullAddressBook(object): + """ + Minimal example of both an addressbook factory and an addressbook + """ + + def clear_caches(self): + pass + + def get_addressbooks(self): + """ + @returns Iterable of (Address Book Factory, Book Id, Book Name) + """ + yield self, "", "None" + + def open_addressbook(self, bookId): + return self + + @staticmethod + def contact_source_short_name(contactId): + return "" + + @staticmethod + def factory_name(): + return "" + + @staticmethod + def get_contacts(): + """ + @returns Iterable of (contact id, contact name) + """ + return [] + + @staticmethod + def get_contact_details(contactId): + """ + @returns Iterable of (Phone Type, Phone Number) + """ + return []