Skip to content

Commit

Permalink
parse address book prop tag names
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenegriffin committed Feb 12, 2024
1 parent b2d9a8c commit 4713675
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions MAPIInspector/Source/Parsers/MSOXCMAPIHTTP.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace MAPIInspector.Parsers
{
using MapiInspector;
using System;
using System.Collections.Generic;
using System.IO;
Expand Down Expand Up @@ -4307,6 +4308,11 @@ public class AddressBookPropertyValue : BaseStructure
/// </summary>
private CountWideEnum countWide;

/// <summary>
/// Source property tag information
/// </summary>
public AnnotatedComment PropertyTag;

/// <summary>
/// Initializes a new instance of the AddressBookPropertyValue class.
/// </summary>
Expand Down Expand Up @@ -4367,13 +4373,18 @@ public class AddressBookTaggedPropertyValue : BaseStructure
/// <summary>
/// An unsigned integer that identifies the property.
/// </summary>
public ushort PropertyId;
public PidTagPropertyEnum PropertyId;

/// <summary>
/// An AddressBookPropertyValue structure
/// </summary>
public AddressBookPropertyValue PropertyValue;

/// <summary>
/// Source property tag information
/// </summary>
public AnnotatedComment PropertyTag;

/// <summary>
/// Parse the AddressBookTaggedPropertyValue structure.
/// </summary>
Expand All @@ -4382,10 +4393,11 @@ public override void Parse(Stream s)
{
base.Parse(s);
this.PropertyType = (PropertyDataType)this.ReadUshort();
this.PropertyId = this.ReadUshort();
this.PropertyId = (PidTagPropertyEnum)this.ReadUshort();
AddressBookPropertyValue addressBookValue = new AddressBookPropertyValue(this.PropertyType);
addressBookValue.Parse(s);
this.PropertyValue = addressBookValue;
this.PropertyTag = $"{PropertyType}:{Utilities.EnumToString(PropertyId)}";
}
}
#endregion
Expand Down Expand Up @@ -4445,6 +4457,11 @@ public class AddressBookTypedPropertyValue : BaseStructure
/// </summary>
public AddressBookPropertyValue PropertyValue;

/// <summary>
/// Source property tag information
/// </summary>
public AnnotatedComment PropertyTag;

/// <summary>
/// Parse the AddressBookTypedPropertyValue structure.
/// </summary>
Expand Down Expand Up @@ -4481,6 +4498,11 @@ public class AddressBookFlaggedPropertyValue : BaseStructure
/// </summary>
private PropertyDataType propertyDataType;

/// <summary>
/// Source property tag information
/// </summary>
public AnnotatedComment PropertyTag;

/// <summary>
/// Initializes a new instance of the AddressBookFlaggedPropertyValue class.
/// </summary>
Expand Down Expand Up @@ -4540,6 +4562,11 @@ public class AddressBookFlaggedPropertyValueWithType : BaseStructure
/// </summary>
public AddressBookPropertyValue PropertyValue;

/// <summary>
/// Source property tag information
/// </summary>
public AnnotatedComment PropertyTag;

/// <summary>
/// Parse the AddressBookFlaggedPropertyValueWithType structure.
/// </summary>
Expand Down Expand Up @@ -4628,12 +4655,14 @@ public override void Parse(Stream s)
{
AddressBookPropertyValue propValue = new AddressBookPropertyValue(propTag.PropertyType, this.ptypMultiCountSize);
propValue.Parse(s);
propValue.PropertyTag = $"{propTag.PropertyType}:{Utilities.EnumToString(propTag.PropertyId)}";
addrRowValue = propValue;
}
else
{
AddressBookTypedPropertyValue typePropValue = new AddressBookTypedPropertyValue();
typePropValue.Parse(s);
typePropValue.PropertyTag = $"{propTag.PropertyType}:{Utilities.EnumToString(propTag.PropertyId)}";
addrRowValue = typePropValue;
}
}
Expand All @@ -4643,12 +4672,14 @@ public override void Parse(Stream s)
{
AddressBookFlaggedPropertyValue flagPropValue = new AddressBookFlaggedPropertyValue(propTag.PropertyType);
flagPropValue.Parse(s);
flagPropValue.PropertyTag = $"{propTag.PropertyType}:{Utilities.EnumToString(propTag.PropertyId)}";
addrRowValue = flagPropValue;
}
else
{
AddressBookFlaggedPropertyValueWithType flagPropValue = new AddressBookFlaggedPropertyValueWithType();
flagPropValue.Parse(s);
flagPropValue.PropertyTag = $"{propTag.PropertyType}:{Utilities.EnumToString(propTag.PropertyId)}";
addrRowValue = flagPropValue;
}
}
Expand Down

0 comments on commit 4713675

Please sign in to comment.