a
    ¡˜ëjÂ  ã                   @  sR   d Z ddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ G dd„ dƒZd	S )
a*  The `Recipient` object provides access to properties for a recipient of the message.

This object is accessed using the `Message.recipients` property:
```python
>>> from oxmsg import Message

>>> msg = Message.load("message.msg")
>>> recipient = msg.recipients[0]
>>> recipient.name
'Jane Doe'
```
é    )Úannotations)Ú	constants)Úmodel)Ú
Properties)Úlazypropertyc                   @  sT   e Zd ZdZddœdd„Zeddœdd	„ƒZeddœd
d„ƒZeddœdd„ƒZdS )Ú	Recipientz(A recipient of an Outlook email message.z
m.StorageT)Ústoragec                 C  s
   || _ d S )N)Ú_storage)Úselfr   © r   úN/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/oxmsg/recipient.pyÚ__init__   s    zRecipient.__init__Ústr)Úreturnc                 C  s"   | j }| tj¡p | tj¡p dS )z$The email address of this recipient.Ú )Ú
propertiesÚstr_prop_valueÚcZPID_SMTP_ADDRESSZPID_EMAIL_ADDRESS)r
   Úpropsr   r   r   Úemail_address   s    
ÿýzRecipient.email_addressc                 C  s   | j  tj¡pdS )zThe name of this recipient.r   )r   r   r   ZPID_DISPLAY_NAME©r
   r   r   r   Úname(   s    zRecipient.namer   c                 C  s   t | jtjd�S )z7Provides access to the properties of this OXMSG object.)Zproperties_header_offset)r   r	   ÚmZRECIP_HDR_OFFSETr   r   r   r   r   -   s    zRecipient.propertiesN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r   r   r      s   r   N)r   Ú
__future__r   Zoxmsg.domainr   r   r   r   Zoxmsg.propertiesr   Z
oxmsg.utilr   r   r   r   r   r   Ú<module>   s   