uidesigner/com.nokia.sdt.series60.componentlibrary/components/non-layout/webclient/WebClient.component
author Frank Turovich <frank.turovich@nokia.com>
Thu, 02 Apr 2009 15:09:04 -0500
changeset 24 f2ad263823f3
parent 2 d760517a8095
permissions -rw-r--r--
added DS_Store to hgignore list
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
cawthron
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
cawthron
parents:
diff changeset
     2
<!-- Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -->
cawthron
parents:
diff changeset
     3
<!-- All rights reserved. -->
cawthron
parents:
diff changeset
     4
<!-- This component and the accompanying materials are made available -->
cawthron
parents:
diff changeset
     5
<!-- under the terms of the License "Eclipse Public License v1.0" -->
cawthron
parents:
diff changeset
     6
<!-- which accompanies this distribution, and is available -->
cawthron
parents:
diff changeset
     7
<!-- at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
cawthron
parents:
diff changeset
     8
cawthron
parents:
diff changeset
     9
<componentDefinition xmlns="http://www.nokia.com/sdt/emf/component" 
cawthron
parents:
diff changeset
    10
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
cawthron
parents:
diff changeset
    11
	
cawthron
parents:
diff changeset
    12
	<component friendlyName="%friendlyName" 
cawthron
parents:
diff changeset
    13
		qualifiedName="com.nokia.sdt.WebClient"
cawthron
parents:
diff changeset
    14
		baseComponent="com.nokia.sdt.series60.NonLayoutBase"
cawthron
parents:
diff changeset
    15
		category="Other" version="1.1"
cawthron
parents:
diff changeset
    16
		instanceNameRoot="webClient">
cawthron
parents:
diff changeset
    17
		<documentation>
cawthron
parents:
diff changeset
    18
			<information>%information</information>
cawthron
parents:
diff changeset
    19
		</documentation>
cawthron
parents:
diff changeset
    20
		<symbian sdkName="com.nokia.series60" minSDKVersion="3.0"
cawthron
parents:
diff changeset
    21
		/>
cawthron
parents:
diff changeset
    22
		<designerImages smallIconFile="WebClient_sm.png" 
cawthron
parents:
diff changeset
    23
			largeIconFile="WebClient.png"/>
cawthron
parents:
diff changeset
    24
cawthron
parents:
diff changeset
    25
		<properties>
cawthron
parents:
diff changeset
    26
			<property name="defaultURL" type="string" default="http://www.s60.com" category="Behavior" descriptionKey="defaultURLDescription"/>
cawthron
parents:
diff changeset
    27
			<componentReferenceProperty name="waitDialog" scope="model" constraint="com.nokia.sdt.series60.WaitDialog"
cawthron
parents:
diff changeset
    28
					creationKeys="newWaitDialog" category="Behavior" descriptionKey="waitDialogDescription"/>
cawthron
parents:
diff changeset
    29
			<componentReferenceProperty name="credentialsQuery" scope="model" constraint="com.nokia.sdt.series60.MultiLineDataQuery" 
cawthron
parents:
diff changeset
    30
					creationKeys="newCredentialsQuery" category="Behavior" descriptionKey="credentialsQueryDescription"/>
cawthron
parents:
diff changeset
    31
		</properties>
cawthron
parents:
diff changeset
    32
		
cawthron
parents:
diff changeset
    33
		<events>
cawthron
parents:
diff changeset
    34
			<event name="openSessionFailed" category="Data" 
cawthron
parents:
diff changeset
    35
				   handlerNameTemplate="Handle{title(name)}OpenSessionFailedL"
cawthron
parents:
diff changeset
    36
				   descriptionKey="openSessionFailedDescription"
cawthron
parents:
diff changeset
    37
				/>
cawthron
parents:
diff changeset
    38
			<event name="connecting" category="Data" 
cawthron
parents:
diff changeset
    39
				   handlerNameTemplate="Handle{title(name)}ConnectingL"
cawthron
parents:
diff changeset
    40
				   descriptionKey="connectingDescription"
cawthron
parents:
diff changeset
    41
				/>
cawthron
parents:
diff changeset
    42
			<event name="headerReceived" category="Data" 
cawthron
parents:
diff changeset
    43
				   handlerNameTemplate="Handle{title(name)}HeaderReceivedL"
cawthron
parents:
diff changeset
    44
				   descriptionKey="headerReceivedDescription"
cawthron
parents:
diff changeset
    45
				/>
cawthron
parents:
diff changeset
    46
			<event name="bodyReceived" category="Data" 
cawthron
parents:
diff changeset
    47
				   handlerNameTemplate="Handle{title(name)}BodyReceivedL"
cawthron
parents:
diff changeset
    48
				   descriptionKey="bodyReceivedDescription"
cawthron
parents:
diff changeset
    49
				/>
cawthron
parents:
diff changeset
    50
			<event name="connectionCanceled" category="Data" 
cawthron
parents:
diff changeset
    51
				   handlerNameTemplate="Handle{title(name)}ConnectionCanceledL"
cawthron
parents:
diff changeset
    52
				   descriptionKey="connectionCanceledDescription"
cawthron
parents:
diff changeset
    53
				/>
cawthron
parents:
diff changeset
    54
			<event name="responseComplete" category="Data" 
cawthron
parents:
diff changeset
    55
				   handlerNameTemplate="Handle{title(name)}ResponseCompleteL"
cawthron
parents:
diff changeset
    56
				   descriptionKey="responseCompleteDescription"
cawthron
parents:
diff changeset
    57
				/>
cawthron
parents:
diff changeset
    58
			<event name="transactionSucceeded" category="Data" 
cawthron
parents:
diff changeset
    59
				   handlerNameTemplate="Handle{title(name)}TransactionSucceededL"
cawthron
parents:
diff changeset
    60
				   descriptionKey="transactionSucceededDescription"
cawthron
parents:
diff changeset
    61
				/>
cawthron
parents:
diff changeset
    62
			<event name="transactionFailed" category="Data" 
cawthron
parents:
diff changeset
    63
				   handlerNameTemplate="Handle{title(name)}TransactionFailedL"
cawthron
parents:
diff changeset
    64
				   descriptionKey="transactionFailedDescription"
cawthron
parents:
diff changeset
    65
				/>
cawthron
parents:
diff changeset
    66
			<event name="unknownEvent" category="Data" 
cawthron
parents:
diff changeset
    67
				   handlerNameTemplate="Handle{title(name)}UnknownEventL"
cawthron
parents:
diff changeset
    68
				   descriptionKey="unknownEventDescription"
cawthron
parents:
diff changeset
    69
				/>
cawthron
parents:
diff changeset
    70
			<event name="runError" category="Data" 
cawthron
parents:
diff changeset
    71
				   handlerNameTemplate="Handle{title(name)}RunErrorL"
cawthron
parents:
diff changeset
    72
				   descriptionKey="runErrorDescription"
cawthron
parents:
diff changeset
    73
				/>
cawthron
parents:
diff changeset
    74
		</events>
cawthron
parents:
diff changeset
    75
		
cawthron
parents:
diff changeset
    76
		<implementations>
cawthron
parents:
diff changeset
    77
			<implementation>
cawthron
parents:
diff changeset
    78
				<interface id="com.nokia.sdt.datamodel.adapter.ISetValueCommandExtender"/>
cawthron
parents:
diff changeset
    79
				<code class="com.nokia.sdt.series60.component.WebClientImplFactory"/>
cawthron
parents:
diff changeset
    80
			</implementation>
cawthron
parents:
diff changeset
    81
		</implementations>
cawthron
parents:
diff changeset
    82
cawthron
parents:
diff changeset
    83
		<sourceGen forms="AppUi AknView Container Dialog Form SettingsList">
cawthron
parents:
diff changeset
    84
		
cawthron
parents:
diff changeset
    85
			<inline>
cawthron
parents:
diff changeset
    86
if (Engine.formMatches(form, [""])) {
cawthron
parents:
diff changeset
    87
	// create files if missing, without adding user's new file template
cawthron
parents:
diff changeset
    88
	Engine.createFromStockFile("inc", "WebClientEngine.h", "WebClientEngine.h");
cawthron
parents:
diff changeset
    89
	Engine.createFromStockFile("inc", "WebClientEngine.pan", "WebClientEngine.pan");
cawthron
parents:
diff changeset
    90
	Engine.createFromStockFile("src", "WebClientEngine.cpp", "WebClientEngine.cpp");
cawthron
parents:
diff changeset
    91
}
cawthron
parents:
diff changeset
    92
			</inline>
cawthron
parents:
diff changeset
    93
		
cawthron
parents:
diff changeset
    94
			<template phase="EventIncludes"><![CDATA[
cawthron
parents:
diff changeset
    95
#include "WebClientEngine.h"
cawthron
parents:
diff changeset
    96
]]>			</template>
cawthron
parents:
diff changeset
    97
