File: //lib64/python3.6/site-packages/gpg/__pycache__/core.cpython-36.pyc
3
���\j�  �               @   s  d dl mZmZmZ d dlZd dlZd dlZd dlZddlm	Z	 ddl
mZmZ ddlm
Z
 ddlm
Z
 ddlmZ [[[G d	d
� d
e�ZG dd� de�ZG d
d� de�Zdd� Zdd� Zdd� Zdd� Zdd� Zd%dd�Ze�  dd� Zdd� Zd&dd �Zd!d"� Zd#d$� ZdS )'�    )�absolute_import�print_function�unicode_literalsN�   )�gpgme)�
errorcheck�
GPGMEError)�	constants)�errors)�utilc                   s�   e Zd ZdZdd� Z� fdd�Zdd� Zdd	� Zd
d� Ze	dd
� �Z
e	dd� �Zdd� Ze
� Zddd�Zejd�Zdd� Z� fdd�Z�  ZS )�GpgmeWrapperz>Base wrapper class
    Not to be instantiated directly.
    c             C   s   d | _ || _d S )N)�_callback_excinfo�wrapped)�selfr   � r   �/usr/lib64/python3.6/core.py�__init__3   s    zGpgmeWrapper.__init__c                s   dj tt| �j� | j�S )Nz	<{}/{!r}>)�format�superr   �__repr__r   )r   )�	__class__r   r   r   7   s    zGpgmeWrapper.__repr__c                sP   dj t� jj�g}� fdd�� jD �}|r@|jdj dj|��� dj dj|��S )Nz{}.{}c                s   g | ]}t � |�r|�qS r   )�getattr)�.0�f)r   r   r   �
<listcomp>=   s    z(GpgmeWrapper.__str__.<locals>.<listcomp>z({})� z<{}>)r   �__name__r   �_boolean_properties�append�join)r   Zacc�flagsr   )r   r   �__str__;   s
    zGpgmeWrapper.__str__c             C   s   t t| j��S )N)�hash�reprr   )r   r   r   r   �__hash__C   s    zGpgmeWrapper.__hash__c             C   s$   |d krdS t | j�t |j�kS d S )NF)r#   r   )r   �otherr   r   r   �__eq__F   s    zGpgmeWrapper.__eq__c             C   s
   t � �dS )z]The name of the c type wrapped by this class
        Must be set by child classes.
        N)�NotImplementedError)r   r   r   r   �_ctypeL   s    zGpgmeWrapper._ctypec             C   s
   t � �dS )zgThe common prefix of c functions wrapped by this class
        Must be set by child classes.
        N)r'