80 lines
2.9 KiB
C

//----------------------------------------------------------------------------
//
// Copyright (C) Intel Corporation, 2007 - 2008.
//
// File: OptionsUtils.h
//
// Contents: Utility file which allows easy access to Options elements.
//
// Notes:
//----------------------------------------------------------------------------
#ifndef OPTIONS_UTILS_H
#define OPTIONS_UTILS_H
//------------------
// Includes
//------------------
#include <ace/INET_Addr.h>
#include "DataStructures.h"
//------------------
// functions
//------------------
/*
* These functions get the element they state from the configuration file.
* In case of error NULL is returned.
*
* NOTE: These functions are not expected to return NULL since it is checked previously that all
* occurences for NULL won't occur (by Options).
* It is used as such in the MPS, but is very unsafe.
* The correct machnisem is using exceptions, and it will be done later on.
*
*/
const unsigned int * getMaximumWindowSize();
const unsigned int * getMinimumWindowSize();
const unsigned int * getThreadNumber();
const unsigned int * getMaxQueueSize();
const unsigned int * getMaxChannels();
const time_t * getMaxTunnelTimeout();
//const ACE_TString * getAMTListenIPv4();
//const ACE_TString * getAMTListenIPv6();
const unsigned short * getAMTListenPort();
const ACE_INET_Addr * getAMTListenINET();
const ACE_TString * getMCSocksListenIP();
//const ACE_TString * getMCSocksListenIPv6();
const ACE_TString * getMCSocksListenIP();
const unsigned short * getMCSocksListenPort();
//const ACE_INET_Addr * getMCSocksListenINET();
const unsigned short * getMCHttpListenPort();
const ACE_TString * getHeading();
const ACE_TString * getTraceLevel();
const ACE_TString * getLogFilePath();
const ACE_TString * getLogFileName();
const unsigned int * getLogFileSize();
const unsigned int * getLogFileMaxFiles();
//const unsigned long * getLogLevels();
const bool * getAmtNeedAuthentication();
const ACE_TString * getAmtDllName();
const ACE_TString * getAmtDllParameters();
const bool * getSocksNeedAuthentication();
const ACE_TString * getSocksDllName();
const ACE_TString * getSocksDllParameters();
const MCList * getMCSubscribersList();
const AuthServerHash * getAutherizedServersHash();
MCList * getChangableMCSubscribersList();
AuthServerHash * getChangableAutherizedServersHash();
const bool * getMCNeedAuthentication();
const ACE_TString * getMCUsername();
const ACE_TString * getMCPassword();
const bool * getAuthServersListNeeded();
STATUS fillCommonElements();
STATUS getListenINET(const ACE_TCHAR* section, const ACE_TCHAR* elementIP, const ACE_TCHAR* elementPort,
ACE_INET_Addr& address);
STATUS getAMTListenINET(ACE_INET_Addr& address);
//STATUS getAMTListenINETv4(ACE_INET_Addr& address);
//STATUS getAMTListenINETv6(ACE_INET_Addr& address);
//STATUS getSocksListenINETv4(ACE_INET_Addr& address);
//STATUS getSocksListenINETv6(ACE_INET_Addr& address);
#endif /* OPTIONS_UTILS_H */