/// <summary> /// Parse the RopGetReceiveFolderTableResponse structure. /// </summary> /// <param name="s">An stream containing RopGetReceiveFolderTableResponse structure.</param> public override void Parse(Stream s) { base.Parse(s); this.RopId = (RopIdType)ReadByte(); this.InputHandleIndex = ReadByte(); List<PropertyRow> TmpRows = new List<PropertyRow>(); HelpMethod help = new HelpMethod(); this.ReturnValue = help.FormatErrorCode(ReadUint()); if ((ErrorCodes)ReturnValue == ErrorCodes.Success) { this.RowCount = ReadUint(); for (int i = 0; i < this.RowCount; i++) { // PidTagMessageClass is defined as PtypString8 due to Open Specification said all characters in this property MUST be from the // ASCII characters 0x20 through 0x7F. PropertyTag[] Properties_GetReceiveFolderTable = new PropertyTag[3] { new PropertyTag(PropertyDataType.PtypInteger64, PidTagPropertyEnum.PidTagFolderId), new PropertyTag(PropertyDataType.PtypString8, PidTagPropertyEnum.PidTagMessageClass), new PropertyTag(PropertyDataType.PtypTime, PidTagPropertyEnum.PidTagLastModificationTime) }; PropertyRow ProRow = new PropertyRow(Properties_GetReceiveFolderTable); ProRow.Parse(s); TmpRows.Add(ProRow); } this.Rows = TmpRows.ToArray(); } }
/// <summary> /// The construe function for RopQueryRowsResponse /// </summary> /// <param name="propertiesBySetColum">Property Tags got from RopSetColumn</param> public RopQueryRowsResponse(PropertyTag[] propertiesBySetColum) { this.propertiesBySetColum = propertiesBySetColum; }
/// <summary> /// Parse the RopReloadCachedInformationResponse structure. /// </summary> /// <param name="s">An stream containing RopReloadCachedInformationResponse structure</param> public override void Parse(Stream s) { base.Parse(s); this.RopId = (RopIdType)ReadByte(); this.InputHandleIndex = ReadByte(); HelpMethod help = new HelpMethod(); this.ReturnValue = help.FormatErrorCode(ReadUint()); if ((ErrorCodes)ReturnValue == ErrorCodes.Success) { this.HasNamedProperties = ReadBoolean(); this.SubjectPrefix = new TypedString(); this.SubjectPrefix.Parse(s); this.NormalizedSubject = new TypedString(); this.NormalizedSubject.Parse(s); this.RecipientCount = ReadUshort(); this.ColumnCount = ReadUshort(); List<PropertyTag> propertyTags = new List<PropertyTag>(); for (int i = 0; i < this.ColumnCount; i++) { PropertyTag propertyTag = new PropertyTag(); propertyTag.Parse(s); propertyTags.Add(propertyTag); } this.RecipientColumns = propertyTags.ToArray(); this.RowCount = ReadByte(); List<OpenRecipientRow> openRecipientRows = new List<OpenRecipientRow>(); for (int i = 0; i < this.RowCount; i++) { OpenRecipientRow openRecipientRow = new OpenRecipientRow(this.RecipientColumns); openRecipientRow.Parse(s); openRecipientRows.Add(openRecipientRow); } this.RecipientRows = openRecipientRows.ToArray(); } }
/// <summary> /// Parse the NotificationData structure. /// </summary> /// <param name="s">An stream containing NotificationData structure.</param> public override void Parse(Stream s) { base.Parse(s); this.NotificationFlags = new NotificationFlags(); this.NotificationFlags.Parse(s); if (this.NotificationFlags.Value.NotificationType == NotificationTypesEnum.TableModified) { this.TableEventType = (TableEventTypeEnum)ReadUshort(); } if (NotificationFlags.Value.NotificationType == NotificationTypesEnum.TableModified && (TableEventType == TableEventTypeEnum.TableRowAdded || TableEventType == TableEventTypeEnum.TableRowDeleted || TableEventType == TableEventTypeEnum.TableRowModified)) { this.TableRowFolderID = new FolderID(); this.TableRowFolderID.Parse(s); } if ((((int)NotificationFlags.Value.NotificationDataAvailability & 0x8000) != 0) && (TableEventType == TableEventTypeEnum.TableRowAdded || TableEventType == TableEventTypeEnum.TableRowDeleted || TableEventType == TableEventTypeEnum.TableRowModified)) { this.TableRowMessageID = new MessageID(); this.TableRowMessageID.Parse(s); } if ((((int)NotificationFlags.Value.NotificationDataAvailability & 0x8000) != 0) && (TableEventType == TableEventTypeEnum.TableRowAdded || TableEventType == TableEventTypeEnum.TableRowDeleted || TableEventType == TableEventTypeEnum.TableRowModified)) { this.TableRowInstance = ReadUint(); } if (NotificationFlags.Value.NotificationType == NotificationTypesEnum.TableModified && (TableEventType == TableEventTypeEnum.TableRowAdded || TableEventType == TableEventTypeEnum.TableRowModified)) { this.InsertAfterTableRowFolderID = new FolderID(); this.InsertAfterTableRowFolderID.Parse(s); } if (NotificationFlags.Value.NotificationType == NotificationTypesEnum.TableModified && (((int)NotificationFlags.Value.NotificationDataAvailability & 0x8000) != 0) && (TableEventType == TableEventTypeEnum.TableRowAdded || TableEventType == TableEventTypeEnum.TableRowModified)) { this.InsertAfterTableRowID = new MessageID(); this.InsertAfterTableRowID.Parse(s); } if (NotificationFlags.Value.NotificationType == NotificationTypesEnum.TableModified && (((int)NotificationFlags.Value.NotificationDataAvailability & 0x8000) != 0) && (TableEventType == TableEventTypeEnum.TableRowAdded || TableEventType == TableEventTypeEnum.TableRowModified)) { this.InsertAfterTableRowInstance = ReadUint(); } if (NotificationFlags.Value.NotificationType == NotificationTypesEnum.TableModified && (TableEventType == TableEventTypeEnum.TableRowAdded || TableEventType == TableEventTypeEnum.TableRowModified)) { this.TableRowDataSize = ReadUshort(); } if (NotificationFlags.Value.NotificationType == NotificationTypesEnum.TableModified && (TableEventType == TableEventTypeEnum.TableRowAdded || TableEventType == TableEventTypeEnum.TableRowModified)) { if (DecodingContext.SetColumnProTagMap_Handle != null && DecodingContext.SetColumnProTagMap_Handle.ContainsKey(this.NotificationHandle) ) { propertiesBySetColum = DecodingContext.SetColumnProTagMap_Handle[this.NotificationHandle]; } else { throw new MissingInformationException("Missing PropertyTags information for RopNotifyResponse", (ushort)RopIdType.RopNotify, new uint[] {0,NotificationHandle }); } this.TableRowData = new PropertyRow(propertiesBySetColum); this.TableRowData.Parse(s); } if (NotificationFlags.Value.NotificationType != NotificationTypesEnum.TableModified && NotificationFlags.Value.NotificationType != NotificationTypesEnum.Extended) { this.FolderId = new FolderID(); this.FolderId.Parse(s); } if (NotificationFlags.Value.NotificationType != NotificationTypesEnum.TableModified && NotificationFlags.Value.NotificationType != NotificationTypesEnum.Extended && (((int)NotificationFlags.Value.NotificationDataAvailability & 0x8000) != 0)) { this.MessageId = new MessageID(); this.MessageId.Parse(s); } if ((NotificationFlags.Value.NotificationType == NotificationTypesEnum.ObjectCreated || NotificationFlags.Value.NotificationType == NotificationTypesEnum.ObjectDeleted || NotificationFlags.Value.NotificationType == NotificationTypesEnum.ObjectMoved || NotificationFlags.Value.NotificationType == NotificationTypesEnum.ObjectCopied) && ((((int)NotificationFlags.Value.NotificationDataAvailability) & 0xC000) == 0xC000 || (((int)NotificationFlags.Value.NotificationDataAvailability) & 0xC000) == 0)) { this.ParentFolderId = new FolderID(); this.ParentFolderId.Parse(s); } if (NotificationFlags.Value.NotificationType == NotificationTypesEnum.ObjectMoved || NotificationFlags.Value.NotificationType == NotificationTypesEnum.ObjectCopied) { this.OldFolderId = new FolderID(); this.OldFolderId.Parse(s); } if ((NotificationFlags.Value.NotificationType == NotificationTypesEnum.ObjectMoved || NotificationFlags.Value.NotificationType == NotificationTypesEnum.ObjectCopied) && (((int)NotificationFlags.Value.NotificationDataAvailability & 0x8000) != 0)) { this.OldMessageId = new MessageID(); this.OldMessageId.Parse(s); } if ((NotificationFlags.Value.NotificationType == NotificationTypesEnum.ObjectMoved || NotificationFlags.Value.NotificationType == NotificationTypesEnum.ObjectCopied) && (((int)NotificationFlags.Value.NotificationDataAvailability & 0x8000) == 0)) { this.OldParentFolderId = new MessageID(); this.OldParentFolderId.Parse(s); } if (NotificationFlags.Value.NotificationType == NotificationTypesEnum.ObjectCreated || NotificationFlags.Value.NotificationType == NotificationTypesEnum.ObjectModified) { this.TagCount = ReadUshort(); if (TagCount != 0x0000 && TagCount != 0xFFFF) { List<PropertyTag> listTags = new List<PropertyTag>(); for (int i = 0; i < this.TagCount; i++) { PropertyTag tempTag = new PropertyTag(); tempTag.Parse(s); listTags.Add(tempTag); } this.Tags = listTags.ToArray(); } } if (((int)NotificationFlags.Value.NotificationDataAvailability & 0x1000) != 0) { this.TotalMessageCount = ReadUint(); } if (((int)NotificationFlags.Value.NotificationDataAvailability & 0x2000) != 0) { this.UnreadMessageCount = ReadUint(); } if (NotificationFlags.Value.NotificationType == NotificationTypesEnum.NewMail) { this.MessageFlags = ReadUint(); this.UnicodeFlag = ReadByte(); this.MessageClass = new MAPIString(Encoding.ASCII); this.MessageClass.Parse(s); } }
/// <summary> /// Parse the PropertyProblem structure. /// </summary> /// <param name="s">A stream containing the PropertyProblem structure</param> public override void Parse(Stream s) { base.Parse(s); this.Index = ReadUshort(); this.PropertyTag = new PropertyTag(); this.PropertyTag.Parse(s); this.ErrorCode = (PropertyErrorCodes)ReadUint(); }
/// <summary> /// The Constructor to set the property tag. /// </summary> /// <param name="ptypMultiCountSize"> The array of property tag.</param> public RecipientRow(PropertyTag[] propTags) { this.PropTags = propTags; }
/// <summary> /// Parse the RopGetPropertiesSpecificRequest structure. /// </summary> /// <param name="s">An stream containing RopGetPropertiesSpecificRequest structure.</param> public override void Parse(Stream s) { base.Parse(s); this.RopId = (RopIdType)ReadByte(); this.LogonId = ReadByte(); this.InputHandleIndex = ReadByte(); this.PropertySizeLimit = ReadUshort(); this.WantUnicode = ReadUshort(); this.PropertyTagCount = ReadUshort(); List<PropertyTag> tmpPropertyTags = new List<PropertyTag>(); for (int i = 0; i < this.PropertyTagCount; i++) { PropertyTag tmppropertytag = new PropertyTag(); tmppropertytag.Parse(s); tmpPropertyTags.Add(tmppropertytag); } this.PropertyTags = tmpPropertyTags.ToArray(); }
/// <summary> /// Parse the RopQueryColumnsAllResponse structure. /// </summary> /// <param name="s">An stream containing RopQueryColumnsAllResponse structure.</param> public override void Parse(Stream s) { base.Parse(s); this.RopId = (RopIdType)ReadByte(); this.InputHandleIndex = ReadByte(); HelpMethod help = new HelpMethod(); this.ReturnValue = help.FormatErrorCode(ReadUint()); if ((ErrorCodes)ReturnValue == ErrorCodes.Success) { this.PropertyTagCount = ReadUshort(); List<PropertyTag> tempPropertyTags = new List<PropertyTag>(); for (int i = 0; i < this.PropertyTagCount; i++) { PropertyTag tempPropertyTag = new PropertyTag(); tempPropertyTag.Parse(s); tempPropertyTags.Add(tempPropertyTag); } this.PropertyTags = tempPropertyTags.ToArray(); } }
/// <summary> /// Parse the ModLinkAttRequest structure. /// </summary> /// <param name="s">An stream containing ModLinkAttRequest structure.</param> public override void Parse(Stream s) { base.Parse(s); this.Flags = ReadUint(); this.PropertyTag = new PropertyTag(); this.PropertyTag.Parse(s); this.MinimalId = new MinimalEntryID(); this.MinimalId.Parse(s); this.HasEntryIds = ReadBoolean(); if (this.HasEntryIds) { this.EntryIdCount = ReadUint(); List<object> tempObj = new List<object>(); for (int i = 0; i < this.EntryIdCount; i++) { byte currentByte = ReadByte(); s.Position -= 1; if (currentByte == 0x87) { EphemeralEntryID ephemeralEntryID = new EphemeralEntryID(); ephemeralEntryID.Parse(s); tempObj.Add(ephemeralEntryID); } else if (currentByte == 0x00) { PermanentEntryID permanentEntryID = new PermanentEntryID(); permanentEntryID.Parse(s); tempObj.Add(permanentEntryID); } } this.EntryIds = tempObj.ToArray(); } this.AuxiliaryBufferSize = ReadUint(); if (this.AuxiliaryBufferSize > 0) { this.AuxiliaryBuffer = new ExtendedBuffer(); this.AuxiliaryBuffer.Parse(s); } }
/// <summary> /// Parse the RopGetPropertiesListResponse structure. /// </summary> /// <param name="s">An stream containing RopGetPropertiesListResponse structure.</param> public override void Parse(Stream s) { base.Parse(s); this.RopId = (RopIdType)ReadByte(); this.InputHandleIndex = ReadByte(); HelpMethod help = new HelpMethod(); this.ReturnValue = help.FormatErrorCode(ReadUint()); if ((ErrorCodes)ReturnValue == ErrorCodes.Success) { this.PropertyTagCount = ReadUshort(); PropertyTag[] InterTag = new PropertyTag[(int)this.PropertyTagCount]; for (int i = 0; i < this.PropertyTagCount; i++) { InterTag[i] = new PropertyTag(); InterTag[i].Parse(s); } this.PropertyTags = InterTag; } }
/// <summary> /// Parse the LargePropertyTagArray structure. /// </summary> /// <param name="s">An stream containing LargePropertyTagArray structure.</param> public override void Parse(Stream s) { base.Parse(s); this.PropertyTagCount = ReadUint(); List<PropertyTag> tempPT = new List<PropertyTag>(); for (int i = 0; i < PropertyTagCount; i++) { PropertyTag p = new PropertyTag(); p.Parse(s); tempPT.Add(p); } this.PropertyTags = tempPT.ToArray(); }
/// <summary> /// Parse the RopModifyRecipientsRequest structure. /// </summary> /// <param name="s">An stream containing RopModifyRecipientsRequest structure</param> public override void Parse(Stream s) { base.Parse(s); this.RopId = (RopIdType)ReadByte(); this.LogonId = ReadByte(); this.InputHandleIndex = ReadByte(); this.ColumnCount = ReadUshort(); List<PropertyTag> propertyTags = new List<PropertyTag>(); for (int i = 0; i < ColumnCount; i++) { PropertyTag propertyTag = new PropertyTag(); propertyTag.Parse(s); propertyTags.Add(propertyTag); } this.RecipientColumns = propertyTags.ToArray(); this.RowCount = ReadUshort(); List<ModifyRecipientRow> modifyRecipientRows = new List<ModifyRecipientRow>(); for (int i = 0; i < RowCount; i++) { ModifyRecipientRow modifyRecipientRow = new ModifyRecipientRow(this.RecipientColumns); modifyRecipientRow.Parse(s); modifyRecipientRows.Add(modifyRecipientRow); } this.RecipientRows = modifyRecipientRows.ToArray(); }
/// <summary> /// The OpenRecipientRow construct function /// </summary> /// <param name="propTags">Array of PropertyTag used to initialize the class.</param> public OpenRecipientRow(PropertyTag[] propTags) { this.propTags = propTags; }
/// <summary> /// Parse the RopSetColumnsRequest structure. /// </summary> /// <param name="s">An stream containing RopSetColumnsRequest structure.</param> public override void Parse(Stream s) { base.Parse(s); this.RopId = (RopIdType)ReadByte(); this.LogonId = ReadByte(); this.InputHandleIndex = ReadByte(); this.SetColumnsFlags = (AsynchronousFlags)ReadByte(); this.PropertyTagCount = ReadUshort(); List<PropertyTag> tempPropertyTags = new List<PropertyTag>(); for (int i = 0; i < this.PropertyTagCount; i++) { PropertyTag tempPropertyTag = new PropertyTag(); tempPropertyTag.Parse(s); tempPropertyTags.Add(tempPropertyTag); } this.PropertyTags = tempPropertyTags.ToArray(); }
/// <summary> /// Parse the RopOpenStreamRequest structure. /// </summary> /// <param name="s">An stream containing RopOpenStreamRequest structure.</param> public override void Parse(Stream s) { base.Parse(s); this.RopId = (RopIdType)ReadByte(); this.LogonId = ReadByte(); this.InputHandleIndex = ReadByte(); this.OutputHandleIndex = ReadByte(); this.PropertyTag = new PropertyTag(); this.PropertyTag.Parse(s); this.OpenModeFlags = (OpenModeFlags)ReadByte(); }
/// <summary> /// The construe function for RopFindRowsResponse /// </summary> /// <param name="propertiesBySetColum">Property Tags got from RopSetColumn</param> public RopFindRowResponse(PropertyTag[] propertiesBySetColum) { this.propertiesBySetColum = propertiesBySetColum; }
/// <summary> /// Parse the RopCopyToRequest structure. /// </summary> /// <param name="s">An stream containing RopCopyToRequest structure.</param> public override void Parse(Stream s) { base.Parse(s); this.RopId = (RopIdType)ReadByte(); this.LogonId = ReadByte(); this.SourceHandleIndex = ReadByte(); this.DestHandleIndex = ReadByte(); this.WantAsynchronous = ReadBoolean(); this.WantSubObjects = ReadBoolean(); this.CopyFlags = (CopyFlags)ReadByte(); this.ExcludedTagCount = ReadUshort(); this.ExcludedTags = new PropertyTag[(int)this.ExcludedTagCount]; for (int i = 0; i < this.ExcludedTagCount; i++) { ExcludedTags[i] = new PropertyTag(); ExcludedTags[i].Parse(s); } }
/// <summary> /// Parse the ContentRestriction structure. /// </summary> /// <param name="s">A stream containing the ContentRestriction structure</param> public override void Parse(Stream s) { base.Parse(s); this.RestrictType = (RestrictTypeEnum)ReadByte(); this.FuzzyLevelLow = (FuzzyLevelLowEnum)ReadUshort(); this.FuzzyLevelHigh = (FuzzyLevelHighEnum)ReadUshort(); this.PropertyTag = new PropertyTag(); this.PropertyTag.Parse(s); this.TaggedValue = new TaggedPropertyValue(); this.TaggedValue.Parse(s); }
/// <summary> /// Parse the RopFastTransferSourceCopyToRequest structure. /// </summary> /// <param name="s">An stream containing RopFastTransferSourceCopyToRequest structure.</param> public override void Parse(Stream s) { base.Parse(s); this.RopId = (RopIdType)ReadByte(); this.LogonId = ReadByte(); this.InputHandleIndex = ReadByte(); this.OutputHandleIndex = ReadByte(); this.Level = ReadByte(); this.CopyFlags = (CopyFlags_CopyTo)ReadUint(); this.SendOptions = (SendOptions)ReadByte(); this.PropertyTagCount = ReadUshort(); PropertyTag[] InterTag = new PropertyTag[(int)this.PropertyTagCount]; for (int i = 0; i < this.PropertyTagCount; i++) { InterTag[i] = new PropertyTag(); InterTag[i].Parse(s); } this.PropertyTags = InterTag; }
/// <summary> /// The Constructor to set property tag. /// </summary> /// <param name="propTags">The array of property tag.</param> public PropertyRow(PropertyTag[] propTags) { this.PropTags = propTags; }
/// <summary> /// Parse the RopSynchronizationConfigureRequest structure. /// </summary> /// <param name="s">An stream containing RopSynchronizationConfigureRequest structure.</param> public override void Parse(Stream s) { base.Parse(s); this.RopId = (RopIdType)ReadByte(); this.LogonId = ReadByte(); this.InputHandleIndex = ReadByte(); this.OutputHandleIndex = ReadByte(); this.SynchronizationType = (SynchronizationType)ReadByte(); this.SendOptions = (SendOptions)ReadByte(); this.SynchronizationFlags = (SynchronizationFlags)ReadUshort(); this.RestrictionDataSize = ReadUshort(); if (RestrictionDataSize > 0) { this.RestrictionData = new RestrictionType(); this.RestrictionData.Parse(s); } this.SynchronizationExtraFlags = (SynchronizationExtraFlags)ReadUint(); this.PropertyTagCount = ReadUshort(); PropertyTag[] InterTag = new PropertyTag[(int)this.PropertyTagCount]; for (int i = 0; i < this.PropertyTagCount; i++) { InterTag[i] = new PropertyTag(); InterTag[i].Parse(s); } this.PropertyTags = InterTag; }
/// <summary> /// Parse the TaggedPropertyValue structure. /// </summary> /// <param name="s">A stream containing the TaggedPropertyValue structure</param> public override void Parse(Stream s) { base.Parse(s); this.PropertyTag = new PropertyTag(); this.PropertyTag.Parse(s); PropertyValue propertyValue = new PropertyValue(); this.PropertyValue = propertyValue.ReadPropertyValue(this.PropertyTag.PropertyType, s, countWide); }
/// <summary> /// The construct function for ModifyRecipientRow /// </summary> /// <param name="propTags">The initialized parameter</param> public ModifyRecipientRow(PropertyTag[] propTags) { this.propTags = propTags; }