#pragma once

#include <memory>

namespace tt::service {

enum class State {
    Starting,
    Started,
    Stopping,
    Stopped
};

// Forward declaration
class ServiceContext;

class Service {

public:

    Service() = default;
    virtual ~Service() = default;

    virtual bool onStart(ServiceContext& serviceContext) { return true; }
    virtual void onStop(ServiceContext& serviceContext) {}
};

template<typename T>
std::shared_ptr<Service> create() { return std::shared_ptr<T>(new T); }

}