Пример #1
0
        /// <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>
        /// Parse the RopPendingResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopPendingResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId        = (RopIdType)ReadByte();
            this.SessionIndex = ReadUshort();
        }
Пример #3
0
        /// <summary>
        /// Parse the RopPublicFolderIsGhostedResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopPublicFolderIsGhostedResponse 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.IsGhosted = ReadBoolean();
                if (this.IsGhosted == true)
                {
                    this.ServersCount      = ReadUshort();
                    this.CheapServersCount = ReadUshort();
                    List <MAPIString> tmpServers = new List <MAPIString>();
                    for (int i = 0; i < this.ServersCount; i++)
                    {
                        MAPIString subServer = new MAPIString(Encoding.ASCII);
                        subServer.Parse(s);
                        tmpServers.Add(subServer);
                    }
                    this.Servers = tmpServers.ToArray();
                }
            }
        }
Пример #4
0
        /// <summary>
        /// Parse the RopLogonResponse_PublicFolders structure.
        /// </summary>
        /// <param name="s">An stream containing RopLogonResponse_PublicFolders structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId             = (RopIdType)ReadByte();
            this.OutputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();

            this.ReturnValue = help.FormatErrorCode(ReadUint());
            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.LogonFlags = (LogonFlags)ReadByte();
                this.FolderIds  = new FolderID[13];
                for (int i = 0; i < 13; i++)
                {
                    FolderIds[i] = new FolderID();
                    FolderIds[i].Parse(s);
                }
                this.ReplId      = ReadUshort();
                this.ReplGuid    = ReadGuid();
                this.PerUserGuid = ReadGuid();
            }
            else if ((AdditionalErrorCodes)ReturnValue == AdditionalErrorCodes.WrongServer)
            {
                this.LogonFlags     = (LogonFlags)ReadByte();
                this.ServerNameSize = ReadByte();
                this.ServerName     = new MAPIString(Encoding.ASCII);
                this.ServerName.Parse(s);
            }
        }
Пример #5
0
        /// <summary>
        /// Parse the RopGetStoreStateRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetStoreStateRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId            = (RopIdType)ReadByte();
            this.LogonId          = ReadByte();
            this.InputHandleIndex = ReadByte();
        }
        /// <summary>
        /// Parse the RopCloneStreamRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopCloneStreamRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.OutputHandleIndex = ReadByte();
        }
 /// <summary>
 /// Parse the RopGetPermissionsTableRequest structure.
 /// </summary>
 /// <param name="s">A stream containing RopGetPermissionsTableRequest structure.</param>
 public override void Parse(Stream s)
 {
     base.Parse(s);
     this.RopId             = (RopIdType)this.ReadByte();
     this.LogonId           = this.ReadByte();
     this.InputHandleIndex  = this.ReadByte();
     this.OutputHandleIndex = this.ReadByte();
     this.TableFlags        = (TableFlagsRopGetPermissionsTable)this.ReadByte();
 }
 /// <summary>
 /// Parse the RopNotifyResponse structure.
 /// </summary>
 /// <param name="s">A stream containing RopNotifyResponse structure.</param>
 public override void Parse(Stream s)
 {
     base.Parse(s);
     this.RopId = (RopIdType)this.ReadByte();
     this.NotificationHandle = this.ReadUint();
     this.LogonId            = this.ReadByte();
     this.NotificationData   = new NotificationData(this.NotificationHandle);
     this.NotificationData.Parse(s);
 }
 /// <summary>
 /// Parse the RopGetRulesTableRequest structure.
 /// </summary>
 /// <param name="s">An stream containing RopGetRulesTableRequest structure.</param>
 public override void Parse(System.IO.Stream s)
 {
     base.Parse(s);
     this.RopId             = (RopIdType)ReadByte();
     this.LogonId           = ReadByte();
     this.InputHandleIndex  = ReadByte();
     this.OutputHandleIndex = ReadByte();
     this.TableFlags        = (TableFlags)ReadByte();
 }
        /// <summary>
        /// Parse the RopModifyPermissionsResponse structure.
        /// </summary>
        /// <param name="s">A stream containing RopModifyPermissionsResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);
            this.RopId            = (RopIdType)this.ReadByte();
            this.InputHandleIndex = this.ReadByte();
            HelpMethod help = new HelpMethod();

            this.ReturnValue = help.FormatErrorCode(this.ReadUint());
        }
