view dep/animia/include/animia/fd.h @ 217:47ddd6b638e3

dep/animia: add missing wayland files derp
author Paper <mrpapersonic@gmail.com>
date Sun, 07 Jan 2024 13:27:22 -0500
parents bc1ae1810855
children
line wrap: on
line source

#ifndef __animia__animia__fd_h
#define __animia__animia__fd_h

#include <functional>
#include <set>
#include <string>

#include "animia/types.h"

namespace animia {

struct Process;

namespace internal {

struct OpenFile {
		pid_t pid = 0;
		std::string path;
};

using process_proc_t = std::function<bool(const Process&)>;

using open_file_proc_t = std::function<bool(const OpenFile&)>;

bool EnumerateOpenProcesses(process_proc_t process_proc);
bool EnumerateOpenFiles(const std::set<pid_t>& pids, open_file_proc_t open_file_proc);

} // namespace internal

} // namespace animia

#endif // __animia__animia__fd_h