~ubuntu-branches/ubuntu/vivid/blueman/vivid-proposed

« back to all changes in this revision

Viewing changes to blueman/bluez/ServiceInterface.py

  • Committer: Package Import Robot
  • Author(s): Artur Rona
  • Date: 2014-12-24 18:33:36 UTC
  • mfrom: (2.3.8 sid)
  • Revision ID: package-import@ubuntu.com-20141224183336-cyb82ot0y8tz8flq
Tags: 1.99~alpha1-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - debian/patches/01_dont_autostart_lxde.patch:
    + Don't autostart the applet in LXDE.
  - debian/patches/03_filemanager_fix.patch:
    + Add support for more filemanagers.
* debian/patches/02_dont_crash_on_non-bluetooth_card.patch:
  - Dropped, no longer applicable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# ServiceInterface.py - interface of BlueZ service plugins
2
 
#
3
 
# Copyright (C) 2008 Vinicius Gomes <vcgomes [at] gmail [dot] com>
4
 
# Copyright (C) 2008 Li Dongyang <Jerry87905 [at] gmail [dot] com>
5
 
#
6
 
# This program is free software; you can redistribute it and/or modify
7
 
# it under the terms of the GNU General Public License as published by
8
 
# the Free Software Foundation; either version 2 of the License, or
9
 
# (at your option) any later version.
10
 
#
11
 
# This program is distributed in the hope that it will be useful,
12
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
# GNU General Public License for more details.
15
 
#
16
 
# You should have received a copy of the GNU General Public License
17
 
# along with this program; if not, write to the Free Software
18
 
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 
 
20
 
from utils import raise_dbus_error
21
 
from BlueZInterface import BlueZInterface
22
 
 
23
 
class ServiceInterface(BlueZInterface):
24
 
 
 
1
from PropertiesBlueZInterface import PropertiesBlueZInterface
 
2
from errors import raise_dbus_error
 
3
 
 
4
 
 
5
class ServiceInterface(PropertiesBlueZInterface):
25
6
    @raise_dbus_error
26
7
    def __init__(self, interface, obj_path, methods):
27
8
        self.methods = methods
28
9
        super(ServiceInterface, self).__init__(interface, obj_path)
29
 
    # __init__
30
10
 
31
11
    def __getattribute__(self, name):
32
12
        if name in object.__getattribute__(self, 'methods'):
33
 
            func = getattr(self.GetInterface(), name)
 
13
            func = getattr(self.get_interface(), name)
34
14
            return raise_dbus_error(func)
35
15
        else:
36
 
            return super(ServiceInterface, self).__getattribute__(name)
37
 
    # __getattribute__
38
 
# ServiceInterface
 
16
            return super(ServiceInterface, self).__getattribute__(name)
 
 
b'\\ No newline at end of file'