/*  *********************************************************************
 *  ASTRIS - Remote JTAG probe
 *
 *  Astris.framework - C++ API
 *
 *  File: NewApiInternal.h
 *
 ***********************************************************************
 *
 *  Copyright (C) 2021- Apple Inc. All rights reserved.
 *
 *  This document is the property of Apple Inc.
 *  It is considered confidential and proprietary.
 *
 *  This document may not be reproduced or transmitted in any form,
 *  in whole or in part, without the express written permission of
 *  Apple Inc.
 ********************************************************************* */

#ifndef NewApiInternal_h
#define NewApiInternal_h

#include "astris_api.h"
#include <memory.h>

typedef struct AXHostingInfo
{
    AXconn_t **con;
    AXchip_t **dap;
} AXhosting_info_t;

#ifdef __cplusplus
extern "C" {
#endif

void ASTRIS_EXPORT AXhosting_set_configuration(AXhosting_info_t *info);
void ASTRIS_EXPORT AXhosting_get_framework_version(unsigned long *major, unsigned long *minor, unsigned long *patch, const char **suffix);

#ifdef __cplusplus
}   // extern "C"

namespace AstrisAPI {
namespace impl {

class ASTRIS_EXPORT HostingConfiguration
{
public:
    
    virtual bool isHosted() = 0;
    virtual void configureHosting(const AXhosting_info_t &info) = 0;
    virtual void clearHosting() = 0;
    virtual AXhosting_info_t& config() = 0;

protected:
    HostingConfiguration() {};
    virtual ~HostingConfiguration() {};
};

HostingConfiguration& GetHostingConfiguration(void);

}   // namespace impl
}   // namespace AstrisAPI

#endif // __cplusplus

#endif /* NewApiInternal_h */
