acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
context_apex.h
1//
2// Created by camilo on 2024-10-24 04:05 <3ThomasBorregaardSorensen!!
3//
4#pragma once
5
6
7namespace platform
8{
9
10//
11// struct CLASS_DECL_ACME apex_context_layer_t
12// {
13//
14//
15//
16// string m_strStoreServerBaseUrl;
17//
18// string_to_string_base m_mapCachedLatestBuild;
19// //::pointer<::os_context> m_poscontext;
20//
21//
22//
23// };
24
25
26 class CLASS_DECL_ACME apex_context_layer
27 {
28 public:
29
30
31// void initialize(::particle * pparticle) override;
32//
33//
34// void request(::request * prequest) override;
35//
36// void post_request(::request * prequest) override;
37//
38// bool on_idle() override;
39
40 virtual string get_store_server_base_url();
41
42 //bool contains(::request * prequest) const;
43
44 //string command_line_text() const;
45
46 //virtual void destroy() override;
47
48 //virtual ::task_pool* taskpool() override;
49
50
51// void initialize_context() override;
52//
53//
54// void initialize_context_1() override;
55//
56//
57// void finalize_context() override;
58
59
60 virtual void clear_cache();
61
62
63// bool is_system() const override;
64// bool is_session() const override;
65 virtual bool is_local_data() const;
66
67
68 //inline ::http::context& http() { return *m_phttp; }
69 //inline ::os_context * os_context() { return m_poscontext; };
70
71
72 //::directory_context * dir() override;
73 //::directory_system * directory_system() override;
74 //::file_context * file() override;
75 //::file_system * file_system() override;
76
77
78 //virtual ::handle::ini ini_from_path(::file::path& path);
79
80 //virtual ::handle::ini local_ini();
81
82
83
84 //virtual bool http_download(const ::scoped_string & scopedstrUrl, const ::scoped_string & scopedstrFile);
85 //virtual string http_get(const ::scoped_string & scopedstrUrl, ::property_set & set);
86 //virtual string http_get(const ::scoped_string & scopedstrUrl);
87
88 virtual string get_latest_build_number(const ::scoped_string & scopedstrConfiguration, const ::scoped_string & scopedstrAppId);
89
90 virtual ::file::path defer_make_file_system_url(const ::scoped_string & scopedstr);
91 virtual string defer_get_file_title(const ::scoped_string & scopedstr);
92
93
94// bool defer_process_media_library_path(::file::path& path) override;
95//
96//
97// ::file::path defer_process_path(::file::path path) override;
98// ::file::path _defer_process_path(::file::path path) override;
99// ::file::path __defer_process_path(::file::path path) override;
100
101 virtual bool _001IsProtocol(::file::path & path, const ::scoped_string & scopedstrProtocol);
102
103 //bool defer_process_known_folder_path(::file::path & path) override;
104 virtual ::file::path full_process_path(::file::path path);
105
106 //virtual bool defer_process_protocol_path(::file::path & path) override;
107
108 //sclass ::hyperlink hyperlink() { return this; }
109
110
111 // get a file and if there are exceptions, should show end user friendly messages
112 virtual file_pointer friendly_get_file(::payload payloadFile, ::file::e_open eopen);
113
114
115 //::pointer < ::file::link > os_resolve_alias(const ::file::path& path, bool bNoUI = false, bool bNoMount = false) override;
116
117 //bool _os_has_alias_in_path(const ::file::path & path, bool bNoUI = false, bool bNoMount = false) override;
118
119 //::pointer < ::file::link > _os_resolve_alias(const ::file::path& path, bool bNoUI, bool bNoMount) override;
120
121 //virtual bool os_is_alias(const ::file::path & path) override;
122
123 virtual ::file::path sys_path(const ::scoped_string & scopedstrPath);
124 virtual void sys_set(const ::scoped_string & scopedstrPath, const ::scoped_string & scopedstrValue);
125 virtual string sys_get(const ::scoped_string & scopedstrPath, const ::scoped_string & scopedstrDefault = "");
126
127
128 virtual string load_string(const ::scoped_string & scopedstr);
129
130 //bool _enumerates(::file::listing_base & listing) override;
131 //bool enumerate(::file::listing_base& listing) override;
132 //virtual bool perform_file_relative_name_listing(::file::listing_base& listing) override;
133
134
135 //virtual ::image::image_pointer get_image(const ::payload & payloadFile, bool bCache = true, bool bSync = true);
136 //virtual ::image::image_pointer matter_image(const ::scoped_string & scopedstrMatter, bool bCache = true, bool bSync = true);
137
138 //virtual ::image::image_pointer load_image(const ::payload & payloadFile, bool bCache = true, bool bSync = true, bool bCreateHelperMaps = false) override;
139 //virtual ::image::image_pointer load_matter_image(const ::scoped_string & scopedstrMatter, bool bCache = true, bool bSync = true, bool bCreateHelperMaps = false);
140 //virtual ::image::image_pointer load_matter_icon(string_array_base & straMatter, const ::scoped_string & scopedstrIcon) override;
141 //virtual ::image::image_pointer load_thumbnail(const ::payload & payloadFile, ::i32 w, ::i32 h) override;
142 //virtual ::image::image_pointer load_thumbnail(const ::scoped_string & scopedstrPath);
143 //virtual ::image::image_pointer load_dib(const ::file::path & pathDib) override;
144 //virtual ::icon_pointer load_icon(const ::payload & payloadFile);
145
146
147 //virtual void _get_image(::image::image *pimage, const ::payload & payloadFile, bool bSync = true);
148 //virtual void _matter_image(::image::image *pimage, const ::scoped_string & scopedstrMatter, bool bSync = true);
149
150
151 //virtual void _load_image(::image::image *pimage, const ::payload & payloadFile, bool bSync = true, bool bCreateHelperMaps = false);
152 //virtual void _load_matter_image(::image::image *pimage, const ::scoped_string & scopedstrMatter, bool bSync = true, bool bCreateHelperMaps = false);
153 //virtual void _load_matter_icon(::image::image *pimage, string_array_base & straMatter, const ::scoped_string & scopedstrIcon);
154 //virtual void _load_thumbnail(::image::image *pimage, const ::payload & payloadFile, ::i32 w, ::i32 h);
155 //virtual void _load_thumbnail(::image::image *pimage, const ::payload & payloadFile);
156 //virtual void _load_dib(::image::image *pimage, const ::file::path & pathDib);
157
158
159 //virtual void save_image(const ::payload & payloadFile, const ::image::image *pimage, ::save_image * psaveimage = nullptr);
160 //virtual void save_dib(const ::file::path & path, const ::image::image *pimage);
161
162
163 //virtual ::image::image_pointer _load_image_from_file(const ::payload & payloadFile, const ::payload & varOptions);
164 //virtual void _save_to_file(const ::payload & payloadFile, const ::image::image *pimage, const ::payload & varOptions);
165
166
167 /*virtual string matter_locator(const ::scoped_string & scopedstrApp);
168 virtual string matter_locator(::apex::application* papp);
169
170
171 virtual void add_matter_locator(const ::scoped_string & scopedstrApp);
172 virtual void add_matter_locator(::apex::application* papp);*/
173
174
175 virtual void _load_from_file(::particle * pparticle, const ::payload& payloadFile, const ::payload& varOptions);
176 virtual void _save_to_file(const ::payload& payloadFile, const ::payload& varOptions, const ::particle * pparticle);
177
178
179 virtual void load_from_file(::particle * pparticle, const ::payload& payloadFile, const ::payload* pvarOptions);
180 virtual void load_from_file(::particle * pparticle, const ::payload& payloadFile);
181 virtual void save_to_file(const ::payload& payloadFile, const ::payload* pvarOptions, const ::particle * pparticle);
182 virtual void save_to_file(const ::payload& payloadFile, const ::particle * pparticle);
183
184
185 virtual bool defer_process_fs_raw_folder_protocol_path(::file::path & path);
186
187 virtual bool is_fs_raw_folder_protocol_installed(const ::scoped_string & scopedstrProtocol);
188
189
190
191 //virtual void destroy() override;
192
193 //file_pointer get_file(const ::payload& payloadFile, ::file::e_open eopen, ::pointer < ::file::exception > * pfileexception = nullptr) override;
194
195
196// using acme::handler_context::http_text;
197// ::string http_text(const ::scoped_string & scopedstrUrl, ::property_set & set) override;
198//
199// using acme::handler_context::http_download;
200// void http_download(const ::payload & payloadFile, const ::scoped_string & scopedstrUrl, ::property_set & set) override;
201
202// using acme::handler_context::http_get;
203 //::pointer < ::nano::http::response > http_get(const ::scoped_string& scopedstrUrl, const ::property_set & set) override;
204
205 //virtual void perform(::nano::http::get * defer_get);
206
207
208 };
209
210
211} // namespace platform
212
213
214
215
216
217
218
Definition path.h:52
Definition particle.h:95
Definition payload.h:54
Definition context_apex.h:27
include "thread/AutoLock.h"
Definition _forward_declaration.h:877