/*! * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file DeviceError.h * \author (last) Behrouz NematiPour * \date (last) 03-Jun-2021 * \author (original) Behrouz NematiPour * \date (original) 03-Jun-2020 * */ #pragma once // Qt #include // Project // Define // forward declarations namespace Device { /*! * \brief The DeviceError class * \details This class contains the device script errors and its message mapping * */ class DeviceError { Q_GADGET static const char *Scripts_Error_Text[]; public: enum Scripts_Error_Enum { eDevice_OK = 0 , eDevice_Scripts_Error_Start = 1000 , // the script itself in system starts from 0 so give it enough gap eDevice_Scripts_Error_NotFound , eDevice_Scripts_Error_NotExecutable , eDevice_Scripts_Error_IsRunning , eDevice_Scripts_Error_OutOfRange , eDevice_Scripts_Error_Incorrect_Req , eDevice_Scripts_Error_Incorrect_Rsp , eDevice_Watch_Error_NotFound , eDevice_Watch_Error_NotAdded , eDevice_Error_End }; Q_ENUM(Scripts_Error_Enum) static QString deviceErrorText( DeviceError::Scripts_Error_Enum vError ); static Scripts_Error_Enum checkScript(QString &vScript, const QString &vShellScript); }; }