Пример #11
0
        /// <summary>
        /// Parse the RopGetReceiveFolderRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetReceiveFolderRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId            = (RopIdType)ReadByte();
            this.LogonId          = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.MessageClass     = new MAPIString(Encoding.ASCII);
            this.MessageClass.Parse(s);
        }
 /// <summary>
 /// Parse the RopUpdateDeferredActionMessagesRequest structure.
 /// </summary>
 /// <param name="s">An stream containing RopUpdateDeferredActionMessagesRequest structure.</param>
 public override void Parse(System.IO.Stream s)
 {
     base.Parse(s);
     this.RopId             = (RopIdType)ReadByte();
     this.LogonId           = ReadByte();
     this.InputHandleIndex  = ReadByte();
     this.ServerEntryIdSize = ReadUshort();
     this.ServerEntryId     = ReadBytes((int)ServerEntryIdSize);
     this.ClientEntryIdSize = ReadUshort();
     this.ClientEntryId     = ReadBytes((int)ClientEntryIdSize);
 }
Пример #13
0
        /// <summary>
        /// Parse the RopReadPerUserInformationRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopReadPerUserInformationRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId            = (RopIdType)ReadByte();
            this.LogonId          = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.FolderId         = new LongTermID();
            this.FolderId.Parse(s);
            this.Reserved    = ReadByte();
            this.DataOffset  = ReadUint();
            this.MaxDataSize = ReadUshort();
        }
Пример #14
0
        /// <summary>
        /// Parse the RopGetPerUserGuidResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetPerUserGuidResponse 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.DatabaseGuid = ReadGuid();
            }
        }
Пример #15
0
        /// <summary>
        /// Parse the RopGetStoreStateResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetStoreStateResponse 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.StoreState = ReadUint();
            }
        }
Пример #16
0
        /// <summary>
        /// Parse the RopReadPerUserInformationResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopReadPerUserInformationResponse 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.HasFinished = ReadBoolean();
                this.DataSize    = ReadUshort();
                this.Data        = ConvertArray(ReadBytes((int)this.DataSize));
            }
        }
Пример #17
0
        /// <summary>
        /// Parse the RopGetReceiveFolderResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetReceiveFolderResponse 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.FolderId = new FolderID();
                this.FolderId.Parse(s);
                this.ExplicitMessageClass = new MAPIString(Encoding.ASCII);
                this.ExplicitMessageClass.Parse(s);
            }
        }
Пример #18
0
        /// <summary>
        /// Parse the RopLogonRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopLogonRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId             = (RopIdType)ReadByte();
            this.LogonId           = ReadByte();
            this.OutputHandleIndex = ReadByte();
            this.LogonFlags        = (LogonFlags)ReadByte();
            this.OpenFlags         = (OpenFlags)ReadUint();
            this.StoreState        = ReadUint();
            this.EssdnSize         = ReadUshort();
            if (this.EssdnSize > 0)
            {
                this.Essdn = new MAPIString(Encoding.ASCII);
                this.Essdn.Parse(s);
            }
        }
