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

#ifndef TANGO_INTERNAL_SERVER_BASICCOMMAND_H
#define TANGO_INTERNAL_SERVER_BASICCOMMAND_H

#include <tango/common/tango_const.h>
#include <tango/server/Command.h>

namespace Tango
{
class DeviceImpl;

//=============================================================================
//
//            The DevStatusCmd class
//
// description :    Class to implement the DevStatus command. This command
//            does not take any input argument and return the device
//            state as a string
//
//=============================================================================

class DevStatusCmd : public Command
{
  public:
    DevStatusCmd(const char *cmd_name, Tango::CmdArgType in, Tango::CmdArgType out);

    ~DevStatusCmd() override { }

    CORBA::Any *execute(DeviceImpl *device, const CORBA::Any &in_any) override;
};

//=============================================================================
//
//            The DevState class
//
// description :    Class to implement the DevState command. This command
//            does not take any input argument and return the device
//            state as an enumerated type
//
//=============================================================================

class DevStateCmd : public Command
{
  public:
    DevStateCmd(const char *cmd_name, Tango::CmdArgType in, Tango::CmdArgType out);

    ~DevStateCmd() override { }

    CORBA::Any *execute(DeviceImpl *device, const CORBA::Any &in_any) override;
};

//=============================================================================
//
//            The DevInit class
//
// description :    Class to implement the Init command. This command
//            does not take any input argument and output argument.
//            It will call the device delete_device method and its
//            init_device method.
//
//=============================================================================

class DevInitCmd : public Command
{
  public:
    DevInitCmd(const char *cmd_name, Tango::CmdArgType in, Tango::CmdArgType out);

    ~DevInitCmd() override { }

    CORBA::Any *execute(DeviceImpl *device, const CORBA::Any &in_any) override;
};

} // namespace Tango

#endif // TANGO_INTERNAL_SERVER_BASICCOMMAND_H
