HostDnsService.h revision c0b3f8f271f3bc2358c46ed5a99af29a28bd1b66
/* $Id$ */
/** @file
* Host DNS listener.
*/
/*
* Copyright (C) 2005-2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef ___H_DNSHOSTSERVICE
#define ___H_DNSHOSTSERVICE
#include "VirtualBoxBase.h"
#include <iprt/critsect.h>
#include <list>
#include <vector>
typedef const HostDnsMonitorProxy *PCHostDnsMonitorProxy;
{
Lockee();
const RTCRITSECT* lock() const;
};
{
~ALock();
};
{
};
/**
* This class supposed to be a real DNS monitor object it should be singleton,
* it lifecycle starts and ends together with VBoxSVC.
*/
{
static const HostDnsMonitor *getHostDnsMonitor();
static void shutdown();
void addMonitorProxy(PCHostDnsMonitorProxy) const;
void releaseMonitorProxy(PCHostDnsMonitorProxy) const;
const HostDnsInformation &getInfo() const;
void notifyAll() const;
void setInfo(const HostDnsInformation &);
HostDnsMonitor(const HostDnsMonitor &);
struct Data;
Data *m;
};
/**
* This class supposed to be a proxy for events on changing Host Name Resolving configurations.
*/
{
void notify() const;
bool operator==(PCHostDnsMonitorProxy&);
void updateInfo();
struct Data;
Data *m;
};
# ifdef RT_OS_DARWIN
{
};
# endif
# ifdef RT_OS_WINDOWS
{
};
# endif
{
HostDnsServiceResolvConf() : m(NULL) {}
struct Data;
Data *m;
};
# if defined(RT_OS_SOLARIS)
/**
*/
{
};
# elif defined(RT_OS_LINUX)
{
};
{
~HostDnsServiceOs2(){}
/* XXX: \\MPTN\\ETC should be taken from environment variable ETC */
};
# endif
# endif
#endif /* !___H_DNSHOSTSERVICE */