| OLD | NEW |
| 1 /** | 1 /** |
| 2 * \file process.h | 2 * \file process.h |
| 3 */ | 3 */ |
| 4 | 4 |
| 5 #ifndef PROCESS_H | 5 #ifndef PROCESS_H |
| 6 #define PROCESS_H | 6 #define PROCESS_H |
| 7 | 7 |
| 8 #include "installer-lib.h" | 8 #include "installer-lib.h" |
| 9 #include "handle.h" | 9 #include "handle.h" |
| 10 #include "session.h" | 10 #include "session.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 { | 137 { |
| 138 PROCESSENTRY32W operator()(const PROCESSENTRY32W& process) | 138 PROCESSENTRY32W operator()(const PROCESSENTRY32W& process) |
| 139 { | 139 { |
| 140 return process ; | 140 return process ; |
| 141 } | 141 } |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 /** | 144 /** |
| 145 * Extractor that copies only the PID. | 145 * Extractor that copies only the PID. |
| 146 */ | 146 */ |
| 147 struct CopyPID | 147 struct CopyPid |
| 148 : public std::unary_function<PROCESSENTRY32W, DWORD> | 148 : public std::unary_function<PROCESSENTRY32W, DWORD> |
| 149 { | 149 { |
| 150 inline DWORD operator()(const PROCESSENTRY32W& process) | 150 inline DWORD operator()(const PROCESSENTRY32W& process) |
| 151 { | 151 { |
| 152 return process.th32ProcessID ; | 152 return process.th32ProcessID ; |
| 153 } | 153 } |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 /** | 156 /** |
| 157 * Retrieve the process ID that created a window. | 157 * Retrieve the process ID that created a window. |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 * The argument of the filter constructor is a set by reference. | 613 * The argument of the filter constructor is a set by reference. |
| 614 * Since it does not make a copy for itself, we define it as a class member to
provide its allocation. | 614 * Since it does not make a copy for itself, we define it as a class member to
provide its allocation. |
| 615 */ | 615 */ |
| 616 FileNameSet processNames; | 616 FileNameSet processNames; |
| 617 | 617 |
| 618 ProcessByAnyExeNotImmersive filter; | 618 ProcessByAnyExeNotImmersive filter; |
| 619 | 619 |
| 620 /** | 620 /** |
| 621 * Copy function object copies just the process ID. | 621 * Copy function object copies just the process ID. |
| 622 */ | 622 */ |
| 623 CopyPID copy; | 623 CopyPid copy; |
| 624 | 624 |
| 625 /** | 625 /** |
| 626 * Snapshot of running processes. | 626 * Snapshot of running processes. |
| 627 */ | 627 */ |
| 628 ProcessSnapshot& snapshot; | 628 ProcessSnapshot& snapshot; |
| 629 | 629 |
| 630 void update() | 630 void update() |
| 631 { | 631 { |
| 632 InitializeProcessSet(pidSet, snapshot, filter, copy); | 632 InitializeProcessSet(pidSet, snapshot, filter, copy); |
| 633 }; | 633 }; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 } | 700 } |
| 701 | 701 |
| 702 /* | 702 /* |
| 703 * Shut down every process in the pidSet. | 703 * Shut down every process in the pidSet. |
| 704 */ | 704 */ |
| 705 bool ShutDown(ImmediateSession& session); | 705 bool ShutDown(ImmediateSession& session); |
| 706 | 706 |
| 707 }; | 707 }; |
| 708 | 708 |
| 709 #endif | 709 #endif |
| OLD | NEW |