#pragma once
/***********************************************************
 Copyright (c) 2019 Qualcomm Technologies, Inc.
 All Rights Reserved.
 Confidential and Proprietary - Qualcomm Technologies, Inc.
************************************************************/

/**
 * Interface to the SMCInvoke skeleton_app functionality.
 */

/** @cond */

// AUTOGENERATED FILE: DO NOT EDIT

#include <cstdint>
#include "object.h"
#include "proxy_base.hpp"
#include "impl_base.hpp"
#include "ISMCIExample.hpp"

class ISMCIExampleImplBase : protected ImplBase, public IISMCIExample {
   public:
    ISMCIExampleImplBase() {}
    virtual ~ISMCIExampleImplBase() {}

   protected:
    virtual int32_t invoke(ObjectOp op, ObjectArg* a, ObjectCounts k) {
        switch (ObjectOp_methodID(op)) {
            case OP_add: {
                if (k != ObjectCounts_pack(1, 1, 0, 0) ||
                    a[0].b.size != 8 ||
                    a[1].b.size != 4) {
                    break;
                }
                const struct s1 {
                    uint32_t m_val1;
                    uint32_t m_val2;
                }* i = (const struct s1*)a[0].b.ptr;
                uint32_t* result_ptr = (uint32_t*)a[1].b.ptr;
                return add(i->m_val1, i->m_val2, result_ptr);
            }
            default: { return Object_ERROR_INVALID; }
        }
        return Object_ERROR_INVALID;
    }
};