cawthron
parents:
diff changeset
    98
			<template id="BaseClass" phase="BaseClassList">,MWebClientObserver</template>
cawthron
parents:
diff changeset
    99
	
cawthron
parents:
diff changeset
   100
			<template phase="InstanceVariables">
cawthron
parents:
diff changeset
   101
CWebClientEngine* ${instanceMemberName};
cawthron
parents:
diff changeset
   102
			</template>	
cawthron
parents:
diff changeset
   103
cawthron
parents:
diff changeset
   104
			<template phase="Construct">
cawthron
parents:
diff changeset
   105
${instanceMemberName} = NULL;
cawthron
parents:
diff changeset
   106
			</template>
cawthron
parents:
diff changeset
   107
				
cawthron
parents:
diff changeset
   108
			<template phase="Destroy">
cawthron
parents:
diff changeset
   109
delete ${instanceMemberName};
cawthron
parents:
diff changeset
   110
${instanceMemberName} = NULL;
cawthron
parents:
diff changeset
   111
			</template>
cawthron
parents:
diff changeset
   112
				
cawthron
parents:
diff changeset
   113
			<template phase="ClassMethods"><![CDATA[
cawthron
parents:
diff changeset
   114
void IssueHTTPGetL( const TDesC8* aUrl = NULL );
cawthron
parents:
diff changeset
   115
]]>			</template>
cawthron
parents:
diff changeset
   116
				
cawthron
parents:
diff changeset
   117
			<template phase="ClassProtected"><![CDATA[
cawthron
parents:
diff changeset
   118
// Implementations of MWebClientObserver methods
cawthron
parents:
diff changeset
   119
void ClientOpenSessionFailedL( 
cawthron
parents:
diff changeset
   120
		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   121
		TInt anError );
cawthron
parents:
diff changeset
   122
]]>			</template>
cawthron
parents:
diff changeset
   123
			<template phase="ClassProtected"><![CDATA[
cawthron
parents:
diff changeset
   124
void ClientConnectingL( 
cawthron
parents:
diff changeset
   125
		CWebClientEngine& anEngine );
cawthron
parents:
diff changeset
   126
]]>			</template>
cawthron
parents:
diff changeset
   127
			<template phase="ClassProtected"><![CDATA[
cawthron
parents:
diff changeset
   128
void ClientHeaderReceivedL( 
cawthron
parents:
diff changeset
   129
		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   130
		const TDesC& aHeaderData );
cawthron
parents:
diff changeset
   131
]]>			</template>
cawthron
parents:
diff changeset
   132
			<template phase="ClassProtected"><![CDATA[
cawthron
parents:
diff changeset
   133
void ClientBodyReceivedL( 
cawthron
parents:
diff changeset
   134
		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   135
		const TDesC8& aBodyData );
cawthron
parents:
diff changeset
   136
]]>			</template>
cawthron
parents:
diff changeset
   137
			<template phase="ClassProtected"><![CDATA[
cawthron
parents:
diff changeset
   138
void ClientConnectionCanceledL( 
cawthron
parents:
diff changeset
   139
		CWebClientEngine& anEngine );
cawthron
parents:
diff changeset
   140
]]>			</template>
cawthron
parents:
diff changeset
   141
			<template phase="ClassProtected"><![CDATA[
cawthron
parents:
diff changeset
   142
void ClientResponseCompleteL( 
cawthron
parents:
diff changeset
   143
		CWebClientEngine& anEngine );
cawthron
parents:
diff changeset
   144
]]>			</template>
cawthron
parents:
diff changeset
   145
			<template phase="ClassProtected"><![CDATA[
cawthron
parents:
diff changeset
   146
void ClientTransactionSucceededL( 
cawthron
parents:
diff changeset
   147
		CWebClientEngine& anEngine );
cawthron
parents:
diff changeset
   148
]]>			</template>
cawthron
parents:
diff changeset
   149
			<template phase="ClassProtected"><![CDATA[
cawthron
parents:
diff changeset
   150
void ClientTransactionFailedL( 
cawthron
parents:
diff changeset
   151
		CWebClientEngine& anEngine );
cawthron
parents:
diff changeset
   152
]]>			</template>
cawthron
parents:
diff changeset
   153
			<template phase="ClassProtected"><![CDATA[
cawthron
parents:
diff changeset
   154
void ClientUnknownEventL( 
cawthron
parents:
diff changeset
   155
		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   156
		TInt aStatus );
cawthron
parents:
diff changeset
   157
]]>			</template>
cawthron
parents:
diff changeset
   158
			<template phase="ClassProtected"><![CDATA[
cawthron
parents:
diff changeset
   159
void ClientRunErrorL( 
cawthron
parents:
diff changeset
   160
		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   161
		TInt anError );
cawthron
parents:
diff changeset
   162
]]>			</template>
cawthron
parents:
diff changeset
   163
			<template phase="ClassProtected"><![CDATA[
cawthron
parents:
diff changeset
   164
TBool ClientGetCredentialsL( 
cawthron
parents:
diff changeset
   165
		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   166
		const TUriC8& aUri, 
cawthron
parents:
diff changeset
   167
		const TDesC8& aRealm, 
cawthron
parents:
diff changeset
   168
		TDes& aUsername, 
cawthron
parents:
diff changeset
   169
		TDes& aPassword );
cawthron
parents:
diff changeset
   170
]]>			</template>
cawthron
parents:
diff changeset
   171
			
cawthron
parents:
diff changeset
   172
			<template id="INIT_FROM_CONTAINER" phase="Initialize"><![CDATA[
cawthron
parents:
diff changeset
   173
${instanceMemberName} = CWebClientEngine::NewL( *this );
cawthron
parents:
diff changeset
   174
]]>			</template>
cawthron
parents:
diff changeset
   175
cawthron
parents:
diff changeset
   176
cawthron
parents:
diff changeset
   177
<!-- begin ClientOpenSessionFailed -->
cawthron
parents:
diff changeset
   178
		<defineLocation id="ClientOpenSessionFailedL" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   179
						owned="false"
cawthron
parents:
diff changeset
   180
						location="function(${handlerClassName}::ClientOpenSessionFailedL(CWebClientEngine&amp;, TInt))">
cawthron
parents:
diff changeset
   181
			<template><![CDATA[
cawthron
parents:
diff changeset
   182
/**
cawthron
parents:
diff changeset
   183
 * ClientOpenFailedL( CWebClientEngine& anEngine )
cawthron
parents:
diff changeset
   184
 * An error occurred opening the HTTP session. The calling code
cawthron
parents:
diff changeset
   185
 * will leave after this method returns.
cawthron
parents:
diff changeset
   186
 * @param anError: the error code
cawthron
parents:
diff changeset
   187
 * Most common error; no access point configured, and session creation
cawthron
parents:
diff changeset
   188
 * leaves with KErrNotFound.
cawthron
parents:
diff changeset
   189
 */			
cawthron
parents:
diff changeset
   190
void ${className}::ClientOpenSessionFailedL( 
cawthron
parents:
diff changeset
   191
		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   192
		TInt anError )
cawthron
parents:
diff changeset
   193
	{
cawthron
parents:
diff changeset
   194
	}
cawthron
parents:
diff changeset
   195
]]>			</template>
cawthron
parents:
diff changeset
   196
		</defineLocation>
cawthron
parents:
diff changeset
   197
		<template location="ClientOpenSessionFailedL"/>
cawthron
parents:
diff changeset
   198
		
cawthron
parents:
diff changeset
   199
		<defineLocation id="ClientOpenSessionFailedBody" baseLocation="ClientOpenSessionFailedL"
cawthron
parents:
diff changeset
   200
			owned="true" location="region(Generated Code)"/>
cawthron
parents:
diff changeset
   201
		<template id="RealizeClientOpenSessionFailedBody" location="ClientOpenSessionFailedBody"/>
cawthron
parents:
diff changeset
   202
		
cawthron
parents:
diff changeset
   203
		<templateGroup id="ClientOpenSessionFailedEvent" ifEvents="openSessionFailed">
cawthron
parents:
diff changeset
   204
		
cawthron
parents:
diff changeset
   205
				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
cawthron
parents:
diff changeset
   206
void ${event.handlerName}( 
cawthron
parents:
diff changeset
   207
		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   208
		TInt anError );
cawthron
parents:
diff changeset
   209
]]>				</template>
cawthron
parents:
diff changeset
   210
cawthron
parents:
diff changeset
   211
			<template id="InvokeHandler" location="ClientOpenSessionFailedBody">
cawthron
parents:
diff changeset
   212
${event.handlerName}( anEngine, anError );
cawthron
parents:
diff changeset
   213
			</template>
cawthron
parents:
diff changeset
   214
cawthron
parents:
diff changeset
   215
			<defineLocation id="OpenSessionFailedHandler" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   216
				owned="false"
cawthron
parents:
diff changeset
   217
				isEventHandler="true"
