| 1 | // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/src/helper/pmon/procpidsolver.h`/ |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "ipidsolver.h"cxx . . $ `<file>/src/helper/pmon/ipidsolver.h`/ |
| 7 | #include <filesystem> |
| 8 | #include <set> |
| 9 | #include <string> |
| 10 | #include <vector> |
| 11 | |
| 12 | class ProcPIDSolvercxx . . $ ProcPIDSolver# final : public IPIDSolvercxx . . $ IPIDSolver# |
| 13 | { |
| 14 | public: |
| 15 | stdcxx . . $ std/::stringcxx . . $ std/string# appcxx . . $ ProcPIDSolver#app(7eb93f795f0defb3).(int PID) override; |
| 16 | |
| 17 | private: |
| 18 | /// Gets the canonical path of the file procPIDPath/exe |
| 19 | /// @param procPIDPath the process /proc/PID path |
| 20 | /// @return canonical path of the file or empty string if procPIDPath/exe |
| 21 | /// is not a valid path |
| 22 | stdcxx . . $ std/::stringcxx . . $ std/string# procExeFileNamecxx . . $ ProcPIDSolver#procExeFileName(e8724f73bdeef9de).(stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# const &procPIDPath) const; |
| 23 | |
| 24 | /// Returns the last component of a windows or unix path |
| 25 | stdcxx . . $ std/::stringcxx . . $ std/string# lastComponentcxx . . $ ProcPIDSolver#lastComponent(ed3976f106e8bf8e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &path) const; |
| 26 | |
| 27 | /// Gets the executable name (.exe) from a wine launch command line |
| 28 | /// @param cmdline /proc/PID/cmline file entries |
| 29 | /// @return executable name or empty string when the command line is not a valid wine |
| 30 | /// executable launch command line |
| 31 | stdcxx . . $ std/::stringcxx . . $ std/string# wineAppNamecxx . . $ ProcPIDSolver#wineAppName(c704ec1904b9b1cc).(stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> const &cmdline) const; |
| 32 | |
| 33 | stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# const procPath_cxx . . $ ProcPIDSolver#procPath_.{cxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d)."/proc"}; |
| 34 | stdcxx . . $ std/::setcxx . . $ std/set#<stdcxx . . $ std/::stringcxx . . $ std/string#> const wineExecutables_cxx . . $ ProcPIDSolver#wineExecutables_.{cxx . . $ std/set#set(6a59bae0ff1db065). |
| 35 | "wine-preloader", "wine64-preloader", "wine", |
| 36 | "wine64", "wineloader", "wineloader64"}; |
| 37 | }; |