acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
process1.h
1//
2// Created by camilo on 03/12/2020. <3tbs!!
3//
4#pragma once
5
6
7#include "acme/prototype/collection/atom_array.h"
8#include "acme/prototype/prototype/atom.h"
9
10
11
12
13
14
15//
16//
17//CLASS_DECL_ACME::string get_command_line();
18//
19
20
21
22//CLASS_DECL_ACME bool launch_command(::platform::system * psystem, const_char_pointer const pszCommand);
23
24
25
26#if !defined(UNIVERSAL_WINDOWS)
27
28
29//CLASS_DECL_ACME string module_path_from_pid(::u32 pid);
30//CLASS_DECL_ACME ::atom_array module_path_get_pid(const ::scoped_string & scopedstrModuleName, bool bModuleNameIsPropertyFormatted = true);
31
32
33#ifndef WINDOWS
34
35//CLASS_DECL_ACME string_array_base cmdline_from_pid(::u32 pid);
36//CLASS_DECL_ACME atom_array app_get_pid(const ::scoped_string & scopedstrModuleName);
37
38
39#endif
40
41
42#endif
43
44#ifndef UNIVERSAL_WINDOWS
45//CLASS_DECL_ACME bool process_contains_module(string & strImage, ::u32 processID, const ::scoped_string & scopedstrLibrary);
46//CLASS_DECL_ACME void shared_library_process(dword_array & dwa, string_array_base & straProcesses, const ::scoped_string & scopedstrLibrary);
47#endif
48
49
50
51//CLASS_DECL_ACME bool is_shared_library_busy(::u32 processid, const string_array_base & stra);
52//CLASS_DECL_ACME bool is_shared_library_busy(const string_array_base & stra);
53
54
55
56//CLASS_DECL_ACME bool os_init_application();
57//CLASS_DECL_ACME void os_term_application();
58
59
60
61
62//CLASS_DECL_ACME ::u32 get_current_process_id();
63
64
65// it was extracted from macOS code base
66// it is prepared for a command line supplied by macOS*1?
67// (*1.macOS:
68// proc_pidinfo((pid_t) uiPid, PROC_PIDTASKALLINFO, SHOW_ZOMBIES, &info, sizeof(struct proc_taskallinfo));
69// return info.pbsd.pbi_comm;
70// )
71
72//#ifdef WINDOWS_DESKTOP
73//CLASS_DECL_ACME string ca2_command_line(hinstance hinstance);
74//#else
75//CLASS_DECL_ACME string ca2_command_line();
76//#endif
77
78
79
80
81
82
83
84
85#include "exit_status.h"
86
87
88//CLASS_DECL_ACME string app_id_to_app_name(const ::scoped_string & scopedstrId);
89
90
91#if !defined(UNIVERSAL_WINDOWS)
92
93//CLASS_DECL_ACME void call_async(const ::file::path & path, const ::scoped_string & scopedstrParam, const ::scoped_string & scopedstrDir, ::e_display edisplay, bool bPrivileged, ::u32 * puiPid = nullptr);
94
95//typedef ::i32 CALLSYNCONRETRY(::i32 iTry,uptr dwParam);
96
97//typedef CALLSYNCONRETRY * PFNCALLSYNCONRETRY;
98
99//CLASS_DECL_ACME void call_sync(const ::file::path & path, const ::scoped_string & scopedstrParam, const ::scoped_string & scopedstrDir, ::e_display edisplay, const class time & timeTimeout, ::property_set & set);
100
101#endif
102
103