wapstack/wapmessageapi/sws/WapBoundCLPush.h
author srilekhas <srilekhas@symbian.org>
Fri, 17 Sep 2010 17:35:51 +0100
branchRCL_3
changeset 71 b10722dbe19e
parent 18 50bae5c5c85f
permissions -rw-r--r--
Merge RCL_3 fix to Bug 1398 with the latest delivery.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
     1
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
     2
// All rights reserved.
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
     7
//
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
     8
// Initial Contributors:
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    10
//
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    11
// Contributors:
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    12
//
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    13
// Description:
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    14
//
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    15
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    16
#ifndef __CSWSWAPBOUNDCLPUSHSERVICE_H__
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    17
#define __CSWSWAPBOUNDCLPUSHSERVICE_H__
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    18
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    19
// Include definitions of ECOM interfaces for the WAP Messaging API
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    20
#include <wapmessage.h>
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    21
#include "WapMessageApiAgent.h"
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    22
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    23
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    24
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    25
class CSWSWapBoundCLPushService : public CWapBoundCLPushService
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    26
/** 
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    27
The WAP Messaging API, SWS WAP Stack binding.  Implementation of the bound CLPush API.
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    28
@internalComponent
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    29
@released
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    30
@since v8.0
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    31
*/ 
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    32
{
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    33
public:
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    34
	static CSWSWapBoundCLPushService* NewL();
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    35
	virtual ~CSWSWapBoundCLPushService();
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    36
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    37
public:
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    38
	virtual TInt Connect(Wap::TBearer aBearer,
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    39
					  Wap::TPort aPort,
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    40
					  TBool aSecure,
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    41
					  TInetAddr aInetAddr);
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    42
	virtual TInt Connect(Wap::TBearer aBearer,
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    43
					  Wap::TPort aPort,
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    44
					  TBool aSecure);
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    45
	virtual TInt AwaitPush(TDes8& aPushHeaders,
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    46
						  TDes8& aPushBody,
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    47
						  TPckgBuf<TUint8>& aPushIdPckg,
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    48
						  TRequestStatus& aReqStatus);
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    49
	virtual void CancelAwaitPush();
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    50
	virtual TInt GetLocalPort(Wap::TPort& aPort);
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    51
	virtual TInt GetLocalAddress(HBufC8*& aLocalHost);
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    52
	virtual TInt GetBearer(Wap::TBearer& aBearer);
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    53
	virtual TInt GetServerAddress(HBufC8*& aRemoteHost);
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    54
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    55
private:
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    56
	CSWSWapBoundCLPushService();
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    57
	void ConstructL();
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    58
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    59
private:
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    60
	/**
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    61
	the agent instance which actually handles wsp PDU.
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    62
	*/
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    63
	CWspMessageApiAgent* iAgent;
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    64
	/**
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    65
	the wsp status in received wsp PDU. Not used in push.
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    66
	*/
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    67
	TWSPStatus iWspStatus;
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    68
};
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    69
50bae5c5c85f Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff changeset
    70
#endif // __CSWSWAPBOUNDCLPUSHSERVICE_H__