diff -r 000000000000 -r c316ab048e9d common/inc/HttpClient.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/inc/HttpClient.h Fri Jun 25 12:50:05 2010 +0200 @@ -0,0 +1,48 @@ +/* + * Name : HttpClient.h + * Description : HTTP helper class + * Project : This file is part of OpenMAR, an Open Mobile Augmented Reality browser + * Website : http://OpenMAR.org + * + * Copyright (c) 2010 David Caabeiro + * + * All rights reserved. This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 which accompanies this + * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html + * + */ + +#ifndef HTTPCLIENT_H_ +#define HTTPCLIENT_H_ + +#include +#include + +#include + +class CHttpClient : public CBase +{ +public: + static CHttpClient* NewL(MHTTPTransactionCallback& aCallback); + ~CHttpClient(); + +protected: + CHttpClient(MHTTPTransactionCallback& aCallback); + void ConstructL(); + +public: + RHTTPTransaction GetL(const TDesC8& aUri); + void Stop(RHTTPTransaction& aTransaction); + +protected: + void SetHeaderL(RHTTPHeaders aHeaders, TInt aHdrField, const TDesC8& aHdrValue); + +private: + MHTTPTransactionCallback& iCallback; + + RHTTPSession iSession; + RSocketServ iSocketServ; + RConnection iConnection; +}; + +#endif // HTTPSOURCE_H_