OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::CF Namespace Reference

Classes

struct  cppstring_error
 
struct  Type
 
class  Wrap
 

Typedefs

typedef Wrap< CFTypeRef > Generic
 
typedef BufferAllocatedType< CFTypeRef > SrcList
 

Enumerations

enum  Rule { CREATE , GET }
 

Functions

 OPENVPN_CF_WRAP (Error, error_cast, CFErrorRef, CFErrorGetTypeID)
 
Generic generic_cast (CFTypeRef obj)
 
String string (const char *str)
 
String string (CFStringRef str)
 
String string (const String &str)
 
String string (const std::string &str)
 
String string (const std::string *str)
 
Number number_from_int (const int n)
 
Number number_from_int32 (const SInt32 n)
 
Number number_from_long_long (const long long n)
 
Number number_from_index (const CFIndex n)
 
Data data (const void *bytes, CFIndex length)
 
Array array (const void **values, CFIndex numValues)
 
Dict dict (const void **keys, const void **values, CFIndex numValues)
 
Dict const_dict (MutableDict &mdict)
 
Array const_array (MutableArray &marray)
 
Dict empty_dict ()
 
MutableArray mutable_array (const CFIndex capacity=0)
 
MutableDict mutable_dict (const CFIndex capacity=0)
 
template<typename DICT >
MutableDict mutable_dict_copy (const DICT &dict, const CFIndex capacity=0)
 
Error error (CFStringRef domain, CFIndex code, CFDictionaryRef userInfo)
 
template<typename ARRAY >
CFIndex array_len (const ARRAY &array)
 
template<typename DICT >
CFIndex dict_len (const DICT &dict)
 
template<typename ARRAY >
CFTypeRef array_index (const ARRAY &array, const CFIndex idx)
 
template<typename DICT , typename KEY >
CFTypeRef dict_index (const DICT &dict, const KEY &key)
 
std::string cppstring (CFStringRef str)
 
std::string cppstring (const String &str)
 
std::string description (CFTypeRef obj)
 
template<typename ARRAY >
std::string array_to_string (const ARRAY &array, const char delim=',')
 
bool string_equal (const String &s1, const String &s2, const CFStringCompareFlags compareOptions=0)
 
Data plist (CFTypeRef obj)
 
Array array (const SrcList &values)
 
Dict dict (const SrcList &keys, const SrcList &values)
 
CFTypeRef mutable_dict_new ()
 
CFTypeRef mutable_array_new ()
 
template<typename KEY >
CFTypeRef dict_get_create (CFMutableDictionaryRef base, const KEY &key, CFTypeRef(*create_method)())
 
template<typename KEY >
MutableDict dict_get_create_dict (MutableDict &base, const KEY &key)
 
template<typename KEY >
MutableArray dict_get_create_array (MutableDict &base, const KEY &key)
 
template<typename DICT , typename KEY >
CFTypeRef dict_get_obj (const DICT &dict, const KEY &key)
 
template<typename DICT , typename KEY >
std::string dict_get_str (const DICT &dict, const KEY &key)
 
template<typename DICT , typename KEY >
std::string dict_get_str (const DICT &dict, const KEY &key, const std::string &default_value)
 
template<typename DICT , typename KEY >
int dict_get_int (const DICT &dict, const KEY &key, const int default_value)
 
template<typename DICT , typename KEY >
bool dict_get_bool (const DICT &dict, const KEY &key, const bool default_value)
 
void dictionarySetValue (CFMutableDictionaryRef theDict, const void *key, const void *value)
 
void arrayAppendValue (CFMutableArrayRef theArray, const void *value)
 
template<typename KEY >
void dict_set_obj (MutableDict &dict, const KEY &key, CFTypeRef value)
 
template<typename KEY , typename VALUE >
void dict_set_str (MutableDict &dict, const KEY &key, const VALUE &value)
 
template<typename KEY >
void dict_set_int (MutableDict &dict, const KEY &key, int value)
 
template<typename KEY >
void dict_set_int32 (MutableDict &dict, const KEY &key, SInt32 value)
 
template<typename KEY >
void dict_set_long_long (MutableDict &dict, const KEY &key, long long value)
 
template<typename KEY >
void dict_set_index (MutableDict &dict, const KEY &key, CFIndex value)
 
template<typename KEY >
void dict_set_bool (MutableDict &dict, const KEY &key, bool value)
 
template<typename VALUE >
void array_append_str (MutableArray &array, const VALUE &value)
 
void array_append_int (MutableArray &array, int value)
 
void array_append_int32 (MutableArray &array, SInt32 value)
 
