OpenVPN 3 Core Library
Loading...
Searching...
No Matches
logsetup.hpp
Go to the documentation of this file.
1// OpenVPN -- An application to securely tunnel IP networks
2// over a single port, with support for SSL/TLS-based
3// session authentication and key exchange,
4// packet encryption, packet authentication, and
5// packet compression.
6//
7// Copyright (C) 2012- OpenVPN Inc.
8//
9// SPDX-License-Identifier: MPL-2.0 OR AGPL-3.0-only WITH openvpn3-openssl-exception
10//
11
12#pragma once
13
14#include <vector>
15
16#include <openvpn/common/rc.hpp>
17
18namespace openvpn {
19
20class LogSetup : public RC<thread_safe_refcount>
21{
22 public:
24
25 virtual void reopen() = 0;
26};
27
28class MultiLogSetup : public std::vector<LogSetup::Ptr>,
29 public LogSetup
30{
31 public:
33
34 virtual void reopen() override
35 {
36 for (const auto &e : *this)
37 e->reopen();
38 }
39};
40
41} // namespace openvpn
virtual void reopen()=0
RCPtr< LogSetup > Ptr
Definition logsetup.hpp:23
virtual void reopen() override
Definition logsetup.hpp:34
RCPtr< MultiLogSetup > Ptr
Definition logsetup.hpp:32
The smart pointer class.
Definition rc.hpp:119
Reference count base class for objects tracked by RCPtr. Disallows copying and assignment.
Definition rc.hpp:912