syncmlfw/common/http/inc/nsmlhttpclient.h
changeset 0 b497e44ab2fc
child 25 b183ec05bd8c
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  SyncML HTTP client
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "nsmlhttp.h"
       
    21 
       
    22 // Standard headers used by default
       
    23 _LIT8(KSmlCacheControl, "no-store");
       
    24 _LIT8(KSmlAcceptCharSet, "utf-8");
       
    25 _LIT8(KSmlAcceptLanguage, "en");
       
    26 _LIT8(KSmlContentType, "Content-Type");
       
    27 _LIT8(KSmlAcceptEncodingType, "Accept-Encoding");
       
    28 _LIT8(KSmlContentEncodingType, "Content-Encoding");
       
    29 _LIT8(KSmlContentTypeDS, "application/vnd.syncml+wbxml");
       
    30 _LIT8(KSmlContentTypeDM, "application/vnd.syncml.dm+wbxml");
       
    31 _LIT8(KSmlContentDeflate, "deflate");
       
    32 
       
    33 _LIT(KSmlHttpClientPanic, "HTTP Client Panic");
       
    34 #define KServerUntrusted -7548 //symbian error code
       
    35 
       
    36 enum TSmlHttpPanics
       
    37 	{
       
    38 		EReqBodySubmitBufferNotAllocated,
       
    39 		KBodyWithInvalidSize,
       
    40 		KCouldNotNotifyBodyDataPart
       
    41 	};
       
    42 
       
    43 
       
    44 //============================================================
       
    45 // Class CHttpEventHandler declaration
       
    46 // Handles all events for the active transaction. 
       
    47 //
       
    48 //============================================================
       
    49 class CHttpEventHandler : public CBase, public MHTTPTransactionCallback
       
    50 	{
       
    51 public:
       
    52 	virtual ~CHttpEventHandler();
       
    53 	static CHttpEventHandler* NewLC();
       
    54 	static CHttpEventHandler* NewL();
       
    55 	//
       
    56 	// methods from MHTTPTransactionCallback
       
    57 	//
       
    58 	virtual void MHFRunL( RHTTPTransaction aTransaction, const THTTPEvent& aEvent );
       
    59 	virtual TInt MHFRunError( TInt aError, RHTTPTransaction aTransaction, const THTTPEvent& aEvent );
       
    60 
       
    61 protected:
       
    62 	CHttpEventHandler();
       
    63 	void ConstructL( CNSmlHTTP* aAgent );
       
    64 private:
       
    65 	CNSmlHTTP* iAgent;
       
    66 	MHTTPDataSupplier* iRespBody;
       
    67 
       
    68 private:
       
    69 	friend class CNSmlHTTP;
       
    70 
       
    71 	};
       
    72