~didrocks/ubuntuone-client/use_result_var

« back to all changes in this revision

Viewing changes to ubuntuone/status/notification.py

  • Committer: Bazaar Package Importer
  • Author(s): Rodney Dawes
  • Date: 2011-01-25 16:42:52 UTC
  • mfrom: (1.1.43 upstream)
  • Revision ID: james.westby@ubuntu.com-20110125164252-gyx1hii7jk1b3hw7
Tags: 1.5.3-0ubuntu1
* New upstream release.
  - Metadata load is too slow (LP: #436612)
  - Out of space dialog is broken (LP: #650671)
  - Should not autoconnect when there are no credentials (LP: #701588)
  - gsd extension should not ask for sso credentials (LP: #702171) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# ubuntuone.status.notification - User Notification
 
2
#
 
3
# Author: Eric Casteleijn <eric.casteleijn@canonical.com>
 
4
#
 
5
# Copyright 2011 Canonical Ltd.
 
6
#
 
7
# This program is free software: you can redistribute it and/or modify it
 
8
# under the terms of the GNU General Public License version 3, as published
 
9
# by the Free Software Foundation.
 
10
#
 
11
# This program is distributed in the hope that it will be useful, but
 
12
# WITHOUT ANY WARRANTY; without even the implied warranties of
 
13
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
14
# PURPOSE.  See the GNU General Public License for more details.
 
15
#
 
16
# You should have received a copy of the GNU General Public License along
 
17
# with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
"""Module that defines the interfaces for notification of the end user."""
 
19
 
 
20
from abc import ABCMeta, abstractmethod
 
21
 
 
22
APPLICATION_NAME = 'Ubuntu One Client'
 
23
 
 
24
 
 
25
class AbstractNotification(object):
 
26
    """Abstract Base Class for notification implementations."""
 
27
 
 
28
    __metaclass__ = ABCMeta
 
29
 
 
30
    # pylint: disable=W0613,R0201
 
31
    @abstractmethod
 
32
    def send_notification(self, title, message, icon, append):
 
33
        """Send a notification to the end user."""
 
34
        return NotImplemented
 
35
    # pylint: enable=W0613,R0201