Пример #19
0
        /// <summary>
        /// Parse the RopWritePerUserInformationRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopWritePerUserInformationRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId            = (RopIdType)ReadByte();
            this.LogonId          = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.FolderId         = new LongTermID();
            this.FolderId.Parse(s);
            this.HasFinished = ReadBoolean();
            this.DataOffset  = ReadUint();
            this.DataSize    = ReadUshort();
            this.Data        = ReadBytes((int)this.DataSize);
            if (this.DataOffset == 0 && (((byte)DecodingContext.SessionLogonFlagMapLogId[MapiInspector.MAPIInspector.currentParsingSessionID][LogonId] & (byte)LogonFlags.Private) == (byte)LogonFlags.Private))
            {
                this.ReplGuid = ReadGuid();
            }
        }
        /// <summary>
        /// Parse the RopModifyRulesRequest structure.
        /// </summary>
        /// <param name="s">A stream containing the RopModifyRulesRequest structure</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);
            this.RopId            = (RopIdType)ReadByte();
            this.LogonId          = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.ModifyRulesFlags = new ModifyRulesFlags();
            this.ModifyRulesFlags.Parse(s);
            this.RulesCount = ReadUshort();
            List <RuleData> tempRulesDatas = new List <RuleData>();

            for (int i = 0; i < this.RulesCount; i++)
            {
                RuleData tempRuleData = new RuleData();
                tempRuleData.Parse(s);
                tempRulesDatas.Add(tempRuleData);
            }
            this.RulesData = tempRulesDatas.ToArray();
        }
        /// <summary>
        /// Parse the RopModifyPermissionsRequest structure.
        /// </summary>
        /// <param name="s">A stream containing RopModifyPermissionsRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);
            this.RopId            = (RopIdType)this.ReadByte();
            this.LogonId          = this.ReadByte();
            this.InputHandleIndex = this.ReadByte();
            this.ModifyFlags      = (ModifyFlags)this.ReadByte();
            this.ModifyCount      = this.ReadUshort();
            List <PermissionData> listPermissionData = new List <PermissionData>();

            for (int i = 0; i < this.ModifyCount; i++)
            {
                PermissionData tempPermissionData = new PermissionData();
                tempPermissionData.Parse(s);
                listPermissionData.Add(tempPermissionData);
            }

            this.PermissionsData = listPermissionData.ToArray();
        }