cawthron
parents:
diff changeset
   218
				location="function(${handlerClassName}::${event.handlerName}(CWebClientEngine&amp;, TInt))">
cawthron
parents:
diff changeset
   219
				<template><![CDATA[
cawthron
parents:
diff changeset
   220
/** 
cawthron
parents:
diff changeset
   221
 * Handle the openSessionFailed event.
cawthron
parents:
diff changeset
   222
 */
cawthron
parents:
diff changeset
   223
void ${handlerClassName}::${event.handlerName}( 
cawthron
parents:
diff changeset
   224
		CWebClientEngine& /*anEngine*/, 
cawthron
parents:
diff changeset
   225
		TInt /*anError*/ )
cawthron
parents:
diff changeset
   226
	{
cawthron
parents:
diff changeset
   227
	// TODO: implement ${event.eventName} event handler
cawthron
parents:
diff changeset
   228
	}
cawthron
parents:
diff changeset
   229
]]>				
cawthron
parents:
diff changeset
   230
					</template>
cawthron
parents:
diff changeset
   231
			</defineLocation>
cawthron
parents:
diff changeset
   232
			<template id="RealizeHandler" location="OpenSessionFailedHandler"/>
cawthron
parents:
diff changeset
   233
		</templateGroup>
cawthron
parents:
diff changeset
   234
<!-- end ClientOpenSessionFailed -->
cawthron
parents:
diff changeset
   235
cawthron
parents:
diff changeset
   236
<!-- begin ClientConnecting -->
cawthron
parents:
diff changeset
   237
		<defineLocation id="ClientConnecting" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   238
						owned="false"
cawthron
parents:
diff changeset
   239
						location="function(${handlerClassName}::ClientConnectingL(CWebClientEngine&amp;))">
cawthron
parents:
diff changeset
   240
			<template><![CDATA[
cawthron
parents:
diff changeset
   241
/**
cawthron
parents:
diff changeset
   242
 * ClientConnectingL()
cawthron
parents:
diff changeset
   243
 * Called to notify that a connection was initiated
cawthron
parents:
diff changeset
   244
 */			
cawthron
parents:
diff changeset
   245
void ${className}::ClientConnectingL( 
cawthron
parents:
diff changeset
   246
		CWebClientEngine& anEngine )
cawthron
parents:
diff changeset
   247
	{
cawthron
parents:
diff changeset
   248
	}
cawthron
parents:
diff changeset
   249
]]>			</template>
cawthron
parents:
diff changeset
   250
		</defineLocation>
cawthron
parents:
diff changeset
   251
		<template location="ClientConnecting"/>
cawthron
parents:
diff changeset
   252
		
cawthron
parents:
diff changeset
   253
		<defineLocation id="ClientConnectingBody" baseLocation="ClientConnecting"
cawthron
parents:
diff changeset
   254
			owned="true" location="region(Generated Code)"/>
cawthron
parents:
diff changeset
   255
		<template id="RealizeClientConnectingBody" location="ClientConnectingBody"/>
cawthron
parents:
diff changeset
   256
cawthron
parents:
diff changeset
   257
		<templateGroup id="ClientConnectingEvent" ifEvents="connecting">
cawthron
parents:
diff changeset
   258
		
cawthron
parents:
diff changeset
   259
				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
cawthron
parents:
diff changeset
   260
void ${event.handlerName}( CWebClientEngine& anEngine );
cawthron
parents:
diff changeset
   261
]]>				</template>
cawthron
parents:
diff changeset
   262
cawthron
parents:
diff changeset
   263
			<template id="InvokeHandler" location="ClientConnectingBody">
cawthron
parents:
diff changeset
   264
${event.handlerName}( anEngine );
cawthron
parents:
diff changeset
   265
			</template>
cawthron
parents:
diff changeset
   266
cawthron
parents:
diff changeset
   267
			<defineLocation id="ConnectingHandler" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   268
				owned="false"
cawthron
parents:
diff changeset
   269
				isEventHandler="true"
cawthron
parents:
diff changeset
   270
				location="function(${handlerClassName}::${event.handlerName}(CWebClientEngine&amp;))">
cawthron
parents:
diff changeset
   271
				<template><![CDATA[
cawthron
parents:
diff changeset
   272
/** 
cawthron
parents:
diff changeset
   273
 * Handle the connecting event.
cawthron
parents:
diff changeset
   274
 */
cawthron
parents:
diff changeset
   275
void ${handlerClassName}::${event.handlerName}( 
cawthron
parents:
diff changeset
   276
		CWebClientEngine& /*anEngine*/ )
cawthron
parents:
diff changeset
   277
	{
cawthron
parents:
diff changeset
   278
	// TODO: implement ${event.eventName} event handler
cawthron
parents:
diff changeset
   279
	}
cawthron
parents:
diff changeset
   280
]]>				
cawthron
parents:
diff changeset
   281
					</template>
cawthron
parents:
diff changeset
   282
			</defineLocation>
cawthron
parents:
diff changeset
   283
			<template id="RealizeHandler" location="ConnectingHandler"/>
cawthron
parents:
diff changeset
   284
		</templateGroup>
cawthron
parents:
diff changeset
   285
<!-- end ClientConnecting -->
cawthron
parents:
diff changeset
   286
cawthron
parents:
diff changeset
   287
<!-- begin ClientHeaderReceived -->
cawthron
parents:
diff changeset
   288
		<defineLocation id="ClientHeaderReceived" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   289
						owned="false"
cawthron
parents:
diff changeset
   290
						location="function(${handlerClassName}::ClientHeaderReceivedL(CWebClientEngine&amp;, const TDesC&amp;))">
cawthron
parents:
diff changeset
   291
			<template><![CDATA[
cawthron
parents:
diff changeset
   292
/**
cawthron
parents:
diff changeset
   293
 * ClientHeaderReceivedL()
cawthron
parents:
diff changeset
   294
 * Called when HTTP header is received.
cawthron
parents:
diff changeset
   295
 * @param aHeaderData: Header field name and value
cawthron
parents:
diff changeset
   296
 */			
cawthron
parents:
diff changeset
   297
void ${className}::ClientHeaderReceivedL( 
cawthron
parents:
diff changeset
   298
		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   299
		const TDesC& aHeaderData )
cawthron
parents:
diff changeset
   300
	{
cawthron
parents:
diff changeset
   301
	}
cawthron
parents:
diff changeset
   302
]]>			</template>
cawthron
parents:
diff changeset
   303
		</defineLocation>
cawthron
parents:
diff changeset
   304
		<template location="ClientHeaderReceived"/>
cawthron
parents:
diff changeset
   305
 
cawthron
parents:
diff changeset
   306
		<defineLocation id="ClientHeaderReceivedBody" baseLocation="ClientHeaderReceived"
cawthron
parents:
diff changeset
   307
			owned="true" location="region(Generated Code)"/>
cawthron
parents:
diff changeset
   308
		<template id="RealizeClientHeaderReceivedBody" location="ClientHeaderReceivedBody"/>
cawthron
parents:
diff changeset
   309
		
cawthron
parents:
diff changeset
   310
		<templateGroup id="HeaderReceived" ifEvents="headerReceived">
cawthron
parents:
diff changeset
   311
				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
cawthron
parents:
diff changeset
   312
void ${event.handlerName}( 
cawthron
parents:
diff changeset
   313
		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   314
		const TDesC& aHeaderData );
cawthron
parents:
diff changeset
   315
]]>				</template>
cawthron
parents:
diff changeset
   316
cawthron
parents:
diff changeset
   317
			<template id="InvokeHandler" location="ClientHeaderReceivedBody">
cawthron
parents:
diff changeset
   318
${event.handlerName}( anEngine, aHeaderData );
cawthron
parents:
diff changeset
   319
			</template>
cawthron
parents:
diff changeset
   320
cawthron
parents:
diff changeset
   321
			<defineLocation id="HeaderReceivedHandler" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   322
				owned="false"
cawthron
parents:
diff changeset
   323
				isEventHandler="true"
cawthron
parents:
diff changeset
   324
				location="function(${handlerClassName}::${event.handlerName}(CWebClientEngine&amp;, const TDesC&amp;))">
cawthron
parents:
diff changeset
   325
				<template><![CDATA[
cawthron
parents:
diff changeset
   326
/** 
cawthron
parents:
diff changeset
   327
 * Handle the ${event.eventName} event.
cawthron
parents:
diff changeset
   328
 */
cawthron
parents:
diff changeset
   329
void ${handlerClassName}::${event.handlerName}( 
cawthron
parents:
diff changeset
   330
		CWebClientEngine& /*anEngine*/, 
cawthron
parents:
diff changeset
   331
		const TDesC& /*aHeaderData*/)
cawthron
parents:
diff changeset
   332
	{
cawthron
parents:
diff changeset
   333
	// TODO: implement ${event.eventName} event handler
cawthron
parents:
diff changeset
   334
	}
cawthron
parents:
diff changeset
   335
]]>				
cawthron
parents:
diff changeset
   336
					</template>
