File: //lib/python3.9/site-packages/dasbus/__pycache__/structure.cpython-39.pyc
a
װ_62 � @ s� d dl Z d dlmZ d dlmZ d dlmZmZmZm Z m
Z
mZ g d�ZdZ
G dd� de�ZG d d
� d
e�ZG dd� de�ZG d
d� de�ZG dd� ded�Zdd� ZG dd� de�Zddd�Zdd� ZdS )� N)�ABCMeta)�get_type_hints)�get_variant�get_type_arguments�unwrap_variant�is_base_type� Structure�List)�DBusStructureError�DBusData�generate_string_from_data�compare_dataZ__dbus_fields__c @ s e Zd ZdZdS )r
z,General exception for DBus structure errors.N)�__name__�
__module__�__qualname__�__doc__� r r �4/usr/lib/python3.9/site-packages/dasbus/structure.pyr
( s r
c @ sj e Zd ZdZddd�Zedd� �Zedd� �Zed d
� �Zedd� �Z d
d� Z
dd� Zdd� Zdd� Z
dS )� DBusFieldz+Description of a field in a DBus structure.� c C s || _ || _|| _dS )z�Create a description of the field.
:param name: a name of the field
:param type_hint: a type hint
:param description: a description
N)�_name�
_type_hint�_description)�self�name� type_hint�descriptionr r r �__init__0 s zDBusField.__init__c C s | j S )z4Name of the field.
:return: a name
)r �r r r r r ; s zDBusField.namec C s | j S )z>Type hint of the field.
:return: a type hint
)r r r r r r C s zDBusField.type_hintc C s | j S )zBDescription of the field.
:return: a description
)r r r r r r K s zDBusField.descriptionc C s | j �dd�S )zQReturn name of a data attribute.
:return: a data attribute name
�-�_)r �replacer r r r � data_nameS s zDBusField.data_namec C s t || j|� dS )zaSet the data attribute.
:param obj: a data object
:param value: a value
N)�setattrr"