VirtualBox

Changeset 86057 in vbox for trunk/src


Ignore:
Timestamp:
Sep 7, 2020 11:15:45 PM (4 years ago)
Author:
vboxsync
Message:

OCI: Add ICloudProfileRegisteredEvent and its implementation for OCI.
The events should be autogenerated a-la VBoxEvents, but the first one
is manual to test what we need to generate.

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r86012 r86057  
    2490124901      </desc>
    2490224902    </const>
     24903    <const name="OnCloudProfileRegistered" value="106">
     24904      <desc>
     24905        See <link to="ICloudProfileRegisteredEvent"/>.
     24906      </desc>
     24907    </const>
     24908    <const name="OnCloudProfileChanged" value="107">
     24909      <desc>
     24910        See <link to="ICloudProfileChangedEvent"/>.
     24911      </desc>
     24912    </const>
    2490324913    <!-- End event marker -->
    2490424914    <!-- @todo rename to 'End' as it is exclusive (we use 'last' to be inclusive). -->
    24905     <const name="Last" value="106">
     24915    <const name="Last" value="108">
    2490624916      <desc>
    2490724917        Must be last event, used for iterations and structures relying on numerical event values.
     
    2824828258    id="OnCloudProviderRegistered" waitable="yes"
    2824928259    >
    28250     <!-- should be in ICloudProviderEvent if we ever have one -->
    2825128260    <attribute name="id" type="uuid" mod="string" readonly="yes"/>
    28252 
     28261    <attribute name="registered" type="boolean" readonly="yes"/>
     28262  </interface>
     28263
     28264  <interface name="ICloudProfileRegisteredEvent" extends="IEvent"
     28265    uuid="6a5e65ba-eeb9-11ea-ae38-73242bc0f172"
     28266    wsmap="managed"
     28267    id="OnCloudProfileRegistered" waitable="yes"
     28268    >
     28269    <attribute name="providerId" type="uuid" mod="string" readonly="yes"/>
     28270    <attribute name="name" type="wstring" readonly="yes"/>
    2825328271    <attribute name="registered" type="boolean" readonly="yes"/>
    2825428272  </interface>
  • trunk/src/VBox/Main/include/ExtPackManagerImpl.h

    r82968 r86057  
    174174    static DECLCALLBACK(uint32_t) i_hlpCompleteProgress(PCVBOXEXTPACKHLP pHlp, VBOXEXTPACK_IF_CS(IProgress) *pProgress,
    175175                                                        uint32_t uResultCode);
     176    static DECLCALLBACK(uint32_t) i_hlpCreateEvent(PCVBOXEXTPACKHLP pHlp,
     177                                                   VBOXEXTPACK_IF_CS(IEventSource) *aSource,
     178                                                   /* VBoxEventType_T */ uint32_t aType, bool aWaitable,
     179                                                   VBOXEXTPACK_IF_CS(IEvent) **ppEventOut);
    176180    static DECLCALLBACK(int)    i_hlpReservedN(PCVBOXEXTPACKHLP pHlp);
    177181    /** @}  */
  • trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp

    r85232 r86057  
    756756        /* pfnWaitOtherProgress = */ ExtPack::i_hlpWaitOtherProgress,
    757757        /* pfnCompleteProgress  = */ ExtPack::i_hlpCompleteProgress,
     758        /* pfnCreateEvent       = */ ExtPack::i_hlpCreateEvent,
    758759        /* pfnReserved1         = */ ExtPack::i_hlpReservedN,
    759760        /* pfnReserved2         = */ ExtPack::i_hlpReservedN,
     
    19201921    return pProgressControl->NotifyComplete((LONG)uResultCode, errorInfo);
    19211922}
     1923
     1924
     1925/*static*/ DECLCALLBACK(uint32_t)
     1926ExtPack::i_hlpCreateEvent(PCVBOXEXTPACKHLP pHlp,
     1927                          VBOXEXTPACK_IF_CS(IEventSource) *aSource,
     1928                          /* VBoxEventType_T */ uint32_t aType, bool aWaitable,
     1929                          VBOXEXTPACK_IF_CS(IEvent) **ppEventOut)
     1930{
     1931    HRESULT hrc;
     1932
     1933    AssertPtrReturn(pHlp, (uint32_t)E_INVALIDARG);
     1934    AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, (uint32_t)E_INVALIDARG);
     1935    AssertPtrReturn(ppEventOut, (uint32_t)E_INVALIDARG);
     1936
     1937    ComObjPtr<VBoxEvent> pEvent;
     1938
     1939    hrc = pEvent.createObject();
     1940    if (FAILED(hrc))
     1941        return hrc;
     1942
     1943    /* default aSource to pVirtualBox? */
     1944    hrc = pEvent->init(aSource, static_cast<VBoxEventType_T>(aType), aWaitable);
     1945    if (FAILED(hrc))
     1946        return hrc;
     1947
     1948    return pEvent.queryInterfaceTo(ppEventOut);
     1949}
     1950
    19221951
    19231952/*static*/ DECLCALLBACK(int)
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