MAPIPropertyValue.cs
author Volker Birk <vb@pep.foundation>
Sun, 11 Mar 2018 19:02:18 +0100
changeset 2053 054906b5e067
parent 1360 697801c205db
child 2001 79b037aa8337
child 2242 bb7cba500122
permissions -rw-r--r--
automating time logging
     1 ´╗┐using System;
     2 
     3 namespace pEp
     4 {
     5     /// <summary>
     6     /// MAPI helper class containing all defined property values.
     7     /// </summary>
     8     internal class MapiPropertyValue
     9     {
    10         /// <summary>
    11         /// Enumeration of flags for PidTagMessageFlags which specifies the status of the Message object.
    12         /// After the first successful call to the RopSaveChangesMessage ROP ([MS-OXCROPS] section 2.2.6.3), 
    13         /// as described in section 2.2.3.3, these flags are read-only for the client.
    14         /// </summary>
    15         [Flags]
    16         public enum EnumPidTagMessageFlags : int
    17         {
    18             /// <summary>
    19             /// The message is marked as having been read.
    20             /// </summary>
    21             mfRead = 0x00000001,
    22 
    23             /// <summary>
    24             /// The message has not been modified since it was first saved (if unsent) or it was delivered (if sent).
    25             /// This flag is always read-only for the client.
    26             /// </summary>
    27             mfUnmodified = 0x00000002,
    28 
    29             /// <summary>
    30             /// The message is marked for sending as a result of a call to the RopSubmitMessage ROP.
    31             /// This flag is always read-only for the client.
    32             /// </summary>
    33             mfSubmitted = 0x00000004,
    34 
    35             /// <summary>
    36             /// The message is still being composed and is treated as a Draft Message object. 
    37             /// This bit is cleared by the server when responding to the RopSubmitMessage ROP ([MS-OXCROPS] section 2.2.7.1) with a success code.
    38             /// </summary>
    39             mfUnsent = 0x00000008,
    40 
    41             /// <summary>
    42             /// The message has at least one attachment. This flag corresponds to the message's PidTagHasAttachments property (section 2.2.1.2).
    43             /// This flag is always read-only for the client.
    44             /// </summary>
    45             mfHasAttach = 0x00000010,
    46 
    47             /// <summary>
    48             /// The user receiving the message was also the user who sent the message.
    49             /// This flag is always read-only for the client.
    50             /// </summary>
    51             mfFromMe = 0x00000020,
    52 
    53             /// <summary>
    54             /// The message is an FAI (folder associated information) message.
    55             /// This flag is always read-only for the client.
    56             /// </summary>
    57             mfFAI = 0x00000040,
    58 
    59             /// <summary>
    60             /// The message includes a request for a resend operation with a non-delivery report.
    61             /// For more details, see [MS-OXOMSG] section 3.2.4.5.
    62             /// </summary>
    63             mfResend = 0x00000080,
    64 
    65             /// <summary>
    66             /// The user who sent the message has requested notification when a recipient (1) first reads it.
    67             /// This flag is always read-only for the client.
    68             /// </summary>
    69             mfNotifyRead = 0x00000100,
    70 
    71             /// <summary>
    72             /// The user who sent the message has requested notification when a recipient (1) deletes it before reading or the Message object expires.
    73             /// This flag is always read-only for the client.
    74             /// </summary>
    75             mfNotifyUnread = 0x00000200,
    76 
    77             /// <summary>
    78             /// The message has been read at least once. This flag is set or cleared by the server whenever the mfRead flag is set or cleared. Clients SHOULD ignore this flag.
    79             /// This flag is always read-only for the client.
    80             /// </summary>
    81             mfEverRead = 0x00000400,
    82 
    83             /// <summary>
    84             /// The incoming message arrived over the Internet and originated either outside the organization or from a source the gateway does not consider trusted.
    85             /// This flag is always read-only for the client.
    86             /// </summary>
    87             mfInternet = 0x00002000,
    88 
    89             /// <summary>
    90             /// The incoming message arrived over an external link other than X.400 or the Internet. 
    91             /// It originated either outside the organization or from a source the gateway does not consider trusted.
    92             /// This flag is always read-only for the client.
    93             /// </summary>
    94             mfUntrusted = 0x00008000
    95         }
    96 
    97         /// <summary>
    98         /// Value for PidTagAttachTag which specifies the attachment is TNEF.
    99         /// </summary>
   100         public static readonly byte[] PidTagAttachTagTNEF = {0x2A, 0x86, 0x48, 0x86, 0xF7, 0x14, 0x03, 0x0A, 0x01};
   101 
   102         /// <summary>
   103         /// Value for PidTagAttachTag which specifies the attachment is in an application-specific format.
   104         /// </summary>
   105         public static readonly byte[] PidTagAttachTagAfStorage = {0x2A, 0x86, 0x48, 0x86, 0xF7, 0x14, 0x03, 0x0A, 0x03, 0x02, 0x01};
   106 
   107         /// <summary>
   108         /// Value for PidTagAttachTag which specifies the attachment is MIME.
   109         /// </summary>
   110         public static readonly byte[] PidTagAttachTagMIME = {0x2A, 0x86, 0x48, 0x86, 0xF7, 0x14, 0x03, 0x0A, 0x04};
   111 
   112         /// <summary>
   113         /// Value for PidTagMessageClass indicating a normal e-mail message.
   114         /// See: https://msdn.microsoft.com/en-us/library/ee200767
   115         /// </summary>
   116         public const string PidTagMessageClassNormalMessage = "IPM.Note";
   117 
   118         /// <summary>
   119         /// Value for PidTagMessageClass indicating that the message is secure. This is a Microsoft standard
   120         /// and changes the message icon in the UI.
   121         /// See: https://msdn.microsoft.com/en-us/library/office/ff861573.aspx
   122         /// and: https://www.howto-outlook.com/howto/icons.htm
   123         /// </summary>
   124         public const string PidTagMessageClassSecure = "IPM.Note.Secure";
   125 
   126         /// <summary>
   127         /// Value for PidTagMessageClass indicating that the message is secure and from pEp. This is a custom 
   128         /// defined value and needed for secure messages on untrusted servers in order to load correctly the
   129         /// form region overlay in the message preview.
   130         /// </summary>
   131         public const string PidTagMessageClassSecurePEP = "IPM.Note.Secure.pEp";
   132 
   133         /// <summary>
   134         /// Value for PidTagMessageClass indicating the message is secure (S/MIME) and can also be signed.
   135         /// See: https://msdn.microsoft.com/en-us/library/ee200767
   136         /// </summary>
   137         public const string PidTagMessageClassSMIME = "IPM.Note.SMIME";
   138 
   139         /// <summary>
   140         /// Value for PidTagMessageClass indicating the message is secure (S/MIME) and clear signed.
   141         /// See: https://msdn.microsoft.com/en-us/library/ee200767
   142         /// </summary>
   143         public const string PidTagMessageClassSMIMEMultipartSigned = "IPM.Note.SMIME.MultipartSigned";
   144 
   145         /// <summary>
   146         /// Value for PidTagMessageClass indicating the message is a secure read receipt
   147         /// See: https://msdn.microsoft.com/en-us/library/ee200767
   148         /// </summary>
   149         public const string PidTagMessageClassSMIMEReceipt = "IPM.Note.Receipt.SMIME";
   150     }
   151 }