VirtualBox

source: vbox/trunk/src/VBox/Main/EventImpl.cpp@ 30324

Last change on this file since 30324 was 30311, checked in by vboxsync, 15 years ago

forgotten couple

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/* $Id: EventImpl.cpp 30311 2010-06-18 13:03:20Z vboxsync $ */
2/** @file
3 * VirtualBox COM Event class implementation
4 */
5
6/*
7 * Copyright (C) 2010 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#include "EventImpl.h"
19
20struct VBoxEvent::Data
21{
22 Data()
23 :
24 mType(VBoxEventType_Invalid),
25 mWaitable(FALSE)
26 {}
27 VBoxEventType_T mType;
28 BOOL mWaitable;
29};
30
31HRESULT VBoxEvent::FinalConstruct()
32{
33 m = new Data;
34 return S_OK;
35}
36
37void VBoxEvent::FinalRelease()
38{
39 uninit();
40 delete m;
41}
42
43
44HRESULT VBoxEvent::init(IEventSource *aSource, VBoxEventType_T aType, BOOL aWaitable)
45{
46 HRESULT rc = S_OK;
47
48 m->mType = aType;
49 m->mWaitable = aWaitable;
50
51 return rc;
52}
53
54void VBoxEvent::uninit()
55{
56 m->mType = VBoxEventType_Invalid;
57}
58
59STDMETHODIMP VBoxEvent::COMGETTER(Type)(VBoxEventType_T *aType)
60{
61 // never changes till event alive, no locking?
62 *aType = m->mType;
63 return S_OK;
64}
65
66STDMETHODIMP VBoxEvent::COMGETTER(Source)(IEventSource* *aSource)
67{
68 return E_NOTIMPL;
69}
70
71STDMETHODIMP VBoxEvent::COMGETTER(Waitable)(BOOL *aWaitable)
72{
73 // never changes till event alive, no locking?
74 *aWaitable = m->mWaitable;
75 return S_OK;
76}
77
78
79STDMETHODIMP VBoxEvent::SetProcessed()
80{
81 return E_NOTIMPL;
82}
83
84STDMETHODIMP VBoxEvent::WaitProcessed(LONG aTimeout, BOOL *aResult)
85{
86 return E_NOTIMPL;
87}
88
89
90struct EventSource::Data
91{
92 Data()
93 :
94 mBogus(0)
95 {}
96 int32_t mBogus;
97};
98
99HRESULT EventSource::FinalConstruct()
100{
101 m = new Data;
102 return S_OK;
103}
104
105void EventSource::FinalRelease()
106{
107 uninit();
108 delete m;
109}
110
111
112HRESULT EventSource::init()
113{
114 HRESULT rc = S_OK;
115 return rc;
116}
117
118void EventSource::uninit()
119{
120}
121
122STDMETHODIMP EventSource::RegisterListener(IEventListener * aListener,
123 ComSafeArrayIn(VBoxEventType, aInterested),
124 BOOL aActive)
125{
126 return E_NOTIMPL;
127}
128
129STDMETHODIMP EventSource::UnregisterListener(IEventListener * aListener)
130{
131 return E_NOTIMPL;
132}
133
134STDMETHODIMP EventSource::FireEvent(IEvent * aEvent,
135 LONG aTimeout,
136 BOOL *aProcessed)
137{
138 return E_NOTIMPL;
139}
140
141
142STDMETHODIMP EventSource::GetEvent(IEventListener * aListener,
143 LONG aTimeout,
144 IEvent * *aEvent)
145{
146 return E_NOTIMPL;
147}
148
149STDMETHODIMP EventSource::EventProcessed(IEventListener * aListener,
150 IEvent * aEvent)
151{
152 return E_NOTIMPL;
153}
154
Note: See TracBrowser for help on using the repository browser.

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