Lines Matching refs:self
51 def __init__(self, idx): argument
52 self._idx = idx
53 self._type = None
56 def idx(self): argument
57 return self._idx
60 def name(self): argument
61 return open('/sys/class/rfkill/rfkill%d/name' % self._idx, 'r').read().rstrip()
64 def type(self): argument
65 if not self._type:
67 if r.idx == self.idx:
68 self._type = r._type
70 return self._type
73 def type_name(self): argument
74 return _type_names.get(self._type, "unknown")
77 def blocked(self): argument
80 if r.idx == self.idx:
85 def soft_blocked(self): argument
86 return self.blocked[0]
89 def soft_blocked(self, block): argument
91 self.block()
93 self.unblock()
96 def hard_blocked(self): argument
97 return self.blocked[1]
99 def block(self): argument
101 s = struct.pack(_event_struct, self.idx, TYPE_ALL, _OP_CHANGE, 1, 0)
105 def unblock(self): argument
107 s = struct.pack(_event_struct, self.idx, TYPE_ALL, _OP_CHANGE, 0, 0)