VirtualBox

Changeset 3420 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Jul 4, 2007 4:04:02 PM (18 years ago)
Author:
vboxsync
Message:

Main: Converted the VRDPServer class to the new locking scheme.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/VRDPServerImpl.h

    r2981 r3420  
    3131
    3232class ATL_NO_VTABLE VRDPServer :
     33    public VirtualBoxBaseNEXT,
    3334    public VirtualBoxSupportErrorInfoImpl <VRDPServer, IVRDPServer>,
    3435    public VirtualBoxSupportTranslation <VRDPServer>,
    35     public VirtualBoxBase,
    3636    public IVRDPServer
    3737{
     
    5959    };
    6060
     61    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (VRDPServer)
     62
    6163    DECLARE_NOT_AGGREGATABLE(VRDPServer)
    6264
     
    7072    NS_DECL_ISUPPORTS
    7173
     74    DECLARE_EMPTY_CTOR_DTOR (VRDPServer)
     75
    7276    HRESULT FinalConstruct();
    7377    void FinalRelease();
    7478
    7579    // public initializer/uninitializer for internal purposes only
    76     HRESULT init(Machine *parent);
    77     HRESULT init(Machine *parent, VRDPServer *that);
    78     HRESULT initCopy (Machine *parent, VRDPServer *that);
     80    HRESULT init(Machine *aParent);
     81    HRESULT init(Machine *aParent, VRDPServer *aThat);
     82    HRESULT initCopy (Machine *aParent, VRDPServer *aThat);
    7983    void uninit();
    8084
    8185    // IVRDPServer properties
    82     STDMETHOD(COMGETTER(Enabled))(BOOL *enabled);
    83     STDMETHOD(COMSETTER(Enabled))(BOOL enable);
    84     STDMETHOD(COMGETTER(Port))(ULONG *port);
    85     STDMETHOD(COMSETTER(Port))(ULONG port);
    86     STDMETHOD(COMGETTER(NetAddress))(BSTR *address);
    87     STDMETHOD(COMSETTER(NetAddress))(INPTR BSTR address);
    88     STDMETHOD(COMGETTER(AuthType))(VRDPAuthType_T *type);
    89     STDMETHOD(COMSETTER(AuthType))(VRDPAuthType_T type);
    90     STDMETHOD(COMGETTER(AuthTimeout))(ULONG *timeout);
    91     STDMETHOD(COMSETTER(AuthTimeout))(ULONG timeout);
    92     STDMETHOD(COMGETTER(AllowMultiConnection))(BOOL *enabled);
    93     STDMETHOD(COMSETTER(AllowMultiConnection))(BOOL enable);
     86    STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled);
     87    STDMETHOD(COMSETTER(Enabled)) (BOOL aEnable);
     88    STDMETHOD(COMGETTER(Port)) (ULONG *aPort);
     89    STDMETHOD(COMSETTER(Port)) (ULONG aPort);
     90    STDMETHOD(COMGETTER(NetAddress)) (BSTR *aAddress);
     91    STDMETHOD(COMSETTER(NetAddress)) (INPTR BSTR aAddress);
     92    STDMETHOD(COMGETTER(AuthType)) (VRDPAuthType_T *aType);
     93    STDMETHOD(COMSETTER(AuthType)) (VRDPAuthType_T aType);
     94    STDMETHOD(COMGETTER(AuthTimeout)) (ULONG *aTimeout);
     95    STDMETHOD(COMSETTER(AuthTimeout)) (ULONG aTimeout);
     96    STDMETHOD(COMGETTER(AllowMultiConnection)) (BOOL *aAllowMultiConnection);
     97    STDMETHOD(COMSETTER(AllowMultiConnection)) (BOOL aAllowMultiConnection);
    9498
    9599    // IVRDPServer methods
     
    97101    // public methods only for internal purposes
    98102
    99     void loadConfig (CFGNODE node);
    100     void saveConfig (CFGNODE node);
    101 
    102     const Backupable <Data> &data() const { return mData; }
     103    HRESULT loadSettings (CFGNODE aNode);
     104    HRESULT saveSettings (CFGNODE aNode);
    103105
    104106    bool isModified() { AutoLock alock (this); return mData.isBackedUp(); }
     
    108110    void copyFrom (VRDPServer *aThat);
    109111
     112    // public methods for internal purposes only
     113    // (ensure there is a caller and a read lock before calling them!)
     114
     115    const Backupable <Data> &data() const { return mData; }
     116
    110117    // for VirtualBoxSupportErrorInfoImpl
    111118    static const wchar_t *getComponentName() { return L"VRDPServer"; }
     
    113120private:
    114121
    115     ComObjPtr <Machine, ComWeakRef> mParent;
    116     ComObjPtr <VRDPServer> mPeer;
     122    const ComObjPtr <Machine, ComWeakRef> mParent;
     123    const ComObjPtr <VRDPServer> mPeer;
     124
    117125    Backupable <Data> mData;
    118126};
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