#ifndef VENDOR_SAMSUNG_SECURITY_DRK_BASECMDHANDLER_H
#define VENDOR_SAMSUNG_SECURITY_DRK_BASECMDHANDLER_H
#include "Log.h"
#include "systemConfig.h"

namespace vendor   {
namespace samsung  {
namespace hardware {
namespace security {
namespace drk      {

class BaseCmdHandler
{
protected:
    virtual int32_t  encodeMessage(int32_t cmd, void *param, Bytes& out)
    {
        int32_t ret = NOT_ERROR;
        if (param == NULL) {
            return ERR_INVALID_ARGUMENT;
        }
        switch (cmd) {
            default:
                LOGMD("cmd : %d", cmd);
                break;
        }
        return ret;
    };

    virtual int32_t  decodeMessage(int32_t cmd, Bytes& in, void *param)
    {
        int32_t ret = NOT_ERROR;
        if (param == NULL) {
            return ERR_INVALID_ARGUMENT;
        }
        switch (cmd) {
            default:
                LOGMD("cmd : %d", cmd);
                break;
        }
        return ret;
    };

public:
    BaseCmdHandler()  {};
    virtual ~BaseCmdHandler() {};

    virtual int32_t  CmdHandler(int32_t cmd, uint32_t cpid, Bytes& req, Bytes& resp) = 0;
};

}  // namespace drk
}  // namespace security
}  // namespace hardware
}  // namespace samsung
}  // namespace vendor

#endif
