MAPIPropertyValue.cs
author Thomas
Fri, 22 Jun 2018 15:08:20 +0200
branchOUT-468
changeset 2251 5016c73310c7
parent 2242 bb7cba500122
child 2324 14b4d780a124
permissions -rw-r--r--
Do not show pEp Privacy Status for S/MIME messages
     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         /// Enumeration of flags for S/MIME security settings.
    99         /// No proper documentation available.
   100         /// </summary>
   101         [Flags]
   102         public enum SecurityFlags : int
   103         {
   104             Encrypted = 0x00000001,
   105             Signed = 0x00000002
   106         }
   107 
   108         /// <summary>
   109         /// Value for PidTagAttachTag which specifies the attachment is TNEF.
   110         /// </summary>
   111         public static readonly byte[] PidTagAttachTagTNEF = {0x2A, 0x86, 0x48, 0x86, 0xF7, 0x14, 0x03, 0x0A, 0x01};
   112 
   113         /// <summary>
   114         /// Value for PidTagAttachTag which specifies the attachment is in an application-specific format.
   115         /// </summary>
   116         public static readonly byte[] PidTagAttachTagAfStorage = {0x2A, 0x86, 0x48, 0x86, 0xF7, 0x14, 0x03, 0x0A, 0x03, 0x02, 0x01};
   117 
   118         /// <summary>
   119         /// Value for PidTagAttachTag which specifies the attachment is MIME.
   120         /// </summary>
   121         public static readonly byte[] PidTagAttachTagMIME = {0x2A, 0x86, 0x48, 0x86, 0xF7, 0x14, 0x03, 0x0A, 0x04};
   122 
   123         /// <summary>
   124         /// Value for PidTagMessageClass indicating a normal e-mail message.
   125         /// See: https://msdn.microsoft.com/en-us/library/ee200767
   126         /// </summary>
   127         public const string PidTagMessageClassNormalMessage = "IPM.Note";
   128 
   129         /// <summary>
   130         /// Value for PidTagMessageClass indicating that the message is secure. This is a Microsoft standard
   131         /// and changes the message icon in the UI.
   132         /// See: https://msdn.microsoft.com/en-us/library/office/ff861573.aspx
   133         /// and: https://www.howto-outlook.com/howto/icons.htm
   134         /// </summary>
   135         public const string PidTagMessageClassSecure = "IPM.Note.Secure";
   136 
   137         /// <summary>
   138         /// Value for PidTagMessageClass indicating that the message is secure and from pEp. This is a custom 
   139         /// defined value and needed for secure messages on untrusted servers in order to load correctly the
   140         /// form region overlay in the message preview.
   141         /// </summary>
   142         public const string PidTagMessageClassSecurePEP = "IPM.Note.Secure.pEp";
   143 
   144         /// <summary>
   145         /// Value for PidTagMessageClass indicating the message is secure (S/MIME) and can also be signed.
   146         /// See: https://msdn.microsoft.com/en-us/library/ee200767
   147         /// </summary>
   148         public const string PidTagMessageClassSMIME = "IPM.Note.SMIME";
   149 
   150         /// <summary>
   151         /// Value for PidTagMessageClass indicating the message is secure (S/MIME) and clear signed.
   152         /// See: https://msdn.microsoft.com/en-us/library/ee200767
   153         /// </summary>
   154         public const string PidTagMessageClassSMIMEMultipartSigned = "IPM.Note.SMIME.MultipartSigned";
   155 
   156         /// <summary>
   157         /// Value for PidTagMessageClass indicating the message is a secure read receipt
   158         /// See: https://msdn.microsoft.com/en-us/library/ee200767
   159         /// </summary>
   160         public const string PidTagMessageClassSMIMEReceipt = "IPM.Note.Receipt.SMIME";
   161     }
   162 }