ProgressProxyImpl.h revision 16ad47ef7a806f45a9b210cea20014b946c4ca2a
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync * IProgress implementation for Machine::openRemoteSession in VBoxSVC.
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync * Copyright (C) 2006-2010 Oracle Corporation
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync * available from http://www.virtualbox.org. This file is free software;
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync * you can redistribute it and/or modify it under the terms of the GNU
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync * General Public License (GPL) as published by the Free Software
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync * The ProgressProxy class allows proxying the important Progress calls and
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync * attributes to a different IProgress object for a period of time.
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync public com::SupportErrorInfoDerived<Progress, ProgressProxy, IProgress>,
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync VIRTUALBOXSUPPORTTRANSLATION_OVERRIDE(ProgressProxy)
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync // IProgress properties
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync STDMETHOD(COMGETTER(ResultCode))(LONG *aResultCode);
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync STDMETHOD(COMGETTER(ErrorInfo))(IVirtualBoxErrorInfo **aErrorInfo);
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync STDMETHOD(COMGETTER(OperationPercent))(ULONG *aOperationPercent);
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync // IProgress methods
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync STDMETHOD(WaitForOperationCompletion)(ULONG aOperation, LONG aTimeout);
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync STDMETHOD(SetCurrentOperationProgress)(ULONG aPercent);
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync STDMETHOD(SetNextOperation)(IN_BSTR bstrNextOperationDescription, ULONG ulNextOperationsWeight);
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync // public methods only for internal purposes
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync const char *aText, ...);
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync bool setOtherProgressObject(IProgress *pOtherProgress, ULONG uOperationWeight);
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync bool clearOtherProgressObject(const char *pszLastOperationDescription, ULONG uLastOperationWeight);
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync /** For com::SupportErrorInfoImpl. */
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync static const char *ComponentName() { return "ProgressProxy"; }
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync void clearOtherProgressObjectInternal(bool fEarly);
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync void copyProgressInfo(IProgress *pOtherProgress, bool fEarly);
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync /** The other progress object. This can be NULL. */
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync /** The number of other progress objects expected. */
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync /** The current other progress object. */
16ad47ef7a806f45a9b210cea20014b946c4ca2avboxsync#endif /* !____H_PROGRESSPROXYIMPL */