VBoxCredProvFactory.cpp revision 04c077e3c2bfacb8a42b4ee801ca025e94a9f0eb
/* $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.
*/
#include "VBoxCredentialProvider.h"
#include "VBoxCredProvFactory.h"
#include "VBoxCredProvProvider.h"
{
}
{
}
/** IUnknown overrides. */
{
VBoxCredProvVerbose(0, "VBoxCredProvFactory: AddRef: Returning refcount=%ld\n",
return cRefCount;
}
{
VBoxCredProvVerbose(0, "VBoxCredProvFactory: Release: Returning refcount=%ld\n",
if (!cRefCount)
{
VBoxCredProvVerbose(0, "VBoxCredProvFactory: Calling destructor\n");
delete this;
}
return cRefCount;
}
{
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;
}
/** IClassFactory overrides. This creates our actual credential provider. */
{
if (pUnkOuter)
return CLASS_E_NOAGGREGATION;
}
{
return S_OK;
}