Files
ropkg/libropkg/instance.h
T

37 lines
1.2 KiB
C
Raw Normal View History

#ifndef _ROPKG_INSTANCE_H_
#define _ROPKG_INSTANCE_H_
2026-06-22 17:45:54 +01:00
#include <fx/io/directory.h>
#include <fx/io/file.h>
#include <ropkg/package-db.h>
#include <ropkg/system-state.h>
#define ROPKG_INSTANCE_DIRPATH_CONFIG "etc/ropkg"
#define ROPKG_INSTANCE_DIRPATH_CACHE "var/cache/ropkg"
#define ROPKG_INSTANCE_DIRPATH_DATABASE "var/lib/ropkg"
2026-06-22 17:45:54 +01:00
#define ROPKG_INSTANCE_DIRPATH_CONFIG_FILES \
ROPKG_INSTANCE_DIRPATH_CONFIG "/config"
2026-06-22 17:45:54 +01:00
#define ROPKG_INSTANCE_DIRPATH_SOURCES ROPKG_INSTANCE_DIRPATH_CONFIG "/sources"
#define ROPKG_INSTANCE_DIRPATH_ARCHIVES ROPKG_INSTANCE_DIRPATH_CACHE "/archives"
2026-06-22 17:45:54 +01:00
#define ROPKG_INSTANCE_FILEPATH_STATUS \
ROPKG_INSTANCE_DIRPATH_DATABASE "/status.rodb"
#define ROPKG_INSTANCE_FILEPATH_AVAILABLE \
2026-06-22 17:45:54 +01:00
ROPKG_INSTANCE_DIRPATH_DATABASE "/available.rodb"
#define ROPKG_INSTANCE_FILEPATH_LOCK ROPKG_INSTANCE_DIRPATH_DATABASE "/lock"
struct ropkg_instance {
2026-06-22 17:45:54 +01:00
fx_directory *inst_root;
2026-06-22 17:45:54 +01:00
fx_file *inst_lock;
fx_directory *inst_dir_config;
fx_directory *inst_dir_cache;
fx_directory *inst_dir_database;
struct ropkg_system_state *inst_status;
struct ropkg_package_db *inst_available;
};
#endif