/*
 * SPDX-FileCopyrightText: 2025 Copyright contributors to the cppTango project
 *
 * SPDX-License-Identifier: LGPL-3.0-or-later
 */
#ifndef TANGO_CLIENT_TGREQUEST_H
#define TANGO_CLIENT_TGREQUEST_H

#include <omniORB4/CORBA.h>

namespace Tango
{
class Connection;
class CallBack;

class TgRequest
{
  public:
    enum ReqType
    {
        CMD_INOUT,
        READ_ATTR,
        WRITE_ATTR_SINGLE,
        WRITE_ATTR
    };

    TgRequest(CORBA::Request_ptr re, ReqType ty) :
        request(re),
        req_type(ty),
        cb_ptr(nullptr),
        arrived(false),
        dev(nullptr)
    {
    }

    TgRequest(CORBA::Request_ptr re, ReqType ty, CallBack *cb) :
        request(re),
        req_type(ty),
        cb_ptr(cb),
        arrived(false),
        dev(nullptr)
    {
    }

    TgRequest(Tango::Connection *con, ReqType ty, CallBack *cb) :
        request(nullptr),
        req_type(ty),
        cb_ptr(cb),
        arrived(false),
        dev(con)
    {
    }

    CORBA::Request_ptr request;
    ReqType req_type;
    CallBack *cb_ptr;
    bool arrived;
    Connection *dev;
};
} // namespace Tango
#endif // TANGO_CLIENT_TGREQUEST_H
