os/security/authorisation/userpromptservice/policies/inc/fingerprint.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 *
    16 */
    17 
    18 
    19 /**
    20  @file
    21  @publishedPartner
    22  @released
    23 */
    24 
    25 #ifndef FINGERPRINT_H
    26 #define FINGERPRINT_H
    27 
    28 #include <e32base.h>
    29 #include <e32cmn.h>
    30 
    31 namespace UserPromptService
    32 	{
    33 	/**
    34 	Class that represents the fingerprint data for a stored decision.
    35 	
    36 	The raw fingerprint data must be between one and  KMaxFingerprintLength bytes in 
    37 	length and are typically created from selected parts of the destination and opaque fields.
    38 	\n	
    39 	E.g. Hash("GPRS") or Hash("+442071541000") or "ALL"\n
    40 
    41 	Since hash functions are irreversible the fingerprint may also include a human readable
    42 	string of up to KMaxDescriptionLength characters in length that describes the data used to 
    43 	generate the hash. This may be used by a management user interface that allows a device user 
    44 	to rescind individual decisions.
    45 
    46 	This field is stored in the decision record but is otherwise unused by the User Prompt Service. 
    47 	*/
    48 	NONSHARABLE_CLASS(CFingerprint) : public CBase
    49 		{
    50 	public:		
    51 		IMPORT_C static CFingerprint* NewL(const TDesC8& aFingerprint, const TDesC& aDescription);
    52 		IMPORT_C static CFingerprint* NewLC(const TDesC8& aFingerprint, const TDesC& aDescription);
    53 
    54 		IMPORT_C const TDesC8& Fingerprint() const;
    55 		IMPORT_C const TDesC& Description() const;
    56 		~CFingerprint();
    57 
    58 	private:
    59 		CFingerprint();
    60 		void ConstructL(const TDesC8& aFingerprint, const TDesC& aDescription);
    61 		
    62 		HBufC8* iFingerprint;	///< The raw fingerprint data		
    63 		HBufC* iDescription;	///< Describes the data used to generate the hash
    64 		};
    65 	}	
    66 
    67 #endif // FINGERPRINT_H