def create_server(self, pattern): if pattern == "opp": if self.Config.props.opp_enabled: OdsManager.create_server(self) elif pattern == "ftp": if self.Config.props.ftp_enabled: OdsManager.create_server(self, pattern="ftp", require_pairing=True)
def create_server(self, pattern): if pattern == "opp": if self.Config["opp-enabled"]: OdsManager.create_server(self) elif pattern == "ftp": if self.Config["ftp-enabled"]: OdsManager.create_server(self, pattern="ftp", require_pairing=True)
def __init__(self, applet): OdsManager.__init__(self) self.Applet = applet try: self.status_icon = self.Applet.Plugins.StatusIcon except: self.status_icon = None self.GHandle("server-created", self.on_server_created) self.Config = Config("org.blueman.transfer") self.create_server("opp") self.create_server("ftp") self.allowed_devices = []
def __init__(self, applet): OdsManager.__init__(self) self.Applet = applet try: self.status_icon = self.Applet.Plugins.StatusIcon except: self.status_icon = None self.GHandle("server-created", self.on_server_created) self.Config = Config("transfer") #check options if self.Config.props.opp_enabled == None: self.Config.props.opp_enabled = True if self.Config.props.ftp_enabled == None: self.Config.props.ftp_enabled = True self.create_server("opp") self.create_server("ftp") self.allowed_devices = []
def create_server(self, pattern): if pattern == "opp": if self.Config.props.opp_enabled: OdsManager.create_server(self, pattern="opp", require_pairing=False, obex_over_l2cap=False) OdsManager.create_server(self, pattern="opp", require_pairing=False, obex_over_l2cap=True) elif pattern == "bip": OdsManager.create_server(self, pattern="bip", require_pairing=False, obex_over_l2cap=False) OdsManager.create_server(self, pattern="bip", require_pairing=False, obex_over_l2cap=True) elif pattern == "ftp": if self.Config.props.ftp_enabled: OdsManager.create_server(self, pattern="ftp", require_pairing=True, obex_over_l2cap=False) OdsManager.create_server(self, pattern="ftp", require_pairing=True, obex_over_l2cap=True)