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

#ifndef TANGO_INTERNAL_SERVER_LOGCMDS_H
#define TANGO_INTERNAL_SERVER_LOGCMDS_H

#include <tango/server/Command.h>

#include <string>

namespace Tango
{

//=============================================================================
//
//            The AddLoggingTarget class
//
// description :    Class implementing the AddLoggingTarget command.
//            This command adds one (or more) logging target to one (or more)
//    device(s) running within the same Device server.
//
//=============================================================================
class AddLoggingTarget : public Command
{
  public:
    AddLoggingTarget(const char *cmd_name, Tango::CmdArgType in, Tango::CmdArgType out, const std::string &in_desc);

    ~AddLoggingTarget() override { }

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

//=============================================================================
//
//            The RemoveLoggingTarget class
//
// description :    Class implementing the RemoveLoggingTarget command.
//            This command removes one (or more) logging target to one (or more)
//    device(s) running within the same Device server.
//
//=============================================================================
class RemoveLoggingTarget : public Command
{
  public:
    RemoveLoggingTarget(const char *cmd_name, Tango::CmdArgType in, Tango::CmdArgType out, const std::string &in_desc);

    ~RemoveLoggingTarget() override { }

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

//=============================================================================
//
//            The GetLoggingTarget class
//
// description :    Class implementing the GetLoggingTarget command.
//            This command returns the logging target list of a device.
//
//=============================================================================
class GetLoggingTarget : public Command
{
  public:
    GetLoggingTarget(const char *cmd_name,
                     Tango::CmdArgType in,
                     Tango::CmdArgType out,
                     const std::string &in_desc,
                     const std::string &out_desc);

    ~GetLoggingTarget() override { }

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

//=============================================================================
//
//            The SetLoggingLevel class
//
// description :    Class implementing the SetLoggingLevel command.
//            This command set the logging level of one or more device(s).
//
//=============================================================================
class SetLoggingLevel : public Command
{
  public:
    SetLoggingLevel(const char *cmd_name, Tango::CmdArgType in, Tango::CmdArgType out, const std::string &in_desc);

    ~SetLoggingLevel() override { }

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

//=============================================================================
//
//            The GetLoggingLevel class
//
// description :    Class implementing the GetLoggingLevel command.
//            This command returns the logging level of one or more device(s).
//
//=============================================================================
class GetLoggingLevel : public Command
{
  public:
    GetLoggingLevel(const char *cmd_name,
                    Tango::CmdArgType in,
                    Tango::CmdArgType out,
                    const std::string &in_desc,
                    const std::string &out_desc);

    ~GetLoggingLevel() override { }

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

//=============================================================================
//
//            The StopLogging class
//
// description :    Class implementing the StopLogging command.
//            This command disable the logging for all the devices.
//
//=============================================================================
class StopLogging : public Command
{
  public:
    StopLogging(const char *cmd_name, Tango::CmdArgType in, Tango::CmdArgType out);

    ~StopLogging() override { }

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

//=============================================================================
//
//            The StartLogging class
//
// description :    Class implementing the StartLogging command.
//            This command enable the logging for all the devices.
//
//=============================================================================
class StartLogging : public Command
{
  public:
    StartLogging(const char *cmd_name, Tango::CmdArgType in, Tango::CmdArgType out);

    ~StartLogging() override { }

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

} // namespace Tango

#endif // TANGO_INTERNAL_SERVER_LOGCMDS_H
