Ken Van Hoeylandt c87200a80d
Project restructuring (fixes macOS builds) (#198)
- Create `Include/` folder for all main projects
- Fix some issues here and there (found while moving things)
- All includes are now in `Tactility/` subfolder and must be included with that prefix. This fixes issues with clashing POSIX headers (e.g. `<semaphore.h>` versus Tactility's `Semaphore.h`)
2025-02-01 18:13:20 +01:00

31 lines
780 B
C++

#pragma once
#include "Tactility/service/ServiceContext.h"
#include "Tactility/service/Service.h"
namespace tt::service {
class ServiceInstance : public ServiceContext {
private:
Mutex mutex = Mutex(Mutex::Type::Normal);
std::shared_ptr<const ServiceManifest> manifest;
std::shared_ptr<Service> service;
public:
explicit ServiceInstance(std::shared_ptr<const service::ServiceManifest> manifest);
~ServiceInstance() override = default;
/** @return a reference ot the service's manifest */
const service::ServiceManifest& getManifest() const override;
/** Retrieve the paths that are relevant to this service */
std::unique_ptr<Paths> getPaths() const override;
std::shared_ptr<Service> getService() const { return service; }
};
}