OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::LogPeriod Class Reference

#include <logperiod.hpp>

Public Types

enum  Period { UNDEF , DAILY , HOURLY , BY_MINUTE }
 

Public Member Functions

 OPENVPN_EXCEPTION (log_period_error)
 
 LogPeriod ()
 
 LogPeriod (const Period period, const time_t base)
 
 LogPeriod (const LogPeriod &other, const int index)
 
bool is_current (const time_t now) const
 
bool defined () const
 
time_t expires_in (const time_t now)
 
std::string to_string_verbose () const
 
std::string to_string () const
 

Static Public Member Functions

static Period period_from_string (const std::string &str)
 

Static Private Member Functions

static olong period_sec (const Period p)
 
static olong period_base (const Period p, const time_t time)
 

Private Attributes

olong start_
 
olong end_
 
Period period_
 

Detailed Description

Definition at line 27 of file logperiod.hpp.

Member Enumeration Documentation

◆ Period

Enumerator
UNDEF 
DAILY 
HOURLY 
BY_MINUTE 

Definition at line 32 of file logperiod.hpp.

Constructor & Destructor Documentation

◆ LogPeriod() [1/3]

openvpn::LogPeriod::LogPeriod ( )
inline

Definition at line 40 of file logperiod.hpp.

◆ LogPeriod() [2/3]

openvpn::LogPeriod::LogPeriod ( const Period  period,
const time_t  base 
)
inline

Definition at line 47 of file logperiod.hpp.

◆ LogPeriod() [3/3]

openvpn::LogPeriod::LogPeriod ( const LogPeriod other,
const int  index 
)
inline

Definition at line 55 of file logperiod.hpp.

Member Function Documentation

◆ defined()

bool openvpn::LogPeriod::defined ( ) const
inline

Definition at line 69 of file logperiod.hpp.

◆ expires_in()

time_t openvpn::LogPeriod::expires_in ( const time_t  now)
inline

Definition at line 74 of file logperiod.hpp.

◆ is_current()

bool openvpn::LogPeriod::is_current ( const time_t  now) const
inline

Definition at line 63 of file logperiod.hpp.

◆ OPENVPN_EXCEPTION()

openvpn::LogPeriod::OPENVPN_EXCEPTION ( log_period_error  )

◆ period_base()

static olong openvpn::LogPeriod::period_base ( const Period  p,
const time_t  time 
)
inlinestaticprivate

Definition at line 130 of file logperiod.hpp.

Here is the caller graph for this function:

◆ period_from_string()

static Period openvpn::LogPeriod::period_from_string ( const std::string &  str)
inlinestatic

Definition at line 102 of file logperiod.hpp.

◆ period_sec()

static olong openvpn::LogPeriod::period_sec ( const Period  p)
inlinestaticprivate

Definition at line 115 of file logperiod.hpp.

Here is the caller graph for this function:

◆ to_string()

std::string openvpn::LogPeriod::to_string ( ) const
inline

Definition at line 88 of file logperiod.hpp.

◆ to_string_verbose()

std::string openvpn::LogPeriod::to_string_verbose ( ) const
inline

Definition at line 83 of file logperiod.hpp.

Member Data Documentation

◆ end_

olong openvpn::LogPeriod::end_
private

Definition at line 160 of file logperiod.hpp.

◆ period_

Period openvpn::LogPeriod::period_
private

Definition at line 161 of file logperiod.hpp.

◆ start_

olong openvpn::LogPeriod::start_
private

Definition at line 159 of file logperiod.hpp.


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