Program Listing for File status-data-model.h

Return to documentation for file (include\runtime\status-data-model.h)

/******************************************************************************
© Intel Corporation.

This software and the related documents are Intel copyrighted materials,
and your use of them is governed by the express license under which they
were provided to you ("License"). Unless the License provides otherwise,
you may not use, modify, copy, publish, distribute, disclose or transmit
this software or the related documents without Intel's prior written
permission.


 This software and the related documents are provided as is, with no express
or implied warranties, other than those that are expressly stated in the
License.

******************************************************************************/

#pragma once

#include "runtime/runtime-common.h"

#include <cstdint>

namespace gpa {
namespace runtime {

class GPA_RUNTIME_EXPORT StatusDataModel
{
public:
    typedef uint64_t ItemHandle;

    enum {
        HANDLE_INVALID = 0
    };

    enum ItemState {
        STATE_NOT_SET,
        STATE_RED,
        STATE_YELLOW,
        STATE_GREEN,
        STATE_TRANSIENT,
    };

    virtual ~StatusDataModel();

    virtual ItemHandle CreateStatusDataItem(char const* label) = 0;

    virtual void DestroyStatusDataItem(ItemHandle item) = 0;

    virtual void SetStatusDataItemLabel(ItemHandle item, char const* label) = 0;

    virtual void SetStatusDataItemState(ItemHandle item, ItemState state) = 0;

    virtual void SetStatusDataItemTimeout(ItemHandle item, uint64_t timeoutMS) = 0;

    virtual uint32_t GetStatusDataItemCount() = 0;

    virtual ItemHandle GetStatusDataItem(uint32_t index) const = 0;

    virtual char const* GetStatusDataItemLabel(ItemHandle item) const = 0;

    virtual ItemState GetStatusDataItemState(ItemHandle item) const = 0;

    virtual uint64_t GetStatusDataItemTimeout(ItemHandle item) const = 0;
};

GPA_RUNTIME_EXPORT StatusDataModel* GetStatusDataModel();

}  // namespace runtime
}  // namespace gpa