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

#include <merge.hpp>

Inheritance diagram for openvpn::ProfileMerge:
[legend]

Public Types

enum  Status {
  MERGE_UNDEFINED , MERGE_SUCCESS , MERGE_EXCEPTION , MERGE_OVPN_EXT_FAIL ,
  MERGE_OVPN_FILE_FAIL , MERGE_REF_FAIL , MERGE_MULTIPLE_REF_FAIL
}
 
enum  Follow { FOLLOW_NONE , FOLLOW_PARTIAL , FOLLOW_FULL }
 

Public Member Functions

 OPENVPN_EXCEPTION (merge_error)
 
Status status () const
 
const std::string & error () const
 
const std::string & basename () const
 
const std::string & profile_content () const
 
const std::vector< std::string > & ref_path_list () const
 
const char * status_string () const
 
 ProfileMerge (const std::string &profile_path, const std::string &profile_ext, const std::string &profile_dir_override, const Follow follow_references, const size_t max_line_len, const size_t max_size)
 

Static Public Member Functions

static std::string merge (const std::string &profile_path, const std::string &profile_ext, const std::string &profile_dir_override, const Follow follow_references, const size_t max_line_len, const size_t max_size)
 

Protected Member Functions

 ProfileMerge ()
 
void expand_profile (const std::string &orig_profile_content, const std::string &profile_dir, const Follow follow_references, const size_t max_line_len, const size_t max_size, size_t total_size)
 

Static Protected Member Functions

static bool is_fileref_directive (const std::string &d, unsigned int &flags)
 

Protected Attributes

Status status_
 
std::string profile_content_
 
std::string basename_
 
std::string error_
 
std::vector< std::string > ref_fail_list_
 
std::vector< std::string > ref_succeed_list_
 

Private Types

enum  { F_MAY_INCLUDE_KEY_DIRECTION = (1 << 0) , F_PKCS12 = (1 << 1) , F_HTTP_PROXY = (1 << 2) }
 
enum  { MAX_FN_LIST_SIZE = 16 }
 

Detailed Description

Definition at line 35 of file merge.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
F_MAY_INCLUDE_KEY_DIRECTION 
F_PKCS12 
F_HTTP_PROXY 

Definition at line 38 of file merge.hpp.

◆ anonymous enum

anonymous enum
private
Enumerator
MAX_FN_LIST_SIZE 

Definition at line 46 of file merge.hpp.

◆ Follow

Enumerator
FOLLOW_NONE 
FOLLOW_PARTIAL 
FOLLOW_FULL 

Definition at line 119 of file merge.hpp.

◆ Status

Enumerator
MERGE_UNDEFINED 
MERGE_SUCCESS 
MERGE_EXCEPTION 
MERGE_OVPN_EXT_FAIL 
MERGE_OVPN_FILE_FAIL 
MERGE_REF_FAIL 
MERGE_MULTIPLE_REF_FAIL 

Definition at line 55 of file merge.hpp.

Constructor & Destructor Documentation

◆ ProfileMerge() [1/2]

openvpn::ProfileMerge::ProfileMerge ( const std::string &  profile_path,
const std::string &  profile_ext,
const std::string &  profile_dir_override,
const Follow  follow_references,
const size_t  max_line_len,
const size_t  max_size 
)
inline

Definition at line 126 of file merge.hpp.

◆ ProfileMerge() [2/2]

openvpn::ProfileMerge::ProfileMerge ( )
inlineprotected

Definition at line 207 of file merge.hpp.

Member Function Documentation

◆ basename()

const std::string & openvpn::ProfileMerge::basename ( ) const
inline

Definition at line 77 of file merge.hpp.

Here is the caller graph for this function:

◆ error()

const std::string & openvpn::ProfileMerge::error ( ) const
inline

Definition at line 71 of file merge.hpp.

Here is the caller graph for this function:

◆ expand_profile()

void openvpn::ProfileMerge::expand_profile ( const std::string &  orig_profile_content,
const std::string &  profile_dir,
const Follow  follow_references,
const size_t  max_line_len,
const size_t  max_size,
size_t  total_size 
)
inlineprotected

Definition at line 212 of file merge.hpp.

Here is the caller graph for this function:

◆ is_fileref_directive()

static bool openvpn::ProfileMerge::is_fileref_directive ( const std::string &  d,
unsigned int &  flags 
)
inlinestaticprotected

Definition at line 409 of file merge.hpp.

Here is the caller graph for this function:

◆ merge()

static std::string openvpn::ProfileMerge::merge ( const std::string &  profile_path,
const std::string &  profile_ext,
const std::string &  profile_dir_override,
const Follow  follow_references,
const size_t  max_line_len,
const size_t  max_size 
)
inlinestatic

Definition at line 187 of file merge.hpp.

◆ OPENVPN_EXCEPTION()

openvpn::ProfileMerge::OPENVPN_EXCEPTION ( merge_error  )

◆ profile_content()

const std::string & openvpn::ProfileMerge::profile_content ( ) const
inline

Definition at line 83 of file merge.hpp.

Here is the caller graph for this function:

◆ ref_path_list()

const std::vector< std::string > & openvpn::ProfileMerge::ref_path_list ( ) const
inline

Definition at line 89 of file merge.hpp.

Here is the caller graph for this function:

◆ status()

Status openvpn::ProfileMerge::status ( ) const
inline

Definition at line 67 of file merge.hpp.

Here is the caller graph for this function:

◆ status_string()

const char * openvpn::ProfileMerge::status_string ( ) const
inline

Definition at line 95 of file merge.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ basename_

std::string openvpn::ProfileMerge::basename_
protected

Definition at line 472 of file merge.hpp.

◆ error_

std::string openvpn::ProfileMerge::error_
protected

Definition at line 473 of file merge.hpp.

◆ profile_content_

std::string openvpn::ProfileMerge::profile_content_
protected

Definition at line 471 of file merge.hpp.

◆ ref_fail_list_

std::vector<std::string> openvpn::ProfileMerge::ref_fail_list_
protected

Definition at line 474 of file merge.hpp.

◆ ref_succeed_list_

std::vector<std::string> openvpn::ProfileMerge::ref_succeed_list_
protected

Definition at line 475 of file merge.hpp.

◆ status_

Status openvpn::ProfileMerge::status_
protected

Definition at line 470 of file merge.hpp.


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