Пример #22
0
        /// <summary>
        /// Parse the RopGetPerUserLongTermIdsResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetPerUserLongTermIdsResponse 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.LongTermIdCount = ReadUshort();
                this.LongTermIds     = new LongTermID[(int)this.LongTermIdCount];
                for (int i = 0; i < this.LongTermIdCount; i++)
                {
                    this.LongTermIds[i] = new LongTermID();
                    this.LongTermIds[i].Parse(s);
                }
            }
        }
        /// <summary>
        /// Parse the RopRegisterNotificationRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopRegisterNotificationRequest 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.NotificationTypes = (NotificationTypesEnum)ReadUshort();
            if (this.NotificationTypes == NotificationTypesEnum.Extended)
            {
                this.Reserved = ReadByte();
            }
            this.WantWholeStore = ReadBoolean();
            if (!this.WantWholeStore)
            {
                this.FolderId = new FolderID();
                this.FolderId.Parse(s);
                this.MessageId = new MessageID();
                this.MessageId.Parse(s);
            }
        }
        /// <summary>
        /// Parse the RopGetCollapseStateRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetCollapseStateRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.RowId = ReadINT64();
            this.RowInstanceNumber = ReadUint();
        }
        /// <summary>
        /// Parse the RopGetAddressTypesResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetAddressTypesResponse 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.AddressTypeCount = ReadUshort();
                this.AddressTypeSize = ReadUshort();
                List<MAPIString> listAddressTypes = new List<MAPIString>();

                for (int i = 0; i < this.AddressTypeCount; i++)
                {
                    MAPIString tempAddressTypes = new MAPIString(Encoding.ASCII);
                    tempAddressTypes.Parse(s);
                    listAddressTypes.Add(tempAddressTypes);
                }
                this.AddressTypes = listAddressTypes.ToArray();

            }
        }
        /// <summary>
        /// Parse the RopBackoffResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopBackoffResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.Duration = ReadUint();
            this.BackoffRopCount = ReadByte();
            List<BackoffRop> BackoffRopDataList = new List<BackoffRop>();
            for (int i = 0; i < this.BackoffRopCount; i++)
            {
                BackoffRop SubBackoffRop = new BackoffRop();
                SubBackoffRop.Parse(s);
                BackoffRopDataList.Add(SubBackoffRop);
            }

            this.BackoffRopData = BackoffRopDataList.ToArray();
            this.AdditionalDataSize = ReadUshort();
            this.AdditionalData = ReadBytes(this.AdditionalDataSize);
        }
        /// <summary>
        /// Parse the RopAbortSubmitRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopAbortSubmitRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.FolderId = new FolderID();
            this.FolderId.Parse(s);
            this.MessageId = new MessageID();
            this.MessageId.Parse(s);
        }
        /// <summary>
        /// Parse the RopTransportNewMailRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopTransportNewMailRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.MessageId = new MessageID();
            this.MessageId.Parse(s);
            this.FolderId = new FolderID();
            this.FolderId.Parse(s);
            this.MessageClass = new MAPIString(Encoding.ASCII);
            this.MessageClass.Parse(s);
            this.MessageFlags = (MessageFlags)ReadUint();
        }
        /// <summary>
        /// Parse the RopOptionsDataResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopOptionsDataResponse 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.Reserved = ReadByte();
                this.OptionalInfoSize = ReadUshort();
                this.OptionalInfo = ConvertArray(ReadBytes((int)this.OptionalInfoSize));
                this.HelpFileSize = ReadUshort();
                if (this.HelpFileSize != 0)
                {
                    this.HelpFile = ConvertArray(ReadBytes((int)this.HelpFileSize));
                    this.HelpFileName = new MAPIString(Encoding.ASCII);
                    this.HelpFileName.Parse(s);
                }
            }
        }
        /// <summary>
        /// Parse the RopGetTransportFolderResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetTransportFolderResponse 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.FolderId = new FolderID();
                this.FolderId.Parse(s);
            }
        }
        /// <summary>
        /// Parse the RopLogonRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopLogonRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.OutputHandleIndex = ReadByte();
            this.LogonFlags = (LogonFlags)ReadByte();
            this.OpenFlags = (OpenFlags)ReadUint();
            this.StoreState = ReadUint();
            this.EssdnSize = ReadUshort();
            if (this.EssdnSize > 0)
            {
                this.Essdn = new MAPIString(Encoding.ASCII);
                this.Essdn.Parse(s);
            }
        }
        /// <summary>
        /// Parse the RopFindRowResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopFindRowResponse 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.RowNoLongerVisible = ReadBoolean();
                this.HasRowData = ReadBoolean();
                if ((bool)HasRowData)
                {
                    PropertyRow tempPropertyRow = new PropertyRow(propertiesBySetColum);
                    this.RowData = tempPropertyRow;
                    this.RowData.Parse(s);
                }
            }
        }
        /// <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 RopSortTableRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopSortTableRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.SortTableFlags = (AsynchronousFlags)ReadByte();
            this.SortOrderCount = ReadUshort();
            this.CategoryCount = ReadUshort();
            this.ExpandedCount = ReadUshort();
            List<SortOrder> tempSortOrders = new List<SortOrder>();
            for (int i = 0; i < this.SortOrderCount; i++)
            {
                SortOrder tempSortOrder = new SortOrder();
                tempSortOrder.Parse(s);
                tempSortOrders.Add(tempSortOrder);
            }
            this.SortOrders = tempSortOrders.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 RopGetCollapseStateResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopGetCollapseStateResponse 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.CollapseStateSize = ReadUshort();
                this.CollapseState = ConvertArray(ReadBytes((int)CollapseStateSize));
            }
        }
        /// <summary>
        /// Parse the RopSeekRowFractionalRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopSeekRowFractionalRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.Numerator = ReadUint();
            this.Denominator = ReadUint();
        }
        /// <summary>
        /// Parse the RopSetCollapseStateRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopSetCollapseStateRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.CollapseStateSize = ReadUshort();
            this.CollapseState = ReadBytes(CollapseStateSize);
        }
        /// <summary>
        /// Parse the RopOptionsDataRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopOptionsDataRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.AddressType = new MAPIString(Encoding.ASCII);
            this.AddressType.Parse(s);
            this.WantWin32 = ReadByte();
        }
        /// <summary>
        /// Parse the RopQueryRowsRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopQueryRowsRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.QueryRowsFlags = (QueryRowsFlags)ReadByte();
            this.ForwardRead = ReadBoolean();
            this.RowCount = ReadUshort();
        }
        /// <summary>
        /// Parse the RopSubmitMessageResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopSubmitMessageResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.InputHandleIndex = ReadByte();
            this.ReturnValue = ReadUint();
        }
        /// <summary>
        /// Parse the RopFindRow structure.
        /// </summary>
        /// <param name="s">An stream containing RopFindRow structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.FindRowFlags = (FindRowFlags)ReadByte();
            this.RestrictionDataSize = ReadUshort();
            if (RestrictionDataSize > 0)
            {
                RestrictionType tempRestriction = new RestrictionType();
                this.RestrictionData = tempRestriction;
                this.RestrictionData.Parse(s);
            }
            this.Origin = (Bookmarks)ReadByte();
            this.BookmarkSize = ReadUshort();
            this.Bookmark = ReadBytes(BookmarkSize);
        }
        /// <summary>
        /// Parse the RopTransportSendResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopTransportSendResponse 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.NoPropertiesReturned = ReadByte();
                this.PropertyValueCount = ReadUshort();
                List<TaggedPropertyValue> tempPropertyValues = new List<TaggedPropertyValue>();
                for (int i = 0; i < this.PropertyValueCount; i++)
                {
                    TaggedPropertyValue temptaggedPropertyValue = new TaggedPropertyValue(CountWideEnum.twoBytes);
                    temptaggedPropertyValue.Parse(s);
                    tempPropertyValues.Add(temptaggedPropertyValue);
                }
                this.PropertyValues = tempPropertyValues.ToArray();
            }
        }
        /// <summary>
        /// Parse the RopRestrictRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopRestrictRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.RestrictFlags = (AsynchronousFlags)ReadByte();
            this.RestrictionDataSize = ReadUshort();
            if (this.RestrictionDataSize > 0)
            {
                RestrictionType restriction = new RestrictionType();
                this.RestrictionData = restriction;
                this.RestrictionData.Parse(s);
            }
        }
        /// <summary>
        /// Parse the RopAbortSubmitResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopAbortSubmitResponse 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());
        }
        /// <summary>
        /// Parse the RopExpandRowResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopExpandRowResponse 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.ExpandedRowCount = ReadUint();
                this.RowCount = ReadUshort();
                List<PropertyRow> tempPropertyRows = new List<PropertyRow>();
                for (int i = 0; i < RowCount; i++)
                {
                    PropertyRow tempPropertyRow = new PropertyRow(this.propertiesBySetColum);
                    tempPropertyRow.Parse(s);
                    tempPropertyRows.Add(tempPropertyRow);
                }
                this.RowData = tempPropertyRows.ToArray();
            }
        }
        /// <summary>
        /// Parse the RopBufferTooSmallResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopBufferTooSmallResponse structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.SizeNeeded = ReadUshort();
            this.RequestBuffers = ReadBytes((int)this.RequestBuffersSize);
        }
        /// <summary>
        /// Parse the RopSeekRowRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopSeekRowRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.Origin = (Bookmarks)ReadByte();
            this.RowCount = ReadINT32();
            this.WantRowMovedCount = ReadBoolean();
        }
        /// <summary>
        /// Parse the RopSeekRowResponse structure.
        /// </summary>
        /// <param name="s">An stream containing RopSeekRowResponse 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.HasSoughtLess = ReadBoolean();
                this.RowsSought = ReadINT32();
            }
        }
        /// <summary>
        /// Parse the RopFreeBookmarkRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopFreeBookmarkRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.BookmarkSize = ReadUshort();
            this.Bookmark = ReadBytes(BookmarkSize);
        }
        /// <summary>
        /// Parse the RopLogonResponse_PublicFolders structure.
        /// </summary>
        /// <param name="s">An stream containing RopLogonResponse_PublicFolders structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.OutputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());
            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.LogonFlags = (LogonFlags)ReadByte();
                this.FolderIds = new FolderID[13];
                for (int i = 0; i < 13; i++)
                {
                    FolderIds[i] = new FolderID();
                    FolderIds[i].Parse(s);
                }
                this.ReplId = ReadUshort();
                this.ReplGuid = ReadGuid();
                this.PerUserGuid = ReadGuid();
            }
            else if ((AdditionalErrorCodes)ReturnValue == AdditionalErrorCodes.WrongServer)
            {
                this.LogonFlags = (LogonFlags)ReadByte();
                this.ServerNameSize = ReadByte();
                this.ServerName = new MAPIString(Encoding.ASCII);
                this.ServerName.Parse(s);
            }
        }
        /// <summary>
        /// Parse the RopExpandRowRequest structure.
        /// </summary>
        /// <param name="s">An stream containing RopExpandRowRequest structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.LogonId = ReadByte();
            this.InputHandleIndex = ReadByte();
            this.MaxRowCount = ReadUshort();
            this.CategoryId = ReadINT64();
        }