VirtualBox

Ignore:
Timestamp:
Feb 7, 2014 4:16:41 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92122
Message:

Main/xpcom: fix server registration breakage, incomplete conversion to wrapper class

Location:
trunk/src/VBox/Main/src-server/xpcom
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/xpcom/server.cpp

    r50355 r50369  
    55
    66/*
    7  * Copyright (C) 2004-2013 Oracle Corporation
     7 * Copyright (C) 2004-2014 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    9595# include "NATNetworkImpl.h"
    9696
     97// This needs to stay - it is needed by the service registration below, and
     98// is defined in the automatically generated VirtualBoxWrap.cpp
     99extern nsIClassInfo *NS_CLASSINFO_NAME(VirtualBoxWrap);
     100NS_DECL_CI_INTERFACE_GETTER(VirtualBoxWrap)
     101
     102// The declarations/implementations of the various XPCOM helper data structures
     103// and functions have to be removed bit by bit, as the conversion to the
     104// automatically generated wrappers makes them obsolete.
    97105
    98106/* implement nsISupports parts of our objects with support for nsIClassInfo */
     
    834842        NULL, // deregistration function
    835843        VirtualBoxClassFactory::FactoryDestructor, // factory destructor function
    836         NS_CI_INTERFACE_GETTER_NAME(VirtualBox),
     844        NS_CI_INTERFACE_GETTER_NAME(VirtualBoxWrap),
    837845        NULL, // language helper
    838         &NS_CLASSINFO_NAME(VirtualBox),
     846        &NS_CLASSINFO_NAME(VirtualBoxWrap),
    839847        0 // flags
    840848    };
     
    856864        }
    857865
    858         nsCOMPtr <nsIComponentRegistrar> registrar;
     866        nsCOMPtr<nsIComponentRegistrar> registrar;
    859867        rc = NS_GetComponentRegistrar(getter_AddRefs(registrar));
    860868        if (NS_FAILED(rc))
  • trunk/src/VBox/Main/src-server/xpcom/server.h

    r50359 r50369  
    3535
    3636#endif /* ____H_LINUX_SERVER */
    37 
    38 /**
    39  * Implements NSGetInterfacesProcPtr (nsIGenericFactory.h)
    40  * @note: declaration in nsIGenericFactory.h asks for zeroing
    41  * count and array, if returning of list of interfaces isn't supported.
    42  */
    43 HRESULT VirtualBox_GetInterfacesHelper(PRUint32 *count, nsIID** *array)
    44 {
    45     if (count != NULL) *count = 0;
    46     if (array != NULL) *array = NULL;
    47 
    48     return S_OK;
    49 }
    50 nsIClassInfo* VirtualBox_classInfoGlobal;
  • trunk/src/VBox/Main/src-server/xpcom/server_module.cpp

    r50355 r50369  
    9191 *  in sync with macros used for VirtualBox in server.cpp for the same purpose.
    9292 */
     93
     94NS_DECL_CLASSINFO(VirtualBoxWrap)
     95NS_IMPL_CI_INTERFACE_GETTER1(VirtualBoxWrap, IVirtualBox)
    9396
    9497static nsresult vboxsvcSpawnDaemon(void)
     
    361364        NULL, // destructor function
    362365        /// @todo
    363         NS_CI_INTERFACE_GETTER_NAME(VirtualBox), // interfaces function
     366        NS_CI_INTERFACE_GETTER_NAME(VirtualBoxWrap), // interfaces function
    364367        NULL, // language helper
    365368        /// @todo
    366         &NS_CLASSINFO_NAME(VirtualBox) // global class info & flags
     369        &NS_CLASSINFO_NAME(VirtualBoxWrap) // global class info & flags
    367370    }
    368371};
Note: See TracChangeset for help on using the changeset viewer.

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