/*
 * SPDX-FileCopyrightText: 2004 Copyright contributors to the cppTango project
 *
 * SPDX-License-Identifier: LGPL-3.0-or-later
 */

#include <tango/client/AsynchRequest.h>

namespace Tango
{

// AsynchRequest constructor
AsynchRequest::AsynchRequest(long _rid, const std::string &_obj_name, bool ge_enabled) :
    rq_id(_rid),
    group_element_enabled_m(ge_enabled)
{
    obj_names.push_back(_obj_name);
}

// AsynchRequest constructor
AsynchRequest::AsynchRequest(long _rid, const std::vector<std::string> &_obj_names, bool ge_enabled) :
    rq_id(_rid),
    group_element_enabled_m(ge_enabled)
{
    obj_names = _obj_names;
}

// AsynchRequest constructor
AsynchRequest::AsynchRequest(long _rid, const std::string &_obj_name, const DevFailed &_df) :
    rq_id(_rid),
    rq_ex(_df),
    group_element_enabled_m(true)
{
    obj_names.push_back(_obj_name);
}

// AsynchRequest constructor
AsynchRequest::AsynchRequest(long _rid, const std::vector<std::string> &_obj_names, const DevFailed &_df) :
    rq_id(_rid),
    rq_ex(_df),
    group_element_enabled_m(true)
{
    obj_names = _obj_names;
}

AsynchRequest::~AsynchRequest() = default;

AsynchRequest::AsynchRequest(const AsynchRequest &) = default;
AsynchRequest &AsynchRequest::operator=(const AsynchRequest &) = default;

AsynchRequest::AsynchRequest(AsynchRequest &&) = default;
AsynchRequest &AsynchRequest::operator=(AsynchRequest &&) = default;

bool AsynchRequest::group_element_enabled() const
{
    return group_element_enabled_m;
}

} // namespace Tango
