applayerprotocols/httpservice/inc/chttpclientauthentication.h
branchRCL_3
changeset 5 337070b4fa18
child 19 c0c2f28ace9c
equal deleted inserted replaced
3:5ee1d9ce5878 5:337070b4fa18
       
     1 // Copyright (c) 2003-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 "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 #ifndef __CHTTPCLIENTAUTHENTICATION_H__
       
    18 #define __CHTTPCLIENTAUTHENTICATION_H__
       
    19 
       
    20 #include <e32base.h>
       
    21 #include <http/mhttpauthenticationcallback.h>
       
    22 class MHTTPServiceAuthentication;
       
    23 
       
    24 NONSHARABLE_CLASS(CHttpClientAuthentication) : public CBase, public MHTTPAuthenticationCallback
       
    25     {
       
    26 public:
       
    27     static CHttpClientAuthentication* New(RHTTPSession aSesion, MHTTPServiceAuthentication* aCallback);
       
    28 
       
    29 // methods inherited from MHTTPAuthenticationCallback
       
    30     virtual TBool GetCredentialsL(const TUriC8& aURI, RString aRealm, 
       
    31                                  RStringF aAuthenticationType,
       
    32                                  RString& aUsername, 
       
    33                                  RString& aPassword);
       
    34 
       
    35 protected:
       
    36     TInt Construct(RHTTPSession aSesion, MHTTPServiceAuthentication* aCallback);
       
    37     void FillCredentialsL(RString& aRealm, RString& aUsername, RString& aPassword, RBuf8& aClientUsername, RBuf8& aClientPassword);
       
    38 private:
       
    39     MHTTPServiceAuthentication* iHTTPServiceAuthentication;    
       
    40     };
       
    41 
       
    42 #endif  __CHTTPCLIENTAUTHENTICATION_H__