/*
 * SDK Pullenti Unitext, version 4.33, fabruary 2026. Copyright (c) 2013-2026, Pullenti. All rights reserved. 
 * Non-Commercial Freeware and Commercial Software. 
 * This class is generated using the converter UniSharping (www.unisharping.ru) from Pullenti C# project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */


const TestOperation = require("./TestOperation");

/**
 * Status returned returned by <see cref="ZipTestResultHandler"/> during testing.
 */
class TestStatus {
    
    /**
     * Initialise a new instance of <see cref="TestStatus"/>
     * @param _file The <see cref="ZipFile"/> this status applies to.
     */
    constructor(_file) {
        this.m_File = null;
        this.m_Entry = null;
        this.m_EntryValid = false;
        this.m_ErrorCount = 0;
        this.m_BytesTested = 0;
        this.m_Operation = TestOperation.INITIALISING;
        this.m_File = _file;
    }
    
    get operation() {
        return this.m_Operation;
    }
    
    get file() {
        return this.m_File;
    }
    
    get entry() {
        return this.m_Entry;
    }
    
    get errorCount() {
        return this.m_ErrorCount;
    }
    
    get bytesTested() {
        return this.m_BytesTested;
    }
    
    get entryValid() {
        return this.m_EntryValid;
    }
    
    addError() {
        this.m_ErrorCount++;
        this.m_EntryValid = false;
    }
    
    setOperation(_operation) {
        this.m_Operation = _operation;
    }
    
    setEntry(_entry) {
        this.m_Entry = _entry;
        this.m_EntryValid = true;
        this.m_BytesTested = 0;
    }
    
    setBytesTested(value) {
        this.m_BytesTested = value;
    }
}


module.exports = TestStatus