
    
h                    2   % S SK Jr  S SKrS SKJr  SSKJrJr  0 rS\	S'   S r
0 rS\	S	'   S
 r0 rS\	S'   SS jrS rSS jr\\R$                  \\R(                  \\R,                  \\R0                  \" S5      \R4                  \\R8                  0rS rS rg)    )annotationsN)TimeType   )mapimapitagszdict[int, str]prTablec                   [         (       d  [        R                  R                  5        H  u  pUS S S:X  d  M  [        R                  " U5      [        R
                  :X  d(  [        R                  " U5      [        R                  :X  a<  USS  S:X  d	  USS  S:X  a  U[         U'   M}  U[         [        R                  " U5      '   M  U[         U'   U[         [        R                  " U5      '   M       [         U    $ ! [         a     [         [        R                  " U 5         s $ f = f! [         a5    [        [        U 5      5      nUS   S:X  a  USS  nUS	   S
:X  a  US S	 nUs $ f = f)N   PR__A_Wr   -r   L)r   r   __dict__items	PROP_TYPE
PT_UNICODE
PT_STRING8PROP_IDKeyErrorhexint)ptnamevaluerets       lC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\win32comext/mapi/mapiutil.pyGetPropTagNamer       sF   7#,,224KDBQx5 " &&u-1D1DD))%0H4G4GGBCyD(DI,=)-;? 0 0 78 &*GEN7;GH,,U349 5<	12; 	18++B/00	1  	 #b'lq6S=ab'Cr7c>cr(C
	s*   2C; ;'D%"D( $D%%D( (<E'&E'mapiErrorTablec                    [         (       d;  [        R                  R                  5        H  u  pUS S S;   d  M  U[         U'   M     [         R	                  U [
        R                  " U 5      5      $ )N   )MAPI_E_MAPI_W_)r!   r   r   r   get	pythoncomGetScodeString)hrr   r   s      r   r(   r(   A   sY    >==..0KDBQx11(,u% 1 b)":":2">??    ptTablec                $   [         (       dC  [        R                  R                  5        H!  u  p#USS S:X  d  M  US;   a  M  U[         U'   M#     U(       a  U [        R                  ) -  n [         R                  U [        [        U 5      5      5      $ )z?Given a mapi type flag, return a string description of the typeNr
   PT_)
PT_TSTRINGPT_MV_TSTRING)r+   r   r   r   MV_FLAGr&   strr   )propTyperawTyper   r   s       r   GetMapiTypeNamer4   L   sy    7#,,224KDBQx5  ::!% 5 X%%%%;;xS]!344r*   c                   Sn[        U[        [        45      (       d  SnU4n/ n/ nU H  n[        U[        5      (       da  [        R
                  U44nU R                  US5      n[        R                  " [        R                  [        R                  " US   5      5      nUR                  U5        M     U R                  US5      u  pUS:w  a  Sn	gU(       a  U	 V
s/ s H  oS   PM	     sn
$ U	S   S   $ s  sn
f )a_  Given a MAPI object and a list of properties, return a list of property values.

Allows a single property to be passed, and the result is a single object.

Each request property can be an integer or a string.  Of a string, it is
automatically converted to an integer via the GetIdsFromNames function.

If the property fetch fails, the result is None.
r   r   N)
isinstancetuplelistr   r   PS_PUBLIC_STRINGSGetIDsFromNamesr   PROP_TAGPT_UNSPECIFIEDr   appendGetProps)objpropListbRetListrealPropListrcproppropspropIdsr)   datavs              r   GetPropertiesrI   ]   s     Hh..;L	B$$$,,d35E))%3G$$'')9)9'!*)ED 	D!  ||L!,HB	Qw"#d!d##Awqz $s   C8c                (   U R                  S5      nU R                  U5      u  p4/ nU He  u  pgU(       aE  U R                  U45      u  p2n[        US   S   [        5      (       a	  US   S   n	O[        U5      n	OUn	UR                  X45        Mg     U$ )Nr   r   )GetPropListr>   GetNamesFromIDsr6   r1   r    r=   )
r?   make_tag_namestagsr)   rG   r   tagvalarrayr   s
             r   GetAllPropertiesrR      s    ??1D||D!HB
C!113&9OBe%(1+s++Qx{%c*D

D;  Jr*   c                   [        U[        5      (       d  [        R                  U44nU R	                  U[        R
                  5      nUS:X  d  US:X  a  [        R                  nO=[        R                  [        U5      5      nUc  [        SU< S[        U5       S35      e[        R                  " U[        R                  " US   5      5      nUc  U R                  U45        g U R                  X445        g )NTFzDon't know what to do with 'z' ('z')r   )r6   r   r   r9   r:   MAPI_CREATEr   
PT_BOOLEAN_MapiTypeMapr&   type
ValueErrorr;   r   DeletePropsSetProps)r?   rD   rP   rE   rF   type_tags         r   SetPropertyValuer\      s    dC  (($/1%%eT-=-=>$;#,**H#''S	2H 23'd3i[K    8+;+;GAJ+GH
{ tk^$r*   c           	     $   / nUR                  5        H=  u  p4[        U[        5      (       d  M  UR                  [        R
                  U45        M?     U(       a   U R                  U[        R                  5      nSn/ nUR                  5        H  u  p4[        U[        5      (       a  [        U[        5      (       a  [        R                  nOh[        U[        5      (       a  [        R                  nOB[        U[        5      (       a  [        R                  nO[        SU< S[        U5       S35      e[        R                   " U[        R"                  " WU   5      5      nUS-  nUR                  X445        M     U R%                  U5        g)aG  Given a Python dictionary, set the objects properties.

If the dictionary key is a string, then a property ID is queried
otherwise the ID is assumed native.

Coded for maximum efficiency wrt server calls - ie, maximum of
2 calls made to the object, regardless of the dictionary contents
(only 1 if dictionary full of int keys)
r   zThe type of object (z) can not be writtenr   N)r   r6   r1   r=   r   r9   r:   rT   r   r   r   PT_I4r   
PT_SYSTIMErX   rW   r;   r   rZ   )msgpropDictnewPropskeyrP   newIdsnewIdNotagTypes           r   SetPropertiesrh      s9    HNN$c3OOT33S9: % $$Xt/?/?@GHNN$c3#s##"--C%%"..C**"-- )#$s)<PQ  ##GX-=-=fWo-NOCqLG
# % LLr*   )T) 
__future__r   r'   
pywintypesr    r   r   r   __annotations__r    r!   r(   r+   r4   rI   rR   float	PT_DOUBLEr   r_   bytesr   r1   r   rW   r<   boolrU   rV   r\   rh    r*   r   <module>rr      s    "    /d "$ #@  5" F$ 
8	8		J''(

%($r*   