annotate dep/animia/test/main.cpp @ 75:d3e9310598b1

*: refactor some stuff text: "TextParagraph"s are now called sections, because that's the actual word for it :P text: new classes: Line and OneLineSection, solves many problems with paragraphs that are only one line long (ex. going out of bounds) http: reworked http stuff to allow threaded get requests, also moved it to its own file to (hopefully) remove clutter eventually I'll make a threaded post request method and use that in the "basic" function
author Paper <mrpapersonic@gmail.com>
date Wed, 04 Oct 2023 01:42:30 -0400
parents 4c6dd5999b39
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
56
6ff7aabeb9d7 deps: add animia for open files detection
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
1 #include "animia.h"
6ff7aabeb9d7 deps: add animia for open files detection
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
2 #include <iostream>
6ff7aabeb9d7 deps: add animia for open files detection
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
3
6ff7aabeb9d7 deps: add animia for open files detection
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
4 int main() {
62
4c6dd5999b39 *: update
Paper <mrpapersonic@gmail.com>
parents: 56
diff changeset
5 /* getting all open files */
4c6dd5999b39 *: update
Paper <mrpapersonic@gmail.com>
parents: 56
diff changeset
6 std::vector<int> pids = Animia::get_all_pids();
4c6dd5999b39 *: update
Paper <mrpapersonic@gmail.com>
parents: 56
diff changeset
7 for (int i: pids) {
4c6dd5999b39 *: update
Paper <mrpapersonic@gmail.com>
parents: 56
diff changeset
8 if (Animia::get_process_name(i) == "mpc-hc64.exe") {
4c6dd5999b39 *: update
Paper <mrpapersonic@gmail.com>
parents: 56
diff changeset
9 std::vector<std::string> files = Animia::filter_system_files(Animia::get_open_files(i));
4c6dd5999b39 *: update
Paper <mrpapersonic@gmail.com>
parents: 56
diff changeset
10 for (std::string s: files) {
4c6dd5999b39 *: update
Paper <mrpapersonic@gmail.com>
parents: 56
diff changeset
11 std::cout << Animia::get_process_name(i) << " (" << i << "): " << s << "\n";
4c6dd5999b39 *: update
Paper <mrpapersonic@gmail.com>
parents: 56
diff changeset
12 }
56
6ff7aabeb9d7 deps: add animia for open files detection
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
13 }
6ff7aabeb9d7 deps: add animia for open files detection
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
14 }
6ff7aabeb9d7 deps: add animia for open files detection
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
15 }