cawthron
parents:
diff changeset
   337
			</defineLocation>
cawthron
parents:
diff changeset
   338
			<template id="RealizeHandler" location="HeaderReceivedHandler"/>
cawthron
parents:
diff changeset
   339
		</templateGroup>
cawthron
parents:
diff changeset
   340
<!-- end ClientHeaderReceived -->
cawthron
parents:
diff changeset
   341
cawthron
parents:
diff changeset
   342
<!-- begin ClientBodyReceived -->
cawthron
parents:
diff changeset
   343
		<defineLocation id="ClientBodyReceived" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   344
						owned="false"
cawthron
parents:
diff changeset
   345
						location="function(${handlerClassName}::ClientBodyReceivedL(CWebClientEngine&amp;, const TDesC8&amp;))">
cawthron
parents:
diff changeset
   346
			<template><![CDATA[
cawthron
parents:
diff changeset
   347
/**
cawthron
parents:
diff changeset
   348
 * ClientBodyReceivedL()
cawthron
parents:
diff changeset
   349
 * Called when a part of the HTTP body is received.
cawthron
parents:
diff changeset
   350
 * @param aBodyData:  Part of the body data received. (e.g. part of
cawthron
parents:
diff changeset
   351
 *                    the received HTML page)
cawthron
parents:
diff changeset
   352
 */			
cawthron
parents:
diff changeset
   353
void ${className}::ClientBodyReceivedL( 
cawthron
parents:
diff changeset
   354
		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   355
		const TDesC8& aBodyData )
cawthron
parents:
diff changeset
   356
	{
cawthron
parents:
diff changeset
   357
	}
cawthron
parents:
diff changeset
   358
]]>			</template>
cawthron
parents:
diff changeset
   359
		</defineLocation>
cawthron
parents:
diff changeset
   360
		<template location="ClientBodyReceived"/>
cawthron
parents:
diff changeset
   361
		
cawthron
parents:
diff changeset
   362
		<defineLocation id="ClientBodyReceivedBody" baseLocation="ClientBodyReceived"
cawthron
parents:
diff changeset
   363
			owned="true" location="region(Generated Code)"/>
cawthron
parents:
diff changeset
   364
		<template id="RealizeClientBodyReceivedBody" location="ClientBodyReceivedBody"/>
cawthron
parents:
diff changeset
   365
cawthron
parents:
diff changeset
   366
		<templateGroup id="BodyReceived" ifEvents="bodyReceived">
cawthron
parents:
diff changeset
   367
				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
cawthron
parents:
diff changeset
   368
void ${event.handlerName}( 
cawthron
parents:
diff changeset
   369
		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   370
		const TDesC8& aBodyData );
cawthron
parents:
diff changeset
   371
]]>				</template>
cawthron
parents:
diff changeset
   372
cawthron
parents:
diff changeset
   373
			<template id="InvokeHandler" location="ClientBodyReceivedBody">
cawthron
parents:
diff changeset
   374
${event.handlerName}( anEngine, aBodyData );
cawthron
parents:
diff changeset
   375
			</template>
cawthron
parents:
diff changeset
   376
cawthron
parents:
diff changeset
   377
			<defineLocation id="BodyReceivedHandler" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   378
				owned="false"
cawthron
parents:
diff changeset
   379
				isEventHandler="true"
cawthron
parents:
diff changeset
   380
				location="function(${handlerClassName}::${event.handlerName}(CWebClientEngine&amp;, TDesC8&amp;))">
cawthron
parents:
diff changeset
   381
				<template><![CDATA[
cawthron
parents:
diff changeset
   382
/** 
cawthron
parents:
diff changeset
   383
 * Handle the ${event.eventName} event.
cawthron
parents:
diff changeset
   384
 */
cawthron
parents:
diff changeset
   385
void ${handlerClassName}::${event.handlerName}( 
cawthron
parents:
diff changeset
   386
		CWebClientEngine& /*anEngine*/, 
cawthron
parents:
diff changeset
   387
		const TDesC8& /*aBodyData*/)
cawthron
parents:
diff changeset
   388
	{
cawthron
parents:
diff changeset
   389
	// TODO: implement ${event.eventName} event handler
cawthron
parents:
diff changeset
   390
	}
cawthron
parents:
diff changeset
   391
]]>				
cawthron
parents:
diff changeset
   392
					</template>
cawthron
parents:
diff changeset
   393
			</defineLocation>
cawthron
parents:
diff changeset
   394
			<template id="RealizeHandler" location="BodyReceivedHandler"/>
cawthron
parents:
diff changeset
   395
		</templateGroup>
cawthron
parents:
diff changeset
   396
<!-- end ClientBodyReceived -->
cawthron
parents:
diff changeset
   397
cawthron
parents:
diff changeset
   398
<!-- begin ClientConnectionCanceled -->
cawthron
parents:
diff changeset
   399
		<defineLocation id="ClientConnectionCanceled" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   400
						owned="false"
cawthron
parents:
diff changeset
   401
						location="function(${handlerClassName}::ClientConnectionCanceledL(CWebClientEngine&amp;))">
cawthron
parents:
diff changeset
   402
			<template><![CDATA[
cawthron
parents:
diff changeset
   403
/**
cawthron
parents:
diff changeset
   404
 * ClientConnectionCanceledL()
cawthron
parents:
diff changeset
   405
 * Called to notify that a connection attempt has been canceled
cawthron
parents:
diff changeset
   406
 */			
cawthron
parents:
diff changeset
   407
void ${className}::ClientConnectionCanceledL( 
cawthron
parents:
diff changeset
   408
		CWebClientEngine& anEngine )
cawthron
parents:
diff changeset
   409
	{
cawthron
parents:
diff changeset
   410
	}
cawthron
parents:
diff changeset
   411
]]>			</template>
cawthron
parents:
diff changeset
   412
		</defineLocation>
cawthron
parents:
diff changeset
   413
		<template location="ClientConnectionCanceled"/>
cawthron
parents:
diff changeset
   414
		
cawthron
parents:
diff changeset
   415
		<defineLocation id="ClientConnectionCanceledBody" baseLocation="ClientConnectionCanceled"
cawthron
parents:
diff changeset
   416
			owned="true" location="region(Generated Code)"/>
cawthron
parents:
diff changeset
   417
		<template id="RealizeClientConnectionCanceledBody" location="ClientConnectionCanceledBody"/>
cawthron
parents:
diff changeset
   418
cawthron
parents:
diff changeset
   419
		<templateGroup id="ConnectionCanceled" ifEvents="connectionCanceled">
cawthron
parents:
diff changeset
   420
				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
cawthron
parents:
diff changeset
   421
void ${event.handlerName}( CWebClientEngine& anEngine );
cawthron
parents:
diff changeset
   422
]]>				</template>
cawthron
parents:
diff changeset
   423
cawthron
parents:
diff changeset
   424
			<template id="InvokeHandler" location="ClientConnectionCanceledBody">
cawthron
parents:
diff changeset
   425
${event.handlerName}( anEngine );
cawthron
parents:
diff changeset
   426
			</template>
cawthron
parents:
diff changeset
   427
cawthron
parents:
diff changeset
   428
			<defineLocation id="ConnectionCanceledHandler" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   429
				owned="false"
cawthron
parents:
diff changeset
   430
				isEventHandler="true"
cawthron
parents:
diff changeset
   431
				location="function(${handlerClassName}::${event.handlerName}(CWebClientEngine&amp;))">
cawthron
parents:
diff changeset
   432
				<template><![CDATA[
cawthron
parents:
diff changeset
   433
/** 
cawthron
parents:
diff changeset
   434
 * Handle the ${event.eventName} event.
cawthron
parents:
diff changeset
   435
 */
cawthron
parents:
diff changeset
   436
void ${handlerClassName}::${event.handlerName}( 
cawthron
parents:
diff changeset
   437
		CWebClientEngine& /*anEngine*/ )
cawthron
parents:
diff changeset
   438
	{
cawthron
parents:
diff changeset
   439
	// TODO: implement ${event.eventName} event handler
cawthron
parents:
diff changeset
   440
	}
cawthron
parents:
diff changeset
   441
]]>				
cawthron
parents:
diff changeset
   442
					</template>
cawthron
parents:
diff changeset
   443
			</defineLocation>
cawthron
parents:
diff changeset
   444
			<template id="RealizeHandler" location="ConnectionCanceledHandler"/>
cawthron
parents:
diff changeset
   445
		</templateGroup>
cawthron
parents:
diff changeset
   446
<!-- end ClientConnectionCanceled -->
cawthron
parents:
diff changeset
   447
cawthron
parents:
diff changeset
   448
