/* SPDX-License-Identifier: BSD-3-Clause */
/*
 * Copyright 2018 Raritan Inc. All rights reserved.
 */

#include <UserEvent.idl>

/** Raw Configuration */
module rawcfg {

    /** Raw Configuration Interface */
    interface RawConfiguration_1_0_1 {

        /** Status of the last raw configuration update operation */
        enumeration Status {
            UNKNOWN,            ///< No raw configuration was done yet
            UPLOAD_FAILED,      ///< Uploading a raw configuration failed
            UPDATE_PENDING,     ///< Update is pending
            UPDATE_OK,          ///< Updating raw configuration successful
            UPDATE_FAILED       ///< Updating raw configuration failed
        };

        /**
         * Retrieve the status of the last raw configuration update
         * operation.
         *
         * @param status     Result: Raw configuration update status
         * @param timeStamp  Result: Time of last update operation (UNIX timestamp, UTC)
         */
        void getStatus(out Status status, out time timeStamp);

        /** Event: Raw configuration downloaded */
        valueobject RawConfigDownloadedEvent extends event.UserEvent {};
        /** Event: Raw configuration updated */
        valueobject RawConfigUpdatedEvent extends event.UserEvent {};
    };

}
