~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/Main/include/ProgressImpl.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-01-30 23:27:25 UTC
  • mfrom: (0.3.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20110130232725-2ouajjd2ggdet0zd
Tags: 4.0.2-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Drop ubuntu-01-fix-build-gcc45.patch, fixed upstream.
* Drop ubuntu-02-as-needed.patch, added to the Debian package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: ProgressImpl.h $ */
 
1
/* $Id: ProgressImpl.h 33540 2010-10-28 09:27:05Z vboxsync $ */
2
2
/** @file
3
3
 *
4
4
 * VirtualBox COM class implementation
21
21
 
22
22
#include "VirtualBoxBase.h"
23
23
 
24
 
#include <VBox/com/SupportErrorInfo.h>
25
 
 
26
24
#include <iprt/semaphore.h>
27
25
 
28
26
////////////////////////////////////////////////////////////////////////////////
32
30
 */
33
31
class ATL_NO_VTABLE ProgressBase :
34
32
    public VirtualBoxBase,
35
 
    public com::SupportErrorInfoBase,
36
 
    public VirtualBoxSupportTranslation<ProgressBase>,
37
33
    VBOX_SCRIPTABLE_IMPL(IProgress)
38
34
{
39
35
protected:
40
36
 
41
 
    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (ProgressBase)
 
37
//  VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ProgressBase, IProgress)
 
38
//  cannot be added here or Windows will not buuld; as a result, ProgressBase cannot be
 
39
//  instantiated, but we're not doing that anyway (but only its children)
42
40
 
43
41
    DECLARE_EMPTY_CTOR_DTOR (ProgressBase)
44
42
 
73
71
    STDMETHOD(COMGETTER(Operation)) (ULONG *aOperation);
74
72
    STDMETHOD(COMGETTER(OperationDescription)) (BSTR *aOperationDescription);
75
73
    STDMETHOD(COMGETTER(OperationPercent)) (ULONG *aOperationPercent);
 
74
    STDMETHOD(COMGETTER(OperationWeight)) (ULONG *aOperationWeight);
76
75
    STDMETHOD(COMSETTER(Timeout)) (ULONG aTimeout);
77
76
    STDMETHOD(COMGETTER(Timeout)) (ULONG *aTimeout);
78
77
 
79
78
    // public methods only for internal purposes
80
79
 
81
 
    static HRESULT setErrorInfoOnThread (IProgress *aProgress);
82
80
    bool setCancelCallback(void (*pfnCallback)(void *), void *pvUser);
83
81
 
84
82
 
107
105
    void (*m_pfnCancelCallback)(void *);
108
106
    void *m_pvCancelUserArg;
109
107
 
110
 
    /* The fields below are to be properly initalized by subclasses */
 
108
    /* The fields below are to be properly initialized by subclasses */
111
109
 
112
110
    BOOL mCompleted;
113
111
    BOOL mCancelable;
133
131
 * Normal progress object.
134
132
 */
135
133
class ATL_NO_VTABLE Progress :
136
 
    public com::SupportErrorInfoDerived<ProgressBase, Progress, IProgress>,
137
 
    public VirtualBoxSupportTranslation<Progress>
 
134
    public ProgressBase
138
135
{
139
136
 
140
137
public:
141
 
 
142
 
    VIRTUALBOXSUPPORTTRANSLATION_OVERRIDE (Progress)
 
138
    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(Progress, IProgress)
143
139
 
144
140
    DECLARE_NOT_AGGREGATABLE (Progress)
145
141
 
259
255
    HRESULT notifyComplete(HRESULT aResultCode);
260
256
    HRESULT notifyComplete(HRESULT aResultCode,
261
257
                           const GUID &aIID,
262
 
                           const Bstr &aComponent,
 
258
                           const char *pcszComponent,
263
259
                           const char *aText,
264
260
                           ...);
265
261
    HRESULT notifyCompleteV(HRESULT aResultCode,
266
262
                            const GUID &aIID,
267
 
                            const Bstr &aComponent,
 
263
                            const char *pcszComponent,
268
264
                            const char *aText,
269
265
                            va_list va);
270
266
    bool notifyPointOfNoReturn(void);
271
267
 
272
 
    /** For com::SupportErrorInfoImpl. */
273
 
    static const char *ComponentName() { return "Progress"; }
274
 
 
275
268
private:
276
269
 
277
270
    RTSEMEVENTMULTI mCompletedSem;