<!-- begin ClientResponseComplete -->
cawthron
parents:
diff changeset
   449
		<defineLocation id="ClientResponseComplete" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   450
						owned="false"
cawthron
parents:
diff changeset
   451
						location="function(${handlerClassName}::ClientResponseCompleteL(CWebClientEngine&amp;))">
cawthron
parents:
diff changeset
   452
			<template><![CDATA[
cawthron
parents:
diff changeset
   453
/**
cawthron
parents:
diff changeset
   454
 * ClientResponseCompleteL
cawthron
parents:
diff changeset
   455
 * Called to notify that a transaction's response is complete.
cawthron
parents:
diff changeset
   456
 * See TTransactionEvent::EResponseComplete
cawthron
parents:
diff changeset
   457
 */			
cawthron
parents:
diff changeset
   458
void ${className}::ClientResponseCompleteL( 
cawthron
parents:
diff changeset
   459
		CWebClientEngine& anEngine )
cawthron
parents:
diff changeset
   460
	{
cawthron
parents:
diff changeset
   461
	}
cawthron
parents:
diff changeset
   462
]]>			</template>
cawthron
parents:
diff changeset
   463
		</defineLocation>
cawthron
parents:
diff changeset
   464
		<template location="ClientResponseComplete"/>
cawthron
parents:
diff changeset
   465
		
cawthron
parents:
diff changeset
   466
		<defineLocation id="ClientResponseCompleteBody" baseLocation="ClientResponseComplete"
cawthron
parents:
diff changeset
   467
			owned="true" location="region(Generated Code)"/>
cawthron
parents:
diff changeset
   468
		<template id="RealizeClientResponseCompleteBody" location="ClientResponseCompleteBody"/>
cawthron
parents:
diff changeset
   469
cawthron
parents:
diff changeset
   470
		<templateGroup id="ResponseComplete" ifEvents="responseComplete">
cawthron
parents:
diff changeset
   471
				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
cawthron
parents:
diff changeset
   472
void ${event.handlerName}( CWebClientEngine& anEngine );
cawthron
parents:
diff changeset
   473
]]>				</template>
cawthron
parents:
diff changeset
   474
cawthron
parents:
diff changeset
   475
			<template id="InvokeHandler" location="ClientResponseCompleteBody">
cawthron
parents:
diff changeset
   476
${event.handlerName}( anEngine );
cawthron
parents:
diff changeset
   477
			</template>
cawthron
parents:
diff changeset
   478
cawthron
parents:
diff changeset
   479
			<defineLocation id="ResponseCompleteHandler" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   480
				owned="false"
cawthron
parents:
diff changeset
   481
				isEventHandler="true"
cawthron
parents:
diff changeset
   482
				location="function(${handlerClassName}::${event.handlerName}(CWebClientEngine&amp;))">
cawthron
parents:
diff changeset
   483
				<template><![CDATA[
cawthron
parents:
diff changeset
   484
/** 
cawthron
parents:
diff changeset
   485
 * Handle the ${event.eventName} event.
cawthron
parents:
diff changeset
   486
 */
cawthron
parents:
diff changeset
   487
void ${handlerClassName}::${event.handlerName}( 
cawthron
parents:
diff changeset
   488
		CWebClientEngine& /*anEngine*/ )
cawthron
parents:
diff changeset
   489
	{
cawthron
parents:
diff changeset
   490
	// TODO: implement ${event.eventName} event handler
cawthron
parents:
diff changeset
   491
	}
cawthron
parents:
diff changeset
   492
]]>				
cawthron
parents:
diff changeset
   493
					</template>
cawthron
parents:
diff changeset
   494
			</defineLocation>
cawthron
parents:
diff changeset
   495
			<template id="RealizeHandler" location="ResponseCompleteHandler"/>
cawthron
parents:
diff changeset
   496
		</templateGroup>
cawthron
parents:
diff changeset
   497
<!-- end ClientResponseComplete -->
cawthron
parents:
diff changeset
   498
cawthron
parents:
diff changeset
   499
<!-- begin ClientTransactionSucceeded -->
cawthron
parents:
diff changeset
   500
		<defineLocation id="ClientTransactionSucceeded" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   501
						owned="false"
cawthron
parents:
diff changeset
   502
						location="function(${handlerClassName}::ClientTransactionSucceededL(CWebClientEngine&amp;))">
cawthron
parents:
diff changeset
   503
			<template><![CDATA[
cawthron
parents:
diff changeset
   504
/**
cawthron
parents:
diff changeset
   505
 * ClientTransactionSucceededL()
cawthron
parents:
diff changeset
   506
 * Called to notify that a transaction completed successfully
cawthron
parents:
diff changeset
   507
 * See TTransactionEvent::ESucceeded
cawthron
parents:
diff changeset
   508
 */			
cawthron
parents:
diff changeset
   509
void ${className}::ClientTransactionSucceededL( 
cawthron
parents:
diff changeset
   510
		CWebClientEngine& anEngine )
cawthron
parents:
diff changeset
   511
	{
cawthron
parents:
diff changeset
   512
	}
cawthron
parents:
diff changeset
   513
]]>			</template>
cawthron
parents:
diff changeset
   514
		</defineLocation>
cawthron
parents:
diff changeset
   515
		<template location="ClientTransactionSucceeded"/>
cawthron
parents:
diff changeset
   516
		
cawthron
parents:
diff changeset
   517
		<defineLocation id="ClientTransactionSucceededBody" baseLocation="ClientTransactionSucceeded"
cawthron
parents:
diff changeset
   518
			owned="true" location="region(Generated Code)"/>
cawthron
parents:
diff changeset
   519
		<template id="RealizeClientTransactionSucceededBody" location="ClientTransactionSucceededBody"/>
cawthron
parents:
diff changeset
   520
			
cawthron
parents:
diff changeset
   521
		<template location="ClientTransactionSucceededBody"><![CDATA[
cawthron
parents:
diff changeset
   522
<%  var dialogInstance = lookupInstanceByName(instance.properties.waitDialog);
cawthron
parents:
diff changeset
   523
	if (dialogInstance != null) { %>
cawthron
parents:
diff changeset
   524
Remove${titleCase(dialogInstance.properties.name)}L();
cawthron
parents:
diff changeset
   525
<% } %> ]]></template>
cawthron
parents:
diff changeset
   526
cawthron
parents:
diff changeset
   527
		<templateGroup id="TransactionSucceeded" ifEvents="transactionSucceeded">
cawthron
parents:
diff changeset
   528
				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
cawthron
parents:
diff changeset
   529
void ${event.handlerName}( CWebClientEngine& anEngine );
cawthron
parents:
diff changeset
   530
]]>				</template>
cawthron
parents:
diff changeset
   531
cawthron
parents:
diff changeset
   532
			<template id="InvokeHandler" location="ClientTransactionSucceededBody">
cawthron
parents:
diff changeset
   533
${event.handlerName}( anEngine );
cawthron
parents:
diff changeset
   534
			</template>
cawthron
parents:
diff changeset
   535
cawthron
parents:
diff changeset
   536
			<defineLocation id="TransactionSucceededHandler" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   537
				owned="false"
cawthron
parents:
diff changeset
   538
				isEventHandler="true"
cawthron
parents:
diff changeset
   539
				location="function(${handlerClassName}::${event.handlerName}(CWebClientEngine&amp;))">
cawthron
parents:
diff changeset
   540
				<template><![CDATA[
cawthron
parents:
diff changeset
   541
/** 
cawthron
parents:
diff changeset
   542
 * Handle the ${event.eventName} event.
cawthron
parents:
diff changeset
   543
 */
cawthron
parents:
diff changeset
   544
void ${handlerClassName}::${event.handlerName}( 
cawthron
parents:
diff changeset
   545
		CWebClientEngine& /*anEngine*/ )
cawthron
parents:
diff changeset
   546
	{
cawthron
parents:
diff changeset
   547
	// TODO: implement ${event.eventName} event handler
cawthron
parents:
diff changeset
   548
	}
cawthron
parents:
diff changeset
   549
]]>				</template>
cawthron
parents:
diff changeset
   550
			</defineLocation>
cawthron
parents:
diff changeset
   551
			<template id="RealizeHandler" location="TransactionSucceededHandler"/>
cawthron
parents:
diff changeset
   552
		</templateGroup>
cawthron
parents:
diff changeset
   553
<!-- end ClientTransactionSucceeded -->
cawthron
parents:
diff changeset
   554
cawthron
parents:
diff changeset
   555
<!-- begin ClientTransactionFailed -->
cawthron
parents:
diff changeset
   556
		<defineLocation id="ClientTransactionFailed" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   557
						owned="false"
cawthron
parents:
diff changeset
   558
						location="function(${handlerClassName}::ClientTransactionFailedL(CWebClientEngine&amp;))">
