Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::net::http::CookieMap Class Reference

Cookie mapping collection class. More...

#include <CookieMap.h>

Public Types

using Ptr = std::shared_ptr<CookieMap>
 
using Map = std::map<std::string, Cookie::Ptr>
 

Public Member Functions

void add (const Cookie::Ptr &cookie) noexcept
 
Cookie::Ptr find (const std::string &name) noexcept
 
void expired (uint64_t now)
 
void updateExpiresFrom (uint64_t offset)
 
size_t size () const
 
bool empty () const
 
void clear ()
 
Map::iterator begin () noexcept
 
Map::iterator end () noexcept
 

Private Attributes

Map map
 

Detailed Description

Cookie mapping collection class.

Member Typedef Documentation

◆ Map

using sese::net::http::CookieMap::Map = std::map<std::string, Cookie::Ptr>

◆ Ptr

using sese::net::http::CookieMap::Ptr = std::shared_ptr<CookieMap>

Member Function Documentation

◆ add()

void CookieMap::add ( const Cookie::Ptr & cookie)
noexcept

◆ begin()

Map::iterator sese::net::http::CookieMap::begin ( )
inlinenoexcept

References map.

◆ clear()

void sese::net::http::CookieMap::clear ( )
inline

References map.

◆ empty()

bool sese::net::http::CookieMap::empty ( ) const
inlinenodiscard

References map.

◆ end()

Map::iterator sese::net::http::CookieMap::end ( )
inlinenoexcept

References map.

◆ expired()

void CookieMap::expired ( uint64_t now)

Check and remove expired cookies

Parameters
nowTime in seconds

References map.

◆ find()

Cookie::Ptr CookieMap::find ( const std::string & name)
noexcept

Retrieve an existing Cookie

Parameters
nameCookie name
Return values
nullptrIf the specified Cookie does not exist

Referenced by sese::net::http::Header::getCookie().

◆ size()

size_t sese::net::http::CookieMap::size ( ) const
inlinenodiscard

References map.

◆ updateExpiresFrom()

void CookieMap::updateExpiresFrom ( uint64_t offset)

Convert max-age field in the collection to expires

Parameters
offsetTime in seconds

References map.

Member Data Documentation

◆ map

Map sese::net::http::CookieMap::map
private

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