CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
http_content_headers.h
1
2#pragma once
3
4#include <cstdint>
5#include <system/array.h>
6#include <system/collections/dictionary.h>
7#include <system/collections/hashset.h>
8#include <system/nullable.h>
9#include <system/object.h>
10#include <system/shared_ptr.h>
11#include <system/string.h>
12#include <system/uri.h>
13
14#include <net/http/headers/content_disposition_header_value.h>
15#include <net/http/headers/content_range_header_value.h>
16//#include <net/http/headers/http_header_parser.h>
17#include <net/http/headers/http_header_value_collection.h>
18#include <net/http/headers/http_headers.h>
19#include <net/http/headers/media_type_header_value.h>
20
21namespace System { namespace Net { namespace Http { namespace Headers {
22
27class ASPOSECPP_SHARED_CLASS HttpContentHeaders final : public System::Net::Http::Headers::HttpHeaders
28{
33
35 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
37 ASPOSECPP_SHARED_RTTI_INFO_DECL();
38
39public:
57 ASPOSECPP_SHARED_API Nullable<int64_t> get_ContentLength();
60 ASPOSECPP_SHARED_API void set_ContentLength(Nullable<int64_t> value);
66 ASPOSECPP_SHARED_API void set_ContentLocation(System::SharedPtr<Uri> value);
72 ASPOSECPP_SHARED_API void set_ContentMD5(System::ArrayPtr<uint8_t> value);
87 ASPOSECPP_SHARED_API Nullable<DateTimeOffset> get_Expires();
90 ASPOSECPP_SHARED_API void set_Expires(Nullable<DateTimeOffset> value);
96 ASPOSECPP_SHARED_API void set_LastModified(Nullable<DateTimeOffset> value);
97
100 ASPOSECPP_SHARED_API HttpContentHeaders(HeaderFunc<Nullable<int64_t>> calculateLengthFunc);
101
104 ASPOSECPP_SHARED_API static void AddKnownHeaders(System::SharedPtr<Collections::Generic::HashSet<String>> headerSet);
105
106private:
109 s_parserStore;
113 HeaderFunc<Nullable<int64_t>> _calculateLengthFunc;
115 bool _contentLengthSet;
122
125 CreateParserStore();
128 GetParserStore();
130 static System::SharedPtr<Collections::Generic::HashSet<String>> CreateInvalidHeaders();
133
135 void InitStatic();
136};
137
138}}}} // namespace System::Net::Http::Headers
Forward declaration of HashSet class.
Definition: hashset.h:82
Represents the collection of the 'Content' headers. Objects of this class should only be allocated us...
Definition: http_content_headers.h:28
System::SharedPtr< Uri > get_ContentLocation()
Gets a value of the 'Content-Location' header.
System::ArrayPtr< uint8_t > get_ContentMD5()
Gets a value of the 'Content-MD5' header.
void set_ContentLength(Nullable< int64_t > value)
Sets a value of the 'Content-Length' header.
System::SharedPtr< Collections::Generic::ICollection< String > > get_Allow()
Gets a value of the 'Allow' header.
void set_ContentMD5(System::ArrayPtr< uint8_t > value)
Sets a value of the 'Content-MD5' header.
void set_ContentDisposition(System::SharedPtr< ContentDispositionHeaderValue > value)
Sets a value of the 'Content-Disposition' header.
HttpContentHeaders(HeaderFunc< Nullable< int64_t > > calculateLengthFunc)
Constructs a new instance.
System::SharedPtr< ContentRangeHeaderValue > get_ContentRange()
Gets a value of the 'Content-Range' header.
System::SharedPtr< Collections::Generic::ICollection< String > > get_ContentLanguage()
Gets a value of the 'Content-Language' header.
Nullable< DateTimeOffset > get_Expires()
Gets a value of the 'Expires' header.
System::SharedPtr< MediaTypeHeaderValue > get_ContentType()
Gets a value of the 'Content-Type' header.
static void AddKnownHeaders(System::SharedPtr< Collections::Generic::HashSet< String > > headerSet)
Adds the known headers to the specified collection.
Nullable< DateTimeOffset > get_LastModified()
Gets a value of the 'Last-Modified' header.
Nullable< int64_t > get_ContentLength()
Gets a value of the 'Content-Length' header.
void set_Expires(Nullable< DateTimeOffset > value)
Sets a value of the 'Expires' header.
void set_LastModified(Nullable< DateTimeOffset > value)
Sets a value of the 'Last-Modified' header.
System::SharedPtr< ContentDispositionHeaderValue > get_ContentDisposition()
Gets a value of the 'Content-Disposition' header.
void set_ContentRange(System::SharedPtr< ContentRangeHeaderValue > value)
Sets a value of the 'Content-Range' header.
System::SharedPtr< Collections::Generic::ICollection< String > > get_ContentEncoding()
Gets a value of the 'Content-Encoding' header.
void set_ContentType(System::SharedPtr< MediaTypeHeaderValue > value)
Sets a value of the 'Content-Type' header.
void set_ContentLocation(System::SharedPtr< Uri > value)
Sets a value of the 'Content-Location' header.
The collection of the HTTP headers. Objects of this class should only be allocated using System::Make...
Definition: http_headers.h:35
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
System::MulticastDelegate< TResult()> HeaderFunc
Definition: http_headers.h:24
Definition: db_command.h:9