cawthron
parents:
diff changeset
   559
			<template><![CDATA[
cawthron
parents:
diff changeset
   560
/** 
cawthron
parents:
diff changeset
   561
 * ClientTransactionFailedL()
cawthron
parents:
diff changeset
   562
 * Catch-all for failure. 
cawthron
parents:
diff changeset
   563
 * See TTransactionEvent::EFailed
cawthron
parents:
diff changeset
   564
 */			
cawthron
parents:
diff changeset
   565
void ${className}::ClientTransactionFailedL( 
cawthron
parents:
diff changeset
   566
		CWebClientEngine& anEngine )
cawthron
parents:
diff changeset
   567
	{
cawthron
parents:
diff changeset
   568
	}
cawthron
parents:
diff changeset
   569
]]>			</template>
cawthron
parents:
diff changeset
   570
		</defineLocation>
cawthron
parents:
diff changeset
   571
		<template location="ClientTransactionFailed"/>
cawthron
parents:
diff changeset
   572
		
cawthron
parents:
diff changeset
   573
		<defineLocation id="ClientTransactionFailedBody" baseLocation="ClientTransactionFailed"
cawthron
parents:
diff changeset
   574
			owned="true" location="region(Generated Code)"/>
cawthron
parents:
diff changeset
   575
		<template id="RealizeClientTransactionFailedBody" location="ClientTransactionFailedBody"/>
cawthron
parents:
diff changeset
   576
cawthron
parents:
diff changeset
   577
		<template location="ClientTransactionFailedBody"><![CDATA[
cawthron
parents:
diff changeset
   578
<%  var dialogInstance = lookupInstanceByName(instance.properties.waitDialog);
cawthron
parents:
diff changeset
   579
	if (dialogInstance != null) { %>
cawthron
parents:
diff changeset
   580
Remove${titleCase(dialogInstance.properties.name)}L();
cawthron
parents:
diff changeset
   581
<% } %> ]]></template>
cawthron
parents:
diff changeset
   582
cawthron
parents:
diff changeset
   583
		<templateGroup id="TransactionFailed" ifEvents="transactionFailed">
cawthron
parents:
diff changeset
   584
				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
cawthron
parents:
diff changeset
   585
void ${event.handlerName}( CWebClientEngine& anEngine );
cawthron
parents:
diff changeset
   586
]]>				</template>
cawthron
parents:
diff changeset
   587
cawthron
parents:
diff changeset
   588
			<template id="InvokeHandler" location="ClientTransactionFailedBody">
cawthron
parents:
diff changeset
   589
${event.handlerName}( anEngine );
cawthron
parents:
diff changeset
   590
			</template>
cawthron
parents:
diff changeset
   591
cawthron
parents:
diff changeset
   592
			<defineLocation id="TransactionFailedHandler" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   593
				owned="false"
cawthron
parents:
diff changeset
   594
				isEventHandler="true"
cawthron
parents:
diff changeset
   595
				location="function(${handlerClassName}::${event.handlerName}(CWebClientEngine&amp;))">
cawthron
parents:
diff changeset
   596
				<template><![CDATA[
cawthron
parents:
diff changeset
   597
/** 
cawthron
parents:
diff changeset
   598
 * Handle the ${event.eventName} event.
cawthron
parents:
diff changeset
   599
 */
cawthron
parents:
diff changeset
   600
void ${handlerClassName}::${event.handlerName}( 
cawthron
parents:
diff changeset
   601
		CWebClientEngine& /*anEngine*/ )
cawthron
parents:
diff changeset
   602
	{
cawthron
parents:
diff changeset
   603
	// TODO: implement ${event.eventName} event handler
cawthron
parents:
diff changeset
   604
	}
cawthron
parents:
diff changeset
   605
]]>				
cawthron
parents:
diff changeset
   606
					</template>
cawthron
parents:
diff changeset
   607
			</defineLocation>
cawthron
parents:
diff changeset
   608
			<template id="RealizeHandler" location="TransactionFailedHandler"/>
cawthron
parents:
diff changeset
   609
		</templateGroup>
cawthron
parents:
diff changeset
   610
<!-- end ClientTransactionFailed -->
cawthron
parents:
diff changeset
   611
cawthron
parents:
diff changeset
   612
<!-- begin ClientUnknownEvent -->
cawthron
parents:
diff changeset
   613
		<defineLocation id="ClientUnknownEvent" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   614
						owned="false"
cawthron
parents:
diff changeset
   615
						location="function(${handlerClassName}::ClientUnknownEventL(CWebClientEngine&amp;, TInt))">
cawthron
parents:
diff changeset
   616
			<template><![CDATA[
cawthron
parents:
diff changeset
   617
/**
cawthron
parents:
diff changeset
   618
  * ClientUnknownEventL
cawthron
parents:
diff changeset
   619
  * Called to notify that an unknown HTTP event has
cawthron
parents:
diff changeset
   620
  * been received.
cawthron
parents:
diff changeset
   621
  * @param aStatus: the iStatus field of the event
cawthron
parents:
diff changeset
   622
  * See THTTPEvent::iStatus
cawthron
parents:
diff changeset
   623
  */			
cawthron
parents:
diff changeset
   624
void ${className}::ClientUnknownEventL( 
cawthron
parents:
diff changeset
   625
		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   626
		TInt aStatus )
cawthron
parents:
diff changeset
   627
	{
cawthron
parents:
diff changeset
   628
	}
cawthron
parents:
diff changeset
   629
]]>			</template>
cawthron
parents:
diff changeset
   630
		</defineLocation>
cawthron
parents:
diff changeset
   631
		<template location="ClientUnknownEvent"/>
cawthron
parents:
diff changeset
   632
		
cawthron
parents:
diff changeset
   633
		<defineLocation id="ClientUnknownEventBody" baseLocation="ClientUnknownEvent"
cawthron
parents:
diff changeset
   634
			owned="true" location="region(Generated Code)"/>
cawthron
parents:
diff changeset
   635
		<template id="RealizeClientUnknownEventBody" location="ClientUnknownEventBody"/>
cawthron
parents:
diff changeset
   636
cawthron
parents:
diff changeset
   637
		<templateGroup id="UnknownEvent" ifEvents="unknownEvent">
cawthron
parents:
diff changeset
   638
				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
cawthron
parents:
diff changeset
   639
void ${event.handlerName}( 
cawthron
parents:
diff changeset
   640
		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   641
		TInt aStatus );
cawthron
parents:
diff changeset
   642
]]>				</template>
cawthron
parents:
diff changeset
   643
cawthron
parents:
diff changeset
   644
			<template id="InvokeHandler" location="ClientUnknownEventBody">
cawthron
parents:
diff changeset
   645
${event.handlerName}( anEngine, aStatus );
cawthron
parents:
diff changeset
   646
			</template>
cawthron
parents:
diff changeset
   647
cawthron
parents:
diff changeset
   648
			<defineLocation id="UnknownEventHandler" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   649
				owned="false"
cawthron
parents:
diff changeset
   650
				isEventHandler="true"
cawthron
parents:
diff changeset
   651
				location="function(${handlerClassName}::${event.handlerName}(CWebClientEngine&amp;,TInt))">
cawthron
parents:
diff changeset
   652
				<template><![CDATA[
cawthron
parents:
diff changeset
   653
/** 
cawthron
parents:
diff changeset
   654
 * Handle the ${event.eventName} event.
cawthron
parents:
diff changeset
   655
 */
cawthron
parents:
diff changeset
   656
void ${handlerClassName}::${event.handlerName}( 
cawthron
parents:
diff changeset
   657
		CWebClientEngine& /*anEngine*/, 
cawthron
parents:
diff changeset
   658
		TInt /*aStatus*/ )
cawthron
parents:
diff changeset
   659
	{
cawthron
parents:
diff changeset
   660
	// TODO: implement ${event.eventName} event handler
cawthron
parents:
diff changeset
   661
	}
cawthron
parents:
diff changeset
   662
]]>				
cawthron
parents:
diff changeset
   663
					</template>
cawthron
parents:
diff changeset
   664
			</defineLocation>
cawthron
parents:
diff changeset
   665
			<template id="RealizeHandler" location="UnknownEventHandler"/>
cawthron
parents:
diff changeset
   666
		</templateGroup>
cawthron
parents:
diff changeset
   667
<!-- end ClientUnknownEvent -->
cawthron
parents:
diff changeset
   668
cawthron
parents:
diff changeset
   669
<!-- begin ClientRunError -->
cawthron
parents:
diff changeset
   670
		<defineLocation id="ClientRunError" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   671
						owned="false"
cawthron
parents:
diff changeset
   672
						location="function(${handlerClassName}::ClientRunErrorL(CWebClientEngine&amp;, TInt))">
