--- a/applayerprotocols/httpservice/src/chttpservice.cpp Fri May 14 16:23:37 2010 +0300
+++ b/applayerprotocols/httpservice/src/chttpservice.cpp Thu May 27 13:21:53 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -15,7 +15,9 @@
#include "chttpservice.h"
#include "httpclientutils.h"
-
+#include "chttpclientauthentication.h"
+#include "mhttpserviceauthentication.h"
+#include "chttpnetworkconnectioninfo.h"
const TInt KMaxNoOfConnections = 6;
const TInt KMaxTransToPipeline = 5;
@@ -45,6 +47,14 @@
}
/**
+ * Destructor of the inner class CHttpServiceStruct
+ */
+CHttpService::CHttpServiceStruct::~CHttpServiceStruct()
+ {
+ delete iHttpClientAuthentication;
+ }
+
+/**
* Retrieves the equivalent string for a give string ID from the
* HTTP string pool
*
@@ -212,6 +222,15 @@
return err;
}
+EXPORT_C TInt CHttpService::SetAuthentication(MHTTPServiceAuthentication* aCallback)
+ {
+ TInt error = KErrGeneral;
+ iHttpServiceStruct->iHttpClientAuthentication = CHttpClientAuthentication::New(iHttpServiceStruct->iHttpSession, aCallback);
+ if(iHttpServiceStruct->iHttpClientAuthentication)
+ error = KErrNone;
+ return error;
+ }
+
/**
* Constructor
*/
@@ -229,3 +248,9 @@
SetMaxTransactionsToPipeline(KMaxTransToPipeline);
}
+EXPORT_C CHttpNetworkConnection* CHttpService::HttpNetworkConnection()
+ {
+ CHttpNetworkConnection *httpNetworkConn = CHttpNetworkConnection::New();
+ httpNetworkConn->SetHttpService(this);
+ return httpNetworkConn;
+ }