\n-00067aa0: 0a20 2020 2020 2020 203c 696d 6720 7372 .
. <\n-000682e0: 6831 3e40 406d 6573 7361 6765 4040 3c2f h1>@@message@@\n-000682f0: 6831 3e0a 2020 2020 3c2f 6469 763e 0a3c h1>.
.<\n-00068300: 2f62 6f64 793e 0a3c 2f68 746d 6c3e 0a27 /body>..'\n+0004e0c0: 2c0a 2020 2020 2020 2020 2020 2020 6465 ,. de\n+0004e0d0: 7374 696e 6174 696f 6e3a 2073 7472 2c0a stination: str,.\n+0004e0e0: 2020 2020 2020 2020 2020 2020 7061 7468 path\n+0004e0f0: 3a20 7374 722c 0a20 2020 2020 2020 2020 : str,. \n+0004e100: 2020 2069 6e74 6572 6661 6365 3a20 7374 interface: st\n+0004e110: 722c 0a20 2020 2020 2020 2020 2020 206d r,. m\n+0004e120: 656d 6265 723a 2073 7472 2c0a 2020 2020 ember: str,. \n+0004e130: 2020 2020 2020 2020 7479 7065 733a 2073 types: s\n+0004e140: 7472 203d 2027 272c 0a20 2020 2020 2020 tr = '',. \n+0004e150: 2020 2020 202a 6172 6773 3a20 6f62 6a65 *args: obje\n+0004e160: 6374 2c0a 2020 2020 2020 2020 2020 2020 ct,. \n+0004e170: 7469 6d65 6f75 743a 204f 7074 696f 6e61 timeout: Optiona\n+0004e180: 6c5b 696e 745d 203d 204e 6f6e 650a 2020 l[int] = None. \n+0004e190: 2020 2920 2d3e 2054 7570 6c65 5b6f 626a ) -> Tuple[obj\n+0004e1a0: 6563 742c 202e 2e2e 5d3a 0a20 2020 2020 ect, ...]:. \n+0004e1b0: 2020 206c 6f67 6765 722e 6465 6275 6728 logger.debug(\n+0004e1c0: 2744 6f69 6e67 2073 796e 6320 6d65 7468 'Doing sync meth\n+0004e1d0: 6f64 2063 616c 6c20 2573 2025 7320 2573 od call %s %s %s\n+0004e1e0: 2025 7320 2573 2025 7327 2c0a 2020 2020 %s %s %s',. \n+0004e1f0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+0004e200: 2064 6573 7469 6e61 7469 6f6e 2c20 7061 destination, pa\n+0004e210: 7468 2c20 696e 7465 7266 6163 652c 206d th, interface, m\n+0004e220: 656d 6265 722c 2074 7970 6573 2c20 6172 ember, types, ar\n+0004e230: 6773 290a 2020 2020 2020 2020 6d65 7373 gs). mess\n+0004e240: 6167 6520 3d20 7365 6c66 2e6d 6573 7361 age = self.messa\n+0004e250: 6765 5f6e 6577 5f6d 6574 686f 645f 6361 ge_new_method_ca\n+0004e260: 6c6c 2864 6573 7469 6e61 7469 6f6e 2c20 ll(destination, \n+0004e270: 7061 7468 2c20 696e 7465 7266 6163 652c path, interface,\n+0004e280: 206d 656d 6265 722c 2074 7970 6573 2c20 member, types, \n+0004e290: 2a61 7267 7329 0a20 2020 2020 2020 206d *args). m\n+0004e2a0: 6573 7361 6765 203d 2073 656c 662e 6361 essage = self.ca\n+0004e2b0: 6c6c 286d 6573 7361 6765 2c20 7469 6d65 ll(message, time\n+0004e2c0: 6f75 7429 0a20 2020 2020 2020 2072 6574 out). ret\n+0004e2d0: 7572 6e20 6d65 7373 6167 652e 6765 745f urn message.get_\n+0004e2e0: 626f 6479 2829 0a0a 2020 2020 6173 796e body().. asyn\n+0004e2f0: 6320 6465 6620 6361 6c6c 5f61 7379 6e63 c def call_async\n+0004e300: 280a 2020 2020 2020 2020 2020 2020 7365 (. se\n+0004e310: 6c66 2c0a 2020 2020 2020 2020 2020 2020 lf,. \n+0004e320: 6d65 7373 6167 653a 2042 7573 4d65 7373 message: BusMess\n+0004e330: 6167 652c 0a20 2020 2020 2020 2020 2020 age,. \n+0004e340: 2074 696d 656f 7574 3a20 4f70 7469 6f6e timeout: Option\n+0004e350: 616c 5b69 6e74 5d20 3d20 4e6f 6e65 0a20 al[int] = None. \n+0004e360: 2020 2029 202d 3e20 4275 734d 6573 7361 ) -> BusMessa\n+0004e370: 6765 3a0a 2020 2020 2020 2020 7065 6e64 ge:. pend\n+0004e380: 696e 6720 3d20 5065 6e64 696e 6743 616c ing = PendingCal\n+0004e390: 6c28 290a 2020 2020 2020 2020 7365 6c66 l(). self\n+0004e3a0: 2e5f 6361 6c6c 5f61 7379 6e63 2862 7972 ._call_async(byr\n+0004e3b0: 6566 2870 656e 6469 6e67 292c 206d 6573 ef(pending), mes\n+0004e3c0: 7361 6765 2c20 7065 6e64 696e 672e 7472 sage, pending.tr\n+0004e3d0: 616d 706f 6c69 6e65 2c20 7065 6e64 696e ampoline, pendin\n+0004e3e0: 672e 7573 6572 6461 7461 2c20 7469 6d65 g.userdata, time\n+0004e3f0: 6f75 7420 6f72 2030 290a 2020 2020 2020 out or 0). \n+0004e400: 2020 7265 7475 726e 2061 7761 6974 2070 return await p\n+0004e410: 656e 6469 6e67 2e66 7574 7572 650a 0a20 ending.future.. \n+0004e420: 2020 2061 7379 6e63 2064 6566 2063 616c async def cal\n+0004e430: 6c5f 6d65 7468 6f64 5f61 7379 6e63 280a l_method_async(.\n+0004e440: 2020 2020 2020 2020 7365 6c66 2c0a 2020 self,. \n+0004e450: 2020 2020 2020 6465 7374 696e 6174 696f destinatio\n+0004e460: 6e3a 204f 7074 696f 6e61 6c5b 7374 725d n: Optional[str]\n+0004e470: 2c0a 2020 2020 2020 2020 7061 7468 3a20 ,. path: \n+0004e480: 7374 722c 0a20 2020 2020 2020 2069 6e74 str,. int\n+0004e490: 6572 6661 6365 3a20 7374 722c 0a20 2020 erface: str,. \n+0004e4a0: 2020 2020 206d 656d 6265 723a 2073 7472 member: str\n+0004e4b0: 2c0a 2020 2020 2020 2020 7479 7065 733a ,. types:\n+0004e4c0: 2073 7472 203d 2027 272c 0a20 2020 2020 str = '',. \n+0004e4d0: 2020 202a 6172 6773 3a20 6f62 6a65 6374 *args: object\n+0004e4e0: 2c0a 2020 2020 2020 2020 7469 6d65 6f75 ,. timeou\n+0004e4f0: 743a 204f 7074 696f 6e61 6c5b 696e 745d t: Optional[int]\n+0004e500: 203d 204e 6f6e 650a 2020 2020 2920 2d3e = None. ) ->\n+0004e510: 2054 7570 6c65 5b6f 626a 6563 742c 202e Tuple[object, .\n+0004e520: 2e2e 5d3a 0a20 2020 2020 2020 206c 6f67 ..]:. log\n+0004e530: 6765 722e 6465 6275 6728 2744 6f69 6e67 ger.debug('Doing\n+0004e540: 2061 7379 6e63 206d 6574 686f 6420 6361 async method ca\n+0004e550: 6c6c 2025 7320 2573 2025 7320 2573 2025 ll %s %s %s %s %\n+0004e560: 7320 2573 272c 0a20 2020 2020 2020 2020 s %s',. \n+0004e570: 2020 2020 2020 2020 2020 2020 6465 7374 dest\n+0004e580: 696e 6174 696f 6e2c 2070 6174 682c 2069 ination, path, i\n+0004e590: 6e74 6572 6661 6365 2c20 6d65 6d62 6572 nterface, member\n+0004e5a0: 2c20 7479 7065 732c 2061 7267 7329 0a20 , types, args). \n+0004e5b0: 2020 2020 2020 206d 6573 7361 6765 203d message =\n+0004e5c0: 2073 656c 662e 6d65 7373 6167 655f 6e65 self.message_ne\n+0004e5d0: 775f 6d65 7468 6f64 5f63 616c 6c28 6465 w_method_call(de\n+0004e5e0: 7374 696e 6174 696f 6e2c 2070 6174 682c stination, path,\n+0004e5f0: 2069 6e74 6572 6661 6365 2c20 6d65 6d62 interface, memb\n+0004e600: 6572 2c20 7479 7065 732c 202a 6172 6773 er, types, *args\n+0004e610: 290a 2020 2020 2020 2020 6d65 7373 6167 ). messag\n+0004e620: 6520 3d20 6177 6169 7420 7365 6c66 2e63 e = await self.c\n+0004e630: 616c 6c5f 6173 796e 6328 6d65 7373 6167 all_async(messag\n+0004e640: 652c 2074 696d 656f 7574 290a 2020 2020 e, timeout). \n+0004e650: 2020 2020 7265 7475 726e 206d 6573 7361 return messa\n+0004e660: 6765 2e67 6574 5f62 6f64 7928 290a 0a20 ge.get_body().. \n+0004e670: 2020 2064 6566 2061 6464 5f6d 6174 6368 def add_match\n+0004e680: 2873 656c 662c 2072 756c 653a 2073 7472 (self, rule: str\n+0004e690: 2c20 6861 6e64 6c65 723a 2043 616c 6c61 , handler: Calla\n+0004e6a0: 626c 655b 5b42 7573 4d65 7373 6167 655d ble[[BusMessage]\n+0004e6b0: 2c20 626f 6f6c 5d29 202d 3e20 536c 6f74 , bool]) -> Slot\n+0004e6c0: 3a0a 2020 2020 2020 2020 736c 6f74 203d :. slot =\n+0004e6d0: 2053 6c6f 7428 6861 6e64 6c65 7229 0a20 Slot(handler). \n+0004e6e0: 2020 2020 2020 2073 656c 662e 5f61 6464 self._add\n+0004e6f0: 5f6d 6174 6368 2862 7972 6566 2873 6c6f _match(byref(slo\n+0004e700: 7429 2c20 7275 6c65 2c20 736c 6f74 2e74 t), rule, slot.t\n+0004e710: 7261 6d70 6f6c 696e 652c 2073 6c6f 742e rampoline, slot.\n+0004e720: 7573 6572 6461 7461 290a 2020 2020 2020 userdata). \n+0004e730: 2020 7265 7475 726e 2073 6c6f 740a 0a20 return slot.. \n+0004e740: 2020 2064 6566 2061 6464 5f6f 626a 6563 def add_objec\n+0004e750: 7428 7365 6c66 2c20 7061 7468 3a20 7374 t(self, path: st\n+0004e760: 722c 206f 626a 3a20 2742 6173 654f 626a r, obj: 'BaseObj\n+0004e770: 6563 7427 2920 2d3e 2053 6c6f 743a 0a20 ect') -> Slot:. \n+0004e780: 2020 2020 2020 2073 6c6f 7420 3d20 536c slot = Sl\n+0004e790: 6f74 286f 626a 2e6d 6573 7361 6765 5f72 ot(obj.message_r\n+0004e7a0: 6563 6569 7665 6429 0a20 2020 2020 2020 eceived). \n+0004e7b0: 2073 656c 662e 5f61 6464 5f6f 626a 6563 self._add_objec\n+0004e7c0: 7428 6279 7265 6628 736c 6f74 292c 2070 t(byref(slot), p\n+0004e7d0: 6174 682c 2073 6c6f 742e 7472 616d 706f ath, slot.trampo\n+0004e7e0: 6c69 6e65 2c20 736c 6f74 2e75 7365 7264 line, slot.userd\n+0004e7f0: 6174 6129 0a20 2020 2020 2020 206f 626a ata). obj\n+0004e800: 2e72 6567 6973 7465 7265 645f 6f6e 5f62 .registered_on_b\n+0004e810: 7573 2873 656c 662c 2070 6174 6829 0a20 us(self, path). \n+0004e820: 2020 2020 2020 2072 6574 7572 6e20 736c return sl\n+0004e830: 6f74 0a0a 0a63 6c61 7373 2042 6173 654f ot...class BaseO\n+0004e840: 626a 6563 743a 0a20 2020 2022 2222 4261 bject:. \"\"\"Ba\n+0004e850: 7365 206f 626a 6563 7420 7479 7065 2066 se object type f\n+0004e860: 6f72 2065 7870 6f72 7469 6e67 206f 626a or exporting obj\n+0004e870: 6563 7473 206f 6e20 7468 6520 6275 730a ects on the bus.\n+0004e880: 0a20 2020 2054 6869 7320 6973 2074 6865 . This is the\n+0004e890: 206c 6f77 6573 742d 6c65 7665 6c20 636c lowest-level cl\n+0004e8a0: 6173 7320 7468 6174 2063 616e 2062 6520 ass that can be \n+0004e8b0: 7061 7373 6564 2074 6f20 4275 732e 6164 passed to Bus.ad\n+0004e8c0: 645f 6f62 6a65 6374 2829 2e0a 0a20 2020 d_object()... \n+0004e8d0: 2049 6620 796f 7520 7761 6e74 2074 6f20 If you want to \n+0004e8e0: 6469 7265 6374 6c79 2073 7562 636c 6173 directly subclas\n+0004e8f0: 7320 7468 6973 2c20 796f 7527 6c6c 206e s this, you'll n\n+0004e900: 6565 6420 746f 2069 6d70 6c65 6d65 6e74 eed to implement\n+0004e910: 0a20 2020 2060 6d65 7373 6167 655f 7265 . `message_re\n+0004e920: 6365 6976 6564 2829 602e 0a0a 2020 2020 ceived()`... \n+0004e930: 5375 6263 6c61 7373 696e 6720 6672 6f6d Subclassing from\n+0004e940: 2060 6275 732e 4f62 6a65 6374 6020 6973 `bus.Object` is\n+0004e950: 2070 726f 6261 626c 7920 6120 6265 7474 probably a bett\n+0004e960: 6572 2063 686f 6963 652e 0a20 2020 2022 er choice.. \"\n+0004e970: 2222 0a20 2020 205f 6462 7573 5f62 7573 \"\". _dbus_bus\n+0004e980: 3a20 4f70 7469 6f6e 616c 5b42 7573 5d20 : Optional[Bus] \n+0004e990: 3d20 4e6f 6e65 0a20 2020 205f 6462 7573 = None. _dbus\n+0004e9a0: 5f70 6174 683a 204f 7074 696f 6e61 6c5b _path: Optional[\n+0004e9b0: 7374 725d 203d 204e 6f6e 650a 0a20 2020 str] = None.. \n+0004e9c0: 2064 6566 2072 6567 6973 7465 7265 645f def registered_\n+0004e9d0: 6f6e 5f62 7573 2873 656c 662c 2062 7573 on_bus(self, bus\n+0004e9e0: 3a20 4275 732c 2070 6174 683a 2073 7472 : Bus, path: str\n+0004e9f0: 2920 2d3e 204e 6f6e 653a 0a20 2020 2020 ) -> None:. \n+0004ea00: 2020 2022 2222 5265 706f 7274 2074 6861 \"\"\"Report tha\n+0004ea10: 7420 616e 2069 6e73 7461 6e63 6520 7761 t an instance wa\n+0004ea20: 7320 6578 706f 7274 6564 206f 6e20 6120 s exported on a \n+0004ea30: 6769 7665 6e20 6275 7320 616e 6420 7061 given bus and pa\n+0004ea40: 7468 2e0a 0a20 2020 2020 2020 2054 6869 th... Thi\n+0004ea50: 7320 6973 2075 7365 6420 736f 2074 6861 s is used so tha\n+0004ea60: 7420 7468 6520 696e 7374 616e 6365 206b t the instance k\n+0004ea70: 6e6f 7773 2077 6865 7265 2074 6f20 7365 nows where to se\n+0004ea80: 6e64 2073 6967 6e61 6c73 2e0a 2020 2020 nd signals.. \n+0004ea90: 2020 2020 4275 732e 6164 645f 6f62 6a65 Bus.add_obje\n+0004eaa0: 6374 2829 2063 616c 6c73 2074 6869 733a ct() calls this:\n+0004eab0: 2079 6f75 2070 726f 6261 626c 7920 7368 you probably sh\n+0004eac0: 6f75 6c64 6e27 7420 6361 6c6c 2074 6869 ouldn't call thi\n+0004ead0: 7320 6f6e 2079 6f75 720a 2020 2020 2020 s on your. \n+0004eae0: 2020 6f77 6e2e 0a20 2020 2020 2020 2022 own.. \"\n+0004eaf0: 2222 0a20 2020 2020 2020 2073 656c 662e \"\". self.\n+0004eb00: 5f64 6275 735f 6275 7320 3d20 6275 730a _dbus_bus = bus.\n+0004eb10: 2020 2020 2020 2020 7365 6c66 2e5f 6462 self._db\n+0004eb20: 7573 5f70 6174 6820 3d20 7061 7468 0a0a us_path = path..\n+0004eb30: 2020 2020 2020 2020 7365 6c66 2e72 6567 self.reg\n+0004eb40: 6973 7465 7265 6428 290a 0a20 2020 2064 istered().. d\n+0004eb50: 6566 2072 6567 6973 7465 7265 6428 7365 ef registered(se\n+0004eb60: 6c66 2920 2d3e 204e 6f6e 653a 0a20 2020 lf) -> None:. \n+0004eb70: 2020 2020 2022 2222 4361 6c6c 6564 2061 \"\"\"Called a\n+0004eb80: 6674 6572 2061 6e20 6f62 6a65 6374 2068 fter an object h\n+0004eb90: 6173 2062 6565 6e20 7265 6769 7374 6572 as been register\n+0004eba0: 6564 206f 6e20 7468 6520 6275 730a 0a20 ed on the bus.. \n+0004ebb0: 2020 2020 2020 2054 6869 7320 6973 2074 This is t\n+0004ebc0: 6865 2063 6f72 7265 6374 206d 6574 686f he correct metho\n+0004ebd0: 6420 746f 2069 6d70 6c65 6d65 6e74 2074 d to implement t\n+0004ebe0: 6f20 646f 2073 6f6d 6520 696e 6974 6961 o do some initia\n+0004ebf0: 6c20 776f 726b 2074 6861 740a 2020 2020 l work that. \n+0004ec00: 2020 2020 6e65 6564 7320 746f 2062 6520 needs to be \n+0004ec10: 646f 6e65 2061 6674 6572 2072 6567 6973 done after regis\n+0004ec20: 7472 6174 696f 6e2e 2020 5468 6520 6465 tration. The de\n+0004ec30: 6661 756c 7420 696d 706c 656d 656e 7461 fault implementa\n+0004ec40: 7469 6f6e 2064 6f65 730a 2020 2020 2020 tion does. \n+0004ec50: 2020 6e6f 7468 696e 672e 0a20 2020 2020 nothing.. \n+0004ec60: 2020 2022 2222 0a20 2020 2020 2020 2070 \"\"\". p\n+0004ec70: 6173 730a 0a20 2020 2064 6566 2065 6d69 ass.. def emi\n+0004ec80: 745f 7369 676e 616c 280a 2020 2020 2020 t_signal(. \n+0004ec90: 2020 2020 2020 7365 6c66 2c20 696e 7465 self, inte\n+0004eca0: 7266 6163 653a 2073 7472 2c20 6e61 6d65 rface: str, name\n+0004ecb0: 3a20 7374 722c 2073 6967 6e61 7475 7265 : str, signature\n+0004ecc0: 3a20 7374 722c 202a 6172 6773 3a20 416e : str, *args: An\n+0004ecd0: 790a 2020 2020 2920 2d3e 2062 6f6f 6c3a y. ) -> bool:\n+0004ece0: 0a20 2020 2020 2020 2022 2222 456d 6974 . \"\"\"Emit\n+0004ecf0: 2061 2044 2d42 7573 2073 6967 6e61 6c20 a D-Bus signal \n+0004ed00: 6f6e 2074 6869 7320 6f62 6a65 6374 0a0a on this object..\n+0004ed10: 2020 2020 2020 2020 5468 6520 6f62 6a65 The obje\n+0004ed20: 6374 206d 7573 7420 6861 7665 2062 6565 ct must have bee\n+0004ed30: 6e20 6578 706f 7274 6564 206f 6e20 7468 n exported on th\n+0004ed40: 6520 6275 7320 7769 7468 2042 7573 2e61 e bus with Bus.a\n+0004ed50: 6464 5f6f 626a 6563 7428 292e 0a0a 2020 dd_object()... \n+0004ed60: 2020 2020 2020 3a69 6e74 6572 6661 6365 :interface\n+0004ed70: 3a20 7468 6520 696e 7465 7266 6163 6520 : the interface \n+0004ed80: 6f66 2074 6865 2073 6967 6e61 6c0a 2020 of the signal. \n+0004ed90: 2020 2020 2020 3a6e 616d 653a 2074 6865 :name: the\n+0004eda0: 2027 6d65 6d62 6572 2720 6e61 6d65 206f 'member' name o\n+0004edb0: 6620 7468 6520 7369 676e 616c 2074 6f20 f the signal to \n+0004edc0: 656d 6974 0a20 2020 2020 2020 203a 7369 emit. :si\n+0004edd0: 676e 6174 7572 653a 2074 6865 2074 7970 gnature: the typ\n+0004ede0: 6520 7369 676e 6174 7572 652c 2061 7320 e signature, as \n+0004edf0: 6120 7374 7269 6e67 0a20 2020 2020 2020 a string. \n+0004ee00: 203a 6172 6773 3a20 7468 6520 6172 6775 :args: the argu\n+0004ee10: 6d65 6e74 732c 2061 6363 6f72 6469 6e67 ments, according\n+0004ee20: 2074 6f20 7468 6520 7369 676e 6174 7572 to the signatur\n+0004ee30: 650a 2020 2020 2020 2020 3a72 6574 7572 e. :retur\n+0004ee40: 6e73 3a20 5472 7565 0a20 2020 2020 2020 ns: True. \n+0004ee50: 2022 2222 0a20 2020 2020 2020 2061 7373 \"\"\". ass\n+0004ee60: 6572 7420 7365 6c66 2e5f 6462 7573 5f62 ert self._dbus_b\n+0004ee70: 7573 2069 7320 6e6f 7420 4e6f 6e65 0a20 us is not None. \n+0004ee80: 2020 2020 2020 2061 7373 6572 7420 7365 assert se\n+0004ee90: 6c66 2e5f 6462 7573 5f70 6174 6820 6973 lf._dbus_path is\n+0004eea0: 206e 6f74 204e 6f6e 650a 2020 2020 2020 not None. \n+0004eeb0: 2020 7265 7475 726e 2073 656c 662e 5f64 return self._d\n+0004eec0: 6275 735f 6275 732e 6d65 7373 6167 655f bus_bus.message_\n+0004eed0: 6e65 775f 7369 676e 616c 2873 656c 662e new_signal(self.\n+0004eee0: 5f64 6275 735f 7061 7468 2c20 696e 7465 _dbus_path, inte\n+0004eef0: 7266 6163 652c 206e 616d 652c 2073 6967 rface, name, sig\n+0004ef00: 6e61 7475 7265 2c20 2a61 7267 7329 2e73 nature, *args).s\n+0004ef10: 656e 6428 290a 0a20 2020 2064 6566 206d end().. def m\n+0004ef20: 6573 7361 6765 5f72 6563 6569 7665 6428 essage_received(\n+0004ef30: 7365 6c66 2c20 6d65 7373 6167 653a 2042 self, message: B\n+0004ef40: 7573 4d65 7373 6167 6529 202d 3e20 626f usMessage) -> bo\n+0004ef50: 6f6c 3a0a 2020 2020 2020 2020 2222 2243 ol:. \"\"\"C\n+0004ef60: 616c 6c65 6420 7768 656e 2061 206d 6573 alled when a mes\n+0004ef70: 7361 6765 2069 7320 7265 6365 6976 6564 sage is received\n+0004ef80: 2066 6f72 2074 6869 7320 6f62 6a65 6374 for this object\n+0004ef90: 0a0a 2020 2020 2020 2020 5468 6973 2069 .. This i\n+0004efa0: 7320 7468 6520 6c6f 7765 7374 206c 6576 s the lowest lev\n+0004efb0: 656c 2069 6e74 6572 6661 6365 2074 6f20 el interface to \n+0004efc0: 7468 6520 4261 7365 4f62 6a65 6374 2e20 the BaseObject. \n+0004efd0: 2059 6f75 206e 6565 6420 746f 0a20 2020 You need to. \n+0004efe0: 2020 2020 2068 616e 646c 6520 6d65 7468 handle meth\n+0004eff0: 6f64 2063 616c 6c73 2c20 7072 6f70 6572 od calls, proper\n+0004f000: 7469 6573 2c20 616e 6420 696e 7472 6f73 ties, and intros\n+0004f010: 7065 6374 696f 6e2e 0a0a 2020 2020 2020 pection... \n+0004f020: 2020 596f 7520 6172 6520 6578 7065 6374 You are expect\n+0004f030: 6564 2074 6f20 6861 6e64 6c65 2074 6865 ed to handle the\n+0004f040: 206d 6573 7361 6765 2061 6e64 2072 6574 message and ret\n+0004f050: 7572 6e20 5472 7565 2e20 204e 6f72 6d61 urn True. Norma\n+0004f060: 6c6c 7920 7468 6973 0a20 2020 2020 2020 lly this. \n+0004f070: 206d 6561 6e73 2074 6861 7420 796f 7520 means that you \n+0004f080: 7365 6e64 2061 2072 6570 6c79 2e20 2049 send a reply. I\n+0004f090: 6620 796f 7520 646f 6e27 7420 7761 6e74 f you don't want\n+0004f0a0: 2074 6f20 6861 6e64 6c65 2074 6865 206d to handle the m\n+0004f0b0: 6573 7361 6765 2c0a 2020 2020 2020 2020 essage,. \n+0004f0c0: 7265 7475 726e 2046 616c 7365 2061 6e64 return False and\n+0004f0d0: 206f 7468 6572 2068 616e 646c 6572 7320 other handlers \n+0004f0e0: 7769 6c6c 2068 6176 6520 6120 6368 616e will have a chan\n+0004f0f0: 6365 2074 6f20 7275 6e2e 2020 4966 206e ce to run. If n\n+0004f100: 6f0a 2020 2020 2020 2020 6861 6e64 6c65 o. handle\n+0004f110: 7220 6861 6e64 6c65 7320 7468 6520 6d65 r handles the me\n+0004f120: 7373 6167 652c 2073 7973 7465 6d64 2077 ssage, systemd w\n+0004f130: 696c 6c20 6765 6e65 7261 7465 2061 2073 ill generate a s\n+0004f140: 7569 7461 626c 6520 6572 726f 720a 2020 uitable error. \n+0004f150: 2020 2020 2020 6d65 7373 6167 6520 616e message an\n+0004f160: 6420 7365 6e64 2074 6861 742c 2069 6e73 d send that, ins\n+0004f170: 7465 6164 2e0a 0a20 2020 2020 2020 203a tead... :\n+0004f180: 6d65 7373 6167 653a 2074 6865 206d 6573 message: the mes\n+0004f190: 7361 6765 2074 6861 7420 7761 7320 7265 sage that was re\n+0004f1a0: 6365 6976 6564 0a20 2020 2020 2020 203a ceived. :\n+0004f1b0: 7265 7475 726e 733a 2054 7275 6520 6966 returns: True if\n+0004f1c0: 2074 6865 206d 6573 7361 6765 2077 6173 the message was\n+0004f1d0: 2068 616e 646c 6564 0a20 2020 2020 2020 handled. \n+0004f1e0: 2022 2222 0a20 2020 2020 2020 2072 6169 \"\"\". rai\n+0004f1f0: 7365 204e 6f74 496d 706c 656d 656e 7465 se NotImplemente\n+0004f200: 6445 7272 6f72 0a0a 0a63 6c61 7373 2049 dError...class I\n+0004f210: 6e74 6572 6661 6365 3a0a 2020 2020 2222 nterface:. \"\"\n+0004f220: 2254 6865 2068 6967 682d 6c65 7665 6c20 \"The high-level \n+0004f230: 6261 7365 2063 6c61 7373 2066 6f72 2064 base class for d\n+0004f240: 6566 696e 696e 6720 442d 4275 7320 696e efining D-Bus in\n+0004f250: 7465 7266 6163 6573 0a0a 2020 2020 5468 terfaces.. Th\n+0004f260: 6973 2063 6c61 7373 2070 726f 7669 6465 is class provide\n+0004f270: 7320 6869 6768 2d6c 6576 656c 2041 5049 s high-level API\n+0004f280: 7320 666f 7220 6465 6669 6e69 6e67 206d s for defining m\n+0004f290: 6574 686f 6473 2c20 7072 6f70 6572 7469 ethods, properti\n+0004f2a0: 6573 2c20 616e 640a 2020 2020 7369 676e es, and. sign\n+0004f2b0: 616c 732c 2061 7320 7765 6c6c 2061 7320 als, as well as \n+0004f2c0: 696d 706c 656d 656e 7469 6e67 2069 6e74 implementing int\n+0004f2d0: 726f 7370 6563 7469 6f6e 2e0a 0a20 2020 rospection... \n+0004f2e0: 204f 6e20 6974 7320 6f77 6e2c 2074 6869 On its own, thi\n+0004f2f0: 7320 636c 6173 7320 646f 6573 6e27 7420 s class doesn't \n+0004f300: 7072 6f76 6964 6520 6120 6d65 6368 616e provide a mechan\n+0004f310: 6973 6d20 666f 7220 6578 706f 7274 696e ism for exportin\n+0004f320: 6720 616e 7974 6869 6e67 0a20 2020 206f g anything. o\n+0004f330: 6e20 7468 6520 6275 732e 2020 5468 6520 n the bus. The \n+0004f340: 4f62 6a65 6374 2063 6c61 7373 2064 6f65 Object class doe\n+0004f350: 7320 7468 6174 2c20 616e 6420 796f 7527 s that, and you'\n+0004f360: 6c6c 2067 656e 6572 616c 6c79 2077 616e ll generally wan\n+0004f370: 7420 746f 0a20 2020 2073 7562 636c 6173 t to. subclas\n+0004f380: 7320 6672 6f6d 2069 742c 2061 7320 6974 s from it, as it\n+0004f390: 2063 6f6e 7461 696e 7320 7365 7665 7261 contains severa\n+0004f3a0: 6c20 6275 696c 742d 696e 2073 7461 6e64 l built-in stand\n+0004f3b0: 6172 6420 696e 7465 7266 6163 6573 0a20 ard interfaces. \n+0004f3c0: 2020 2028 696e 7472 6f73 7065 6374 696f (introspectio\n+0004f3d0: 6e2c 2070 726f 7065 7274 6965 732c 2065 n, properties, e\n+0004f3e0: 7463 2e29 2e0a 0a20 2020 2054 6865 206e tc.)... The n\n+0004f3f0: 616d 6520 6f66 2079 6f75 7220 636c 6173 ame of your clas\n+0004f400: 7320 7769 6c6c 2062 6520 696e 7465 7270 s will be interp\n+0004f410: 7265 7465 6420 6173 2061 2044 2d42 7573 reted as a D-Bus\n+0004f420: 2069 6e74 6572 6661 6365 206e 616d 652e interface name.\n+0004f430: 0a20 2020 2055 6e64 6572 7363 6f72 6573 . Underscores\n+0004f440: 2061 7265 2063 6f6e 7665 7274 6564 2074 are converted t\n+0004f450: 6f20 646f 7473 2e20 204e 6f20 6361 7365 o dots. No case\n+0004f460: 2063 6f6e 7665 7273 696f 6e20 6973 2070 conversion is p\n+0004f470: 6572 666f 726d 6564 2e20 2049 660a 2020 erformed. If. \n+0004f480: 2020 7468 6520 696e 7465 7266 6163 6520 the interface \n+0004f490: 6e61 6d65 2063 616e 2774 2062 6520 7265 name can't be re\n+0004f4a0: 7072 6573 656e 7465 6420 7573 696e 6720 presented using \n+0004f4b0: 7468 6973 2073 6368 656d 652c 206f 7220 this scheme, or \n+0004f4c0: 6966 2079 6f75 2764 206c 696b 650a 2020 if you'd like. \n+0004f4d0: 2020 746f 206e 616d 6520 796f 7572 2063 to name your c\n+0004f4e0: 6c61 7373 2064 6966 6665 7265 6e74 6c79 lass differently\n+0004f4f0: 2c20 796f 7520 6361 6e20 7072 6f76 6964 , you can provid\n+0004f500: 6520 616e 2069 6e74 6572 6661 6365 3d20 e an interface= \n+0004f510: 6b77 6172 6720 746f 2074 6865 0a20 2020 kwarg to the. \n+0004f520: 2063 6c61 7373 2064 6566 696e 6974 696f class definitio\n+0004f530: 6e2e 0a0a 2020 2020 2020 2020 636c 6173 n... clas\n+0004f540: 7320 636f 6d5f 6578 616d 706c 655f 496e s com_example_In\n+0004f550: 7465 7266 6163 6528 6275 732e 4f62 6a65 terface(bus.Obje\n+0004f560: 6374 293a 0a20 2020 2020 2020 2020 2020 ct):. \n+0004f570: 2070 6173 730a 0a20 2020 2020 2020 2063 pass.. c\n+0004f580: 6c61 7373 204d 7949 6e74 6572 6661 6365 lass MyInterface\n+0004f590: 2862 7573 2e4f 626a 6563 742c 2069 6e74 (bus.Object, int\n+0004f5a0: 6572 6661 6365 3d27 6f72 672e 636f 636b erface='org.cock\n+0004f5b0: 7069 745f 7072 6f6a 6563 742e 496e 7465 pit_project.Inte\n+0004f5c0: 7266 6163 6527 293a 0a20 2020 2020 2020 rface'):. \n+0004f5d0: 2020 2020 2070 6173 730a 0a20 2020 2054 pass.. T\n+0004f5e0: 6865 206d 6574 686f 6473 2c20 7072 6f70 he methods, prop\n+0004f5f0: 6572 7469 6573 2c20 616e 6420 7369 676e erties, and sign\n+0004f600: 616c 7320 7768 6963 6820 6172 6520 7669 als which are vi\n+0004f610: 7369 626c 6520 6672 6f6d 2044 2d42 7573 sible from D-Bus\n+0004f620: 2061 7265 0a20 2020 2064 6566 696e 6564 are. defined\n+0004f630: 2075 7369 6e67 2068 656c 7065 7220 636c using helper cl\n+0004f640: 6173 7365 7320 7769 7468 2074 6865 2063 asses with the c\n+0004f650: 6f72 7265 7370 6f6e 6469 6e67 206e 616d orresponding nam\n+0004f660: 6573 2028 4d65 7468 6f64 2c0a 2020 2020 es (Method,. \n+0004f670: 5072 6f70 6572 7479 2c20 5369 676e 616c Property, Signal\n+0004f680: 292e 2020 596f 7520 7368 6f75 6c64 2075 ). You should u\n+0004f690: 7365 206e 6f72 6d61 6c20 5079 7468 6f6e se normal Python\n+0004f6a0: 2073 6e61 6b65 5f63 6173 6520 636f 6e76 snake_case conv\n+0004f6b0: 656e 7469 6f6e 7320 666f 720a 2020 2020 entions for. \n+0004f6c0: 7468 6520 6d65 6d62 6572 206e 616d 6573 the member names\n+0004f6d0: 3a20 7468 6579 2077 696c 6c20 6175 746f : they will auto\n+0004f6e0: 6d61 7469 6361 6c6c 7920 6265 2063 6f6e matically be con\n+0004f6f0: 7665 7274 6564 2074 6f20 4361 6d65 6c43 verted to CamelC\n+0004f700: 6173 6520 6279 0a20 2020 2073 706c 6974 ase by. split\n+0004f710: 7469 6e67 206f 6e20 756e 6465 7273 636f ting on undersco\n+0004f720: 7265 2061 6e64 2063 6f6e 7665 7274 696e re and convertin\n+0004f730: 6720 7468 6520 6669 7273 7420 6c65 7474 g the first lett\n+0004f740: 6572 206f 6620 6561 6368 2072 6573 756c er of each resul\n+0004f750: 7469 6e67 0a20 2020 2077 6f72 6420 746f ting. word to\n+0004f760: 2075 7070 6572 6361 7365 2e20 2046 6f72 uppercase. For\n+0004f770: 2065 7861 6d70 6c65 2c20 606d 6574 686f example, `metho\n+0004f780: 645f 6e61 6d65 6020 6265 636f 6d65 7320 d_name` becomes \n+0004f790: 604d 6574 686f 644e 616d 6560 2e0a 0a20 `MethodName`... \n+0004f7a0: 2020 2045 6163 6820 4d65 7468 6f64 2c20 Each Method, \n+0004f7b0: 5072 6f70 6572 7479 2c20 6f72 2053 6967 Property, or Sig\n+0004f7c0: 6e61 6c20 636f 6e73 7472 7563 746f 7220 nal constructor \n+0004f7d0: 7461 6b65 7320 616e 206f 7074 696f 6e61 takes an optiona\n+0004f7e0: 6c20 6e61 6d65 3d20 6b77 6172 6773 0a20 l name= kwargs. \n+0004f7f0: 2020 2074 6f20 6f76 6572 7269 6465 2074 to override t\n+0004f800: 6865 2061 7574 6f6d 6174 6963 206e 616d he automatic nam\n+0004f810: 6520 636f 6e76 6572 7369 6f6e 2063 6f6e e conversion con\n+0004f820: 7665 6e74 696f 6e20 6162 6f76 652e 0a0a vention above...\n+0004f830: 2020 2020 416e 2065 7861 6d70 6c65 2063 An example c\n+0004f840: 6c61 7373 206d 6967 6874 206c 6f6f 6b20 lass might look \n+0004f850: 6c69 6b65 3a0a 0a20 2020 2020 2020 2063 like:.. c\n+0004f860: 6c61 7373 2063 6f6d 5f65 7861 6d70 6c65 lass com_example\n+0004f870: 5f4d 794f 626a 6563 7428 6275 732e 4f62 _MyObject(bus.Ob\n+0004f880: 6a65 6374 293a 0a20 2020 2020 2020 2020 ject):. \n+0004f890: 2020 2063 7265 6174 6564 203d 2062 7573 created = bus\n+0004f8a0: 2e49 6e74 6572 6661 6365 2e53 6967 6e61 .Interface.Signa\n+0004f8b0: 6c28 2773 272c 2027 6927 290a 2020 2020 l('s', 'i'). \n+0004f8c0: 2020 2020 2020 2020 7265 6e61 6d65 7320 renames \n+0004f8d0: 3d20 6275 732e 496e 7465 7266 6163 652e = bus.Interface.\n+0004f8e0: 5072 6f70 6572 7479 2827 7527 2c20 7661 Property('u', va\n+0004f8f0: 6c75 653d 3029 0a20 2020 2020 2020 2020 lue=0). \n+0004f900: 2020 206e 616d 6520 3d20 6275 732e 496e name = bus.In\n+0004f910: 7465 7266 6163 652e 5072 6f70 6572 7479 terface.Property\n+0004f920: 2827 7327 2c20 2775 6e64 6566 696e 6564 ('s', 'undefined\n+0004f930: 2729 0a0a 2020 2020 2020 2020 2020 2020 ').. \n+0004f940: 4062 7573 2e49 6e74 6572 6661 6365 2e4d @bus.Interface.M\n+0004f950: 6574 686f 6428 6f75 745f 7479 7065 733d ethod(out_types=\n+0004f960: 2829 2c20 696e 5f74 7970 6573 3d27 7327 (), in_types='s'\n+0004f970: 290a 2020 2020 2020 2020 2020 2020 6465 ). de\n+0004f980: 6620 7265 6e61 6d65 2873 656c 662c 206e f rename(self, n\n+0004f990: 616d 6529 3a0a 2020 2020 2020 2020 2020 ame):. \n+0004f9a0: 2020 2020 2020 7365 6c66 2e72 656e 616d self.renam\n+0004f9b0: 6573 202b 3d20 310a 2020 2020 2020 2020 es += 1. \n+0004f9c0: 2020 2020 2020 2020 7365 6c66 2e6e 616d self.nam\n+0004f9d0: 6520 3d20 6e61 6d65 0a0a 2020 2020 2020 e = name.. \n+0004f9e0: 2020 2020 2020 6465 6620 7265 6769 7374 def regist\n+0004f9f0: 6572 6564 2873 656c 6629 3a0a 2020 2020 ered(self):. \n+0004fa00: 2020 2020 2020 2020 2020 2020 7365 6c66 self\n+0004fa10: 2e63 7265 6174 6564 2827 4865 6c6c 6f27 .created('Hello'\n+0004fa20: 2c20 3432 290a 0a20 2020 2053 6565 2074 , 42).. See t\n+0004fa30: 6865 2064 6f63 756d 656e 7461 7469 6f6e he documentation\n+0004fa40: 2066 6f72 2074 6865 204d 6574 686f 642c for the Method,\n+0004fa50: 2050 726f 7065 7274 792c 2061 6e64 2053 Property, and S\n+0004fa60: 6967 6e61 6c20 636c 6173 7365 7320 666f ignal classes fo\n+0004fa70: 720a 2020 2020 6d6f 7265 2069 6e66 6f72 r. more infor\n+0004fa80: 6d61 7469 6f6e 2061 6e64 2065 7861 6d70 mation and examp\n+0004fa90: 6c65 732e 0a20 2020 2022 2222 0a0a 2020 les.. \"\"\".. \n+0004faa0: 2020 2320 436c 6173 7320 7661 7269 6162 # Class variab\n+0004fab0: 6c65 730a 2020 2020 5f64 6275 735f 696e les. _dbus_in\n+0004fac0: 7465 7266 6163 6573 3a20 4469 6374 5b73 terfaces: Dict[s\n+0004fad0: 7472 2c20 4469 6374 5b73 7472 2c20 4469 tr, Dict[str, Di\n+0004fae0: 6374 5b73 7472 2c20 416e 795d 5d5d 0a20 ct[str, Any]]]. \n+0004faf0: 2020 205f 6462 7573 5f6d 656d 6265 7273 _dbus_members\n+0004fb00: 3a20 4f70 7469 6f6e 616c 5b54 7570 6c65 : Optional[Tuple\n+0004fb10: 5b73 7472 2c20 4469 6374 5b73 7472 2c20 [str, Dict[str, \n+0004fb20: 4469 6374 5b73 7472 2c20 416e 795d 5d5d Dict[str, Any]]]\n+0004fb30: 5d0a 0a20 2020 2023 2049 6e73 7461 6e63 ].. # Instanc\n+0004fb40: 6520 7661 7269 6162 6c65 733a 2073 746f e variables: sto\n+0004fb50: 7265 6420 696e 2050 7974 686f 6e20 666f red in Python fo\n+0004fb60: 726d 0a20 2020 205f 6462 7573 5f70 726f rm. _dbus_pro\n+0004fb70: 7065 7274 795f 7661 6c75 6573 3a20 4f70 perty_values: Op\n+0004fb80: 7469 6f6e 616c 5b44 6963 745b 7374 722c tional[Dict[str,\n+0004fb90: 2041 6e79 5d5d 203d 204e 6f6e 650a 0a20 Any]] = None.. \n+0004fba0: 2020 2040 636c 6173 736d 6574 686f 640a @classmethod.\n+0004fbb0: 2020 2020 6465 6620 5f5f 696e 6974 5f73 def __init_s\n+0004fbc0: 7562 636c 6173 735f 5f28 636c 732c 2069 ubclass__(cls, i\n+0004fbd0: 6e74 6572 6661 6365 3a20 4f70 7469 6f6e nterface: Option\n+0004fbe0: 616c 5b73 7472 5d20 3d20 4e6f 6e65 2920 al[str] = None) \n+0004fbf0: 2d3e 204e 6f6e 653a 0a20 2020 2020 2020 -> None:. \n+0004fc00: 2069 6620 696e 7465 7266 6163 6520 6973 if interface is\n+0004fc10: 204e 6f6e 653a 0a20 2020 2020 2020 2020 None:. \n+0004fc20: 2020 2061 7373 6572 7420 275f 5f27 206e assert '__' n\n+0004fc30: 6f74 2069 6e20 636c 732e 5f5f 6e61 6d65 ot in cls.__name\n+0004fc40: 5f5f 2c20 2743 6c61 7373 206e 616d 6520 __, 'Class name \n+0004fc50: 6361 6e6e 6f74 2063 6f6e 7461 696e 2073 cannot contain s\n+0004fc60: 6571 7565 6e74 6961 6c20 756e 6465 7273 equential unders\n+0004fc70: 636f 7265 7327 0a20 2020 2020 2020 2020 cores'. \n+0004fc80: 2020 2069 6e74 6572 6661 6365 203d 2063 interface = c\n+0004fc90: 6c73 2e5f 5f6e 616d 655f 5f2e 7265 706c ls.__name__.repl\n+0004fca0: 6163 6528 275f 272c 2027 2e27 290a 0a20 ace('_', '.').. \n+0004fcb0: 2020 2020 2020 2023 2054 6869 7320 6973 # This is\n+0004fcc0: 2074 6865 2069 6e66 6f72 6d61 7469 6f6e the information\n+0004fcd0: 2066 6f72 2074 6869 7320 7375 6263 6c61 for this subcla\n+0004fce0: 7373 2064 6972 6563 746c 790a 2020 2020 ss directly. \n+0004fcf0: 2020 2020 6d65 6d62 6572 733a 2044 6963 members: Dic\n+0004fd00: 745b 7374 722c 2044 6963 745b 7374 722c t[str, Dict[str,\n+0004fd10: 2049 6e74 6572 6661 6365 2e5f 4d65 6d62 Interface._Memb\n+0004fd20: 6572 5d5d 203d 207b 276d 6574 686f 6473 er]] = {'methods\n+0004fd30: 273a 207b 7d2c 2027 7072 6f70 6572 7469 ': {}, 'properti\n+0004fd40: 6573 273a 207b 7d2c 2027 7369 676e 616c es': {}, 'signal\n+0004fd50: 7327 3a20 7b7d 7d0a 2020 2020 2020 2020 s': {}}. \n+0004fd60: 666f 7220 6e61 6d65 2c20 6d65 6d62 6572 for name, member\n+0004fd70: 2069 6e20 636c 732e 5f5f 6469 6374 5f5f in cls.__dict__\n+0004fd80: 2e69 7465 6d73 2829 3a0a 2020 2020 2020 .items():. \n+0004fd90: 2020 2020 2020 6966 2069 7369 6e73 7461 if isinsta\n+0004fda0: 6e63 6528 6d65 6d62 6572 2c20 496e 7465 nce(member, Inte\n+0004fdb0: 7266 6163 652e 5f4d 656d 6265 7229 3a0a rface._Member):.\n+0004fdc0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+0004fdd0: 6d65 6d62 6572 2e73 6574 7570 2869 6e74 member.setup(int\n+0004fde0: 6572 6661 6365 2c20 6e61 6d65 2c20 6d65 erface, name, me\n+0004fdf0: 6d62 6572 7329 0a0a 2020 2020 2020 2020 mbers).. \n+0004fe00: 2320 5765 206f 6e6c 7920 7374 6f72 6520 # We only store \n+0004fe10: 7468 6520 696e 666f 726d 6174 696f 6e20 the information \n+0004fe20: 6966 2073 6f6d 6574 6869 6e67 2077 6173 if something was\n+0004fe30: 2061 6374 7561 6c6c 7920 6465 6669 6e65 actually define\n+0004fe40: 640a 2020 2020 2020 2020 6966 2073 756d d. if sum\n+0004fe50: 286c 656e 2863 6174 6567 6f72 7929 2066 (len(category) f\n+0004fe60: 6f72 2063 6174 6567 6f72 7920 696e 206d or category in m\n+0004fe70: 656d 6265 7273 2e76 616c 7565 7328 2929 embers.values())\n+0004fe80: 203e 2030 3a0a 2020 2020 2020 2020 2020 > 0:. \n+0004fe90: 2020 636c 732e 5f64 6275 735f 6d65 6d62 cls._dbus_memb\n+0004fea0: 6572 7320 3d20 2869 6e74 6572 6661 6365 ers = (interface\n+0004feb0: 2c20 6d65 6d62 6572 7329 0a0a 2020 2020 , members).. \n+0004fec0: 2020 2020 2320 5468 6973 2069 7320 7468 # This is th\n+0004fed0: 6520 696e 666f 726d 6174 696f 6e20 666f e information fo\n+0004fee0: 7220 7468 6973 2073 7562 636c 6173 732c r this subclass,\n+0004fef0: 2077 6974 6820 616c 6c20 6974 7320 616e with all its an\n+0004ff00: 6365 7374 6f72 730a 2020 2020 2020 2020 cestors. \n+0004ff10: 636c 732e 5f64 6275 735f 696e 7465 7266 cls._dbus_interf\n+0004ff20: 6163 6573 203d 2064 6963 7428 616e 6365 aces = dict(ance\n+0004ff30: 7374 6f72 2e5f 5f64 6963 745f 5f5b 275f stor.__dict__['_\n+0004ff40: 6462 7573 5f6d 656d 6265 7273 275d 0a20 dbus_members']. \n+0004ff50: 2020 2020 2020 2020 2020 2020 2020 2020 \n+0004ff60: 2020 2020 2020 2020 2020 2020 2020 2020 \n+0004ff70: 2020 2066 6f72 2061 6e63 6573 746f 7220 for ancestor \n+0004ff80: 696e 2063 6c73 2e6d 726f 2829 0a20 2020 in cls.mro(). \n+0004ff90: 2020 2020 2020 2020 2020 2020 2020 2020 \n+0004ffa0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+0004ffb0: 2069 6620 275f 6462 7573 5f6d 656d 6265 if '_dbus_membe\n+0004ffc0: 7273 2720 696e 2061 6e63 6573 746f 722e rs' in ancestor.\n+0004ffd0: 5f5f 6469 6374 5f5f 290a 0a20 2020 2040 __dict__).. @\n+0004ffe0: 636c 6173 736d 6574 686f 640a 2020 2020 classmethod. \n+0004fff0: 6465 6620 5f66 696e 645f 696e 7465 7266 def _find_interf\n+00050000: 6163 6528 636c 732c 2069 6e74 6572 6661 ace(cls, interfa\n+00050010: 6365 3a20 7374 7229 202d 3e20 4469 6374 ce: str) -> Dict\n+00050020: 5b73 7472 2c20 4469 6374 5b73 7472 2c20 [str, Dict[str, \n+00050030: 275f 4d65 6d62 6572 275d 5d3a 0a20 2020 '_Member']]:. \n+00050040: 2020 2020 2074 7279 3a0a 2020 2020 2020 try:. \n+00050050: 2020 2020 2020 7265 7475 726e 2063 6c73 return cls\n+00050060: 2e5f 6462 7573 5f69 6e74 6572 6661 6365 ._dbus_interface\n+00050070: 735b 696e 7465 7266 6163 655d 0a20 2020 s[interface]. \n+00050080: 2020 2020 2065 7863 6570 7420 4b65 7945 except KeyE\n+00050090: 7272 6f72 2061 7320 6578 633a 0a20 2020 rror as exc:. \n+000500a0: 2020 2020 2020 2020 2072 6169 7365 204f raise O\n+000500b0: 626a 6563 742e 4d65 7468 6f64 2e55 6e68 bject.Method.Unh\n+000500c0: 616e 646c 6564 2066 726f 6d20 6578 630a andled from exc.\n+000500d0: 0a20 2020 2040 636c 6173 736d 6574 686f . @classmetho\n+000500e0: 640a 2020 2020 6465 6620 5f66 696e 645f d. def _find_\n+000500f0: 6361 7465 676f 7279 2863 6c73 2c20 696e category(cls, in\n+00050100: 7465 7266 6163 653a 2073 7472 2c20 6361 terface: str, ca\n+00050110: 7465 676f 7279 3a20 7374 7229 202d 3e20 tegory: str) -> \n+00050120: 4469 6374 5b73 7472 2c20 275f 4d65 6d62 Dict[str, '_Memb\n+00050130: 6572 275d 3a0a 2020 2020 2020 2020 7265 er']:. re\n+00050140: 7475 726e 2063 6c73 2e5f 6669 6e64 5f69 turn cls._find_i\n+00050150: 6e74 6572 6661 6365 2869 6e74 6572 6661 nterface(interfa\n+00050160: 6365 295b 6361 7465 676f 7279 5d0a 0a20 ce)[category].. \n+00050170: 2020 2040 636c 6173 736d 6574 686f 640a @classmethod.\n+00050180: 2020 2020 6465 6620 5f66 696e 645f 6d65 def _find_me\n+00050190: 6d62 6572 2863 6c73 2c20 696e 7465 7266 mber(cls, interf\n+000501a0: 6163 653a 2073 7472 2c20 6361 7465 676f ace: str, catego\n+000501b0: 7279 3a20 7374 722c 206d 656d 6265 723a ry: str, member:\n+000501c0: 2073 7472 2920 2d3e 2027 5f4d 656d 6265 str) -> '_Membe\n+000501d0: 7227 3a0a 2020 2020 2020 2020 6d65 6d62 r':. memb\n+000501e0: 6572 7320 3d20 636c 732e 5f66 696e 645f ers = cls._find_\n+000501f0: 6361 7465 676f 7279 2869 6e74 6572 6661 category(interfa\n+00050200: 6365 2c20 6361 7465 676f 7279 290a 2020 ce, category). \n+00050210: 2020 2020 2020 7472 793a 0a20 2020 2020 try:. \n+00050220: 2020 2020 2020 2072 6574 7572 6e20 6d65 return me\n+00050230: 6d62 6572 735b 6d65 6d62 6572 5d0a 2020 mbers[member]. \n+00050240: 2020 2020 2020 6578 6365 7074 204b 6579 except Key\n+00050250: 4572 726f 7220 6173 2065 7863 3a0a 2020 Error as exc:. \n+00050260: 2020 2020 2020 2020 2020 7261 6973 6520 raise \n+00050270: 4f62 6a65 6374 2e4d 6574 686f 642e 556e Object.Method.Un\n+00050280: 6861 6e64 6c65 6420 6672 6f6d 2065 7863 handled from exc\n+00050290: 0a0a 2020 2020 636c 6173 7320 5f4d 656d .. class _Mem\n+000502a0: 6265 723a 0a20 2020 2020 2020 205f 6361 ber:. _ca\n+000502b0: 7465 676f 7279 3a20 7374 7220 2023 2066 tegory: str # f\n+000502c0: 696c 6c65 6420 696e 2066 726f 6d20 7375 illed in from su\n+000502d0: 6263 6c61 7373 6573 0a0a 2020 2020 2020 bclasses.. \n+000502e0: 2020 5f70 7974 686f 6e5f 6e61 6d65 3a20 _python_name: \n+000502f0: 4f70 7469 6f6e 616c 5b73 7472 5d20 3d20 Optional[str] = \n+00050300: 4e6f 6e65 0a20 2020 2020 2020 205f 6e61 None. _na\n+00050310: 6d65 3a20 4f70 7469 6f6e 616c 5b73 7472 me: Optional[str\n+00050320: 5d20 3d20 4e6f 6e65 0a20 2020 2020 2020 ] = None. \n+00050330: 205f 696e 7465 7266 6163 653a 204f 7074 _interface: Opt\n+00050340: 696f 6e61 6c5b 7374 725d 203d 204e 6f6e ional[str] = Non\n+00050350: 650a 2020 2020 2020 2020 5f64 6573 6372 e. _descr\n+00050360: 6970 7469 6f6e 3a20 4f70 7469 6f6e 616c iption: Optional\n+00050370: 5b44 6963 745b 7374 722c 2041 6e79 5d5d [Dict[str, Any]]\n+00050380: 0a0a 2020 2020 2020 2020 6465 6620 5f5f .. def __\n+00050390: 696e 6974 5f5f 2873 656c 662c 206e 616d init__(self, nam\n+000503a0: 653a 204f 7074 696f 6e61 6c5b 7374 725d e: Optional[str]\n+000503b0: 203d 204e 6f6e 6529 202d 3e20 4e6f 6e65 = None) -> None\n+000503c0: 3a0a 2020 2020 2020 2020 2020 2020 7365 :. se\n+000503d0: 6c66 2e5f 7079 7468 6f6e 5f6e 616d 6520 lf._python_name \n+000503e0: 3d20 4e6f 6e65 0a20 2020 2020 2020 2020 = None. \n+000503f0: 2020 2073 656c 662e 5f69 6e74 6572 6661 self._interfa\n+00050400: 6365 203d 204e 6f6e 650a 2020 2020 2020 ce = None. \n+00050410: 2020 2020 2020 7365 6c66 2e5f 6e61 6d65 self._name\n+00050420: 203d 206e 616d 650a 0a20 2020 2020 2020 = name.. \n+00050430: 2064 6566 2073 6574 7570 2873 656c 662c def setup(self,\n+00050440: 2069 6e74 6572 6661 6365 3a20 7374 722c interface: str,\n+00050450: 206e 616d 653a 2073 7472 2c20 6d65 6d62 name: str, memb\n+00050460: 6572 733a 2044 6963 745b 7374 722c 2044 ers: Dict[str, D\n+00050470: 6963 745b 7374 722c 2027 496e 7465 7266 ict[str, 'Interf\n+00050480: 6163 652e 5f4d 656d 6265 7227 5d5d 2920 ace._Member']]) \n+00050490: 2d3e 204e 6f6e 653a 0a20 2020 2020 2020 -> None:. \n+000504a0: 2020 2020 2073 656c 662e 5f70 7974 686f self._pytho\n+000504b0: 6e5f 6e61 6d65 203d 206e 616d 6520 2023 n_name = name #\n+000504c0: 2066 6f72 2065 7272 6f72 206d 6573 7361 for error messa\n+000504d0: 6765 730a 2020 2020 2020 2020 2020 2020 ges. \n+000504e0: 6966 2073 656c 662e 5f6e 616d 6520 6973 if self._name is\n+000504f0: 204e 6f6e 653a 0a20 2020 2020 2020 2020 None:. \n+00050500: 2020 2020 2020 2073 656c 662e 5f6e 616d self._nam\n+00050510: 6520 3d20 2727 2e6a 6f69 6e28 776f 7264 e = ''.join(word\n+00050520: 2e74 6974 6c65 2829 2066 6f72 2077 6f72 .title() for wor\n+00050530: 6420 696e 206e 616d 652e 7370 6c69 7428 d in name.split(\n+00050540: 275f 2729 290a 2020 2020 2020 2020 2020 '_')). \n+00050550: 2020 7365 6c66 2e5f 696e 7465 7266 6163 self._interfac\n+00050560: 6520 3d20 696e 7465 7266 6163 650a 2020 e = interface. \n+00050570: 2020 2020 2020 2020 2020 7365 6c66 2e5f self._\n+00050580: 6465 7363 7269 7074 696f 6e20 3d20 7365 description = se\n+00050590: 6c66 2e5f 6465 7363 7269 6265 2829 0a20 lf._describe(). \n+000505a0: 2020 2020 2020 2020 2020 206d 656d 6265 membe\n+000505b0: 7273 5b73 656c 662e 5f63 6174 6567 6f72 rs[self._categor\n+000505c0: 795d 5b73 656c 662e 5f6e 616d 655d 203d y][self._name] =\n+000505d0: 2073 656c 660a 0a20 2020 2020 2020 2064 self.. d\n+000505e0: 6566 205f 6465 7363 7269 6265 2873 656c ef _describe(sel\n+000505f0: 6629 202d 3e20 4469 6374 5b73 7472 2c20 f) -> Dict[str, \n+00050600: 416e 795d 3a0a 2020 2020 2020 2020 2020 Any]:. \n+00050610: 2020 7261 6973 6520 4e6f 7449 6d70 6c65 raise NotImple\n+00050620: 6d65 6e74 6564 4572 726f 720a 0a20 2020 mentedError.. \n+00050630: 2020 2020 2064 6566 205f 5f67 6574 6974 def __getit\n+00050640: 656d 5f5f 2873 656c 662c 206b 6579 3a20 em__(self, key: \n+00050650: 7374 7229 202d 3e20 416e 793a 0a20 2020 str) -> Any:. \n+00050660: 2020 2020 2020 2020 2023 2041 6374 7320 # Acts \n+00050670: 6173 2061 6e20 6164 6170 746f 7220 666f as an adaptor fo\n+00050680: 7220 6469 6374 2061 6363 6573 7365 7320 r dict accesses \n+00050690: 6672 6f6d 2069 6e74 726f 7370 6563 7469 from introspecti\n+000506a0: 6f6e 2e74 6f5f 786d 6c28 290a 2020 2020 on.to_xml(). \n+000506b0: 2020 2020 2020 2020 6173 7365 7274 2073 assert s\n+000506c0: 656c 662e 5f64 6573 6372 6970 7469 6f6e elf._description\n+000506d0: 2069 7320 6e6f 7420 4e6f 6e65 0a20 2020 is not None. \n+000506e0: 2020 2020 2020 2020 2072 6574 7572 6e20 return \n+000506f0: 7365 6c66 2e5f 6465 7363 7269 7074 696f self._descriptio\n+00050700: 6e5b 6b65 795d 0a0a 2020 2020 636c 6173 n[key].. clas\n+00050710: 7320 5072 6f70 6572 7479 285f 4d65 6d62 s Property(_Memb\n+00050720: 6572 293a 0a20 2020 2020 2020 2022 2222 er):. \"\"\"\n+00050730: 4465 6669 6e65 7320 6120 442d 4275 7320 Defines a D-Bus \n+00050740: 7072 6f70 6572 7479 206f 6e20 616e 2069 property on an i\n+00050750: 6e74 6572 6661 6365 0a0a 2020 2020 2020 nterface.. \n+00050760: 2020 5468 6572 6520 6172 6520 7477 6f20 There are two \n+00050770: 6d61 696e 2077 6179 7320 746f 2064 6566 main ways to def\n+00050780: 696e 6520 7072 6f70 6572 7469 6573 3a20 ine properties: \n+00050790: 7769 7468 2061 6e64 2077 6974 686f 7574 with and without\n+000507a0: 2067 6574 7465 7273 2e0a 2020 2020 2020 getters.. \n+000507b0: 2020 4966 2079 6f75 2064 6566 696e 6520 If you define \n+000507c0: 6120 7072 6f70 6572 7479 2077 6974 686f a property witho\n+000507d0: 7574 2061 2067 6574 7465 722c 2074 6865 ut a getter, the\n+000507e0: 6e20 796f 7520 6d75 7374 2070 726f 7669 n you must provi\n+000507f0: 6465 2061 0a20 2020 2020 2020 2076 616c de a. val\n+00050800: 7565 2028 7669 6120 7468 6520 7661 6c75 ue (via the valu\n+00050810: 653d 206b 7761 7267 292e 2020 496e 2074 e= kwarg). In t\n+00050820: 6869 7320 6361 7365 2c20 7468 6520 7072 his case, the pr\n+00050830: 6f70 6572 7479 2076 616c 7565 2069 730a operty value is.\n+00050840: 2020 2020 2020 2020 6d61 696e 7461 696e maintain\n+00050850: 6564 2069 6e74 6572 6e61 6c6c 7920 616e ed internally an\n+00050860: 6420 6361 6e20 6265 2061 6363 6573 7365 d can be accesse\n+00050870: 6420 6672 6f6d 2050 7974 686f 6e20 696e d from Python in\n+00050880: 2074 6865 2075 7375 616c 2077 6179 2e0a the usual way..\n+00050890: 2020 2020 2020 2020 4368 616e 6765 2073 Change s\n+000508a0: 6967 6e61 6c73 2061 7265 2073 656e 7420 ignals are sent \n+000508b0: 6175 746f 6d61 7469 6361 6c6c 792e 0a0a automatically...\n+000508c0: 2020 2020 2020 2020 2020 2020 636c 6173 clas\n+000508d0: 7320 4d79 4f62 6a65 6374 2862 7573 2e4f s MyObject(bus.O\n+000508e0: 626a 6563 7429 3a0a 2020 2020 2020 2020 bject):. \n+000508f0: 2020 2020 2020 2020 636f 756e 7465 7220 counter \n+00050900: 3d20 6275 732e 496e 7465 7266 6163 652e = bus.Interface.\n+00050910: 5072 6f70 6572 7479 2827 6927 2c20 7661 Property('i', va\n+00050920: 6c75 653d 3029 0a0a 2020 2020 2020 2020 lue=0).. \n+00050930: 2020 2020 6120 3d20 4d79 4f62 6a65 6374 a = MyObject\n+00050940: 2829 0a20 2020 2020 2020 2020 2020 2061 (). a\n+00050950: 2e63 6f75 6e74 6572 203d 2035 0a20 2020 .counter = 5. \n+00050960: 2020 2020 2020 2020 2061 2e63 6f75 6e74 a.count\n+00050970: 6572 202b 3d20 310a 2020 2020 2020 2020 er += 1. \n+00050980: 2020 2020 7072 696e 7428 612e 636f 756e print(a.coun\n+00050990: 7465 7229 0a0a 2020 2020 2020 2020 5468 ter).. Th\n+000509a0: 6520 6f74 6865 7220 7761 7920 746f 2064 e other way to d\n+000509b0: 6566 696e 6520 7072 6f70 6572 7469 6573 efine properties\n+000509c0: 2069 7320 7769 7468 2061 2067 6574 7465 is with a gette\n+000509d0: 7220 6675 6e63 7469 6f6e 2e20 2049 6e20 r function. In \n+000509e0: 7468 6973 0a20 2020 2020 2020 2063 6173 this. cas\n+000509f0: 652c 2079 6f75 2063 616e 2072 6561 6420 e, you can read \n+00050a00: 6672 6f6d 2074 6865 2070 726f 7065 7274 from the propert\n+00050a10: 7920 696e 2074 6865 206e 6f72 6d61 6c20 y in the normal \n+00050a20: 7761 792c 2062 7574 206e 6f74 2077 7269 way, but not wri\n+00050a30: 7465 0a20 2020 2020 2020 2074 6f20 6974 te. to it\n+00050a40: 2e20 2059 6f75 2061 7265 2072 6573 706f . You are respo\n+00050a50: 6e73 6962 6c65 2066 6f72 2065 6d69 7474 nsible for emitt\n+00050a60: 696e 6720 6368 616e 6765 2073 6967 6e61 ing change signa\n+00050a70: 6c73 2066 6f72 2079 6f75 7273 656c 662e ls for yourself.\n+00050a80: 0a20 2020 2020 2020 2059 6f75 206d 7573 . You mus\n+00050a90: 7420 6e6f 7420 7072 6f76 6964 6520 7468 t not provide th\n+00050aa0: 6520 7661 6c75 653d 206b 7761 7267 2e0a e value= kwarg..\n+00050ab0: 0a20 2020 2020 2020 2020 2020 2063 6c61 . cla\n+00050ac0: 7373 204d 794f 626a 6563 7428 6275 732e ss MyObject(bus.\n+00050ad0: 4f62 6a65 6374 293a 0a20 2020 2020 2020 Object):. \n+00050ae0: 2020 2020 2020 2020 205f 636f 756e 7465 _counte\n+00050af0: 7220 3d20 300a 0a20 2020 2020 2020 2020 r = 0.. \n+00050b00: 2020 2020 2020 2063 6f75 6e74 6572 203d counter =\n+00050b10: 2062 7573 2e49 6e74 6572 6661 6365 2e50 bus.Interface.P\n+00050b20: 726f 7065 7274 7928 2769 2729 0a20 2020 roperty('i'). \n+00050b30: 2020 2020 2020 2020 2020 2020 2040 636f @co\n+00050b40: 756e 7465 722e 6765 7474 6572 0a20 2020 unter.getter. \n+00050b50: 2020 2020 2020 2020 2020 2020 2064 6566 def\n+00050b60: 2067 6574 5f63 6f75 6e74 6572 2873 656c get_counter(sel\n+00050b70: 6629 3a0a 2020 2020 2020 2020 2020 2020 f):. \n+00050b80: 2020 2020 2020 2020 7265 7475 726e 2073 return s\n+00050b90: 656c 662e 5f63 6f75 6e74 6572 0a0a 2020 elf._counter.. \n+00050ba0: 2020 2020 2020 2020 2020 2020 2020 4063 @c\n+00050bb0: 6f75 6e74 6572 2e73 6574 7465 720a 2020 ounter.setter. \n+00050bc0: 2020 2020 2020 2020 2020 2020 2020 6465 de\n+00050bd0: 6620 7365 745f 636f 756e 7465 7228 7365 f set_counter(se\n+00050be0: 6c66 2c20 7661 6c75 6529 3a0a 2020 2020 lf, value):. \n+00050bf0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00050c00: 7365 6c66 2e5f 636f 756e 7465 7220 3d20 self._counter = \n+00050c10: 7661 6c75 650a 2020 2020 2020 2020 2020 value. \n+00050c20: 2020 2020 2020 2020 2020 7365 6c66 2e70 self.p\n+00050c30: 726f 7065 7274 795f 6368 616e 6765 6428 roperty_changed(\n+00050c40: 2743 6f75 6e74 6572 2729 0a0a 2020 2020 'Counter').. \n+00050c50: 2020 2020 496e 2065 6974 6865 7220 6361 In either ca\n+00050c60: 7365 2c20 796f 7520 6361 6e20 7072 6f76 se, you can prov\n+00050c70: 6964 6520 6120 7365 7474 6572 2066 756e ide a setter fun\n+00050c80: 6374 696f 6e2e 2020 5468 6973 2066 756e ction. This fun\n+00050c90: 6374 696f 6e20 6861 730a 2020 2020 2020 ction has. \n+00050ca0: 2020 6e6f 2069 6d70 6163 7420 6f6e 2050 no impact on P\n+00050cb0: 7974 686f 6e20 636f 6465 2c20 6275 7420 ython code, but \n+00050cc0: 6d61 6b65 7320 7468 6520 7072 6f70 6572 makes the proper\n+00050cd0: 7479 2077 7269 7461 626c 6520 6672 6f6d ty writable from\n+00050ce0: 2074 6865 2076 6965 770a 2020 2020 2020 the view. \n+00050cf0: 2020 6f66 2044 2d42 7573 2e20 2059 6f75 of D-Bus. You\n+00050d00: 7220 7365 7474 6572 2077 696c 6c20 6265 r setter will be\n+00050d10: 2063 616c 6c65 6420 7768 656e 2061 2050 called when a P\n+00050d20: 726f 7065 7274 6965 732e 5365 7428 2920 roperties.Set() \n+00050d30: 6361 6c6c 2069 730a 2020 2020 2020 2020 call is. \n+00050d40: 6d61 6465 2c20 616e 6420 6e6f 206f 7468 made, and no oth\n+00050d50: 6572 2061 6374 696f 6e20 7769 6c6c 2062 er action will b\n+00050d60: 6520 7065 7266 6f72 6d65 642e 2020 4120 e performed. A \n+00050d70: 7472 6976 6961 6c20 696d 706c 656d 656e trivial implemen\n+00050d80: 7461 7469 6f6e 0a20 2020 2020 2020 206d tation. m\n+00050d90: 6967 6874 206c 6f6f 6b20 6c69 6b65 3a0a ight look like:.\n+00050da0: 0a20 2020 2020 2020 2020 2020 2063 6c61 . cla\n+00050db0: 7373 204d 794f 626a 6563 7428 6275 732e ss MyObject(bus.\n+00050dc0: 4f62 6a65 6374 293a 0a20 2020 2020 2020 Object):. \n+00050dd0: 2020 2020 2020 2020 2063 6f75 6e74 6572 counter\n+00050de0: 203d 2062 7573 2e49 6e74 6572 6661 6365 = bus.Interface\n+00050df0: 2e50 726f 7065 7274 7928 2769 272c 2076 .Property('i', v\n+00050e00: 616c 7565 3d30 290a 2020 2020 2020 2020 alue=0). \n+00050e10: 2020 2020 2020 2020 4063 6f75 6e74 6572 @counter\n+00050e20: 2e73 6574 7465 720a 2020 2020 2020 2020 .setter. \n+00050e30: 2020 2020 2020 2020 6465 6620 7365 745f def set_\n+00050e40: 636f 756e 7465 7228 7365 6c66 2c20 7661 counter(self, va\n+00050e50: 6c75 6529 3a0a 2020 2020 2020 2020 2020 lue):. \n+00050e60: 2020 2020 2020 2020 2020 2320 7765 2067 # we g\n+00050e70: 6f74 2061 2072 6571 7565 7374 2074 6f20 ot a request to \n+00050e80: 7365 7420 7468 6520 636f 756e 7465 7220 set the counter \n+00050e90: 6672 6f6d 2044 2d42 7573 0a20 2020 2020 from D-Bus. \n+00050ea0: 2020 2020 2020 2020 2020 2020 2020 2073 s\n+00050eb0: 656c 662e 636f 756e 7465 7220 3d20 7661 elf.counter = va\n+00050ec0: 6c75 650a 0a20 2020 2020 2020 2049 6e20 lue.. In \n+00050ed0: 616c 6c20 6361 7365 732c 2074 6865 2066 all cases, the f\n+00050ee0: 6972 7374 2028 616e 6420 6f6e 6c79 206d irst (and only m\n+00050ef0: 616e 6461 746f 7279 2920 6172 6775 6d65 andatory) argume\n+00050f00: 6e74 2074 6f20 7468 650a 2020 2020 2020 nt to the. \n+00050f10: 2020 636f 6e73 7472 7563 746f 7220 6973 constructor is\n+00050f20: 2074 6865 2044 2d42 7573 2074 7970 6520 the D-Bus type \n+00050f30: 6f66 2074 6865 2070 726f 7065 7274 792e of the property.\n+00050f40: 0a0a 2020 2020 2020 2020 596f 7572 2067 .. Your g\n+00050f50: 6574 7465 7220 616e 6420 7365 7474 6572 etter and setter\n+00050f60: 2066 756e 6374 696f 6e73 2063 616e 2062 functions can b\n+00050f70: 6520 7072 6f76 6964 6564 2062 7920 6b77 e provided by kw\n+00050f80: 6172 6720 746f 2074 6865 0a20 2020 2020 arg to the. \n+00050f90: 2020 2063 6f6e 7374 7275 6374 6f72 2e20 constructor. \n+00050fa0: 2059 6f75 2063 616e 2061 6c73 6f20 6769 You can also gi\n+00050fb0: 7665 2061 206e 616d 653d 206b 7761 7267 ve a name= kwarg\n+00050fc0: 2074 6f20 6f76 6572 7269 6465 2074 6865 to override the\n+00050fd0: 2064 6566 6175 6c74 0a20 2020 2020 2020 default. \n+00050fe0: 206e 616d 6520 636f 6e76 6572 7369 6f6e name conversion\n+00050ff0: 2073 6368 656d 652e 0a20 2020 2020 2020 scheme.. \n+00051000: 2022 2222 0a20 2020 2020 2020 205f 6361 \"\"\". _ca\n+00051010: 7465 676f 7279 203d 2027 7072 6f70 6572 tegory = 'proper\n+00051020: 7469 6573 270a 0a20 2020 2020 2020 205f ties'.. _\n+00051030: 6765 7474 6572 3a20 4f70 7469 6f6e 616c getter: Optional\n+00051040: 5b43 616c 6c61 626c 655b 5b41 6e79 5d2c [Callable[[Any],\n+00051050: 2041 6e79 5d5d 0a20 2020 2020 2020 205f Any]]. _\n+00051060: 7365 7474 6572 3a20 4f70 7469 6f6e 616c setter: Optional\n+00051070: 5b43 616c 6c61 626c 655b 5b41 6e79 2c20 [Callable[[Any, \n+00051080: 416e 795d 2c20 4e6f 6e65 5d5d 0a20 2020 Any], None]]. \n+00051090: 2020 2020 205f 7479 7065 3a20 6275 7374 _type: bust\n+000510a0: 7970 6573 2e54 7970 650a 2020 2020 2020 ypes.Type. \n+000510b0: 2020 5f76 616c 7565 3a20 416e 790a 0a20 _value: Any.. \n+000510c0: 2020 2020 2020 2064 6566 205f 5f69 6e69 def __ini\n+000510d0: 745f 5f28 7365 6c66 2c20 7479 7065 5f73 t__(self, type_s\n+000510e0: 7472 696e 673a 2073 7472 2c0a 2020 2020 tring: str,. \n+000510f0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00051100: 2076 616c 7565 3a20 416e 7920 3d20 4e6f value: Any = No\n+00051110: 6e65 2c0a 2020 2020 2020 2020 2020 2020 ne,. \n+00051120: 2020 2020 2020 2020 206e 616d 653a 204f name: O\n+00051130: 7074 696f 6e61 6c5b 7374 725d 203d 204e ptional[str] = N\n+00051140: 6f6e 652c 0a20 2020 2020 2020 2020 2020 one,. \n+00051150: 2020 2020 2020 2020 2020 6765 7474 6572 getter\n+00051160: 3a20 4f70 7469 6f6e 616c 5b43 616c 6c61 : Optional[Calla\n+00051170: 626c 655b 5b41 6e79 5d2c 2041 6e79 5d5d ble[[Any], Any]]\n+00051180: 203d 204e 6f6e 652c 0a20 2020 2020 2020 = None,. \n+00051190: 2020 2020 2020 2020 2020 2020 2020 7365 se\n+000511a0: 7474 6572 3a20 4f70 7469 6f6e 616c 5b43 tter: Optional[C\n+000511b0: 616c 6c61 626c 655b 5b41 6e79 2c20 416e allable[[Any, An\n+000511c0: 795d 2c20 4e6f 6e65 5d5d 203d 204e 6f6e y], None]] = Non\n+000511d0: 6529 3a0a 2020 2020 2020 2020 2020 2020 e):. \n+000511e0: 6173 7365 7274 2076 616c 7565 2069 7320 assert value is \n+000511f0: 4e6f 6e65 206f 7220 6765 7474 6572 2069 None or getter i\n+00051200: 7320 4e6f 6e65 2c20 2741 2070 726f 7065 s None, 'A prope\n+00051210: 7274 7920 6361 6e6e 6f74 2068 6176 6520 rty cannot have \n+00051220: 626f 7468 2061 2076 616c 7565 2061 6e64 both a value and\n+00051230: 2061 2067 6574 7465 7227 0a0a 2020 2020 a getter'.. \n+00051240: 2020 2020 2020 2020 7375 7065 7228 292e super().\n+00051250: 5f5f 696e 6974 5f5f 286e 616d 653d 6e61 __init__(name=na\n+00051260: 6d65 290a 2020 2020 2020 2020 2020 2020 me). \n+00051270: 7365 6c66 2e5f 6765 7474 6572 203d 2067 self._getter = g\n+00051280: 6574 7465 720a 2020 2020 2020 2020 2020 etter. \n+00051290: 2020 7365 6c66 2e5f 7365 7474 6572 203d self._setter =\n+000512a0: 2073 6574 7465 720a 2020 2020 2020 2020 setter. \n+000512b0: 2020 2020 7365 6c66 2e5f 7479 7065 2c20 self._type, \n+000512c0: 3d20 6275 7374 7970 6573 2e66 726f 6d5f = bustypes.from_\n+000512d0: 7369 676e 6174 7572 6528 7479 7065 5f73 signature(type_s\n+000512e0: 7472 696e 6729 0a20 2020 2020 2020 2020 tring). \n+000512f0: 2020 2073 656c 662e 5f76 616c 7565 203d self._value =\n+00051300: 2076 616c 7565 0a0a 2020 2020 2020 2020 value.. \n+00051310: 6465 6620 5f64 6573 6372 6962 6528 7365 def _describe(se\n+00051320: 6c66 2920 2d3e 2044 6963 745b 7374 722c lf) -> Dict[str,\n+00051330: 2041 6e79 5d3a 0a20 2020 2020 2020 2020 Any]:. \n+00051340: 2020 2072 6574 7572 6e20 7b27 7479 7065 return {'type\n+00051350: 273a 2073 656c 662e 5f74 7970 652e 7479 ': self._type.ty\n+00051360: 7065 7374 7269 6e67 2c20 2766 6c61 6773 pestring, 'flags\n+00051370: 273a 2027 7227 2069 6620 7365 6c66 2e5f ': 'r' if self._\n+00051380: 7365 7474 6572 2069 7320 4e6f 6e65 2065 setter is None e\n+00051390: 6c73 6520 2777 277d 0a0a 2020 2020 2020 lse 'w'}.. \n+000513a0: 2020 6465 6620 5f5f 6765 745f 5f28 7365 def __get__(se\n+000513b0: 6c66 2c20 6f62 6a3a 2027 4f62 6a65 6374 lf, obj: 'Object\n+000513c0: 272c 2063 6c73 3a20 4f70 7469 6f6e 616c ', cls: Optional\n+000513d0: 5b74 7970 655d 203d 204e 6f6e 6529 202d [type] = None) -\n+000513e0: 3e20 416e 793a 0a20 2020 2020 2020 2020 > Any:. \n+000513f0: 2020 2061 7373 6572 7420 7365 6c66 2e5f assert self._\n+00051400: 6e61 6d65 2069 7320 6e6f 7420 4e6f 6e65 name is not None\n+00051410: 0a20 2020 2020 2020 2020 2020 2069 6620 . if \n+00051420: 6f62 6a20 6973 204e 6f6e 653a 0a20 2020 obj is None:. \n+00051430: 2020 2020 2020 2020 2020 2020 2072 6574 ret\n+00051440: 7572 6e20 7365 6c66 0a20 2020 2020 2020 urn self. \n+00051450: 2020 2020 2069 6620 7365 6c66 2e5f 6765 if self._ge\n+00051460: 7474 6572 2069 7320 6e6f 7420 4e6f 6e65 tter is not None\n+00051470: 3a0a 2020 2020 2020 2020 2020 2020 2020 :. \n+00051480: 2020 7265 7475 726e 2073 656c 662e 5f67 return self._g\n+00051490: 6574 7465 722e 5f5f 6765 745f 5f28 6f62 etter.__get__(ob\n+000514a0: 6a2c 2063 6c73 2928 290a 2020 2020 2020 j, cls)(). \n+000514b0: 2020 2020 2020 656c 6966 2073 656c 662e elif self.\n+000514c0: 5f76 616c 7565 2069 7320 6e6f 7420 4e6f _value is not No\n+000514d0: 6e65 3a0a 2020 2020 2020 2020 2020 2020 ne:. \n+000514e0: 2020 2020 6966 206f 626a 2e5f 6462 7573 if obj._dbus\n+000514f0: 5f70 726f 7065 7274 795f 7661 6c75 6573 _property_values\n+00051500: 2069 7320 6e6f 7420 4e6f 6e65 3a0a 2020 is not None:. \n+00051510: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00051520: 2020 7265 7475 726e 206f 626a 2e5f 6462 return obj._db\n+00051530: 7573 5f70 726f 7065 7274 795f 7661 6c75 us_property_valu\n+00051540: 6573 2e67 6574 2873 656c 662e 5f6e 616d es.get(self._nam\n+00051550: 652c 2073 656c 662e 5f76 616c 7565 290a e, self._value).\n+00051560: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00051570: 656c 7365 3a0a 2020 2020 2020 2020 2020 else:. \n+00051580: 2020 2020 2020 2020 2020 7265 7475 726e return\n+00051590: 2073 656c 662e 5f76 616c 7565 0a20 2020 self._value. \n+000515a0: 2020 2020 2020 2020 2065 6c73 653a 0a20 else:. \n+000515b0: 2020 2020 2020 2020 2020 2020 2020 2072 r\n+000515c0: 6169 7365 2041 7474 7269 6275 7465 4572 aise AttributeEr\n+000515d0: 726f 7228 6622 277b 6f62 6a2e 5f5f 636c ror(f\"'{obj.__cl\n+000515e0: 6173 735f 5f2e 5f5f 6e61 6d65 5f5f 7d27 ass__.__name__}'\n+000515f0: 2070 726f 7065 7274 7920 277b 7365 6c66 property '{self\n+00051600: 2e5f 7079 7468 6f6e 5f6e 616d 657d 2720 ._python_name}' \n+00051610: 220a 2020 2020 2020 2020 2020 2020 2020 \". \n+00051620: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00051630: 2020 2020 2020 2066 2277 6173 206e 6f74 f\"was not\n+00051640: 2070 726f 7065 726c 7920 696e 6974 6961 properly initia\n+00051650: 6c69 7365 643a 2075 7365 2065 6974 6865 lised: use eithe\n+00051660: 7220 7468 6520 2776 616c 7565 3d27 206b r the 'value=' k\n+00051670: 7761 7267 206f 7220 220a 2020 2020 2020 warg or \". \n+00051680: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00051690: 2020 2020 2020 2020 2020 2020 2020 2066 f\n+000516a0: 2274 6865 2040 277b 7365 6c66 2e5f 7079 \"the @'{self._py\n+000516b0: 7468 6f6e 5f6e 616d 657d 2e67 6574 7465 thon_name}.gette\n+000516c0: 7227 2064 6563 6f72 6174 6f72 2229 0a0a r' decorator\")..\n+000516d0: 2020 2020 2020 2020 6465 6620 5f5f 7365 def __se\n+000516e0: 745f 5f28 7365 6c66 2c20 6f62 6a3a 2027 t__(self, obj: '\n+000516f0: 4f62 6a65 6374 272c 2076 616c 7565 3a20 Object', value: \n+00051700: 416e 7929 202d 3e20 4e6f 6e65 3a0a 2020 Any) -> None:. \n+00051710: 2020 2020 2020 2020 2020 6173 7365 7274 assert\n+00051720: 2073 656c 662e 5f6e 616d 6520 6973 206e self._name is n\n+00051730: 6f74 204e 6f6e 650a 2020 2020 2020 2020 ot None. \n+00051740: 2020 2020 6966 2073 656c 662e 5f67 6574 if self._get\n+00051750: 7465 7220 6973 206e 6f74 204e 6f6e 653a ter is not None:\n+00051760: 0a20 2020 2020 2020 2020 2020 2020 2020 . \n+00051770: 2072 6169 7365 2041 7474 7269 6275 7465 raise Attribute\n+00051780: 4572 726f 7228 6622 4361 6e6e 6f74 2064 Error(f\"Cannot d\n+00051790: 6972 6563 746c 7920 6173 7369 676e 2027 irectly assign '\n+000517a0: 7b6f 626a 2e5f 5f63 6c61 7373 5f5f 2e5f {obj.__class__._\n+000517b0: 5f6e 616d 655f 5f7d 2720 220a 2020 2020 _name__}' \". \n+000517c0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000517d0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000517e0: 2022 7072 6f70 6572 7479 2027 7b73 656c \"property '{sel\n+000517f0: 662e 5f70 7974 686f 6e5f 6e61 6d65 7d27 f._python_name}'\n+00051800: 2062 6563 6175 7365 2069 7420 6861 7320 because it has \n+00051810: 6120 6765 7474 6572 2229 0a20 2020 2020 a getter\"). \n+00051820: 2020 2020 2020 2069 6620 6f62 6a2e 5f64 if obj._d\n+00051830: 6275 735f 7072 6f70 6572 7479 5f76 616c bus_property_val\n+00051840: 7565 7320 6973 204e 6f6e 653a 0a20 2020 ues is None:. \n+00051850: 2020 2020 2020 2020 2020 2020 206f 626a obj\n+00051860: 2e5f 6462 7573 5f70 726f 7065 7274 795f ._dbus_property_\n+00051870: 7661 6c75 6573 203d 207b 7d0a 2020 2020 values = {}. \n+00051880: 2020 2020 2020 2020 6f62 6a2e 5f64 6275 obj._dbu\n+00051890: 735f 7072 6f70 6572 7479 5f76 616c 7565 s_property_value\n+000518a0: 735b 7365 6c66 2e5f 6e61 6d65 5d20 3d20 s[self._name] = \n+000518b0: 7661 6c75 650a 2020 2020 2020 2020 2020 value. \n+000518c0: 2020 6966 206f 626a 2e5f 6462 7573 5f62 if obj._dbus_b\n+000518d0: 7573 2069 7320 6e6f 7420 4e6f 6e65 3a0a us is not None:.\n+000518e0: 2020 2020 2020 2020 2020 2020 2020 2020 \n+000518f0: 6f62 6a2e 7072 6f70 6572 7469 6573 5f63 obj.properties_c\n+00051900: 6861 6e67 6564 2873 656c 662e 5f69 6e74 hanged(self._int\n+00051910: 6572 6661 6365 2c20 7b73 656c 662e 5f6e erface, {self._n\n+00051920: 616d 653a 2062 7573 7479 7065 732e 5661 ame: bustypes.Va\n+00051930: 7269 616e 7428 7661 6c75 652c 2073 656c riant(value, sel\n+00051940: 662e 5f74 7970 6529 7d2c 205b 5d29 0a0a f._type)}, [])..\n+00051950: 2020 2020 2020 2020 6465 6620 746f 5f64 def to_d\n+00051960: 6275 7328 7365 6c66 2c20 6f62 6a3a 2027 bus(self, obj: '\n+00051970: 4f62 6a65 6374 2729 202d 3e20 6275 7374 Object') -> bust\n+00051980: 7970 6573 2e56 6172 6961 6e74 3a0a 2020 ypes.Variant:. \n+00051990: 2020 2020 2020 2020 2020 7265 7475 726e return\n+000519a0: 2062 7573 7479 7065 732e 5661 7269 616e bustypes.Varian\n+000519b0: 7428 7365 6c66 2e5f 5f67 6574 5f5f 286f t(self.__get__(o\n+000519c0: 626a 292c 2073 656c 662e 5f74 7970 6529 bj), self._type)\n+000519d0: 0a0a 2020 2020 2020 2020 6465 6620 6672 .. def fr\n+000519e0: 6f6d 5f64 6275 7328 7365 6c66 2c20 6f62 om_dbus(self, ob\n+000519f0: 6a3a 2027 4f62 6a65 6374 272c 2076 616c j: 'Object', val\n+00051a00: 7565 3a20 6275 7374 7970 6573 2e56 6172 ue: bustypes.Var\n+00051a10: 6961 6e74 2920 2d3e 204e 6f6e 653a 0a20 iant) -> None:. \n+00051a20: 2020 2020 2020 2020 2020 2069 6620 7365 if se\n+00051a30: 6c66 2e5f 7365 7474 6572 2069 7320 4e6f lf._setter is No\n+00051a40: 6e65 206f 7220 7365 6c66 2e5f 7479 7065 ne or self._type\n+00051a50: 2021 3d20 7661 6c75 652e 7479 7065 3a0a != value.type:.\n+00051a60: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00051a70: 7261 6973 6520 4f62 6a65 6374 2e4d 6574 raise Object.Met\n+00051a80: 686f 642e 556e 6861 6e64 6c65 640a 2020 hod.Unhandled. \n+00051a90: 2020 2020 2020 2020 2020 7365 6c66 2e5f self._\n+00051aa0: 7365 7474 6572 2e5f 5f67 6574 5f5f 286f setter.__get__(o\n+00051ab0: 626a 2928 7661 6c75 652e 7661 6c75 6529 bj)(value.value)\n+00051ac0: 0a0a 2020 2020 2020 2020 6465 6620 6765 .. def ge\n+00051ad0: 7474 6572 2873 656c 662c 2067 6574 7465 tter(self, gette\n+00051ae0: 723a 2043 616c 6c61 626c 655b 5b41 6e79 r: Callable[[Any\n+00051af0: 5d2c 2041 6e79 5d29 202d 3e20 4361 6c6c ], Any]) -> Call\n+00051b00: 6162 6c65 5b5b 416e 795d 2c20 416e 795d able[[Any], Any]\n+00051b10: 3a0a 2020 2020 2020 2020 2020 2020 6966 :. if\n+00051b20: 2073 656c 662e 5f76 616c 7565 2069 7320 self._value is \n+00051b30: 6e6f 7420 4e6f 6e65 3a0a 2020 2020 2020 not None:. \n+00051b40: 2020 2020 2020 2020 2020 7261 6973 6520 raise \n+00051b50: 5661 6c75 6545 7272 6f72 2827 4120 7072 ValueError('A pr\n+00051b60: 6f70 6572 7479 2063 616e 6e6f 7420 6861 operty cannot ha\n+00051b70: 7665 2062 6f74 6820 6120 7661 6c75 6520 ve both a value \n+00051b80: 616e 6420 6120 6765 7474 6572 2729 0a20 and a getter'). \n+00051b90: 2020 2020 2020 2020 2020 2069 6620 7365 if se\n+00051ba0: 6c66 2e5f 6765 7474 6572 2069 7320 6e6f lf._getter is no\n+00051bb0: 7420 4e6f 6e65 3a0a 2020 2020 2020 2020 t None:. \n+00051bc0: 2020 2020 2020 2020 7261 6973 6520 5661 raise Va\n+00051bd0: 6c75 6545 7272 6f72 2827 5468 6973 2070 lueError('This p\n+00051be0: 726f 7065 7274 7920 616c 7265 6164 7920 roperty already \n+00051bf0: 6861 7320 6120 6765 7474 6572 2729 0a20 has a getter'). \n+00051c00: 2020 2020 2020 2020 2020 2073 656c 662e self.\n+00051c10: 5f67 6574 7465 7220 3d20 6765 7474 6572 _getter = getter\n+00051c20: 0a20 2020 2020 2020 2020 2020 2072 6574 . ret\n+00051c30: 7572 6e20 6765 7474 6572 0a0a 2020 2020 urn getter.. \n+00051c40: 2020 2020 6465 6620 7365 7474 6572 2873 def setter(s\n+00051c50: 656c 662c 2073 6574 7465 723a 2043 616c elf, setter: Cal\n+00051c60: 6c61 626c 655b 5b41 6e79 2c20 416e 795d lable[[Any, Any]\n+00051c70: 2c20 4e6f 6e65 5d29 202d 3e20 4361 6c6c , None]) -> Call\n+00051c80: 6162 6c65 5b5b 416e 792c 2041 6e79 5d2c able[[Any, Any],\n+00051c90: 204e 6f6e 655d 3a0a 2020 2020 2020 2020 None]:. \n+00051ca0: 2020 2020 7365 6c66 2e5f 7365 7474 6572 self._setter\n+00051cb0: 203d 2073 6574 7465 720a 2020 2020 2020 = setter. \n+00051cc0: 2020 2020 2020 7265 7475 726e 2073 6574 return set\n+00051cd0: 7465 720a 0a20 2020 2063 6c61 7373 2053 ter.. class S\n+00051ce0: 6967 6e61 6c28 5f4d 656d 6265 7229 3a0a ignal(_Member):.\n+00051cf0: 2020 2020 2020 2020 2222 2244 6566 696e \"\"\"Defin\n+00051d00: 6573 2061 2044 2d42 7573 2073 6967 6e61 es a D-Bus signa\n+00051d10: 6c20 6f6e 2061 6e20 696e 7465 7266 6163 l on an interfac\n+00051d20: 650a 0a20 2020 2020 2020 2054 6869 7320 e.. This \n+00051d30: 6973 2061 2063 616c 6c61 626c 6520 7768 is a callable wh\n+00051d40: 6963 6820 7769 6c6c 2072 6573 756c 7420 ich will result \n+00051d50: 696e 2074 6865 2073 6967 6e61 6c20 6265 in the signal be\n+00051d60: 696e 6720 656d 6974 7465 642e 0a0a 2020 ing emitted... \n+00051d70: 2020 2020 2020 5468 6520 636f 6e73 7472 The constr\n+00051d80: 7563 746f 7220 7461 6b65 7320 7468 6520 uctor takes the \n+00051d90: 7479 7065 7320 6f66 2074 6865 2061 7267 types of the arg\n+00051da0: 756d 656e 7473 2c20 6561 6368 206f 6e65 uments, each one\n+00051db0: 2061 7320 610a 2020 2020 2020 2020 7365 as a. se\n+00051dc0: 7061 7261 7465 2070 6172 616d 6574 6572 parate parameter\n+00051dd0: 2e20 2046 6f72 2065 7861 6d70 6c65 3a0a . For example:.\n+00051de0: 0a20 2020 2020 2020 2020 2020 2070 726f . pro\n+00051df0: 7065 7274 6965 735f 6368 616e 6765 6420 perties_changed \n+00051e00: 3d20 496e 7465 7266 6163 652e 5369 676e = Interface.Sign\n+00051e10: 616c 2827 7327 2c20 2761 7b73 767d 272c al('s', 'a{sv}',\n+00051e20: 2027 6173 2729 0a0a 2020 2020 2020 2020 'as').. \n+00051e30: 596f 7520 6361 6e20 6769 7665 2061 206e You can give a n\n+00051e40: 616d 653d 206b 7761 7267 2074 6f20 6f76 ame= kwarg to ov\n+00051e50: 6572 7269 6465 2074 6865 2064 6566 6175 erride the defau\n+00051e60: 6c74 206e 616d 6520 636f 6e76 6572 7369 lt name conversi\n+00051e70: 6f6e 0a20 2020 2020 2020 2073 6368 656d on. schem\n+00051e80: 652e 0a20 2020 2020 2020 2022 2222 0a20 e.. \"\"\". \n+00051e90: 2020 2020 2020 205f 6361 7465 676f 7279 _category\n+00051ea0: 203d 2027 7369 676e 616c 7327 0a20 2020 = 'signals'. \n+00051eb0: 2020 2020 205f 7479 7065 3a20 6275 7374 _type: bust\n+00051ec0: 7970 6573 2e4d 6573 7361 6765 5479 7065 ypes.MessageType\n+00051ed0: 0a0a 2020 2020 2020 2020 6465 6620 5f5f .. def __\n+00051ee0: 696e 6974 5f5f 2873 656c 662c 202a 6f75 init__(self, *ou\n+00051ef0: 745f 7479 7065 733a 2073 7472 2c20 6e61 t_types: str, na\n+00051f00: 6d65 3a20 4f70 7469 6f6e 616c 5b73 7472 me: Optional[str\n+00051f10: 5d20 3d20 4e6f 6e65 2920 2d3e 204e 6f6e ] = None) -> Non\n+00051f20: 653a 0a20 2020 2020 2020 2020 2020 2073 e:. s\n+00051f30: 7570 6572 2829 2e5f 5f69 6e69 745f 5f28 uper().__init__(\n+00051f40: 6e61 6d65 3d6e 616d 6529 0a20 2020 2020 name=name). \n+00051f50: 2020 2020 2020 2073 656c 662e 5f74 7970 self._typ\n+00051f60: 6520 3d20 6275 7374 7970 6573 2e4d 6573 e = bustypes.Mes\n+00051f70: 7361 6765 5479 7065 286f 7574 5f74 7970 sageType(out_typ\n+00051f80: 6573 290a 0a20 2020 2020 2020 2064 6566 es).. def\n+00051f90: 205f 6465 7363 7269 6265 2873 656c 6629 _describe(self)\n+00051fa0: 202d 3e20 4469 6374 5b73 7472 2c20 416e -> Dict[str, An\n+00051fb0: 795d 3a0a 2020 2020 2020 2020 2020 2020 y]:. \n+00051fc0: 7265 7475 726e 207b 2769 6e27 3a20 7365 return {'in': se\n+00051fd0: 6c66 2e5f 7479 7065 2e74 7970 6573 7472 lf._type.typestr\n+00051fe0: 696e 6773 7d0a 0a20 2020 2020 2020 2064 ings}.. d\n+00051ff0: 6566 205f 5f67 6574 5f5f 2873 656c 662c ef __get__(self,\n+00052000: 206f 626a 3a20 274f 626a 6563 7427 2c20 obj: 'Object', \n+00052010: 636c 733a 204f 7074 696f 6e61 6c5b 7479 cls: Optional[ty\n+00052020: 7065 5d20 3d20 4e6f 6e65 2920 2d3e 2043 pe] = None) -> C\n+00052030: 616c 6c61 626c 655b 2e2e 2e2c 204e 6f6e allable[..., Non\n+00052040: 655d 3a0a 2020 2020 2020 2020 2020 2020 e]:. \n+00052050: 6465 6620 656d 6974 7465 7228 6f62 6a3a def emitter(obj:\n+00052060: 204f 626a 6563 742c 202a 6172 6773 3a20 Object, *args: \n+00052070: 416e 7929 202d 3e20 4e6f 6e65 3a0a 2020 Any) -> None:. \n+00052080: 2020 2020 2020 2020 2020 2020 2020 6173 as\n+00052090: 7365 7274 2073 656c 662e 5f69 6e74 6572 sert self._inter\n+000520a0: 6661 6365 2069 7320 6e6f 7420 4e6f 6e65 face is not None\n+000520b0: 0a20 2020 2020 2020 2020 2020 2020 2020 . \n+000520c0: 2061 7373 6572 7420 7365 6c66 2e5f 6e61 assert self._na\n+000520d0: 6d65 2069 7320 6e6f 7420 4e6f 6e65 0a20 me is not None. \n+000520e0: 2020 2020 2020 2020 2020 2020 2020 2061 a\n+000520f0: 7373 6572 7420 6f62 6a2e 5f64 6275 735f ssert obj._dbus_\n+00052100: 6275 7320 6973 206e 6f74 204e 6f6e 650a bus is not None.\n+00052110: 2020 2020 2020 2020 2020 2020 2020 2020 \n+00052120: 6173 7365 7274 206f 626a 2e5f 6462 7573 assert obj._dbus\n+00052130: 5f70 6174 6820 6973 206e 6f74 204e 6f6e _path is not Non\n+00052140: 650a 2020 2020 2020 2020 2020 2020 2020 e. \n+00052150: 2020 6d65 7373 6167 6520 3d20 6f62 6a2e message = obj.\n+00052160: 5f64 6275 735f 6275 732e 6d65 7373 6167 _dbus_bus.messag\n+00052170: 655f 6e65 775f 7369 676e 616c 286f 626a e_new_signal(obj\n+00052180: 2e5f 6462 7573 5f70 6174 682c 2073 656c ._dbus_path, sel\n+00052190: 662e 5f69 6e74 6572 6661 6365 2c20 7365 f._interface, se\n+000521a0: 6c66 2e5f 6e61 6d65 290a 2020 2020 2020 lf._name). \n+000521b0: 2020 2020 2020 2020 2020 7365 6c66 2e5f self._\n+000521c0: 7479 7065 2e77 7269 7465 286d 6573 7361 type.write(messa\n+000521d0: 6765 2c20 2a61 7267 7329 0a20 2020 2020 ge, *args). \n+000521e0: 2020 2020 2020 2020 2020 206d 6573 7361 messa\n+000521f0: 6765 2e73 656e 6428 290a 2020 2020 2020 ge.send(). \n+00052200: 2020 2020 2020 7265 7475 726e 2065 6d69 return emi\n+00052210: 7474 6572 2e5f 5f67 6574 5f5f 286f 626a tter.__get__(obj\n+00052220: 2c20 636c 7329 0a0a 2020 2020 636c 6173 , cls).. clas\n+00052230: 7320 4d65 7468 6f64 285f 4d65 6d62 6572 s Method(_Member\n+00052240: 293a 0a20 2020 2020 2020 2022 2222 4465 ):. \"\"\"De\n+00052250: 6669 6e65 7320 6120 442d 4275 7320 6d65 fines a D-Bus me\n+00052260: 7468 6f64 206f 6e20 616e 2069 6e74 6572 thod on an inter\n+00052270: 6661 6365 0a0a 2020 2020 2020 2020 5468 face.. Th\n+00052280: 6973 2069 7320 6120 6675 6e63 7469 6f6e is is a function\n+00052290: 2064 6563 6f72 6174 6f72 2077 6869 6368 decorator which\n+000522a0: 206d 6172 6b73 2061 2067 6976 656e 206d marks a given m\n+000522b0: 6574 686f 6420 666f 7220 6578 706f 7274 ethod for export\n+000522c0: 2e0a 0a20 2020 2020 2020 2054 6865 2063 ... The c\n+000522d0: 6f6e 7374 7275 6374 6f72 2074 616b 6573 onstructor takes\n+000522e0: 2074 776f 2061 7267 756d 656e 7473 3a20 two arguments: \n+000522f0: 7468 6520 7479 7065 206f 6620 7468 6520 the type of the \n+00052300: 6f75 7470 7574 2061 7267 756d 656e 7473 output arguments\n+00052310: 2c0a 2020 2020 2020 2020 616e 6420 7468 ,. and th\n+00052320: 6520 7479 7065 206f 6620 7468 6520 696e e type of the in\n+00052330: 7075 7420 6172 6775 6d65 6e74 732e 2020 put arguments. \n+00052340: 426f 7468 2073 686f 756c 6420 6265 2067 Both should be g\n+00052350: 6976 656e 2061 7320 610a 2020 2020 2020 iven as a. \n+00052360: 2020 7365 7175 656e 6365 2e0a 0a20 2020 sequence... \n+00052370: 2020 2020 2020 2020 2040 496e 7465 7266 @Interf\n+00052380: 6163 652e 4d65 7468 6f64 285b 2761 7b73 ace.Method(['a{s\n+00052390: 767d 275d 2c20 5b27 7327 5d29 0a20 2020 v}'], ['s']). \n+000523a0: 2020 2020 2020 2020 2064 6566 2067 6574 def get\n+000523b0: 5f61 6c6c 2873 656c 662c 2069 6e74 6572 _all(self, inter\n+000523c0: 6661 6365 293a 0a20 2020 2020 2020 2020 face):. \n+000523d0: 2020 2020 2020 202e 2e2e 0a0a 2020 2020 ..... \n+000523e0: 2020 2020 596f 7520 6361 6e20 6769 7665 You can give\n+000523f0: 2061 206e 616d 653d 206b 7761 7267 2074 a name= kwarg t\n+00052400: 6f20 6f76 6572 7269 6465 2074 6865 2064 o override the d\n+00052410: 6566 6175 6c74 206e 616d 6520 636f 6e76 efault name conv\n+00052420: 6572 7369 6f6e 0a20 2020 2020 2020 2073 ersion. s\n+00052430: 6368 656d 652e 0a20 2020 2020 2020 2022 cheme.. \"\n+00052440: 2222 0a20 2020 2020 2020 205f 6361 7465 \"\". _cate\n+00052450: 676f 7279 203d 2027 6d65 7468 6f64 7327 gory = 'methods'\n+00052460: 0a0a 2020 2020 2020 2020 636c 6173 7320 .. class \n+00052470: 556e 6861 6e64 6c65 6428 4578 6365 7074 Unhandled(Except\n+00052480: 696f 6e29 3a0a 2020 2020 2020 2020 2020 ion):. \n+00052490: 2020 2222 2252 6169 7365 6420 6279 2061 \"\"\"Raised by a\n+000524a0: 206d 6574 686f 6420 746f 2069 6e64 6963 method to indic\n+000524b0: 6174 6520 7468 6174 2074 6865 206d 6573 ate that the mes\n+000524c0: 7361 6765 2074 7269 6767 6572 696e 6720 sage triggering \n+000524d0: 7468 6174 0a20 2020 2020 2020 2020 2020 that. \n+000524e0: 206d 6574 686f 6420 6361 6c6c 2072 656d method call rem\n+000524f0: 6169 6e73 2075 6e68 616e 646c 6564 2e22 ains unhandled.\"\n+00052500: 2222 0a20 2020 2020 2020 2020 2020 2070 \"\". p\n+00052510: 6173 730a 0a20 2020 2020 2020 2064 6566 ass.. def\n+00052520: 205f 5f69 6e69 745f 5f28 7365 6c66 2c20 __init__(self, \n+00052530: 6f75 745f 7479 7065 733a 2053 6571 7565 out_types: Seque\n+00052540: 6e63 655b 7374 725d 203d 2028 292c 2069 nce[str] = (), i\n+00052550: 6e5f 7479 7065 733a 2053 6571 7565 6e63 n_types: Sequenc\n+00052560: 655b 7374 725d 203d 2028 292c 206e 616d e[str] = (), nam\n+00052570: 653a 204f 7074 696f 6e61 6c5b 7374 725d e: Optional[str]\n+00052580: 203d 204e 6f6e 6529 3a0a 2020 2020 2020 = None):. \n+00052590: 2020 2020 2020 7375 7065 7228 292e 5f5f super().__\n+000525a0: 696e 6974 5f5f 286e 616d 653d 6e61 6d65 init__(name=name\n+000525b0: 290a 2020 2020 2020 2020 2020 2020 7365 ). se\n+000525c0: 6c66 2e5f 6f75 745f 7479 7065 203d 2062 lf._out_type = b\n+000525d0: 7573 7479 7065 732e 4d65 7373 6167 6554 ustypes.MessageT\n+000525e0: 7970 6528 6f75 745f 7479 7065 7329 0a20 ype(out_types). \n+000525f0: 2020 2020 2020 2020 2020 2073 656c 662e self.\n+00052600: 5f69 6e5f 7479 7065 203d 2062 7573 7479 _in_type = busty\n+00052610: 7065 732e 4d65 7373 6167 6554 7970 6528 pes.MessageType(\n+00052620: 696e 5f74 7970 6573 290a 2020 2020 2020 in_types). \n+00052630: 2020 2020 2020 7365 6c66 2e5f 6675 6e63 self._func\n+00052640: 203d 204e 6f6e 650a 0a20 2020 2020 2020 = None.. \n+00052650: 2064 6566 205f 5f67 6574 5f5f 2873 656c def __get__(sel\n+00052660: 662c 206f 626a 2c20 636c 733d 4e6f 6e65 f, obj, cls=None\n+00052670: 293a 0a20 2020 2020 2020 2020 2020 2072 ):. r\n+00052680: 6574 7572 6e20 7365 6c66 2e5f 6675 6e63 eturn self._func\n+00052690: 2e5f 5f67 6574 5f5f 286f 626a 2c20 636c .__get__(obj, cl\n+000526a0: 7329 0a0a 2020 2020 2020 2020 6465 6620 s).. def \n+000526b0: 5f5f 6361 6c6c 5f5f 2873 656c 662c 202a __call__(self, *\n+000526c0: 6172 6773 2c20 2a2a 6b77 6172 6773 293a args, **kwargs):\n+000526d0: 0a20 2020 2020 2020 2020 2020 2023 2064 . # d\n+000526e0: 6563 6f72 6174 6f72 0a20 2020 2020 2020 ecorator. \n+000526f0: 2020 2020 2073 656c 662e 5f66 756e 632c self._func,\n+00052700: 203d 2061 7267 730a 2020 2020 2020 2020 = args. \n+00052710: 2020 2020 7265 7475 726e 2073 656c 660a return self.\n+00052720: 0a20 2020 2020 2020 2064 6566 205f 6465 . def _de\n+00052730: 7363 7269 6265 2873 656c 6629 202d 3e20 scribe(self) -> \n+00052740: 4469 6374 5b73 7472 2c20 416e 795d 3a0a Dict[str, Any]:.\n+00052750: 2020 2020 2020 2020 2020 2020 7265 7475 retu\n+00052760: 726e 207b 2769 6e27 3a20 5b69 7465 6d2e rn {'in': [item.\n+00052770: 7479 7065 7374 7269 6e67 2066 6f72 2069 typestring for i\n+00052780: 7465 6d20 696e 2073 656c 662e 5f69 6e5f tem in self._in_\n+00052790: 7479 7065 2e69 7465 6d5f 7479 7065 735d type.item_types]\n+000527a0: 2c0a 2020 2020 2020 2020 2020 2020 2020 ,. \n+000527b0: 2020 2020 2020 276f 7574 273a 205b 6974 'out': [it\n+000527c0: 656d 2e74 7970 6573 7472 696e 6720 666f em.typestring fo\n+000527d0: 7220 6974 656d 2069 6e20 7365 6c66 2e5f r item in self._\n+000527e0: 6f75 745f 7479 7065 2e69 7465 6d5f 7479 out_type.item_ty\n+000527f0: 7065 735d 7d0a 0a20 2020 2020 2020 2064 pes]}.. d\n+00052800: 6566 205f 696e 766f 6b65 2873 656c 662c ef _invoke(self,\n+00052810: 206f 626a 2c20 6d65 7373 6167 6529 3a0a obj, message):.\n+00052820: 2020 2020 2020 2020 2020 2020 6172 6773 args\n+00052830: 203d 2073 656c 662e 5f69 6e5f 7479 7065 = self._in_type\n+00052840: 2e72 6561 6428 6d65 7373 6167 6529 0a20 .read(message). \n+00052850: 2020 2020 2020 2020 2020 2069 6620 6172 if ar\n+00052860: 6773 2069 7320 4e6f 6e65 3a0a 2020 2020 gs is None:. \n+00052870: 2020 2020 2020 2020 2020 2020 7265 7475 retu\n+00052880: 726e 2046 616c 7365 0a20 2020 2020 2020 rn False. \n+00052890: 2020 2020 2074 7279 3a0a 2020 2020 2020 try:. \n+000528a0: 2020 2020 2020 2020 2020 7265 7375 6c74 result\n+000528b0: 203d 2073 656c 662e 5f66 756e 632e 5f5f = self._func.__\n+000528c0: 6765 745f 5f28 6f62 6a29 282a 6172 6773 get__(obj)(*args\n+000528d0: 290a 2020 2020 2020 2020 2020 2020 6578 ). ex\n+000528e0: 6365 7074 2028 4275 7345 7272 6f72 2c20 cept (BusError, \n+000528f0: 4f53 4572 726f 7229 2061 7320 6572 726f OSError) as erro\n+00052900: 723a 0a20 2020 2020 2020 2020 2020 2020 r:. \n+00052910: 2020 2072 6574 7572 6e20 6d65 7373 6167 return messag\n+00052920: 652e 7265 706c 795f 6d65 7468 6f64 5f65 e.reply_method_e\n+00052930: 7272 6f72 2865 7272 6f72 290a 0a20 2020 rror(error).. \n+00052940: 2020 2020 2020 2020 2072 6574 7572 6e20 return \n+00052950: 6d65 7373 6167 652e 7265 706c 795f 6d65 message.reply_me\n+00052960: 7468 6f64 5f66 756e 6374 696f 6e5f 7265 thod_function_re\n+00052970: 7475 726e 5f76 616c 7565 2873 656c 662e turn_value(self.\n+00052980: 5f6f 7574 5f74 7970 652c 2072 6573 756c _out_type, resul\n+00052990: 7429 0a0a 0a63 6c61 7373 206f 7267 5f66 t)...class org_f\n+000529a0: 7265 6564 6573 6b74 6f70 5f44 4275 735f reedesktop_DBus_\n+000529b0: 5065 6572 2849 6e74 6572 6661 6365 293a Peer(Interface):\n+000529c0: 0a20 2020 2040 496e 7465 7266 6163 652e . @Interface.\n+000529d0: 4d65 7468 6f64 2829 0a20 2020 2040 7374 Method(). @st\n+000529e0: 6174 6963 6d65 7468 6f64 0a20 2020 2064 aticmethod. d\n+000529f0: 6566 2070 696e 6728 2920 2d3e 204e 6f6e ef ping() -> Non\n+00052a00: 653a 0a20 2020 2020 2020 2070 6173 730a e:. pass.\n+00052a10: 0a20 2020 2040 496e 7465 7266 6163 652e . @Interface.\n+00052a20: 4d65 7468 6f64 2827 7327 290a 2020 2020 Method('s'). \n+00052a30: 4073 7461 7469 636d 6574 686f 640a 2020 @staticmethod. \n+00052a40: 2020 6465 6620 6765 745f 6d61 6368 696e def get_machin\n+00052a50: 655f 6964 2829 202d 3e20 7374 723a 0a20 e_id() -> str:. \n+00052a60: 2020 2020 2020 2077 6974 6820 6f70 656e with open\n+00052a70: 2827 2f65 7463 2f6d 6163 6869 6e65 2d69 ('/etc/machine-i\n+00052a80: 6427 2c20 656e 636f 6469 6e67 3d27 6173 d', encoding='as\n+00052a90: 6369 6927 2920 6173 2066 696c 653a 0a20 cii') as file:. \n+00052aa0: 2020 2020 2020 2020 2020 2072 6574 7572 retur\n+00052ab0: 6e20 6669 6c65 2e72 6561 6428 292e 7374 n file.read().st\n+00052ac0: 7269 7028 290a 0a0a 636c 6173 7320 6f72 rip()...class or\n+00052ad0: 675f 6672 6565 6465 736b 746f 705f 4442 g_freedesktop_DB\n+00052ae0: 7573 5f49 6e74 726f 7370 6563 7461 626c us_Introspectabl\n+00052af0: 6528 496e 7465 7266 6163 6529 3a0a 2020 e(Interface):. \n+00052b00: 2020 4049 6e74 6572 6661 6365 2e4d 6574 @Interface.Met\n+00052b10: 686f 6428 2773 2729 0a20 2020 2040 636c hod('s'). @cl\n+00052b20: 6173 736d 6574 686f 640a 2020 2020 6465 assmethod. de\n+00052b30: 6620 696e 7472 6f73 7065 6374 2863 6c73 f introspect(cls\n+00052b40: 2920 2d3e 2073 7472 3a0a 2020 2020 2020 ) -> str:. \n+00052b50: 2020 7265 7475 726e 2069 6e74 726f 7370 return introsp\n+00052b60: 6563 7469 6f6e 2e74 6f5f 786d 6c28 636c ection.to_xml(cl\n+00052b70: 732e 5f64 6275 735f 696e 7465 7266 6163 s._dbus_interfac\n+00052b80: 6573 290a 0a0a 636c 6173 7320 6f72 675f es)...class org_\n+00052b90: 6672 6565 6465 736b 746f 705f 4442 7573 freedesktop_DBus\n+00052ba0: 5f50 726f 7065 7274 6965 7328 496e 7465 _Properties(Inte\n+00052bb0: 7266 6163 6529 3a0a 2020 2020 7072 6f70 rface):. prop\n+00052bc0: 6572 7469 6573 5f63 6861 6e67 6564 203d erties_changed =\n+00052bd0: 2049 6e74 6572 6661 6365 2e53 6967 6e61 Interface.Signa\n+00052be0: 6c28 2773 272c 2027 617b 7376 7d27 2c20 l('s', 'a{sv}', \n+00052bf0: 2761 7327 290a 0a20 2020 2040 496e 7465 'as').. @Inte\n+00052c00: 7266 6163 652e 4d65 7468 6f64 2827 7627 rface.Method('v'\n+00052c10: 2c20 2773 7327 290a 2020 2020 6465 6620 , 'ss'). def \n+00052c20: 6765 7428 7365 6c66 2c20 696e 7465 7266 get(self, interf\n+00052c30: 6163 652c 206e 616d 6529 3a0a 2020 2020 ace, name):. \n+00052c40: 2020 2020 7265 7475 726e 2073 656c 662e return self.\n+00052c50: 5f66 696e 645f 6d65 6d62 6572 2869 6e74 _find_member(int\n+00052c60: 6572 6661 6365 2c20 2770 726f 7065 7274 erface, 'propert\n+00052c70: 6965 7327 2c20 6e61 6d65 292e 746f 5f64 ies', name).to_d\n+00052c80: 6275 7328 7365 6c66 290a 0a20 2020 2040 bus(self).. @\n+00052c90: 496e 7465 7266 6163 652e 4d65 7468 6f64 Interface.Method\n+00052ca0: 285b 2761 7b73 767d 275d 2c20 2773 2729 (['a{sv}'], 's')\n+00052cb0: 0a20 2020 2064 6566 2067 6574 5f61 6c6c . def get_all\n+00052cc0: 2873 656c 662c 2069 6e74 6572 6661 6365 (self, interface\n+00052cd0: 293a 0a20 2020 2020 2020 2070 726f 7065 ):. prope\n+00052ce0: 7274 6965 7320 3d20 7365 6c66 2e5f 6669 rties = self._fi\n+00052cf0: 6e64 5f63 6174 6567 6f72 7928 696e 7465 nd_category(inte\n+00052d00: 7266 6163 652c 2027 7072 6f70 6572 7469 rface, 'properti\n+00052d10: 6573 2729 0a20 2020 2020 2020 2072 6574 es'). ret\n+00052d20: 7572 6e20 7b6e 616d 653a 2070 726f 702e urn {name: prop.\n+00052d30: 746f 5f64 6275 7328 7365 6c66 2920 666f to_dbus(self) fo\n+00052d40: 7220 6e61 6d65 2c20 7072 6f70 2069 6e20 r name, prop in \n+00052d50: 7072 6f70 6572 7469 6573 2e69 7465 6d73 properties.items\n+00052d60: 2829 7d0a 0a20 2020 2040 496e 7465 7266 ()}.. @Interf\n+00052d70: 6163 652e 4d65 7468 6f64 2827 272c 2027 ace.Method('', '\n+00052d80: 7373 7627 290a 2020 2020 6465 6620 7365 ssv'). def se\n+00052d90: 7428 7365 6c66 2c20 696e 7465 7266 6163 t(self, interfac\n+00052da0: 652c 206e 616d 652c 2076 616c 7565 293a e, name, value):\n+00052db0: 0a20 2020 2020 2020 2073 656c 662e 5f66 . self._f\n+00052dc0: 696e 645f 6d65 6d62 6572 2869 6e74 6572 ind_member(inter\n+00052dd0: 6661 6365 2c20 2770 726f 7065 7274 6965 face, 'propertie\n+00052de0: 7327 2c20 6e61 6d65 292e 6672 6f6d 5f64 s', name).from_d\n+00052df0: 6275 7328 7365 6c66 2c20 7661 6c75 6529 bus(self, value)\n+00052e00: 0a0a 0a63 6c61 7373 204f 626a 6563 7428 ...class Object(\n+00052e10: 6f72 675f 6672 6565 6465 736b 746f 705f org_freedesktop_\n+00052e20: 4442 7573 5f49 6e74 726f 7370 6563 7461 DBus_Introspecta\n+00052e30: 626c 652c 0a20 2020 2020 2020 2020 2020 ble,. \n+00052e40: 2020 6f72 675f 6672 6565 6465 736b 746f org_freedeskto\n+00052e50: 705f 4442 7573 5f50 6565 722c 0a20 2020 p_DBus_Peer,. \n+00052e60: 2020 2020 2020 2020 2020 6f72 675f 6672 org_fr\n+00052e70: 6565 6465 736b 746f 705f 4442 7573 5f50 eedesktop_DBus_P\n+00052e80: 726f 7065 7274 6965 732c 0a20 2020 2020 roperties,. \n+00052e90: 2020 2020 2020 2020 4261 7365 4f62 6a65 BaseObje\n+00052ea0: 6374 2c0a 2020 2020 2020 2020 2020 2020 ct,. \n+00052eb0: 2049 6e74 6572 6661 6365 293a 0a20 2020 Interface):. \n+00052ec0: 2022 2222 4869 6768 2d6c 6576 656c 2062 \"\"\"High-level b\n+00052ed0: 6173 6520 636c 6173 7320 666f 7220 6578 ase class for ex\n+00052ee0: 706f 7274 696e 6720 6f62 6a65 6374 7320 porting objects \n+00052ef0: 6f6e 2044 2d42 7573 0a0a 2020 2020 5468 on D-Bus.. Th\n+00052f00: 6973 2069 7320 7573 7561 6c6c 7920 7768 is is usually wh\n+00052f10: 6572 6520 796f 7520 7368 6f75 6c64 2073 ere you should s\n+00052f20: 7461 7274 2e0a 0a20 2020 2054 6869 7320 tart... This \n+00052f30: 7072 6f76 6964 6573 2061 2062 6173 6520 provides a base \n+00052f40: 666f 7220 6578 706f 7274 696e 6720 6f62 for exporting ob\n+00052f50: 6a65 6374 7320 6f6e 2074 6865 2062 7573 jects on the bus\n+00052f60: 2c20 696d 706c 656d 656e 7473 2074 6865 , implements the\n+00052f70: 0a20 2020 2073 7461 6e64 6172 6420 442d . standard D-\n+00052f80: 4275 7320 696e 7465 7266 6163 6573 2c20 Bus interfaces, \n+00052f90: 616e 6420 616c 6c6f 7773 2079 6f75 2074 and allows you t\n+00052fa0: 6f20 6164 6420 796f 7572 206f 776e 2069 o add your own i\n+00052fb0: 6e74 6572 6661 6365 7320 746f 2074 6865 nterfaces to the\n+00052fc0: 0a20 2020 206d 6978 2e20 2053 6565 2074 . mix. See t\n+00052fd0: 6865 2064 6f63 756d 656e 7461 7469 6f6e he documentation\n+00052fe0: 2066 6f72 2049 6e74 6572 6661 6365 2074 for Interface t\n+00052ff0: 6f20 6669 6e64 206f 7574 2068 6f77 2074 o find out how t\n+00053000: 6f20 6465 6669 6e65 2061 6e64 0a20 2020 o define and. \n+00053010: 2069 6d70 6c65 6d65 6e74 2079 6f75 7220 implement your \n+00053020: 442d 4275 7320 696e 7465 7266 6163 652e D-Bus interface.\n+00053030: 0a20 2020 2022 2222 0a20 2020 2064 6566 . \"\"\". def\n+00053040: 206d 6573 7361 6765 5f72 6563 6569 7665 message_receive\n+00053050: 6428 7365 6c66 2c20 6d65 7373 6167 653a d(self, message:\n+00053060: 2042 7573 4d65 7373 6167 6529 202d 3e20 BusMessage) -> \n+00053070: 626f 6f6c 3a0a 2020 2020 2020 2020 696e bool:. in\n+00053080: 7465 7266 6163 6520 3d20 6d65 7373 6167 terface = messag\n+00053090: 652e 6765 745f 696e 7465 7266 6163 6528 e.get_interface(\n+000530a0: 290a 2020 2020 2020 2020 6e61 6d65 203d ). name =\n+000530b0: 206d 6573 7361 6765 2e67 6574 5f6d 656d message.get_mem\n+000530c0: 6265 7228 290a 0a20 2020 2020 2020 2074 ber().. t\n+000530d0: 7279 3a0a 2020 2020 2020 2020 2020 2020 ry:. \n+000530e0: 6d65 7468 6f64 203d 2073 656c 662e 5f66 method = self._f\n+000530f0: 696e 645f 6d65 6d62 6572 2869 6e74 6572 ind_member(inter\n+00053100: 6661 6365 2c20 276d 6574 686f 6473 272c face, 'methods',\n+00053110: 206e 616d 6529 0a20 2020 2020 2020 2020 name). \n+00053120: 2020 2061 7373 6572 7420 6973 696e 7374 assert isinst\n+00053130: 616e 6365 286d 6574 686f 642c 2049 6e74 ance(method, Int\n+00053140: 6572 6661 6365 2e4d 6574 686f 6429 0a20 erface.Method). \n+00053150: 2020 2020 2020 2020 2020 2072 6574 7572 retur\n+00053160: 6e20 6d65 7468 6f64 2e5f 696e 766f 6b65 n method._invoke\n+00053170: 2873 656c 662c 206d 6573 7361 6765 290a (self, message).\n+00053180: 2020 2020 2020 2020 6578 6365 7074 204f except O\n+00053190: 626a 6563 742e 4d65 7468 6f64 2e55 6e68 bject.Method.Unh\n+000531a0: 616e 646c 6564 3a0a 2020 2020 2020 2020 andled:. \n+000531b0: 2020 2020 7265 7475 726e 2046 616c 7365 return False\n+000531c0: 0a27 2727 2c0a 2020 2763 6f63 6b70 6974 .''',. 'cockpit\n+000531d0: 2f5f 7665 6e64 6f72 2f73 7973 7465 6d64 /_vendor/systemd\n+000531e0: 5f63 7479 7065 732f 696e 7472 6f73 7065 _ctypes/introspe\n+000531f0: 6374 696f 6e2e 7079 273a 2062 7227 2727 ction.py': br'''\n+00053200: 2320 7379 7374 656d 645f 6374 7970 6573 # systemd_ctypes\n+00053210: 0a23 0a23 2043 6f70 7972 6967 6874 2028 .#.# Copyright (\n+00053220: 4329 2032 3032 3220 416c 6c69 736f 6e20 C) 2022 Allison \n+00053230: 4b61 726c 6974 736b 6179 6120 3c61 6c6c Karlitskaya