Ejemplo n.º 1
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();
                }
            }
        }
Ejemplo n.º 2
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();
            }
        }
Ejemplo n.º 3
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);
            }
        }
        /// <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());
        }
Ejemplo n.º 5
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();
            }
        }
Ejemplo n.º 6
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();
            }
        }
Ejemplo n.º 7
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));
            }
        }
Ejemplo n.º 8
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);
            }
        }
Ejemplo n.º 9
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);
                }
            }
        }