Update contrib.
2 * Copyright (c) 1998-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.
16 * CCertificateAppInfoManager class implementation
27 #ifndef __CERTIFICATEAPPS_H__
28 #define __CERTIFICATEAPPS_H__
32 #include <mctcertapps.h>
36 * This class is used to access a persistent store which contains the available
37 * applications on a device. It provides an interface to add and retrieve
43 class CCertificateAppInfoManager : public CBase
47 * Creates a new instance of the app info manager and puts a pointer to it onto the cleanup stack.
49 * @return A new CCertificateAppInfoManager object.
51 IMPORT_C static CCertificateAppInfoManager* NewLC();
54 * Creates a new instance of the app info manager.
56 * @return A new CCertificateAppInfoManager object.
58 IMPORT_C static CCertificateAppInfoManager* NewL();
61 * Creates a new instance of the app info manager.
63 * @deprecated Clients should use the no-argument version.
65 IMPORT_C static CCertificateAppInfoManager* NewLC(RFs& aFs, TBool aOpenedForWrite);
68 * Creates a new instance of the app info manager.
70 * @deprecated Clients should use the no-argument version.
72 IMPORT_C static CCertificateAppInfoManager* NewL(RFs& aFs, TBool aOpenedForWrite);
74 /** Virtual destructor. Frees all resources owned by the object, prior to its destruction.
76 IMPORT_C virtual ~CCertificateAppInfoManager();
79 CCertificateAppInfoManager();
84 * Adds a new application.
86 * @param aClient The new application to add.
87 * @capability WriteDeviceData The caller requires the WriteDeviceData capability.
88 * @leave KErrPermissionDenied If the caller does not have the required capability.
90 IMPORT_C void AddL(const TCertificateAppInfo& aClient);
93 * Removes an existing application.
95 * @param aUid The UID of the application to remove.
96 * @capability WriteDeviceData The caller requires the WriteDeviceData capability.
97 * @leave KErrPermissionDenied If the caller does not have the required capability.
98 * @leave KErrNotFound If there is no application matching the specified UID.
100 IMPORT_C void RemoveL(const TUid& aUid);
103 * Gets an application by UID.
105 * @param aUid The UID of the application.
106 * @param aIndex On return, the index of the application in the store.
107 * @return Information about the application if it is present.
108 * @leave KErrNotFound If there is no application matching the specified UID.
110 IMPORT_C const TCertificateAppInfo& ApplicationL(const TUid& aUid, TInt& aIndex) const;
113 * Gets a list of all applications in the store.
115 * @return An array containing all applications in the store.
117 IMPORT_C const RArray<TCertificateAppInfo>& Applications() const;
120 MCTCertApps* iCertAppsIf;
121 /// A cache of the contents of the store
122 RArray<TCertificateAppInfo> iClients;