void array_append_long_long (MutableArray &array, long long value)
 
void array_append_index (MutableArray &array, CFIndex value)
 
 OPENVPN_CF_WRAP (RunLoopSource, runloop_source_cast, CFRunLoopSourceRef, CFRunLoopSourceGetTypeID)
 
 OPENVPN_CF_WRAP (NetworkReachability, network_reachability_cast, SCNetworkReachabilityRef, SCNetworkReachabilityGetTypeID)
 
template<typename RET , typename KEY >
RET DynamicStoreCopy (const DynamicStore &ds, const KEY &key)
 
template<typename KEY >
Dict DynamicStoreCopyDict (const DynamicStore &ds, const KEY &key)
 

Typedef Documentation

◆ Generic

typedef Wrap<CFTypeRef> openvpn::CF::Generic

Definition at line 212 of file cf.hpp.

◆ SrcList

Definition at line 25 of file cfhelper.hpp.

Enumeration Type Documentation

◆ Rule

Enumerator
CREATE 
GET 

Definition at line 49 of file cf.hpp.

Function Documentation

◆ array() [1/2]

Array openvpn::CF::array ( const SrcList values)
inline

Definition at line 27 of file cfhelper.hpp.

◆ array() [2/2]

Array openvpn::CF::array ( const void **  values,
CFIndex  numValues 
)
inline

Definition at line 271 of file cf.hpp.

Here is the caller graph for this function:

◆ array_append_index()

void openvpn::CF::array_append_index ( MutableArray &  array,
CFIndex  value 
)
inline

Definition at line 243 of file cfhelper.hpp.

◆ array_append_int()

void openvpn::CF::array_append_int ( MutableArray &  array,
int  value 
)
inline

Definition at line 225 of file cfhelper.hpp.

◆ array_append_int32()

void openvpn::CF::array_append_int32 ( MutableArray &  array,
SInt32  value 
)
inline

Definition at line 231 of file cfhelper.hpp.

◆ array_append_long_long()

void openvpn::CF::array_append_long_long ( MutableArray &  array,
long long  value 
)
inline

Definition at line 237 of file cfhelper.hpp.

◆ array_append_str()

template<typename VALUE >
void openvpn::CF::array_append_str ( MutableArray &  array,
const VALUE &  value 
)
inline

Definition at line 217 of file cfhelper.hpp.

Here is the caller graph for this function:

◆ array_index()

template<typename ARRAY >
CFTypeRef openvpn::CF::array_index ( const ARRAY &  array,
const CFIndex  idx 
)
inline

Definition at line 351 of file cf.hpp.

Here is the caller graph for this function:

◆ array_len()

template<typename ARRAY >
CFIndex openvpn::CF::array_len ( const ARRAY &  array)
inline

Definition at line 333 of file cf.hpp.

Here is the caller graph for this function:

◆ array_to_string()

template<typename ARRAY >
std::string openvpn::CF::array_to_string ( const ARRAY &  array,
const char  delim = ',' 
)
inline

Definition at line 426 of file cf.hpp.

Here is the caller graph for this function:

◆ arrayAppendValue()

void openvpn::CF::arrayAppendValue ( CFMutableArrayRef  theArray,
const void *  value 
)
inline

Definition at line 146 of file cfhelper.hpp.

Here is the caller graph for this function:

◆ const_array()

Array openvpn::CF::const_array ( MutableArray &  marray)
inline

Definition at line 291 of file cf.hpp.

Here is the caller graph for this function:

◆ const_dict()

Dict openvpn::CF::const_dict ( MutableDict &  mdict)
inline

Definition at line 286 of file cf.hpp.

◆ cppstring() [1/2]

std::string openvpn::CF::cppstring ( CFStringRef  str)
inline

Definition at line 381 of file cf.hpp.

Here is the caller graph for this function:

◆ cppstring() [2/2]

std::string openvpn::CF::cppstring ( const String &  str)
inline

Definition at line 408 of file cf.hpp.

◆ data()

Data openvpn::CF::data ( const void *  bytes,
CFIndex  length 
)
inline

Definition at line 266 of file cf.hpp.

◆ description()

std::string openvpn::CF::description ( CFTypeRef  obj)
inline

Definition at line 413 of file cf.hpp.

Here is the caller graph for this function:

◆ dict() [1/2]

Dict openvpn::CF::dict ( const SrcList keys,
const SrcList values 
)
inline

Definition at line 32 of file cfhelper.hpp.

◆ dict() [2/2]

Dict openvpn::CF::dict ( const void **  keys,
const void **  values,
CFIndex  numValues 
)
inline

Definition at line 276 of file cf.hpp.

