wapstack/wapmessageapi/sws/WapBoundCLPush.h
changeset 49 f50f4094acd7
equal deleted inserted replaced
48:14460bf2a402 49:f50f4094acd7
       
     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 #ifndef __CSWSWAPBOUNDCLPUSHSERVICE_H__
       
    17 #define __CSWSWAPBOUNDCLPUSHSERVICE_H__
       
    18 
       
    19 // Include definitions of ECOM interfaces for the WAP Messaging API
       
    20 #include <wapmessage.h>
       
    21 #include "WapMessageApiAgent.h"
       
    22 
       
    23 
       
    24 
       
    25 class CSWSWapBoundCLPushService : public CWapBoundCLPushService
       
    26 /** 
       
    27 The WAP Messaging API, SWS WAP Stack binding.  Implementation of the bound CLPush API.
       
    28 @internalComponent
       
    29 @released
       
    30 @since v8.0
       
    31 */ 
       
    32 {
       
    33 public:
       
    34 	static CSWSWapBoundCLPushService* NewL();
       
    35 	virtual ~CSWSWapBoundCLPushService();
       
    36 
       
    37 public:
       
    38 	virtual TInt Connect(Wap::TBearer aBearer,
       
    39 					  Wap::TPort aPort,
       
    40 					  TBool aSecure,
       
    41 					  TInetAddr aInetAddr);
       
    42 	virtual TInt Connect(Wap::TBearer aBearer,
       
    43 					  Wap::TPort aPort,
       
    44 					  TBool aSecure);
       
    45 	virtual TInt AwaitPush(TDes8& aPushHeaders,
       
    46 						  TDes8& aPushBody,
       
    47 						  TPckgBuf<TUint8>& aPushIdPckg,
       
    48 						  TRequestStatus& aReqStatus);
       
    49 	virtual void CancelAwaitPush();
       
    50 	virtual TInt GetLocalPort(Wap::TPort& aPort);
       
    51 	virtual TInt GetLocalAddress(HBufC8*& aLocalHost);
       
    52 	virtual TInt GetBearer(Wap::TBearer& aBearer);
       
    53 	virtual TInt GetServerAddress(HBufC8*& aRemoteHost);
       
    54 
       
    55 private:
       
    56 	CSWSWapBoundCLPushService();
       
    57 	void ConstructL();
       
    58 
       
    59 private:
       
    60 	/**
       
    61 	the agent instance which actually handles wsp PDU.
       
    62 	*/
       
    63 	CWspMessageApiAgent* iAgent;
       
    64 	/**
       
    65 	the wsp status in received wsp PDU. Not used in push.
       
    66 	*/
       
    67 	TWSPStatus iWspStatus;
       
    68 };
       
    69 
       
    70 #endif // __CSWSWAPBOUNDCLPUSHSERVICE_H__