Guest User

python sdbus bluez interfaces

a guest
Apr 13th, 2022
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 14.54 KB | None | 0 0
  1. from __future__ import annotations
  2.  
  3. from typing import Any, Dict, List, Tuple
  4.  
  5. from sdbus import (
  6.     DbusDeprecatedFlag,
  7.     DbusInterfaceCommonAsync,
  8.     DbusNoReplyFlag,
  9.     DbusPropertyConstFlag,
  10.     DbusPropertyEmitsChangeFlag,
  11.     DbusPropertyEmitsInvalidationFlag,
  12.     DbusPropertyExplicitFlag,
  13.     DbusUnprivilegedFlag,
  14.     dbus_method_async,
  15.     dbus_property_async,
  16.     dbus_signal_async,
  17. )
  18.  
  19.  
  20. class OrgBluezAdapter1Interface(
  21.     DbusInterfaceCommonAsync,
  22.     interface_name="org.bluez.Adapter1",
  23. ):
  24.     @dbus_method_async()
  25.     async def start_discovery(
  26.         self,
  27.     ) -> None:
  28.         raise NotImplementedError
  29.  
  30.     @dbus_method_async(
  31.         input_signature="a{sv}",
  32.     )
  33.     async def set_discovery_filter(
  34.         self,
  35.         properties: Dict[str, Tuple[str, Any]],
  36.     ) -> None:
  37.         raise NotImplementedError
  38.  
  39.     @dbus_method_async()
  40.     async def stop_discovery(
  41.         self,
  42.     ) -> None:
  43.         raise NotImplementedError
  44.  
  45.     @dbus_method_async(
  46.         input_signature="o",
  47.     )
  48.     async def remove_device(
  49.         self,
  50.         device: str,
  51.     ) -> None:
  52.         raise NotImplementedError
  53.  
  54.     @dbus_method_async(
  55.         result_signature="as",
  56.     )
  57.     async def get_discovery_filters(
  58.         self,
  59.     ) -> List[str]:
  60.         raise NotImplementedError
  61.  
  62.     @dbus_property_async(
  63.         property_signature="s",
  64.     )
  65.     def address(self) -> str:
  66.         raise NotImplementedError
  67.  
  68.     @dbus_property_async(
  69.         property_signature="s",
  70.     )
  71.     def address_type(self) -> str:
  72.         raise NotImplementedError
  73.  
  74.     @dbus_property_async(
  75.         property_signature="s",
  76.     )
  77.     def name(self) -> str:
  78.         raise NotImplementedError
  79.  
  80.     @dbus_property_async(
  81.         property_signature="s",
  82.     )
  83.     def alias(self) -> str:
  84.         raise NotImplementedError
  85.  
  86.     @dbus_property_async(
  87.         property_signature="u",
  88.     )
  89.     def _class(self) -> int:
  90.         raise NotImplementedError
  91.  
  92.     @dbus_property_async(
  93.         property_signature="b",
  94.     )
  95.     def powered(self) -> bool:
  96.         raise NotImplementedError
  97.  
  98.     @dbus_property_async(
  99.         property_signature="b",
  100.     )
  101.     def discoverable(self) -> bool:
  102.         raise NotImplementedError
  103.  
  104.     @dbus_property_async(
  105.         property_signature="u",
  106.     )
  107.     def discoverable_timeout(self) -> int:
  108.         raise NotImplementedError
  109.  
  110.     @dbus_property_async(
  111.         property_signature="b",
  112.     )
  113.     def pairable(self) -> bool:
  114.         raise NotImplementedError
  115.  
  116.     @dbus_property_async(
  117.         property_signature="u",
  118.     )
  119.     def pairable_timeout(self) -> int:
  120.         raise NotImplementedError
  121.  
  122.     @dbus_property_async(
  123.         property_signature="b",
  124.     )
  125.     def discovering(self) -> bool:
  126.         raise NotImplementedError
  127.  
  128.     @dbus_property_async(
  129.         property_signature="as",
  130.     )
  131.     def u_u_i_ds(self) -> List[str]:
  132.         raise NotImplementedError
  133.  
  134.     @dbus_property_async(
  135.         property_signature="s",
  136.     )
  137.     def modalias(self) -> str:
  138.         raise NotImplementedError
  139.  
  140.     @dbus_property_async(
  141.         property_signature="as",
  142.     )
  143.     def roles(self) -> List[str]:
  144.         raise NotImplementedError
  145.  
  146.  
  147. class OrgBluezGattManager1Interface(
  148.     DbusInterfaceCommonAsync,
  149.     interface_name="org.bluez.GattManager1",
  150. ):
  151.     @dbus_method_async(
  152.         input_signature="oa{sv}",
  153.     )
  154.     async def register_application(
  155.         self,
  156.         application: str,
  157.         options: Dict[str, Tuple[str, Any]],
  158.     ) -> None:
  159.         raise NotImplementedError
  160.  
  161.     @dbus_method_async(
  162.         input_signature="o",
  163.     )
  164.     async def unregister_application(
  165.         self,
  166.         application: str,
  167.     ) -> None:
  168.         raise NotImplementedError
  169.  
  170.  
  171. class OrgBluezLEAdvertisingManager1Interface(
  172.     DbusInterfaceCommonAsync,
  173.     interface_name="org.bluez.LEAdvertisingManager1",
  174. ):
  175.     @dbus_method_async(
  176.         input_signature="oa{sv}",
  177.     )
  178.     async def register_advertisement(
  179.         self,
  180.         advertisement: str,
  181.         options: Dict[str, Tuple[str, Any]],
  182.     ) -> None:
  183.         raise NotImplementedError
  184.  
  185.     @dbus_method_async(
  186.         input_signature="o",
  187.     )
  188.     async def unregister_advertisement(
  189.         self,
  190.         service: str,
  191.     ) -> None:
  192.         raise NotImplementedError
  193.  
  194.     @dbus_property_async(
  195.         property_signature="y",
  196.     )
  197.     def active_instances(self) -> int:
  198.         raise NotImplementedError
  199.  
  200.     @dbus_property_async(
  201.         property_signature="y",
  202.     )
  203.     def supported_instances(self) -> int:
  204.         raise NotImplementedError
  205.  
  206.     @dbus_property_async(
  207.         property_signature="as",
  208.     )
  209.     def supported_includes(self) -> List[str]:
  210.         raise NotImplementedError
  211.  
  212.     @dbus_property_async(
  213.         property_signature="as",
  214.     )
  215.     def supported_secondary_channels(self) -> List[str]:
  216.         raise NotImplementedError
  217.  
  218.  
  219. class OrgBluezMedia1Interface(
  220.     DbusInterfaceCommonAsync,
  221.     interface_name="org.bluez.Media1",
  222. ):
  223.     @dbus_method_async(
  224.         input_signature="oa{sv}",
  225.     )
  226.     async def register_endpoint(
  227.         self,
  228.         endpoint: str,
  229.         properties: Dict[str, Tuple[str, Any]],
  230.     ) -> None:
  231.         raise NotImplementedError
  232.  
  233.     @dbus_method_async(
  234.         input_signature="o",
  235.     )
  236.     async def unregister_endpoint(
  237.         self,
  238.         endpoint: str,
  239.     ) -> None:
  240.         raise NotImplementedError
  241.  
  242.     @dbus_method_async(
  243.         input_signature="oa{sv}",
  244.     )
  245.     async def register_player(
  246.         self,
  247.         player: str,
  248.         properties: Dict[str, Tuple[str, Any]],
  249.     ) -> None:
  250.         raise NotImplementedError
  251.  
  252.     @dbus_method_async(
  253.         input_signature="o",
  254.     )
  255.     async def unregister_player(
  256.         self,
  257.         player: str,
  258.     ) -> None:
  259.         raise NotImplementedError
  260.  
  261.     @dbus_method_async(
  262.         input_signature="oa{sv}",
  263.     )
  264.     async def register_application(
  265.         self,
  266.         application: str,
  267.         options: Dict[str, Tuple[str, Any]],
  268.     ) -> None:
  269.         raise NotImplementedError
  270.  
  271.     @dbus_method_async(
  272.         input_signature="o",
  273.     )
  274.     async def unregister_application(
  275.         self,
  276.         application: str,
  277.     ) -> None:
  278.         raise NotImplementedError
  279.  
  280.  
  281. class OrgBluezNetworkServer1Interface(
  282.     DbusInterfaceCommonAsync,
  283.     interface_name="org.bluez.NetworkServer1",
  284. ):
  285.     @dbus_method_async(
  286.         input_signature="ss",
  287.     )
  288.     async def register(
  289.         self,
  290.         uuid: str,
  291.         bridge: str,
  292.     ) -> None:
  293.         raise NotImplementedError
  294.  
  295.     @dbus_method_async(
  296.         input_signature="s",
  297.     )
  298.     async def unregister(
  299.         self,
  300.         uuid: str,
  301.     ) -> None:
  302.         raise NotImplementedError
  303.  
  304.  
  305. class OrgBluezDevice1Interface(
  306.     DbusInterfaceCommonAsync,
  307.     interface_name="org.bluez.Device1",
  308. ):
  309.     @dbus_method_async()
  310.     async def disconnect(
  311.         self,
  312.     ) -> None:
  313.         raise NotImplementedError
  314.  
  315.     @dbus_method_async()
  316.     async def connect(
  317.         self,
  318.     ) -> None:
  319.         raise NotImplementedError
  320.  
  321.     @dbus_method_async(
  322.         input_signature="s",
  323.     )
  324.     async def connect_profile(
  325.         self,
  326.         u_u_i_d: str,
  327.     ) -> None:
  328.         raise NotImplementedError
  329.  
  330.     @dbus_method_async(
  331.         input_signature="s",
  332.     )
  333.     async def disconnect_profile(
  334.         self,
  335.         u_u_i_d: str,
  336.     ) -> None:
  337.         raise NotImplementedError
  338.  
  339.     @dbus_method_async()
  340.     async def pair(
  341.         self,
  342.     ) -> None:
  343.         raise NotImplementedError
  344.  
  345.     @dbus_method_async()
  346.     async def cancel_pairing(
  347.         self,
  348.     ) -> None:
  349.         raise NotImplementedError
  350.  
  351.     @dbus_property_async(
  352.         property_signature="s",
  353.     )
  354.     def address(self) -> str:
  355.         raise NotImplementedError
  356.  
  357.     @dbus_property_async(
  358.         property_signature="s",
  359.     )
  360.     def address_type(self) -> str:
  361.         raise NotImplementedError
  362.  
  363.     @dbus_property_async(
  364.         property_signature="s",
  365.     )
  366.     def name(self) -> str:
  367.         raise NotImplementedError
  368.  
  369.     @dbus_property_async(
  370.         property_signature="s",
  371.     )
  372.     def alias(self) -> str:
  373.         raise NotImplementedError
  374.  
  375.     @dbus_property_async(
  376.         property_signature="u",
  377.     )
  378.     def _class(self) -> int:
  379.         raise NotImplementedError
  380.  
  381.     @dbus_property_async(
  382.         property_signature="q",
  383.     )
  384.     def appearance(self) -> int:
  385.         raise NotImplementedError
  386.  
  387.     @dbus_property_async(
  388.         property_signature="s",
  389.     )
  390.     def icon(self) -> str:
  391.         raise NotImplementedError
  392.  
  393.     @dbus_property_async(
  394.         property_signature="b",
  395.     )
  396.     def paired(self) -> bool:
  397.         raise NotImplementedError
  398.  
  399.     @dbus_property_async(
  400.         property_signature="b",
  401.     )
  402.     def trusted(self) -> bool:
  403.         raise NotImplementedError
  404.  
  405.     @dbus_property_async(
  406.         property_signature="b",
  407.     )
  408.     def blocked(self) -> bool:
  409.         raise NotImplementedError
  410.  
  411.     @dbus_property_async(
  412.         property_signature="b",
  413.     )
  414.     def legacy_pairing(self) -> bool:
  415.         raise NotImplementedError
  416.  
  417.     @dbus_property_async(
  418.         property_signature="n",
  419.     )
  420.     def r_s_s_i(self) -> int:
  421.         raise NotImplementedError
  422.  
  423.     @dbus_property_async(
  424.         property_signature="b",
  425.     )
  426.     def connected(self) -> bool:
  427.         raise NotImplementedError
  428.  
  429.     @dbus_property_async(
  430.         property_signature="as",
  431.     )
  432.     def u_u_i_ds(self) -> List[str]:
  433.         raise NotImplementedError
  434.  
  435.     @dbus_property_async(
  436.         property_signature="s",
  437.     )
  438.     def modalias(self) -> str:
  439.         raise NotImplementedError
  440.  
  441.     @dbus_property_async(
  442.         property_signature="o",
  443.     )
  444.     def adapter(self) -> str:
  445.         raise NotImplementedError
  446.  
  447.     @dbus_property_async(
  448.         property_signature="a{qv}",
  449.     )
  450.     def manufacturer_data(self) -> Dict[int, Tuple[str, Any]]:
  451.         raise NotImplementedError
  452.  
  453.     @dbus_property_async(
  454.         property_signature="a{sv}",
  455.     )
  456.     def service_data(self) -> Dict[str, Tuple[str, Any]]:
  457.         raise NotImplementedError
  458.  
  459.     @dbus_property_async(
  460.         property_signature="n",
  461.     )
  462.     def tx_power(self) -> int:
  463.         raise NotImplementedError
  464.  
  465.     @dbus_property_async(
  466.         property_signature="b",
  467.     )
  468.     def services_resolved(self) -> bool:
  469.         raise NotImplementedError
  470.  
  471.     @dbus_property_async(
  472.         property_signature="b",
  473.     )
  474.     def wake_allowed(self) -> bool:
  475.         raise NotImplementedError
  476.  
  477.  
  478. class OrgBluezGattService1Interface(
  479.     DbusInterfaceCommonAsync,
  480.     interface_name='org.bluez.GattService1',
  481. ):
  482.  
  483.     @dbus_property_async(
  484.         property_signature='s',
  485.     )
  486.     def u_u_i_d(self) -> str:
  487.         raise NotImplementedError
  488.  
  489.     @dbus_property_async(
  490.         property_signature='o',
  491.     )
  492.     def device(self) -> str:
  493.         raise NotImplementedError
  494.  
  495.     @dbus_property_async(
  496.         property_signature='b',
  497.     )
  498.     def primary(self) -> bool:
  499.         raise NotImplementedError
  500.  
  501.     @dbus_property_async(
  502.         property_signature='ao',
  503.     )
  504.     def includes(self) -> List[str]:
  505.         raise NotImplementedError
  506.  
  507.  
  508. class OrgBluezGattCharacteristic1Interface(
  509.     DbusInterfaceCommonAsync,
  510.     interface_name='org.bluez.GattCharacteristic1',
  511. ):
  512.  
  513.     @dbus_method_async(
  514.         input_signature='a{sv}',
  515.         result_signature='ay',
  516.     )
  517.     async def read_value(
  518.         self,
  519.         options: Dict[str, Tuple[str, Any]],
  520.     ) -> bytes:
  521.         raise NotImplementedError
  522.  
  523.     @dbus_method_async(
  524.         input_signature='aya{sv}',
  525.     )
  526.     async def write_value(
  527.         self,
  528.         value: bytes,
  529.         options: Dict[str, Tuple[str, Any]],
  530.     ) -> None:
  531.         raise NotImplementedError
  532.  
  533.     @dbus_method_async(
  534.         input_signature='a{sv}',
  535.         result_signature='hq',
  536.     )
  537.     async def acquire_write(
  538.         self,
  539.         options: Dict[str, Tuple[str, Any]],
  540.     ) -> Tuple[int, int]:
  541.         raise NotImplementedError
  542.  
  543.     @dbus_method_async(
  544.         input_signature='a{sv}',
  545.         result_signature='hq',
  546.     )
  547.     async def acquire_notify(
  548.         self,
  549.         options: Dict[str, Tuple[str, Any]],
  550.     ) -> Tuple[int, int]:
  551.         raise NotImplementedError
  552.  
  553.     @dbus_method_async(
  554.     )
  555.     async def start_notify(
  556.         self,
  557.     ) -> None:
  558.         raise NotImplementedError
  559.  
  560.     @dbus_method_async(
  561.     )
  562.     async def stop_notify(
  563.         self,
  564.     ) -> None:
  565.         raise NotImplementedError
  566.  
  567.     @dbus_property_async(
  568.         property_signature='s',
  569.     )
  570.     def u_u_i_d(self) -> str:
  571.         raise NotImplementedError
  572.  
  573.     @dbus_property_async(
  574.         property_signature='o',
  575.     )
  576.     def service(self) -> str:
  577.         raise NotImplementedError
  578.  
  579.     @dbus_property_async(
  580.         property_signature='ay',
  581.     )
  582.     def value(self) -> bytes:
  583.         raise NotImplementedError
  584.  
  585.     @dbus_property_async(
  586.         property_signature='b',
  587.     )
  588.     def notifying(self) -> bool:
  589.         raise NotImplementedError
  590.  
  591.     @dbus_property_async(
  592.         property_signature='as',
  593.     )
  594.     def flags(self) -> List[str]:
  595.         raise NotImplementedError
  596.  
  597.     @dbus_property_async(
  598.         property_signature='b',
  599.     )
  600.     def write_acquired(self) -> bool:
  601.         raise NotImplementedError
  602.  
  603.     @dbus_property_async(
  604.         property_signature='b',
  605.     )
  606.     def notify_acquired(self) -> bool:
  607.         raise NotImplementedError
  608.  
  609.  
  610. class OrgBluezGattDescriptor1Interface(
  611.     DbusInterfaceCommonAsync,
  612.     interface_name='org.bluez.GattDescriptor1',
  613. ):
  614.  
  615.     @dbus_method_async(
  616.         input_signature='a{sv}',
  617.         result_signature='ay',
  618.     )
  619.     async def read_value(
  620.         self,
  621.         options: Dict[str, Tuple[str, Any]],
  622.     ) -> bytes:
  623.         raise NotImplementedError
  624.  
  625.     @dbus_method_async(
  626.         input_signature='aya{sv}',
  627.     )
  628.     async def write_value(
  629.         self,
  630.         value: bytes,
  631.         options: Dict[str, Tuple[str, Any]],
  632.     ) -> None:
  633.         raise NotImplementedError
  634.  
  635.     @dbus_property_async(
  636.         property_signature='s',
  637.     )
  638.     def u_u_i_d(self) -> str:
  639.         raise NotImplementedError
  640.  
  641.     @dbus_property_async(
  642.         property_signature='o',
  643.     )
  644.     def characteristic(self) -> str:
  645.         raise NotImplementedError
  646.  
  647.     @dbus_property_async(
  648.         property_signature='ay',
  649.     )
  650.     def value(self) -> bytes:
  651.         raise NotImplementedError
Advertisement
Add Comment
Please, Sign In to add comment