Files
ropkg/libropkg/instance.h
T
2026-06-22 17:45:54 +01:00

37 lines
1.2 KiB
C

#ifndef _ROPKG_INSTANCE_H_
#define _ROPKG_INSTANCE_H_
#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"
#define ROPKG_INSTANCE_DIRPATH_CONFIG_FILES \
ROPKG_INSTANCE_DIRPATH_CONFIG "/config"
#define ROPKG_INSTANCE_DIRPATH_SOURCES ROPKG_INSTANCE_DIRPATH_CONFIG "/sources"
#define ROPKG_INSTANCE_DIRPATH_ARCHIVES ROPKG_INSTANCE_DIRPATH_CACHE "/archives"
#define ROPKG_INSTANCE_FILEPATH_STATUS \
ROPKG_INSTANCE_DIRPATH_DATABASE "/status.rodb"
#define ROPKG_INSTANCE_FILEPATH_AVAILABLE \
ROPKG_INSTANCE_DIRPATH_DATABASE "/available.rodb"
#define ROPKG_INSTANCE_FILEPATH_LOCK ROPKG_INSTANCE_DIRPATH_DATABASE "/lock"
struct ropkg_instance {
fx_directory *inst_root;
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