acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
http.h
1//
2// Created by camilo on 2024-10-24 19:05 <3ThomasBorregaardSorensen
3//
4#pragma once
5
6
7#include "http_acme.h"
8#include "http_apex.h"
9#include "acme/platform/department.h"
10
11
12namespace platform
13{
14
15
16 class CLASS_DECL_ACME http :
17 virtual public ::platform::department,
18 virtual public ::platform::acme_http_layer_t,
19 virtual public ::platform::apex_http_layer_t,
20 virtual public ::platform::acme_http_layer,
21 virtual public ::platform::apex_http_layer
22 {
23 public:
24
25
26 // ::property_set m_setHttp;
27
28 ::pointer < ::mutex > m_pmutexHttpDownload;
29 string_array_base m_straHttpDownloading;
30 string_array_base m_straHttpCheckingExistence;
31
32
33
34 http();
35 ~http() override;
36
37
38 void initialize(::particle * pparticle) override;
39
40 virtual ::particle * download_mutex();
41
42 virtual ::string_array_base * download_array();
43 virtual ::string_array_base * checking_existence_array();
44
45 bool is_downloading(const ::url::url & url);
46 bool is_checking_existence(const ::url::url & url);
47
48
49 virtual bool exists(const ::url::url& url, ::property_set & set) override;
50
51
52 virtual ::file::enum_type get_type(const ::url::url& url, ::property_set & set) override;
53
54
55 virtual ::file::enum_type get_type(const ::url::url& url, ::payload* pvarQuery, ::property_set & set) override;
56
57
58 using ::platform::apex_http_layer::get;
59 virtual ::string get(const ::url::url& url, const class ::time& timeTimeout = 5_min) override;
60
61
62 virtual ::string get(const ::url::url& url, ::property_set & set, const class ::time& timeTimeout = 5_min) override;
63
64
65 virtual ::url::url get_effective_url(const ::url::url& url, ::property_set & set) override;
66
67
68 //virtual void http_sync(::nano::http::get * defer_get);
69 //virtual void http_async(::nano::http::get * defer_get, const ::function < void(::nano::http::get *) > & callback);
70
71
72 virtual void download(const ::payload& payloadFile, const ::url::url& url, const class ::time& timeTimeout = 5_h) override;
73
74
75 virtual void download(const ::payload& payloadFile, const ::url::url& url, ::property_set & set,
76 const class ::time& timeTimeout = 5_h) override;
77
78 virtual bool put(const ::url::url & url, memory_base & memory, ::property_set & set) override;
79 virtual bool put(const ::url::url & url, file_pointer pfile, ::property_set & set) override;
80 virtual bool put(const ::url::url & url, memory_base * pmemory, ::property_set & set) override;
81 //virtual bool put(const ::url::url & url, file_pointer pfile, ::property_set & set);
82
83 //virtual ::url::url get_effective_url(const ::url::url & url);
84
85
86 };
87
88
89} // namespace platform
90
91
92
Definition memory_base.h:92
Definition memory.h:33
Definition particle.h:95
Definition http_acme.h:20
Definition http_apex.h:20
Definition department.h:13
include "thread/AutoLock.h"
Definition _forward_declaration.h:877
Definition http_acme.h:12
Definition http_apex.h:12