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

/**
 * ICallbackObjectExample demonstrates how we can implement a callback interface in the CA,
 * and use it from the TA to call code in the CA.
 */

/** @cond */

// AUTOGENERATED FILE: DO NOT EDIT

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

class IICallbackObjectExample {
   public:
    virtual ~IICallbackObjectExample() {}

    virtual int32_t print(const void* msg_ptr, size_t msg_len) = 0;

   protected:
    static const ObjectOp OP_print = 0;
};

class ICallbackObjectExample : public IICallbackObjectExample, public ProxyBase {
   public:
    ICallbackObjectExample() {}
    ICallbackObjectExample(Object impl) : ProxyBase(impl) {}
    virtual ~ICallbackObjectExample() {}

    virtual int32_t print(const void* msg_ptr, size_t msg_len) {
        ObjectArg a[1]={{{0,0}}};
        a[0].bi = (ObjectBufIn) {msg_ptr, msg_len * 1};

        return invoke(OP_print, a, ObjectCounts_pack(1, 0, 0, 0));
    }

};

