def open_remdev_dir(self, uri): for rem_path in self.devs: hci = bluetool.get_remote_hci(sys_bus, rem_path) if hci.GetProperty('address') == uri.short_name: return RemDevDirectoryHandle(uri, rem_path) raise gnomevfs.NotFoundError
def open_remdev_dir(self, uri): for rem_path in self.devs: hci = bluetool.get_remote_hci(sys_bus, rem_path) if hci.GetProperty("address") == uri.short_name: return RemDevDirectoryHandle(uri, rem_path) raise gnomevfs.NotFoundError
def open_remdev_file(self, uri): print 'open_remdev_file(', uri, ')' address = uri.short_name[:-8] for rem_path in self.devs: hci = bluetool.get_remote_hci(sys_bus, rem_path) if hci.GetProperty('address').replace(':', '') == address: return RemDevFileHandle(rem_path, self) raise gnomevfs.NotFoundError
def open_remdev_file(self, uri): print "open_remdev_file(", uri, ")" address = uri.short_name[:-8] for rem_path in self.devs: hci = bluetool.get_remote_hci(sys_bus, rem_path) if hci.GetProperty("address").replace(":", "") == address: return RemDevFileHandle(rem_path, self) raise gnomevfs.NotFoundError
def __init__(self, rem_path, dir_handle): VfsDesktopFileBase.__init__(self) print "RemDevFileHandle(", rem_path, ")" self.hci = bluetool.get_remote_hci(sys_bus, rem_path) # self.sdp = bluetool.get_remote_sdp(sys_bus, rem_path) self.name = self.hci.GetProperty("name") self.address = self.hci.GetProperty("address") if len(self.name) == 0: self.name = self.address svc, ma, mi = self.hci.GetProperty("class") icon_path = "file://" + bluetool.devclass2icon(ma) self.contents = REMDEV_FILE_PROTOTYPE % (self.name, icon_path, dir_handle.address, self.address) self.basename = self.address.replace(":", "")
def __init__(self, uri, rem_path): VfsDirectoryBase.__init__(self) print 'RemDevDirectoryHandle(', rem_path, ')' self.uri = uri VfsCache.store(self.uri, self) self.dev_path = rem_path self.basename = uri.short_name self.hci = bluetool.get_remote_hci(sys_bus, rem_path) self.sdp = bluetool.get_remote_sdp(sys_bus, rem_path) self.records = self.sdp.SearchAllRecordsCached()[1] for rec in self.records: self.store_handle(RemSvcFileHandle(rec, self))
def __init__(self, rem_path, dir_handle): VfsDesktopFileBase.__init__(self) print 'RemDevFileHandle(', rem_path, ')' self.hci = bluetool.get_remote_hci(sys_bus, rem_path) #self.sdp = bluetool.get_remote_sdp(sys_bus, rem_path) self.name = self.hci.GetProperty('name') self.address = self.hci.GetProperty('address') if len(self.name) == 0: self.name = self.address svc, ma, mi = self.hci.GetProperty('class') icon_path = 'file://' + bluetool.devclass2icon(ma) self.contents = REMDEV_FILE_PROTOTYPE % ( self.name, icon_path, dir_handle.address, self.address) self.basename = self.address.replace(':', '')
def __init__(self, uri, rem_path): VfsDirectoryBase.__init__(self) print "RemDevDirectoryHandle(", rem_path, ")" self.uri = uri VfsCache.store(self.uri, self) self.dev_path = rem_path self.basename = uri.short_name self.hci = bluetool.get_remote_hci(sys_bus, rem_path) self.sdp = bluetool.get_remote_sdp(sys_bus, rem_path) self.records = self.sdp.SearchAllRecordsCached()[1] for rec in self.records: self.store_handle(RemSvcFileHandle(rec, self))