mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-10 03:19:37 +00:00
* Add support to read Host DNS * Include properties * Improve host info handling * Add API * Better abstraction * Change prio list * Address lint * fix get properties * Fix nameserver list * Small cleanups * Bit more stability * cleanup
20 lines
448 B
Python
20 lines
448 B
Python
"""Interface class for D-Bus wrappers."""
|
|
from typing import Optional
|
|
|
|
from ..utils.gdbus import DBus
|
|
|
|
|
|
class DBusInterface:
|
|
"""Handle D-Bus interface for hostname/system."""
|
|
|
|
dbus: Optional[DBus] = None
|
|
|
|
@property
|
|
def is_connected(self):
|
|
"""Return True, if they is connected to D-Bus."""
|
|
return self.dbus is not None
|
|
|
|
async def connect(self):
|
|
"""Connect to D-Bus."""
|
|
raise NotImplementedError()
|