acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
_.h
1#pragma once
2
3
4#include "exit_status.h"
5
6
7//CLASS_DECL_ACME string app_id_to_app_name(string strId);
8
9
10#if !defined(UNIVERSAL_WINDOWS)
11
12//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);
13
14//typedef ::i32 CALLSYNCONRETRY(::i32 iTry,uptr dwParam);
15
16//typedef CALLSYNCONRETRY * PFNCALLSYNCONRETRY;
17
18//CLASS_DECL_ACME void call_sync(const ::file::path & path, const ::scoped_string & scopedstrParam, const ::scoped_string & scopedstrDir, ::e_display edisplay, const ::duration & durationTimeout, ::property_set & set);
19
20#endif
21
22
23CLASS_DECL_ACME ::i32 get_current_processor_index();
24CLASS_DECL_ACME ::i32 get_current_process_maximum_affinity();
25CLASS_DECL_ACME ::i32 get_current_process_affinity_order();
26
27
28//CLASS_DECL_ACME string expand_env(string str);
29//CLASS_DECL_ACME string xxxget_environment_variable(const ::scoped_string & scopedstrEnvironmentVariable);
30//CLASS_DECL_ACME string ca2_command_line();
31
32
33CLASS_DECL_ACME string consume_command_line_parameter(const ::scoped_string & scopedstrCommandLine, const_char_pointer * pszEndPtr);
34CLASS_DECL_ACME bool is_command_line_parameter_true(string& strValue, const ::scoped_string & scopedstrCommandLine, const ::scoped_string & scopedstrParam, bool bDefault = false);
35CLASS_DECL_ACME bool get_command_line_parameter(string & strValue, const ::scoped_string & scopedstrCommandLine, const ::scoped_string & scopedstrParam);
36CLASS_DECL_ACME bool get_command_line_parameter(string & strValue, const ::scoped_string & scopedstrCommandLine, const ::scoped_string & scopedstrParam, const ::scoped_string & scopedstrDefault);
37CLASS_DECL_ACME string get_command_line_parameter(const ::scoped_string & scopedstrCommandLine,const ::scoped_string & scopedstrParam);
38
39
40//CLASS_DECL_ACME bool launch_command(::platform::system * psystem, const_char_pointer const pszCommand);
41
42
43CLASS_DECL_ACME string process_configuration_name();
44
45CLASS_DECL_ACME string time_binary_platform(string strPlatform);
46CLASS_DECL_ACME string process_platform_name();
47CLASS_DECL_ACME string process_platform_name();
48CLASS_DECL_ACME string process_version_dir_name();
49
50//CLASS_DECL_ACME i32_bool is_process_running(::u32 pid);
51
52//CLASS_DECL_ACME ::file::path core_app_path(string strApp);
53
54#if !defined(UNIVERSAL_WINDOWS)
55
56
57//CLASS_DECL_ACME string module_path_from_pid(::u32 pid);
58//CLASS_DECL_ACME ::atom_array module_path_get_pid(const ::scoped_string & scopedstrModuleName, bool bModuleNameIsPropertyFormatted = true);
59
60
61#ifndef WINDOWS
62
63//CLASS_DECL_ACME string_array_base cmdline_from_pid(::u32 pid);
64//CLASS_DECL_ACME atom_array app_get_pid(const ::scoped_string & scopedstrModuleName);
65
66
67#endif
68
69
70#endif
71
72#ifndef UNIVERSAL_WINDOWS
73//CLASS_DECL_ACME bool process_contains_module(string & strImage, ::u32 processID, const ::scoped_string & scopedstrLibrary);
74//CLASS_DECL_ACME void shared_library_process(dword_array & dwa, string_array_base & straProcesses, const ::scoped_string & scopedstrLibrary);
75#endif
76
77
78
79//CLASS_DECL_ACME bool is_shared_library_busy(::u32 processid, const string_array_base & stra);
80//CLASS_DECL_ACME bool is_shared_library_busy(const string_array_base & stra);
81
82
83
84//CLASS_DECL_ACME bool os_init_application();
85//CLASS_DECL_ACME void os_term_application();
86
87
88
89CLASS_DECL_ACME string executable_title_from_appid(string str);
90
91
92CLASS_DECL_ACME ::u32 get_current_process_id();
93
94
95
96CLASS_DECL_ACME void prepare_argc_argv(::i32 & argc, char_pointer * argv, char_pointer cmd_line);
97
98
99CLASS_DECL_ACME string transform_to_c_arg(const ::scoped_string & scopedstr);
100CLASS_DECL_ACME string_array_base get_c_args_from_string(const ::scoped_string & scopedstr);
101CLASS_DECL_ACME string_array_base no_escape_get_c_args_from_string(const ::scoped_string & scopedstr);
102CLASS_DECL_ACME string_array_base get_c_args_from_c(const ::scoped_string & scopedstr);
103CLASS_DECL_ACME string_array_base get_c_args_for_c(const ::scoped_string & scopedstr);
104CLASS_DECL_ACME string_array_base get_c_args(::i32 argc, char_pointer * argv);
105
106// it was extracted from macOS code base
107// it is prepared for a command line supplied by macOS*1?
108// (*1.macOS:
109// proc_pidinfo((pid_t) uiPid, PROC_PIDTASKALLINFO, SHOW_ZOMBIES, &info, sizeof(struct proc_taskallinfo));
110// return info.pbsd.pbi_comm;
111// )
112CLASS_DECL_ACME string_array_base command_arguments_from_command_line(const ::scoped_string & scopedstrCommandLine);
113//#ifdef WINDOWS_DESKTOP
114//CLASS_DECL_ACME string ca2_command_line(hinstance hinstance);
115//#else
116//CLASS_DECL_ACME string ca2_command_line();
117//#endif
118
119
120CLASS_DECL_ACME ::i32 process_get_status();
121CLASS_DECL_ACME void process_set_status(::i32 iStatus);
122CLASS_DECL_ACME ::i32 * process_get_pargc();
123CLASS_DECL_ACME ::i32 process_get_argc();
124
125
126CLASS_DECL_ACME bool set_process_priority(::enum_priority epriority);
127
128
129//#include "pipe.h"
130//#include "bidirectional_pipe.h"
131
132
133