author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:27:01 +0100 | |
branch | Symbian2 |
changeset 3 | e1b950c65cb4 |
parent 0 | 061f57f2323e |
child 4 | 837f303aceeb |
permissions | -rw-r--r-- |
williamr@2 | 1 |
/* |
williamr@2 | 2 |
* Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 3 |
* All rights reserved. |
williamr@2 | 4 |
* This component and the accompanying materials are made available |
williamr@2 | 5 |
* under the terms of the License "Eclipse Public License v1.0" |
williamr@2 | 6 |
* which accompanies this distribution, and is available |
williamr@2 | 7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@2 | 8 |
* |
williamr@2 | 9 |
* Initial Contributors: |
williamr@2 | 10 |
* Nokia Corporation - initial contribution. |
williamr@2 | 11 |
* |
williamr@2 | 12 |
* Contributors: |
williamr@2 | 13 |
* |
williamr@2 | 14 |
* Description: |
williamr@2 | 15 |
* CERTIFICATEAPPS.H |
williamr@2 | 16 |
* CCertificateAppInfoManager class implementation |
williamr@2 | 17 |
* |
williamr@2 | 18 |
*/ |
williamr@2 | 19 |
|
williamr@2 | 20 |
|
williamr@2 | 21 |
|
williamr@2 | 22 |
|
williamr@2 | 23 |
/** |
williamr@2 | 24 |
@file |
williamr@2 | 25 |
@publishedAll |
williamr@2 | 26 |
@released |
williamr@2 | 27 |
*/ |
williamr@2 | 28 |
|
williamr@2 | 29 |
#ifndef __CERTIFICATEAPPS_H__ |
williamr@2 | 30 |
#define __CERTIFICATEAPPS_H__ |
williamr@2 | 31 |
|
williamr@2 | 32 |
#include <f32file.h> |
williamr@2 | 33 |
#include <s32file.h> |
williamr@2 | 34 |
#include <mctcertapps.h> |
williamr@2 | 35 |
|
williamr@2 | 36 |
/** |
williamr@2 | 37 |
* This class is used to access a persistent store which contains the available |
williamr@2 | 38 |
* applications on a device. It provides an interface to add and retrieve |
williamr@2 | 39 |
* applications. |
williamr@2 | 40 |
* |
williamr@2 | 41 |
* @publishedAll |
williamr@2 | 42 |
* @released |
williamr@2 | 43 |
*/ |
williamr@2 | 44 |
class CCertificateAppInfoManager : public CBase |
williamr@2 | 45 |
{ |
williamr@2 | 46 |
public: |
williamr@2 | 47 |
/** |
williamr@2 | 48 |
* Creates a new instance of the app info manager and puts a pointer to it onto the cleanup stack. |
williamr@2 | 49 |
* |
williamr@2 | 50 |
* @return A new CCertificateAppInfoManager object. |
williamr@2 | 51 |
*/ |
williamr@2 | 52 |
IMPORT_C static CCertificateAppInfoManager* NewLC(); |
williamr@2 | 53 |
|
williamr@2 | 54 |
/** |
williamr@2 | 55 |
* Creates a new instance of the app info manager. |
williamr@2 | 56 |
* |
williamr@2 | 57 |
* @return A new CCertificateAppInfoManager object. |
williamr@2 | 58 |
*/ |
williamr@2 | 59 |
IMPORT_C static CCertificateAppInfoManager* NewL(); |
williamr@2 | 60 |
|
williamr@2 | 61 |
/** |
williamr@2 | 62 |
* Creates a new instance of the app info manager. |
williamr@2 | 63 |
* |
williamr@2 | 64 |
* @deprecated Clients should use the no-argument version. |
williamr@2 | 65 |
*/ |
williamr@2 | 66 |
IMPORT_C static CCertificateAppInfoManager* NewLC(RFs& aFs, TBool aOpenedForWrite); |
williamr@2 | 67 |
|
williamr@2 | 68 |
/** |
williamr@2 | 69 |
* Creates a new instance of the app info manager. |
williamr@2 | 70 |
* |
williamr@2 | 71 |
* @deprecated Clients should use the no-argument version. |
williamr@2 | 72 |
*/ |
williamr@2 | 73 |
IMPORT_C static CCertificateAppInfoManager* NewL(RFs& aFs, TBool aOpenedForWrite); |
williamr@2 | 74 |
|
williamr@2 | 75 |
/** Virtual destructor. Frees all resources owned by the object, prior to its destruction. |
williamr@2 | 76 |
*/ |
williamr@2 | 77 |
IMPORT_C virtual ~CCertificateAppInfoManager(); |
williamr@2 | 78 |
|
williamr@2 | 79 |
private: |
williamr@2 | 80 |
CCertificateAppInfoManager(); |
williamr@2 | 81 |
void ConstructL(); |
williamr@2 | 82 |
|
williamr@2 | 83 |
public: |
williamr@2 | 84 |
/** |
williamr@2 | 85 |
* Adds a new application. |
williamr@2 | 86 |
* |
williamr@2 | 87 |
* @param aClient The new application to add. |
williamr@2 | 88 |
* @capability WriteDeviceData The caller requires the WriteDeviceData capability. |
williamr@2 | 89 |
* @leave KErrPermissionDenied If the caller does not have the required capability. |
williamr@2 | 90 |
*/ |
williamr@2 | 91 |
IMPORT_C void AddL(const TCertificateAppInfo& aClient); |
williamr@2 | 92 |
|
williamr@2 | 93 |
/** |
williamr@2 | 94 |
* Removes an existing application. |
williamr@2 | 95 |
* |
williamr@2 | 96 |
* @param aUid The UID of the application to remove. |
williamr@2 | 97 |
* @capability WriteDeviceData The caller requires the WriteDeviceData capability. |
williamr@2 | 98 |
* @leave KErrPermissionDenied If the caller does not have the required capability. |
williamr@2 | 99 |
* @leave KErrNotFound If there is no application matching the specified UID. |
williamr@2 | 100 |
*/ |
williamr@2 | 101 |
IMPORT_C void RemoveL(const TUid& aUid); |
williamr@2 | 102 |
|
williamr@2 | 103 |
/** |
williamr@2 | 104 |
* Gets an application by UID. |
williamr@2 | 105 |
* |
williamr@2 | 106 |
* @param aUid The UID of the application. |
williamr@2 | 107 |
* @param aIndex On return, the index of the application in the store. |
williamr@2 | 108 |
* @return Information about the application if it is present. |
williamr@2 | 109 |
* @leave KErrNotFound If there is no application matching the specified UID. |
williamr@2 | 110 |
*/ |
williamr@2 | 111 |
IMPORT_C const TCertificateAppInfo& ApplicationL(const TUid& aUid, TInt& aIndex) const; |
williamr@2 | 112 |
|
williamr@2 | 113 |
/** |
williamr@2 | 114 |
* Gets a list of all applications in the store. |
williamr@2 | 115 |
* |
williamr@2 | 116 |
* @return An array containing all applications in the store. |
williamr@2 | 117 |
*/ |
williamr@2 | 118 |
IMPORT_C const RArray<TCertificateAppInfo>& Applications() const; |
williamr@2 | 119 |
|
williamr@2 | 120 |
private: |
williamr@2 | 121 |
MCTCertApps* iCertAppsIf; |
williamr@2 | 122 |
/// A cache of the contents of the store |
williamr@2 | 123 |
RArray<TCertificateAppInfo> iClients; |
williamr@2 | 124 |
}; |
williamr@2 | 125 |
|
williamr@2 | 126 |
#endif |