#ifndef COMPONENT_H
#define COMPONENT_H

#include <config.h>
#include <memory>
#include <functional>

namespace smo {

class Mind;
class ComponentThread;

class Component
{
public:
	Component(const std::shared_ptr<ComponentThread> &thread);
	~Component() = default;

public:
	std::shared_ptr<ComponentThread> thread;

public:
};

class MindComponent
:	public Component
{
public:
	MindComponent(Mind &parent, const std::shared_ptr<ComponentThread> &thread);
	~MindComponent() = default;

public:
	Mind &parent;
};

namespace mrntt {

class MarionetteComponent
:	public Component
{
public:
	MarionetteComponent(const std::shared_ptr<ComponentThread> &thread);
	~MarionetteComponent() = default;

public:
	typedef std::function<void(bool)> mrnttLifetimeMgmtOpCbFn;
	void initializeReq(mrnttLifetimeMgmtOpCbFn callback);
	void finalizeReq(mrnttLifetimeMgmtOpCbFn callback);

private:
	class MrnttLifetimeMgmtOp;
};

} // namespace mrntt

} // namespace smo

#endif // COMPONENT_H
