VirtualBox

Changeset 48805 in vbox


Ignore:
Timestamp:
Oct 2, 2013 5:16:26 AM (11 years ago)
Author:
vboxsync
Message:

Main: HostDnsServiceWin::init(void) -> HostDnsServiceWin::init(const VirtualBox *aParent) and firing event on update.

Location:
trunk/src/VBox/Main/src-server
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/HostDnsService.cpp

    r48340 r48805  
    2020#include <VBox/com/string.h>
    2121
     22#include <iprt/cpp/utils.h>
     23
     24#include "VirtualBoxImpl.h"
    2225#include "HostDnsService.h"
    2326#include <iprt/thread.h>
     
    3336
    3437
    35 HRESULT HostDnsService::init (void)
     38HRESULT HostDnsService::init(const VirtualBox *aParent)
    3639{
     40    mParent = aParent;
     41   
    3742    int rc = RTCritSectInit(&m_hCritSect);
    3843    AssertRCReturn(rc, E_FAIL);
     
    5156HRESULT HostDnsService::update()
    5257{
     58    unconst(mParent)->onHostNameResolutionConfigurationChange();
    5359    return S_OK;
    5460}
  • trunk/src/VBox/Main/src-server/HostDnsService.h

    r48346 r48805  
    1818#ifndef ___H_DNSHOSTSERVICE
    1919#define ___H_DNSHOSTSERVICE
     20#include "VirtualBoxBase.h"
    2021
    2122#include <iprt/cdefs.h>
     
    3435    HostDnsService();
    3536    virtual ~HostDnsService();
    36     virtual HRESULT init(void);
     37    virtual HRESULT init(const VirtualBox *aParent);
    3738    virtual HRESULT start(void);
    3839    virtual void stop(void);
     
    4647    Utf8StrList     m_llNameServers;
    4748    Utf8StrList     m_llSearchStrings;
    48     com::Utf8Str        m_DomainName;
     49    com::Utf8Str    m_DomainName;
    4950    RTCRITSECT      m_hCritSect;
    5051
    5152private:
     53    const VirtualBox *mParent;
    5254    HostDnsService(const HostDnsService& service){ NOREF(service); }
    5355    HostDnsService& operator =(const HostDnsService& service){ NOREF(service); return *this; }
     
    6163    virtual ~HostDnsServiceDarwin();
    6264
    63     virtual HRESULT init(void);
     65    virtual HRESULT init(const VirtualBox *aParent);
    6466    virtual HRESULT start(void);
    6567    virtual void stop(void);
     
    7880    virtual ~HostDnsServiceWin();
    7981
    80     virtual HRESULT init(void);
     82    virtual HRESULT init(const VirtualBox *aParent);
    8183    virtual HRESULT start(void);
    8284    virtual void stop(void);
     
    9496    HostDnsServiceResolvConf(const char *aResolvConfFileName = "/etc/resolv.conf");
    9597    virtual ~HostDnsServiceResolvConf();
    96     virtual HRESULT init(void);
     98    virtual HRESULT init(VirtualBox *aParent);
    9799    virtual HRESULT update();
    98100protected:
  • trunk/src/VBox/Main/src-server/HostDnsServiceResolvConf.cpp

    r48494 r48805  
    6363}
    6464
    65 HRESULT HostDnsServiceResolvConf::init()
     65HRESULT HostDnsServiceResolvConf::init(const VirtualBox *aParent)
    6666{
    6767    HRESULT hrc;
     
    7272
    7373
    74     hrc = HostDnsService::init();
     74    hrc = HostDnsService::init(aParent);
    7575    AssertComRCReturn(hrc, hrc);
    7676
  • trunk/src/VBox/Main/src-server/HostImpl.cpp

    r48765 r48805  
    306306# endif
    307307
    308     hrc = m->pHostDnsService->init();
     308    hrc = m->pHostDnsService->init(m->pParent);
    309309    AssertComRCReturn(hrc, hrc);
    310310
  • trunk/src/VBox/Main/src-server/darwin/HostDnsServiceDarwin.cpp

    r48492 r48805  
    8989}
    9090
    91 HRESULT HostDnsServiceDarwin::init()
     91HRESULT HostDnsServiceDarwin::init(const VirtualBox *aParent)
    9292{
    9393    SCDynamicStoreContext ctx;
     
    105105        return E_OUTOFMEMORY;
    106106
    107     HRESULT hrc = HostDnsService::init();
     107    HRESULT hrc = HostDnsService::init(aParent);
    108108    AssertComRCReturn(hrc, hrc);
    109109
     
    218218
    219219    CFRelease(propertyRef);
     220    this->HostDnsService::update();
     221
    220222    return S_OK;
    221223}
  • trunk/src/VBox/Main/src-server/win/HostDnsServiceWin.cpp

    r48330 r48805  
    3030
    3131
    32 HRESULT HostDnsServiceWin::init(void)
     32HRESULT HostDnsServiceWin::init(const VirtualBox *aParent)
    3333{
    3434    HRESULT hrc;
    35     hrc = HostDnsService::init();
     35    hrc = HostDnsService::init(aParent);
    3636    AssertComRCReturn(hrc, hrc);
    3737
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette