VBoxCredProvFactory.cpp revision 352bb6b9d2fa1f7df7797f50c58e297ac37059a2
/* $Id$ */
/** @file
* VBoxCredentialProvFactory - The VirtualBox Credential Provider Factory.
*/
/*
* Copyright (C) 2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include "VBoxCredentialProvider.h"
#include "VBoxCredProvFactory.h"
#include "VBoxCredProvProvider.h"
/*******************************************************************************
* Internal Functions *
*******************************************************************************/
VBoxCredProvFactory::VBoxCredProvFactory(void) :
{
}
{
}
VBoxCredProvFactory::AddRef(void)
{
VBoxCredProvVerbose(0, "VBoxCredProvFactory: AddRef: Returning refcount=%ld\n",
cRefs);
return cRefs;
}
VBoxCredProvFactory::Release(void)
{
VBoxCredProvVerbose(0, "VBoxCredProvFactory: Release: Returning refcount=%ld\n",
cRefs);
if (!cRefs)
{
VBoxCredProvVerbose(0, "VBoxCredProvFactory: Calling destructor\n");
delete this;
}
return cRefs;
}
{
VBoxCredProvVerbose(0, "VBoxCredProvFactory: QueryInterface\n");
if (ppvInterface)
{
if ( IID_IClassFactory == interfaceID
|| IID_IUnknown == interfaceID)
{
*ppvInterface = static_cast<IUnknown*>(this);
}
else
{
*ppvInterface = NULL;
hr = E_NOINTERFACE;
}
}
else
hr = E_INVALIDARG;
return hr;
}
{
if (pUnkOuter)
return CLASS_E_NOAGGREGATION;
}
{
if (fLock)
else
return S_OK;
}