oi  UddlmZddlZddlmZddlmZmZiZde d<dZ iZ de d <d Z iZ de d <dd ZdZddZeejeejeejeejedejeejiZdZdZdS)) annotationsN)TimeType)mapimapitagszdict[int, str]prTablectstjD]\}}|dddkrtj|tjks"tj|tjkrD|dddks|dddkr |t|<~|ttj|<|t|<|ttj|< t|S#t$r"ttj|cYSwxYw#t$rMtt|}|ddkr |dd}|d d kr |dd }|cYSwxYw) NPR__A_Wr-rL) rr__dict__items PROP_TYPE PT_UNICODE PT_STRING8PROP_IDKeyErrorhexint)ptnamevaluerets IC:\PYTHON\Scheduler\python\Lib\site-packages\win32comext/mapi/mapiutil.pyGetPropTagNamer s <#,2244 < >crc(C  s+* C77)D# D&"D##D&&AE=<E=mapiErrorTablects:tjD]\}}|dddvr |t|<t|t j|S)N)MAPI_E_MAPI_W_)r!rrrget pythoncomGetScodeString)hrrrs rr(r(Ask -=..00 - -KD%BQBx111(,u%   b)":2">"> ? ??ptTableTc tsAtjD]"\}}|dddkr|dvr|t|<#|r|tjz}t|t t|S)z?Given a mapi type flag, return a string description of the typeNr PT_) PT_TSTRING PT_MV_TSTRING)r+rrrMV_FLAGr&strr)propTyperawTyperrs rGetMapiTypeNamer4Ls &#,2244 & &KD%BQBx5  :::!%&X%%% ;;xS]]!3!3 4 44r*cd}t|ttfsd}|f}g}g}|D]}t|ts\tj|ff}||d}tjtj tj |d}| || |d\}} |dkrd} dS|r d| DS| ddS)asGiven 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. rrNcg|] }|d S)r).0vs r z!GetProperties..{s###!###r*) isinstancetuplelistrrPS_PUBLIC_STRINGSGetIDsFromNamesrPROP_TAGPT_UNSPECIFIEDrappendGetProps) objpropListbRetList realPropListrcproppropspropIdsr)datas r GetPropertiesrM]sH h . .;L B""$$$ ,d35E))%33G$')9'!*)E)ED D!!!!||L!,,HB Qwwt##d####Awqzr*c^|d}||\}}g}|D]z\}}|rZ||f\}}}t|ddtr|dd} nt |} n|} || |f{|S)Nrr) GetPropListrCGetNamesFromIDsr;r1r rB) rDmake_tag_namestagsr)rLrtagvalarrayrs rGetAllPropertiesrVs ??1  D||D!!HB C   S  !113&99OBe%(1+s++ +Qx{%c**D D#; Jr*ct|tstj|ff}||tj}|dks|dkr t j}nLt t|}|#td|dt|dt j |t j |d}|||fdS|||ffdS)NTFzDon't know what to do with 'z' ('z')r)r;rrr>r? MAPI_CREATEr PT_BOOLEAN _MapiTypeMapr&type ValueErrorr@r DeletePropsSetProps)rDrIrTrJrKtype_tags rSetPropertyValuer`s dC I($/1%%eT-=>> $;;#,,*HH#''S 22H K3KKd3iiKKK 8+;GAJ+G+GHH {       tSk^$$$$$r*c "g}|D];\}}t|tr!|tj|f<|r ||tj}d}g}|D]\}}t|trt|tr tj }ngt|tr tj }nEt|tr tj }n#td|dt|dtj|tj||}|dz }|||f||dS)a_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) rzThe type of object (z) can not be writtenrN)rr;r1rBrr>r?rXrrrPT_I4r PT_SYSTIMEr\r[r@rr^)msgpropDictnewPropskeyrTnewIdsnewIdNotagTypes r SetPropertiesrlsHNN$$;;S c3   ; OOT3S9 : : :A$$Xt/?@@GHNN$$$$S c3   #s## "-C%% ".C** "- Q#QQ$s))QQQ#GX-=fWo-N-NOOC qLGc ####LLr*)T) __future__rr' pywintypesrrrr__annotations__r r!r(r+r4rMrVfloat PT_DOUBLErrcbytesrr1rr[rAboolrYrZr`rlr7r*rrusI"""""""///d"$####@@@5555"   F$ 8  8  DJJ'(   %%%($$$$$r*