cawthron
parents:
diff changeset
   673
			<template><![CDATA[
cawthron
parents:
diff changeset
   674
/**
cawthron
parents:
diff changeset
   675
 * ClientRunErrorL()
cawthron
parents:
diff changeset
   676
 * Called when a error occurs in the handling of a transaction event.
cawthron
parents:
diff changeset
   677
 * @param anError: the error code
cawthron
parents:
diff changeset
   678
 */			
cawthron
parents:
diff changeset
   679
void ${className}::ClientRunErrorL( 
cawthron
parents:
diff changeset
   680
		CWebClientEngine& anEngine,
cawthron
parents:
diff changeset
   681
		TInt anError )
cawthron
parents:
diff changeset
   682
	{
cawthron
parents:
diff changeset
   683
	}
cawthron
parents:
diff changeset
   684
]]>			</template>
cawthron
parents:
diff changeset
   685
		</defineLocation>
cawthron
parents:
diff changeset
   686
		<template location="ClientRunError"/>
cawthron
parents:
diff changeset
   687
		
cawthron
parents:
diff changeset
   688
		<defineLocation id="ClientRunErrorBody" baseLocation="ClientRunError"
cawthron
parents:
diff changeset
   689
			owned="true" location="region(Generated Code)"/>
cawthron
parents:
diff changeset
   690
		<template id="RealizeClientRunErrorBody" location="ClientRunErrorBody"/>
cawthron
parents:
diff changeset
   691
			
cawthron
parents:
diff changeset
   692
		<template location="ClientRunErrorBody"><![CDATA[
cawthron
parents:
diff changeset
   693
<%  var dialogInstance = lookupInstanceByName(instance.properties.waitDialog);
cawthron
parents:
diff changeset
   694
	if (dialogInstance != null) { %>
cawthron
parents:
diff changeset
   695
Remove${titleCase(dialogInstance.properties.name)}L();
cawthron
parents:
diff changeset
   696
<% } %> ]]></template>
cawthron
parents:
diff changeset
   697
cawthron
parents:
diff changeset
   698
		<templateGroup id="RunError" ifEvents="runError">
cawthron
parents:
diff changeset
   699
				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
cawthron
parents:
diff changeset
   700
void ${event.handlerName}( 
cawthron
parents:
diff changeset
   701
		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   702
		TInt anError );
cawthron
parents:
diff changeset
   703
]]>				</template>
cawthron
parents:
diff changeset
   704
cawthron
parents:
diff changeset
   705
			<template id="InvokeHandler" location="ClientRunErrorBody">
cawthron
parents:
diff changeset
   706
${event.handlerName}( anEngine, anError );
cawthron
parents:
diff changeset
   707
			</template>
cawthron
parents:
diff changeset
   708
cawthron
parents:
diff changeset
   709
			<defineLocation id="RunErrorHandler" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   710
				owned="false"
cawthron
parents:
diff changeset
   711
				isEventHandler="true"
cawthron
parents:
diff changeset
   712
				location="function(${handlerClassName}::${event.handlerName}(CWebClientEngine&amp;, TInt))">
cawthron
parents:
diff changeset
   713
				<template><![CDATA[
cawthron
parents:
diff changeset
   714
/** 
cawthron
parents:
diff changeset
   715
 * Handle the ${event.eventName} event.
cawthron
parents:
diff changeset
   716
 */
cawthron
parents:
diff changeset
   717
void ${handlerClassName}::${event.handlerName}( 
cawthron
parents:
diff changeset
   718
		CWebClientEngine& /*anEngine*/, 
cawthron
parents:
diff changeset
   719
		TInt /*anError*/ )
cawthron
parents:
diff changeset
   720
	{
cawthron
parents:
diff changeset
   721
	// TODO: implement ${event.eventName} event handler
cawthron
parents:
diff changeset
   722
	}
cawthron
parents:
diff changeset
   723
]]>				
cawthron
parents:
diff changeset
   724
					</template>
cawthron
parents:
diff changeset
   725
			</defineLocation>
cawthron
parents:
diff changeset
   726
			<template id="RealizeHandler" location="RunErrorHandler"/>
cawthron
parents:
diff changeset
   727
		</templateGroup>
cawthron
parents:
diff changeset
   728
<!-- end ClientRunError -->
cawthron
parents:
diff changeset
   729
cawthron
parents:
diff changeset
   730
<!-- begin ClientGetCredentials -->
cawthron
parents:
diff changeset
   731
cawthron
parents:
diff changeset
   732
		<defineLocation id="ClientGetCredentials" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   733
						owned="false"
cawthron
parents:
diff changeset
   734
						location="function(${handlerClassName}::ClientGetCredentialsL(CWebClientEngine&amp;, const TUriC8&amp;, const TDesC8&amp;, TDes&amp;, TDes&amp;))">
cawthron
parents:
diff changeset
   735
			<template><![CDATA[
cawthron
parents:
diff changeset
   736
/**
cawthron
parents:
diff changeset
   737
 * ClientGetCredentialsL()
cawthron
parents:
diff changeset
   738
 * Called when authentication has been requested by the server.
cawthron
parents:
diff changeset
   739
 * Return EFalse for no authentication or e.g. the user cancels
cawthron
parents:
diff changeset
   740
 * an input dialog. Otherwise return the user name and password 
cawthron
parents:
diff changeset
   741
 * as out parameters along with an ETrue result.
cawthron
parents:
diff changeset
   742
 * @param aUri: the current URI
cawthron
parents:
diff changeset
   743
 * @param aRealm: the realm associated with the request
cawthron
parents:
diff changeset
   744
 * @param aUserName: the returned user name
cawthron
parents:
diff changeset
   745
 * @param aPassword: the returned password
cawthron
parents:
diff changeset
   746
 */		
cawthron
parents:
diff changeset
   747
TBool ${className}::ClientGetCredentialsL( 
cawthron
parents:
diff changeset
   748
		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   749
		const TUriC8& aUri, 
cawthron
parents:
diff changeset
   750
		const TDesC8& aRealm, 
cawthron
parents:
diff changeset
   751
		TDes& aUsername, 
cawthron
parents:
diff changeset
   752
		TDes& aPassword )
cawthron
parents:
diff changeset
   753
	{
cawthron
parents:
diff changeset
   754
	}
cawthron
parents:
diff changeset
   755
]]>			</template>
cawthron
parents:
diff changeset
   756
		</defineLocation>
cawthron
parents:
diff changeset
   757
		<template location="ClientGetCredentials"/>
cawthron
parents:
diff changeset
   758
		
cawthron
parents:
diff changeset
   759
		<defineLocation id="ClientGetCredentialsBody" baseLocation="ClientGetCredentials"
cawthron
parents:
diff changeset
   760
			owned="true" location="region(Generated Code)"/>
cawthron
parents:
diff changeset
   761
		<template id="RealizeClientGetCredentialsBody" location="ClientGetCredentialsBody"/>
cawthron
parents:
diff changeset
   762
			
cawthron
parents:
diff changeset
   763
		<template location="ClientGetCredentialsBody"><![CDATA[
cawthron
parents:
diff changeset
   764
<%  var queryInstance = lookupInstanceByName(instance.properties.credentialsQuery);
cawthron
parents:
diff changeset
   765
	if (queryInstance != null) { %>
cawthron
parents:
diff changeset
   766
TInt result = Run${titleCase(instance.properties.credentialsQuery)}L( aUsername, aPassword, ETrue );
cawthron
parents:
diff changeset
   767
return result == EAknSoftkeyOk;
cawthron
parents:
diff changeset
   768
<% } else {%>return EFalse;
cawthron
parents:
diff changeset
   769
<% } %>]]> </template>
cawthron
parents:
diff changeset
   770
cawthron
parents:
diff changeset
   771
<!-- end ClientGetCredentials -->
cawthron
parents:
diff changeset
   772
cawthron
parents:
diff changeset
   773
		<defineLocation id="ISSUE_HTTP_GETL_METHOD" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   774
					owned="true"
cawthron
parents:
diff changeset
   775
					location="function(${className}::IssueHTTPGetL(const TDesC8*))">
