def __init__(self, opath, nm_obj, gpath, props, manager): super(NM08Profile, self).__init__(opath, nm_obj, props, manager) self.helper = GConfHelper() self.gpath = gpath from wader.common.backends import get_backend keyring = get_backend().get_keyring() self.secrets = ProfileSecrets(self, keyring) self._connect_to_signals()
def _init(self): if self.props is None: # created with "from_path" self.props = pickle.load(open(self.path)) else: # regular constructor with properties self._write() from wader.common.backends import get_backend keyring = get_backend().get_keyring(self.secrets_path) self.secrets = ProfileSecrets(self, keyring)
def get_dialer(self, dev_opath, opath, plain=False): """ Returns an instance of the dialer that will be used to connect :param dev_opath: DBus object path of the device to use :param opath: DBus object path of the dialer """ from wader.common.backends import get_backend, plain_backend device = self.ctrl.hm.clients[dev_opath] if plain: dialer_klass = plain_backend.get_dialer_klass(device) else: dialer_klass = get_backend().get_dialer_klass(device) return dialer_klass(device, opath, ctrl=self.ctrl)
# -*- coding: utf-8 -*- # Copyright (C) 2006-2008 Vodafone España, S.A. # Copyright (C) 2008-2009 Warp Networks, S.L. # Author: Pablo Martí # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program 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 General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. """ Profile manager I manage profiles in the system (or connections in NM-lingo) """ from wader.common.profile import ProfileManager from wader.common.backends import get_backend from wader.gtk.consts import WADER_HOME backend = get_backend() manager = ProfileManager(backend, WADER_HOME)
# -*- coding: utf-8 -*- # Copyright (C) 2006-2008 Vodafone España, S.A. # Copyright (C) 2008-2009 Warp Networks, S.L. # Author: Pablo Martí # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program 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 General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. """ Profile manager I manage profiles in the system (or connections in NM-lingo) """ from wader.common.profile import ProfileManager from wader.common.backends import get_backend from gui.consts import VMB_HOME backend = get_backend() manager = ProfileManager(backend, VMB_HOME)