Files
dhfs/launcher/backend/include_public/DhfsInstance.hpp
Stepan Usatiuk b6efcede21 some stuff
but it's somehow not possible to restart jvm after destruction, so it has to be redone anyway
2025-06-25 14:31:22 +02:00

38 lines
581 B
C++

//
// Created by stepus53 on 24.6.25.
//
#ifndef DHFSINSTANCE_HPP
#define DHFSINSTANCE_HPP
#include <jni.h>
#include <string>
#include <vector>
enum class DhfsInstanceState {
RUNNING,
STOPPED,
};
class DhfsInstance {
public:
DhfsInstance();
~DhfsInstance();
DhfsInstanceState state();
void start(const std::string& mount_path, const std::vector<std::string>& extra_options);
void stop();
private:
DhfsInstanceState _state = DhfsInstanceState::STOPPED;
JavaVM* _jvm = nullptr;
JNIEnv* _env = nullptr;
};
#endif //DHFSINSTANCE_HPP