2
# -*- coding: utf-8 -*-
4
# Copyright (C) 2010 Canonical
9
# This program is free software; you can redistribute it and/or modify it under
10
# the terms of the GNU General Public License as published by the Free Software
11
# Foundation; version 3.
13
# This program is distributed in the hope that it will be useful, but WITHOUT
14
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18
# You should have received a copy of the GNU General Public License along with
19
# this program; if not, write to the Free Software Foundation, Inc.,
20
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24
class LoginBackend(gobject.GObject):
26
NEW_ACCOUNT_URL = None
27
FORGOT_PASSWORD_URL = None
30
"login-successful" : (gobject.SIGNAL_RUN_LAST,
32
(gobject.TYPE_PYOBJECT,),
34
"login-failed" : (gobject.SIGNAL_RUN_LAST,
38
"need-username-password" : (gobject.SIGNAL_RUN_LAST,
44
def login(self, username=None, password=None):
46
def cancel_login(self):
49
def new_account_url(self):
50
return self.NEW_ACCOUNT_URL
52
def forgoten_password_url(self):
53
return self.FORGOT_PASSWORD_URL