1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Authentication class for storing login information
21 @file cauthentication.h
26 #ifndef __CAUTHENTICATION_H__
27 #define __CAUTHENTICATION_H__
32 CAuthentication encapsulates username and login information.
33 Uses 8-bit descriptors. Unicode text must be tranformed into UTF8 for storage.
37 class CAuthentication: public CBase
51 IMPORT_C static CAuthentication* NewL(const TDesC8& aName, const TDesC8& aPassword, TMethod aMethod = EDigest);
52 IMPORT_C static CAuthentication* NewL(const TUriC8& aUri, TMethod aMethod = EDigest);
53 IMPORT_C ~CAuthentication();
54 IMPORT_C const TDesC8& Name() const;
55 IMPORT_C const TDesC8& Password() const;
56 IMPORT_C TMethod Method() const;
57 IMPORT_C void SetNameL(const TDesC8& aName);
58 IMPORT_C void SetPasswordL(const TDesC8& aPassword);
59 IMPORT_C void SetMethod(TMethod aMethod);
61 CAuthentication(TMethod aMethod);
62 void ConstructL(const TDesC8& aName, const TDesC8& aPassword);
63 void ConstructL(const TUriC8& aUri);
66 The descriptor buffer that contains the Name.
70 The descriptor buffer that contains the Password.
74 The enum of type TMethod.
79 #endif //__CAUTHENTICATION_H__