acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
http_apex.h
1//
2// Created by camilo on 2024-10-28 23:55 <3ThomasBorregaardSorensen!!
3//
4#pragma once
5
6
7namespace platform
8{
9
10
11 struct CLASS_DECL_ACME apex_http_layer_t
12 {
13
14 //::property_set m_setHttp;
15
16 };
17
18
19 class CLASS_DECL_ACME apex_http_layer
20 {
21 public:
22
23 virtual void http_system_destruct();
24
25
26 virtual void get(::http::message * phttpmessage);
27
28
29 virtual bool http_get(::pointer<::sockets::http_client_socket>& m_psocket, const ::url::url & url, ::property_set & set);
30 virtual bool get(::http::session & session, const ::url::url & url, string & str, ::property_set & set);
31 virtual string get(::http::session & session, const ::url::url & url, ::property_set & set);
32
33
34 //virtual void set_proxy_auth(::account::user * puser, ::sockets::http_client_socket * pfile);
35 //virtual void clean_proxy_auth(::account::user * puser);
36
37
38 virtual bool open(::pointer<::sockets::http_session>& psession, const class ::url::connect_range & connectrange, ::property_set & set, const ::scoped_string & scopedstrVersion);
39
40
41 virtual bool request(::pointer<::sockets::http_session>& spsession, const class ::url::request_range & requestrange, ::property_set & set);
42
43 //virtual ::payload get(const ::url::url & url, ::property_set & set);
44
45 virtual bool request(const ::scoped_string & scopedstrMethod, const ::url::url & url, ::property_set & set);
46
47 virtual bool download(::pointer<::sockets::http_session>& psession, const ::scoped_string & scopedstrRequest, ::payload payloadFile, ::property_set & set);
48 virtual bool download(const ::url::url & url, ::payload payloadFile, ::property_set & set);
49
50 virtual bool put(const ::url::url & url, memory_base & memory, ::property_set & set);
51 virtual bool put(const ::url::url & url, file_pointer pfile, ::property_set & set);
52 virtual bool put(const ::url::url & url, memory_base * pmemory, ::property_set & set);
53 //virtual bool put(const ::url::url & url, file_pointer pfile, ::property_set & set);
54
55
56 virtual ::url::url get_effective_url(const ::url::url & url);
57
58 virtual void defer_auto_initialize_proxy_configuration();
59 virtual void auto_config_proxy(::i32 i);
60 virtual ::i32 auto_config_proxy_count();
61 virtual void config_proxy(const ::url::url & url, ::sockets::http_tunnel * psocket);
62 virtual void config_proxy(const ::url::url & url, ::http::proxy * pproxy);
63 virtual bool try_pac_script(const ::scoped_string & scopedstrScriptUrl, const ::url::url & url, ::http::proxy * pproxy);
64
65 virtual string gmdate(posix_time t);
66
67 virtual ::http::pac * get_pac(const ::url::url & url);
68 virtual ::http::proxy * get_proxy(const ::url::url & url);
69
70 //virtual void on_auth(::property_set & set, ::apex::application * papp, string & strUrl, string & strSessId, ::pointer<::account::user>& puser);
71
72 void http_application_destruct();
73
74 ::property_set & process_set(::property_set & set, const ::url::url & url);
75
76 //DECLARE_MESSAGE_HANDLER(get);
77
78 virtual bool get(::pointer<::sockets::http_client_socket>& psocket, const ::url::url & url, ::property_set & set);
79
80 //virtual string api_get(const ::url::url & url, ::property_set & set);
81 //virtual string api_get(const ::url::url & url);
82
83 //virtual bool exists(const ::url::url & url, ::property_set & set);
84 virtual bool exists(const ::url::url & url, ::property_set & set);
85 virtual ::file::enum_type get_type(const ::url::url & url, ::property_set & set);
86 virtual ::file::enum_type get_type(const ::url::url & url, ::payload * pvarQuery, ::property_set & set);
87
88 virtual ::payload length(const ::url::url & url, ::property_set & set);
89
90 //virtual ::payload length(const ::url::url & url, ::property_set & set);
91 virtual ::payload length(const ::url::url & url, ::payload * pvarQuery, ::property_set & set);
92
93 //virtual string get(const ::url::url & url, ::property_set & set);
94 virtual void _get(const ::url::url & url, ::property_set & set);
95
96 virtual void get(string & str, const ::url::url & url , ::property_set & set);
97 virtual void get(memory_base * pmemory, const ::url::url & url, ::property_set & set);
98
99 virtual void perform(::nano::http::get * defer_get);
100
101 //virtual bool request(const ::scoped_string & scopedstrRequest, const ::url::url & url, ::property_set & set);
102
103 //virtual bool download(::pointer<::sockets::http_session>& psession, const ::url::url & url, ::payload payloadFile, ::property_set & set);
104 //virtual bool download(const ::url::url & url, ::payload payloadFile, ::property_set & set);
105
106 virtual string locale_schema_url(const ::url::url & url, const ::scoped_string & scopedstrLocale, const ::scoped_string & scopedstrSchema);
107
108 virtual string get_locale_schema(const ::url::url & url, const ::scoped_string & scopedstrLocale, const ::scoped_string & scopedstrSchema);
109
110
111 };
112
113
114} // namespace platform
115
116
117
Definition memory_base.h:92
Definition memory.h:33
Definition get.h:25
Definition payload.h:54
Definition http_apex.h:20
Definition session.h:38
Definition property_set.h:512
include "thread/AutoLock.h"
Definition _forward_declaration.h:877
Definition http_apex.h:12
Definition posix_time.h:8