Here is the caller graph for this function:

◆ dict_get_bool()

template<typename DICT , typename KEY >
bool openvpn::CF::dict_get_bool ( const DICT &  dict,
const KEY &  key,
const bool  default_value 
)
inline

Definition at line 125 of file cfhelper.hpp.

◆ dict_get_create()

template<typename KEY >
CFTypeRef openvpn::CF::dict_get_create ( CFMutableDictionaryRef  base,
const KEY &  key,
CFTypeRef(*)()  create_method 
)
inline

Definition at line 50 of file cfhelper.hpp.

Here is the caller graph for this function:

◆ dict_get_create_array()

template<typename KEY >
MutableArray openvpn::CF::dict_get_create_array ( MutableDict &  base,
const KEY &  key 
)
inline

Definition at line 80 of file cfhelper.hpp.

◆ dict_get_create_dict()

template<typename KEY >
MutableDict openvpn::CF::dict_get_create_dict ( MutableDict &  base,
const KEY &  key 
)
inline

Definition at line 72 of file cfhelper.hpp.

◆ dict_get_int()

template<typename DICT , typename KEY >
int openvpn::CF::dict_get_int ( const DICT &  dict,
const KEY &  key,
const int  default_value 
)
inline

Definition at line 113 of file cfhelper.hpp.

◆ dict_get_obj()

template<typename DICT , typename KEY >
CFTypeRef openvpn::CF::dict_get_obj ( const DICT &  dict,
const KEY &  key 
)
inline

Definition at line 88 of file cfhelper.hpp.

Here is the caller graph for this function:

◆ dict_get_str() [1/2]

template<typename DICT , typename KEY >
std::string openvpn::CF::dict_get_str ( const DICT &  dict,
const KEY &  key 
)
inline

Definition at line 95 of file cfhelper.hpp.

Here is the caller graph for this function:

◆ dict_get_str() [2/2]

template<typename DICT , typename KEY >
std::string openvpn::CF::dict_get_str ( const DICT &  dict,
const KEY &  key,
const std::string &  default_value 
)
inline

Definition at line 102 of file cfhelper.hpp.

◆ dict_index()

template<typename DICT , typename KEY >
CFTypeRef openvpn::CF::dict_index ( const DICT &  dict,
const KEY &  key 
)
inline

Definition at line 360 of file cf.hpp.

Here is the caller graph for this function:

◆ dict_len()

template<typename DICT >
CFIndex openvpn::CF::dict_len ( const DICT &  dict)
inline

Definition at line 342 of file cf.hpp.

Here is the caller graph for this function:

◆ dict_set_bool()

template<typename KEY >
void openvpn::CF::dict_set_bool ( MutableDict &  dict,
const KEY &  key,
bool  value 
)
inline

Definition at line 207 of file cfhelper.hpp.

◆ dict_set_index()

template<typename KEY >
void openvpn::CF::dict_set_index ( MutableDict &  dict,
const KEY &  key,
CFIndex  value 
)
inline

Definition at line 197 of file cfhelper.hpp.

◆ dict_set_int()

template<typename KEY >
void openvpn::CF::dict_set_int ( MutableDict &  dict,
const KEY &  key,
int  value 
)
inline

Definition at line 173 of file cfhelper.hpp.

Here is the caller graph for this function:

◆ dict_set_int32()

template<typename KEY >
void openvpn::CF::dict_set_int32 ( MutableDict &  dict,
const KEY &  key,
SInt32  value 
)
inline

Definition at line 181 of file cfhelper.hpp.

◆ dict_set_long_long()

template<typename KEY >
void openvpn::CF::dict_set_long_long ( MutableDict &  dict,
const KEY &  key,
long long  value 
)
inline

Definition at line 189 of file cfhelper.hpp.

◆ dict_set_obj()

template<typename KEY >
void openvpn::CF::dict_set_obj ( MutableDict &  dict,
const KEY &  key,
CFTypeRef  value 
)
inline

Definition at line 154 of file cfhelper.hpp.

Here is the caller graph for this function:

◆ dict_set_str()

template<typename KEY , typename VALUE >
void openvpn::CF::dict_set_str ( MutableDict &  dict,
const KEY &  key,
const VALUE &  value 
)
inline

Definition at line 163 of file cfhelper.hpp.

Here is the caller graph for this function:

◆ dictionarySetValue()

void openvpn::CF::dictionarySetValue ( CFMutableDictionaryRef  theDict,
const void *  key,
const void *  value 
)
inline

Definition at line 139 of file cfhelper.hpp.

Here is the caller graph for this function:

