
    Mi                        S r SSKJr  SSKrSSKrSSKJrJr  SSK	J
r
   " S S\5      r " S S	\5      r " S
 S\5      r " S S\5      r " S S\5      r " S S\5      rSrSrSrSrSrg)zDomain-model objects.

This module should have no dependencies outside the domain model. In particular, any domain model
object should be importable anywhere in the package without risk of producing an import cycle.
    )annotationsN)IteratorProtocol)lazypropertyc                      \ rS rSrSrSrg)UnrecognizedCodePageError   z:The specified code-page is not a known Microsoft encoding. N__name__
__module____qualname____firstlineno____doc____static_attributes__r
       l/var/www/eduai.edurigo.com/storigo/production/storigo_env/lib/python3.13/site-packages/oxmsg/domain/model.pyr   r      s    Dr   r   c                      \ rS rSrSrSrg)UnsupportedEncodingError   zCThe encoding used for this MSG object has no built-in Python codec.r
   Nr   r
   r   r   r   r      s    Mr   r   c                  6    \ rS rSrSr\SS j5       rSS jrSrg)	PropStorageT!   zUThe interface required of a storage object to extract the properties of that storage.c                    gzBytes of stream containing properties for the top-level object this storage represents.

Every storage must have exactly one such stream.
Nr
   selfs    r   properties_stream_bytes$PropStorageT.properties_stream_bytes$        	r   c                    gzIThe bytes of the stream for variable-length property identified by `pid`.Nr
   r   pidptyps      r   property_stream_bytes"PropStorageT.property_stream_bytes,       r   r
   Nreturnbytesr$   intr%   r-   r*   r+   )	r   r   r   r   r   r   r   r&   r   r
   r   r   r   r   !   s    _ r   r   c                  |    \ rS rSrSr\S
S j5       r\SS j5       r\SS j5       r\S
S j5       r	\
SS j5       rSrg	)	PropertyT1   zDThe interface required of a property object, regardless of its type.c                    g)z?The Microsft name for this property, like "PidTagMessageClass".Nr
   r   s    r   namePropertyT.name4        	r   c                    g)zJThe property-id (PID) for this property, like 0x3701 for attachment bytes.Nr
   r   s    r   r$   PropertyT.pid9   r4   r   c                    g)zGThe property-type (PTYP) for this property, like 0x0102 for PtypBinary.Nr
   r   s    r   r%   PropertyT.ptyp>   r4   r   c                    g)zCThe Microsft name for the type of this property, like "PtypString".Nr
   r   s    r   	ptyp_namePropertyT.ptyp_nameC   r4   r   c                    g)z?The value of this property, its type depending on the property.Nr
   r   s    r   valuePropertyT.valueH   r4   r   r
   Nr*   str)r*   r-   )r*   z:bool | bytes | dt.datetime | float | int | str | uuid.UUID)r   r   r   r   r   propertyr2   r$   r%   r:   r   r=   r   r
   r   r   r/   r/   1   sg    N         r   r/   c                  r    \ rS rSrSrSS jrSS jr\SS j5       r\	SS j5       r
\SS j5       rSS jrS	rg
)StorageTN   zInterface for a storage object.c                    g)zGGenerate each storage object specific to an attachment to this message.Nr
   r   s    r   iter_attachment_storages!StorageT.iter_attachment_storagesQ   r(   r   c                    g)zEGenerate each storage object specific to a recipient of this message.Nr
   r   s    r   iter_recipient_storages StorageT.iter_recipient_storagesU   r(   r   c                    g)zThe last segment of the storage path.

This is the empty string for the root storage. Other storages are named is clearly specified
ways depending on the type of top-level object they contain, e.g. attachment, recipient,
etc.
Nr
   r   s    r   r2   StorageT.nameY        	r   c                    g)zString identifier for this storage; its location within the OXMSG CFB.

- Suitable as a unique storage identifier within the MSG file.
- The path of the root storage is the empty string ("").
Nr
   r   s    r   pathStorageT.pathc   s     	r   c                    gr   r
   r   s    r   r    StorageT.properties_stream_bytesl   r    r   c                    gr"   r
   r#   s      r   r&   StorageT.property_stream_bytest   r(   r   r
   N)r*   zIterator[StorageT]r?   r)   r,   )r   r   r   r   r   rF   rI   r   r2   rA   rO   r   r&   r   r
   r   r   rC   rC   N   sP    )      r   rC   c                  T    \ rS rSrSr\SS j5       r\SS j5       r\S	S j5       r	Sr
g)
StreamTy   zInterface for a stream object.c                    g)a  The last segment of the stream path.

Each stream contains the bytes for a property. The form of a stream name is clearly
specified in the OXMSG standard and includes both the property-id (PID) and property
data-type (PTYP) for the property data it contains.
Nr
   r   s    r   r2   StreamT.name|   rM   r   c                    g)zString identifier for this storage; its location within the OXMSG CFB.

Suitable as a unique storage identifier within the MSG file.
Nr
   r   s    r   rO   StreamT.path   r    r   c                    g)z#The bytes contained in this stream.Nr
   r   s    r   bytes_StreamT.bytes_   r4   r   r
   Nr?   r)   )r   r   r   r   r   r   r2   rA   rO   r]   r   r
   r   r   rV   rV   y   s?    (     r   rV      i          )r   
__future__r   datetimedtuuidtypingr   r   
oxmsg.utilr   	Exceptionr   r   r   r/   rC   rV   AF_BY_VALUESTORE_UNICODE_OKATTACH_HDR_OFFSETMSG_HDR_OFFSETRECIP_HDR_OFFSETr
   r   r   <module>rn      s    #   % #E	 ENy N8   :(x (Vh @     r   