Audacity 3.2.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
audacity::network_manager::Header Struct Referencefinal

#include <HeadersList.h>

Collaboration diagram for audacity::network_manager::Header:
[legend]

Public Member Functions

bool hasSameName (const Header &header) const
 
bool hasSameName (const std::string &name) const
 

Static Public Member Functions

static Header Parse (const std::string &header)
 

Public Attributes

std::string Name
 
std::string Value
 

Detailed Description

Definition at line 53 of file HeadersList.h.

Member Function Documentation

◆ hasSameName() [1/2]

bool Header::hasSameName ( const Header header) const

Definition at line 66 of file HeadersList.cpp.

67{
68 return hasSameName (header.Name);
69}
bool hasSameName(const Header &header) const
Definition: HeadersList.cpp:66

References hasSameName(), and Name.

Referenced by audacity::network_manager::CurlHandleManager::Handle::appendHeader(), hasSameName(), and audacity::network_manager::CurlResponse::HeaderCallback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasSameName() [2/2]

bool Header::hasSameName ( const std::string &  name) const

Definition at line 71 of file HeadersList.cpp.

72{
73 return std::equal (
74 name.begin (), name.end (),
75 Name.begin (), Name.end (),
76 [](const char leftChar, const char rightChar) {
77 return std::tolower (leftChar) == std::tolower (rightChar);
78 });
79}
wxString name
Definition: TagsEditor.cpp:166

References Name, and name.

◆ Parse()

Header Header::Parse ( const std::string &  header)
static

Definition at line 81 of file HeadersList.cpp.

82{
83 const size_t colonPosition = header.find (": ");
84
85 if (colonPosition == std::string::npos) // This can happen when we receive the first line of the response
86 return { header, std::string () };
87
88 return {
89 header.substr (0, colonPosition),
90 header.substr (colonPosition + 2)
91 };
92}
constexpr size_t npos(-1)

References Tuple::detail::npos().

Referenced by audacity::network_manager::CurlResponse::HeaderCallback().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ Name

std::string audacity::network_manager::Header::Name

◆ Value

std::string audacity::network_manager::Header::Value

The documentation for this struct was generated from the following files: