From 34d776864f8c2e42afa6b7cbd00a735febf3f8e8 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 29 Sep 2009 07:43:02 -0500 Subject: [PATCH] Currently not using a null backend, so removing it --- src/null_backend.py | 134 --------------------------------------------------- 1 file changed, 134 deletions(-) delete mode 100644 src/null_backend.py diff --git a/src/null_backend.py b/src/null_backend.py deleted file mode 100644 index c07f724..0000000 --- a/src/null_backend.py +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/python - -""" -DialCentral - Front end for Google's Grand Central service. -Copyright (C) 2008 Eric Warnke ericew AT gmail DOT com - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this library; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -""" - - -class NullDialer(object): - - def __init__(self): - pass - - def is_authed(self, force = False): - return False - - def login(self, username, password): - return self.is_authed() - - def logout(self): - self.clear_caches() - - def dial(self, number): - return True - - def send_sms(self, number, message): - raise NotImplementedError("SMS Is Not Supported") - - def clear_caches(self): - pass - - def is_valid_syntax(self, number): - """ - @returns If This number be called ( syntax validation only ) - """ - return False - - def get_account_number(self): - """ - @returns The grand central phone number - """ - return "" - - def set_sane_callback(self): - pass - - def get_callback_numbers(self): - return {} - - def set_callback_number(self, callbacknumber): - return True - - def get_callback_number(self): - return "" - - def get_recent(self): - return () - - def get_addressbooks(self): - return () - - def open_addressbook(self, bookId): - return self - - @staticmethod - def contact_source_short_name(contactId): - return "ERROR" - - @staticmethod - def factory_name(): - return "ERROR" - - def get_contacts(self): - return () - - def get_contact_details(self, contactId): - return () - - 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 [] -- 1.7.9.5