os/security/cryptoservices/filebasedcertificateandkeystores/source/generic/client/clientfactories.cpp
First public contribution.
2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #include "clientfactories.h"
20 #include "cfskeystoreclient.h"
22 #include "CFSCertStoreClient.h"
23 #include "CFSCertAppsClient.h"
25 #include <mctkeystoreuids.h>
29 /*static*/ MCTTokenInterface* CClientInterfaceFactory::ClientInterfaceL(TInt32 aUid, MCTToken& aToken, RFileStoreClientSession& aClient)
31 MCTTokenInterface* tokenInterface = NULL;
35 case KInterfaceKeyStore:
36 tokenInterface = CFSKeyStoreClient::NewKeyStoreUserInterfaceL(aToken, aClient);
39 case KInterfaceKeyStoreManager:
40 tokenInterface = CFSKeyStoreClient::NewKeyStoreManagerInterfaceL(aToken, aClient);
43 case KInterfaceWritableCertStore:
44 tokenInterface = CFSCertStoreClient::NewWritableInterfaceL(aToken, aClient);
47 case KInterfaceCertStore:
48 tokenInterface = CFSCertStoreClient::NewReadableInterfaceL(aToken, aClient);
51 case KInterfaceCertApps:
52 tokenInterface = CFSCertAppsClient::NewInterfaceL(aToken, aClient);
56 User::Leave(KErrArgument);
60 return (tokenInterface);