cawthron
parents:
diff changeset
   776
			<template><![CDATA[
cawthron
parents:
diff changeset
   777
			
cawthron
parents:
diff changeset
   778
/**
cawthron
parents:
diff changeset
   779
 * Initiate the HTTP GET transaction. Progress and data will
cawthron
parents:
diff changeset
   780
 * be provided through the MWebClientObserver callback methods.
cawthron
parents:
diff changeset
   781
 * If configured in the UI Designer, the wait dialog is executed
cawthron
parents:
diff changeset
   782
 * before returning.
cawthron
parents:
diff changeset
   783
 * @param aUrl: if non-null this is used as the URL to fetch. Otherwise
cawthron
parents:
diff changeset
   784
 * the URL configured in the UI Designer is used.
cawthron
parents:
diff changeset
   785
 */	
cawthron
parents:
diff changeset
   786
void ${className}::IssueHTTPGetL( const TDesC8* aUrl )
cawthron
parents:
diff changeset
   787
	{
cawthron
parents:
diff changeset
   788
<%  var dialogInstance = lookupInstanceByName(instance.properties.waitDialog);
cawthron
parents:
diff changeset
   789
	if (dialogInstance != null) { %>
cawthron
parents:
diff changeset
   790
	Execute${titleCase(dialogInstance.properties.name)}LD();
cawthron
parents:
diff changeset
   791
<% } %>
cawthron
parents:
diff changeset
   792
	if ( aUrl != NULL )
cawthron
parents:
diff changeset
   793
		{
cawthron
parents:
diff changeset
   794
		${instanceMemberName}->IssueHTTPGetL( *aUrl );
cawthron
parents:
diff changeset
   795
		}
cawthron
parents:
diff changeset
   796
<% if (instance.properties.defaultURL != null) { %>	else 
cawthron
parents:
diff changeset
   797
		{
cawthron
parents:
diff changeset
   798
		_LIT8( url, "${instance.properties.defaultURL}" );
cawthron
parents:
diff changeset
   799
		${instanceMemberName}->IssueHTTPGetL( url );
cawthron
parents:
diff changeset
   800
		}
cawthron
parents:
diff changeset
   801
<% } %>
cawthron
parents:
diff changeset
   802
	}
cawthron
parents:
diff changeset
   803
]]>				</template>
cawthron
parents:
diff changeset
   804
		</defineLocation>
cawthron
parents:
diff changeset
   805
		<template id="RealizeHttpGetLMethod" location="ISSUE_HTTP_GETL_METHOD"/>
cawthron
parents:
diff changeset
   806
	
cawthron
parents:
diff changeset
   807
		<template mode="upgrade(1.0,1.1)" location="HEADER_FILE"><![CDATA[
cawthron
parents:
diff changeset
   808
@@@ add unowned include
cawthron
parents:
diff changeset
   809
  // ]]] end generated region [Generated Includes]
cawthron
parents:
diff changeset
   810
+ #include "WebClientEngine.h"
cawthron
parents:
diff changeset
   811
]]>			</template>
cawthron
parents:
diff changeset
   812
			
cawthron
parents:
diff changeset
   813
			<template mode="upgrade(1.0,1.1)" location="CLASS"><![CDATA[
cawthron
parents:
diff changeset
   814
@@@ add unowned method declaration
cawthron
parents:
diff changeset
   815
  protected:
cawthron
parents:
diff changeset
   816
+ // Implementations of MWebClientObserver methods
cawthron
parents:
diff changeset
   817
+ void ClientOpenSessionFailedL( 
cawthron
parents:
diff changeset
   818
+ 		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   819
+ 		TInt anError );
cawthron
parents:
diff changeset
   820
]]>			</template>
cawthron
parents:
diff changeset
   821
			
cawthron
parents:
diff changeset
   822
			<template mode="upgrade(1.0,1.1)" location="CLASS"><![CDATA[
cawthron
parents:
diff changeset
   823
@@@ add unowned method declaration
cawthron
parents:
diff changeset
   824
  protected:
cawthron
parents:
diff changeset
   825
+ void ClientConnectingL( 
cawthron
parents:
diff changeset
   826
+ 		CWebClientEngine& anEngine );
cawthron
parents:
diff changeset
   827
]]>			</template>
cawthron
parents:
diff changeset
   828
			
cawthron
parents:
diff changeset
   829
			<template mode="upgrade(1.0,1.1)" location="CLASS"><![CDATA[
cawthron
parents:
diff changeset
   830
@@@ add unowned method declaration
cawthron
parents:
diff changeset
   831
  protected:
cawthron
parents:
diff changeset
   832
+ void ClientHeaderReceivedL( 
cawthron
parents:
diff changeset
   833
+ 		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   834
+ 		const TDesC& aHeaderData );
cawthron
parents:
diff changeset
   835
]]>			</template>
cawthron
parents:
diff changeset
   836
			
cawthron
parents:
diff changeset
   837
			<template mode="upgrade(1.0,1.1)" location="CLASS"><![CDATA[
cawthron
parents:
diff changeset
   838
@@@ add unowned method declaration
cawthron
parents:
diff changeset
   839
  protected:
cawthron
parents:
diff changeset
   840
+ void ClientBodyReceivedL( 
cawthron
parents:
diff changeset
   841
+ 		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   842
+ 		const TDesC8& aBodyData );
cawthron
parents:
diff changeset
   843
]]>			</template>
cawthron
parents:
diff changeset
   844
			
cawthron
parents:
diff changeset
   845
			<template mode="upgrade(1.0,1.1)" location="CLASS"><![CDATA[
cawthron
parents:
diff changeset
   846
@@@ add unowned method declaration
cawthron
parents:
diff changeset
   847
  protected:
cawthron
parents:
diff changeset
   848
+ void ClientConnectionCanceledL( 
cawthron
parents:
diff changeset
   849
+ 		CWebClientEngine& anEngine );
cawthron
parents:
diff changeset
   850
]]>			</template>
cawthron
parents:
diff changeset
   851
			
cawthron
parents:
diff changeset
   852
			<template mode="upgrade(1.0,1.1)" location="CLASS"><![CDATA[
cawthron
parents:
diff changeset
   853
@@@ add unowned method declaration
cawthron
parents:
diff changeset
   854
  protected:
cawthron
parents:
diff changeset
   855
+ void ClientResponseCompleteL( 
cawthron
parents:
diff changeset
   856
+ 		CWebClientEngine& anEngine );
cawthron
parents:
diff changeset
   857
]]>			</template>
cawthron
parents:
diff changeset
   858
			
cawthron
parents:
diff changeset
   859
			<template mode="upgrade(1.0,1.1)" location="CLASS"><![CDATA[
cawthron
parents:
diff changeset
   860
@@@ add unowned method declaration
cawthron
parents:
diff changeset
   861
  protected:
cawthron
parents:
diff changeset
   862
+ void ClientTransactionSucceededL( 
cawthron
parents:
diff changeset
   863
+ 		CWebClientEngine& anEngine );
cawthron
parents:
diff changeset
   864
]]>			</template>
cawthron
parents:
diff changeset
   865
			
cawthron
parents:
diff changeset
   866
			<template mode="upgrade(1.0,1.1)" location="CLASS"><![CDATA[
cawthron
parents:
diff changeset
   867
@@@ add unowned method declaration
cawthron
parents:
diff changeset
   868
  protected:
cawthron
parents:
diff changeset
   869
+ void ClientTransactionFailedL( 
cawthron
parents:
diff changeset
   870
+ 		CWebClientEngine& anEngine );
cawthron
parents:
diff changeset
   871
]]>			</template>
cawthron
parents:
diff changeset
   872
			
cawthron
parents:
diff changeset
   873
			<template mode="upgrade(1.0,1.1)" location="CLASS"><![CDATA[
cawthron
parents:
diff changeset
   874
@@@ add unowned method declaration
cawthron
parents:
diff changeset
   875
  protected:
cawthron
parents:
diff changeset
   876
+ void ClientUnknownEventL( 
cawthron
parents:
diff changeset
   877
+ 		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   878
+ 		TInt aStatus );
cawthron
parents:
diff changeset
   879
]]>			</template>
cawthron
parents:
diff changeset
   880
			
cawthron
parents:
diff changeset
   881
			<template mode="upgrade(1.0,1.1)" location="CLASS"><![CDATA[
cawthron
parents:
diff changeset
   882
@@@ add unowned method declaration
cawthron
parents:
diff changeset
   883
  protected:
cawthron
parents:
diff changeset
   884
+ void ClientRunErrorL( 
cawthron
parents:
diff changeset
   885
+ 		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   886
+ 		TInt anError );
cawthron
parents:
diff changeset
   887
]]>			</template>
cawthron
parents:
diff changeset
   888
			
cawthron
parents:
diff changeset
   889
			<template mode="upgrade(1.0,1.1)" location="CLASS"><![CDATA[
cawthron
parents:
diff changeset
   890
@@@ add unowned method declaration
cawthron
parents:
diff changeset
   891
  protected:
cawthron
parents:
diff changeset
   892
+ TBool ClientGetCredentialsL( 
cawthron
parents:
diff changeset
   893
+ 		CWebClientEngine& anEngine, 
cawthron
parents:
diff changeset
   894
+ 		const TUriC8& aUri, 
cawthron
parents:
diff changeset
   895
+ 		const TDesC8& aRealm, 
cawthron
parents:
diff changeset
   896
+ 		TDes& aUsername, 
cawthron
parents:
diff changeset
   897
+ 		TDes& aPassword );
cawthron
parents:
diff changeset
   898
]]>			</template>
cawthron
parents:
diff changeset
   899
			
cawthron
parents:
diff changeset
   900
cawthron
parents:
diff changeset
   901
		</sourceGen>
cawthron
parents:
diff changeset
   902
	</component>		
cawthron
parents:
diff changeset
   903
</componentDefinition>