/*_############################################################################
  _##
  _##  SNMP4J-Agent 3 - AgentAuditPolicy.java
  _##
  _##  Copyright (C) 2005-2026  Frank Fock (SNMP4J.org)
  _##
  _##  Licensed under the Apache License, Version 2.0 (the "License");
  _##  you may not use this file except in compliance with the License.
  _##  You may obtain a copy of the License at
  _##
  _##      http://www.apache.org/licenses/LICENSE-2.0
  _##
  _##  Unless required by applicable law or agreed to in writing, software
  _##  distributed under the License is distributed on an "AS IS" BASIS,
  _##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  _##  See the License for the specific language governing permissions and
  _##  limitations under the License.
  _##
  _##########################################################################*/

package org.snmp4j.agent.audit;

import org.snmp4j.agent.MOServerLookupListener;
import org.snmp4j.transport.TransportAuditListener;

/**
 * The {@code AgentAuditPolicy} interface defines the audit policy for an SNMP agent to audit
 * managed object access, transport access, and file access.
 * @since 3.12.0
 */
public interface AgentAuditPolicy extends MOServerLookupListener, TransportAuditListener, FileAuditListener {

    /**
     * Retrieves the current audit level for the agent. The audit level specifies
     * the behavior of the agent in logging and enforcing access to managed objects
     * and transport operations.
     *
     * @return the current audit level, which can be one of the following:
     *         {@code OFF}, {@code LOG}, {@code WARN}, or {@code RESTRICT}.
     */
    AgentAuditLevel getAuditLevel();


    /**
     * Determines whether the audit feature of the agent is enabled.
     * The audit is considered enabled if the current {@link AgentAuditLevel}
     * is not set to {@code OFF}.
     *
     * @return {@code true} if audit is enabled, {@code false} otherwise.
     */
    default boolean isAuditEnabled() {
        return getAuditLevel() != AgentAuditLevel.OFF;
    };
}
