#ifndef LCAMERA_DEV_SESSION_MODE_CONFIGURE_H
#define LCAMERA_DEV_SESSION_MODE_CONFIGURE_H

#include <cameraModeRequest.h>
#include <cameraSession.h>
#include <memory>

namespace libcamera {
class CameraConfiguration;
}

namespace lcamera_dev {

enum class ConfigureSessionModeStatus
{
	Configured,
	NoOpAlreadyConfigured,
	RejectedConflictingRequest,
};

ConfigureSessionModeStatus applyModeRequestToSessionState(
	CameraSessionResources& resources,
	const LcameraDevCameraModeRequest& request,
	const LcameraDevConfiguredCameraMode& resolvedMode,
	std::shared_ptr<libcamera::CameraConfiguration> heldConfiguration);

LcameraDevConfiguredCameraMode configureLibcameraSessionMode(
	const std::shared_ptr<libcamera::Camera>& camera,
	const LcameraDevCameraModeRequest& request,
	std::shared_ptr<libcamera::CameraConfiguration>& heldConfiguration);

} // namespace lcamera_dev

#endif // LCAMERA_DEV_SESSION_MODE_CONFIGURE_H
