/***********************************************************
 Copyright (c) 2019 Qualcomm Technologies, Inc.
 All Rights Reserved.
 Confidential and Proprietary - Qualcomm Technologies, Inc.
************************************************************/
/**
 * Interface to the SMCInvoke skeleton_app functionality.
 */
/** @cond */
#pragma once
// AUTOGENERATED FILE: DO NOT EDIT

#include <stdint.h>
#include "object.h"
#include "ISMCIExample.h"

#define ISMCIExample_DEFINE_INVOKE(func, prefix, type) \
  int32_t func(ObjectCxt h, ObjectOp op, ObjectArg *a, ObjectCounts k) \
  { \
    type me = (type) h; \
    switch (ObjectOp_methodID(op)) { \
      case Object_OP_release: { \
        if (k != ObjectCounts_pack(0, 0, 0, 0)) { \
          break; \
        } \
        return prefix##release(me); \
      } \
      case Object_OP_retain: { \
        if (k != ObjectCounts_pack(0, 0, 0, 0)) { \
          break; \
        } \
        return prefix##retain(me); \
      } \
      case ISMCIExample_OP_add: { \
        if (k != ObjectCounts_pack(1, 1, 0, 0) || \
          a[0].b.size != 8 || \
          a[1].b.size != 4) { \
          break; \
        } \
        const struct { \
          uint32_t m_val1; \
          uint32_t m_val2; \
        } *i = a[0].b.ptr; \
        uint32_t *result_ptr = (uint32_t*)a[1].b.ptr; \
        return prefix##add(me, i->m_val1, i->m_val2, result_ptr); \
      } \
    } \
    return Object_ERROR_INVALID; \
  }


