CernVM-FS  2.13.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
download::HeaderLists Class Reference

#include <download.h>

Public Member Functions

 ~HeaderLists ()
 
curl_slist * GetList (const char *header)
 
curl_slist * DuplicateList (curl_slist *slist)
 
void AppendHeader (curl_slist *slist, const char *header)
 
void CutHeader (const char *header, curl_slist **slist)
 
void PutList (curl_slist *slist)
 
std::string Print (curl_slist *slist)
 

Private Member Functions

 FRIEND_TEST (T_HeaderLists, Intrinsics)
 
bool IsUsed (curl_slist *slist)
 
curl_slist * Get (const char *header)
 
void Put (curl_slist *slist)
 
void AddBlock ()
 

Private Attributes

std::vector< curl_slist * > blocks_
 

Static Private Attributes

static const unsigned kBlockSize = 4096 / sizeof(curl_slist)
 

Detailed Description

Manages blocks of arrays of curl_slist storing header strings. In contrast to curl's slists, these ones don't take ownership of the header strings. Overall number of elements is limited as number of concurrent connections is limited.

Only use curl_slist objects created in the same HeaderLists instance in this class

Definition at line 76 of file download.h.

Constructor & Destructor Documentation

download::HeaderLists::~HeaderLists ( )

Definition at line 732 of file download.cc.

Member Function Documentation

void download::HeaderLists::AddBlock ( )
private

Definition at line 837 of file download.cc.

void download::HeaderLists::AppendHeader ( curl_slist *  slist,
const char *  header 
)

Definition at line 760 of file download.cc.

Here is the call graph for this function:

void download::HeaderLists::CutHeader ( const char *  header,
curl_slist **  slist 
)

Ensures that a certain header string is not part of slist on return. Note that if the first header element matches, the returned slist points to a different value.

Definition at line 776 of file download.cc.

Here is the call graph for this function:

curl_slist * download::HeaderLists::DuplicateList ( curl_slist *  slist)

Definition at line 743 of file download.cc.

Here is the call graph for this function:

download::HeaderLists::FRIEND_TEST ( T_HeaderLists  ,
Intrinsics   
)
private
curl_slist * download::HeaderLists::Get ( const char *  header)
private

Definition at line 814 of file download.cc.

curl_slist * download::HeaderLists::GetList ( const char *  header)

Definition at line 740 of file download.cc.

bool download::HeaderLists::IsUsed ( curl_slist *  slist)
inlineprivate

Definition at line 91 of file download.h.

string download::HeaderLists::Print ( curl_slist *  slist)

Definition at line 804 of file download.cc.

void download::HeaderLists::Put ( curl_slist *  slist)
private

Definition at line 831 of file download.cc.

void download::HeaderLists::PutList ( curl_slist *  slist)

Definition at line 795 of file download.cc.

Member Data Documentation

std::vector<curl_slist *> download::HeaderLists::blocks_
private

Definition at line 96 of file download.h.

const unsigned download::HeaderLists::kBlockSize = 4096 / sizeof(curl_slist)
staticprivate

Definition at line 89 of file download.h.


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