Update contrib.
2 * Copyright (c) 2007-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 <ups/fingerprint.h>
20 #include <ups/upsconst.h>
21 #include <ups/upserr.h>
23 using namespace UserPromptService;
26 EXPORT_C CFingerprint* CFingerprint::NewL(const TDesC8& aFingerprint, const TDesC& aDescription)
28 Creates a new fingerprint object.
29 @param aFingerprint An 8-bit descriptor containing the raw fingerprint data.
30 @param aDescription A human readable description of the fingerprint.
31 @return A pointer to the new fingerprint object.
32 @leave KErrUpsBadFingerprintLength if the fingerprint is empty or exceeds
33 KUpsMaxFingerprintLength bytes in length.
36 CFingerprint* self = CFingerprint::NewLC(aFingerprint, aDescription);
37 CleanupStack::Pop(self);
41 EXPORT_C CFingerprint* CFingerprint::NewLC(const TDesC8& aFingerprint, const TDesC& aDescription)
43 Creates a new fingerprint object.
44 @param aFingerprint An 8-bit descriptor containing the raw fingerprint data.
45 @param aDescription A human readable description of the fingerprint.
46 @return A pointer to the new fingerprint object.
47 @leave KErrUpsBadFingerprintLength if the fingerprint is empty or exceeds
48 KUpsMaxFingerprintLength bytes in length.
51 CFingerprint* self = new(ELeave) CFingerprint();
52 CleanupStack::PushL(self);
53 self->ConstructL(aFingerprint, aDescription);
57 void CFingerprint::ConstructL(const TDesC8& aFingerprint, const TDesC& aDescription)
59 Second phase constructor
60 @param aFingerprint The raw fingerprint data.
61 @param aDescription A description of the fingerprint data.
62 @leave KErrUpsBadFingerprintLength if the fingerprint exceeds
63 KUpsMaxFingerprintLength bytes in length.
66 if (aFingerprint.Length() > KUpsMaxFingerprintLength)
68 User::Leave(KErrUpsBadFingerprintLength);
70 iFingerprint = aFingerprint.AllocL();
71 iDescription = aDescription.AllocL();
74 EXPORT_C const TDesC8& CFingerprint::Fingerprint() const
76 Gets the raw fingerprint data.
77 @return An 8-bit descriptor containing the raw fingerprint data.
83 EXPORT_C const TDesC& CFingerprint::Description() const
85 Gets the description of the fingerprint.
86 @return A 16-bit description containing the description of the fingerprint.
92 CFingerprint::CFingerprint()
99 CFingerprint::~CFingerprint()