/// <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 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 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 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 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> /// 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(); } }