fix: Call dbus-next @method decorator as function
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
18
main.py
18
main.py
@@ -28,46 +28,46 @@ class Agent(ServiceInterface):
|
||||
def __init__(self, interface_name):
|
||||
super().__init__(interface_name)
|
||||
|
||||
@method
|
||||
@method()
|
||||
def Release(self):
|
||||
logging.info('Agent Released')
|
||||
|
||||
@method
|
||||
@method()
|
||||
def RequestPinCode(self, device: str) -> str:
|
||||
logging.info(f"RequestPinCode for {device}, returning static PIN")
|
||||
return "0000"
|
||||
|
||||
@method
|
||||
@method()
|
||||
def RequestPasskey(self, device: str) -> int:
|
||||
logging.info(f"RequestPasskey for {device}")
|
||||
return 0
|
||||
|
||||
@method
|
||||
@method()
|
||||
def DisplayPasskey(self, device: str, passkey: int, entered: int):
|
||||
logging.info(f"DisplayPasskey for {device}: {passkey}")
|
||||
|
||||
@method
|
||||
@method()
|
||||
def DisplayPinCode(self, device: str, pincode: str):
|
||||
logging.info(f"DisplayPinCode for {device}: {pincode}")
|
||||
|
||||
@method
|
||||
@method()
|
||||
def RequestConfirmation(self, device: str, passkey: int):
|
||||
logging.info(f"RequestConfirmation for {device} with passkey {passkey}")
|
||||
# Automatically confirm and trust
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.create_task(trust_and_connect_device(device))
|
||||
|
||||
@method
|
||||
@method()
|
||||
def RequestAuthorization(self, device: str):
|
||||
logging.info(f"RequestAuthorization for {device}")
|
||||
pass
|
||||
|
||||
@method
|
||||
@method()
|
||||
def AuthorizeService(self, device: str, uuid: str):
|
||||
logging.info(f"AuthorizeService for {device} with uuid {uuid}")
|
||||
pass
|
||||
|
||||
@method
|
||||
@method()
|
||||
def Cancel(self):
|
||||
logging.info('Pairing Cancelled')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user