◆ DynamicStoreCopy()

template<typename RET , typename KEY >
RET openvpn::CF::DynamicStoreCopy ( const DynamicStore &  ds,
const KEY &  key 
)
inline

Definition at line 23 of file scdynstore.hpp.

◆ DynamicStoreCopyDict()

template<typename KEY >
Dict openvpn::CF::DynamicStoreCopyDict ( const DynamicStore &  ds,
const KEY &  key 
)
inline

Definition at line 30 of file scdynstore.hpp.

Here is the caller graph for this function:

◆ empty_dict()

Dict openvpn::CF::empty_dict ( )
inline

Definition at line 296 of file cf.hpp.

Here is the caller graph for this function:

◆ error()

Error openvpn::CF::error ( CFStringRef  domain,
CFIndex  code,
CFDictionaryRef  userInfo 
)
inline

Definition at line 325 of file cf.hpp.

◆ generic_cast()

Generic openvpn::CF::generic_cast ( CFTypeRef  obj)
inline

Definition at line 214 of file cf.hpp.

◆ mutable_array()

MutableArray openvpn::CF::mutable_array ( const CFIndex  capacity = 0)
inline

Definition at line 306 of file cf.hpp.

Here is the caller graph for this function:

◆ mutable_array_new()

CFTypeRef openvpn::CF::mutable_array_new ( )
inline

Definition at line 42 of file cfhelper.hpp.

Here is the caller graph for this function:

◆ mutable_dict()

MutableDict openvpn::CF::mutable_dict ( const CFIndex  capacity = 0)
inline

Definition at line 311 of file cf.hpp.

Here is the caller graph for this function:

◆ mutable_dict_copy()

template<typename DICT >
MutableDict openvpn::CF::mutable_dict_copy ( const DICT &  dict,
const CFIndex  capacity = 0 
)
inline

Definition at line 317 of file cf.hpp.

Here is the caller graph for this function:

◆ mutable_dict_new()

CFTypeRef openvpn::CF::mutable_dict_new ( )
inline

Definition at line 37 of file cfhelper.hpp.

Here is the caller graph for this function:

◆ number_from_index()

Number openvpn::CF::number_from_index ( const CFIndex  n)
inline

Definition at line 261 of file cf.hpp.

Here is the caller graph for this function:

◆ number_from_int()

Number openvpn::CF::number_from_int ( const int  n)
inline

Definition at line 246 of file cf.hpp.

Here is the caller graph for this function:

◆ number_from_int32()

Number openvpn::CF::number_from_int32 ( const SInt32  n)
inline

Definition at line 251 of file cf.hpp.

Here is the caller graph for this function:

◆ number_from_long_long()

Number openvpn::CF::number_from_long_long ( const long long  n)
inline

Definition at line 256 of file cf.hpp.

Here is the caller graph for this function:

◆ OPENVPN_CF_WRAP() [1/3]

openvpn::CF::OPENVPN_CF_WRAP ( Error  ,
error_cast  ,
CFErrorRef  ,
CFErrorGetTypeID   
)

◆ OPENVPN_CF_WRAP() [2/3]

openvpn::CF::OPENVPN_CF_WRAP ( NetworkReachability  ,
network_reachability_cast  ,
SCNetworkReachabilityRef  ,
SCNetworkReachabilityGetTypeID   
)

◆ OPENVPN_CF_WRAP() [3/3]

openvpn::CF::OPENVPN_CF_WRAP ( RunLoopSource  ,
runloop_source_cast  ,
CFRunLoopSourceRef  ,
CFRunLoopSourceGetTypeID   
)

◆ plist()

Data openvpn::CF::plist ( CFTypeRef  obj)
inline

Definition at line 454 of file cf.hpp.

◆ string() [1/5]

String openvpn::CF::string ( CFStringRef  str)
inline

Definition at line 226 of file cf.hpp.

◆ string() [2/5]

String openvpn::CF::string ( const char *  str)
inline

Definition at line 221 of file cf.hpp.

Here is the caller graph for this function:

◆ string() [3/5]

String openvpn::CF::string ( const std::string &  str)
inline

Definition at line 236 of file cf.hpp.

◆ string() [4/5]

String openvpn::CF::string ( const std::string *  str)
inline

Definition at line 241 of file cf.hpp.

◆ string() [5/5]

String openvpn::CF::string ( const String &  str)
inline

Definition at line 231 of file cf.hpp.

◆ string_equal()

bool openvpn::CF::string_equal ( const String &  s1,
const String &  s2,
const CFStringCompareFlags  compareOptions = 0 
)
inline

Definition at line 448 of file cf.hpp.