summaryrefslogtreecommitdiffstats
path: root/plugins/contacts/symbian/contactsmodel/cntsrv/inc/ccntrequest.h
blob: e15fa0e271c295bc45f35d37b54e837e69ee7b70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
/*
* Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
* Contact: http://www.qt-project.org/legal
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
*
*/



 
#ifndef __CCNTREQUEST_H__
#define __CCNTREQUEST_H__

#include <e32base.h>
#include <cntdb.h>

#include "cactiveloop.h"

enum TAccept		// TAccept is the return value for CState::AcceptRequestL methods
	{
	EProcessed = 0,	    // The State object has processed the request
	EDeferred,		    // The State object cannot processed the request at this moment and wish to defer processing
	EOwnershipPassed    // The State object has seized the request from its owner
	};
	
const TInt KFirstRequest = 0;
const TInt KOneSecond 	 = 1000000;
const TInt KSixtySeconds = 60000000;

class CState;
class CCntPackager;
class CContactItem;
class CCntStateMachine;
class CCntRequestTimer;
class CCntServerSpeedDialManager;
class CCntServerSpeedDialTable;
class MIniFileManager;
class CRequestStore;

/**
 These request classes are based on the Command Pattern
 All request class derive from the base class CCntRequest and implement
 a VisitStateL method. The VisitStateL method is called by the 
 CStateMachine class. When invoking the VisitStateL on a request object, 
 the CStateMachine provides the current active state class (a class derived from CState).
*/

class CCntRequest : public CBase
	{
public:
	// Complete the RMessage
	virtual void Complete(TInt aErrorCode = KErrNone);

	// Base declaration of the visitor pattern method.
	virtual TAccept VisitStateL(CState& aState) = 0; 
	virtual ~CCntRequest();
	inline const TUint SessionId();
	inline const TInt  TimeOut();
	// Request timeout methods - requests timeout when the 
	// statemachine is not able to process the request.
	void ActivateTimeOutL (CRequestStore& aReqStore);	
	void DeActivateTimeOut();	
	void SetTimeOutError  (TInt aError);
	TInt TimeOutError() const;
	
protected:
	CCntRequest(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	inline CCntRequest(const TUint aSessionId);
	inline CCntRequest();

protected:
	RMessage2 	iMessage;
	const TUint iSessionId;

private:
	// A request is only valid for a set period of time.
	// if not completed within this given time, the request object
	// should be completed and destroyed.
	const TInt  		iTimeOut;
	TInt				iTimeOutError;
	CCntRequestTimer*	iTimer;
	};


/**
   The CReqInternal class is the parent class for a group of special request classes.
   These classes are internal classes, they are NOT created in response to a Contact Model
   client proxy request. That is, classes derived from CReqInternal don't originate 
   in the Session. They contain neither a message nor a session ID.
*/
class CReqInternal : public CCntRequest
	{
public:
	// Override these methods so that they do not refer to iMessage which does
	// not exist for internal requests.
	void Complete(TInt aErrorCode = KErrNone);
	
protected:	
	~CReqInternal();
	CReqInternal();
	CReqInternal(const TUint aSessionId);
	};




/**
 When a request is deferred by the state machine it can only live for a give time
 The CCntRequestTimer monitors the life of a deferred request.
*/ 
class CCntRequestTimer : CTimer
	{
public:
	static CCntRequestTimer* NewL(CCntRequest& aRequest, CRequestStore& aReqStore);
	~CCntRequestTimer();
	void Start();
	void Stop ();
private:
	CCntRequestTimer(CCntRequest& aRequest, CRequestStore& aReqStore);
	void RunL();
	void ConstructL();
private:
	CCntRequest& iRequest;		
	// After a request timeout it must be removed from the request store
	// refer to note 3 in the CCntRequest.cpp
	CRequestStore& iReqStore; 
							  
	};


/**
 Open a file asyncronously - syncronous open works in the same manner as
 async open and also result in this request being created.
*/ 
class CReqAsyncOpen : public CCntRequest
	{
public:	
	static CReqAsyncOpen* NewLC(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);

	TAccept VisitStateL(CState& aState);
	// The FileManagerController can modify the filename 
	// - it is responsible for setting the default name
	TDes& FileName(); 
	
protected:
	inline CReqAsyncOpen(const TUint aSessionId);
	
private:
	CReqAsyncOpen(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	void ConstructL();
	
protected:
	TFileName iFilename;	
	};


/** Reopen the database file - Note that unlike the CReqAsyncOpen class the CReqReOpen does not contain
    a filename. Reopen opens the last opened file and does not have a filename. 
*/ 
class CReqReOpen : public CCntRequest
	{
public:	
	static CReqReOpen* NewLC(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	TAccept VisitStateL(CState& aState);

private:
	CReqReOpen(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	};


/**
  Close the database tables
*/ 
class CReqCloseTables : public CCntRequest
	{
public:	
 	static CReqCloseTables* NewLC(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
  	TAccept VisitStateL(CState& aState);
  
private:
  	CReqCloseTables(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
 
  	};

	
// Database Transaction Request Classes	
	
/**
 Request to begin a transaction	
*/ 
class CReqDbBeginTrans : public CCntRequest
	{
public:	
	static CReqDbBeginTrans* NewLC(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	TAccept VisitStateL(CState& aState);

private:
	CReqDbBeginTrans (const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	};	
	
	
/**
 Request to Commit a transaction	
*/ 
class CReqDbCommitTrans : public CCntRequest
	{
public:	
	static CReqDbCommitTrans* NewLC(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	TAccept VisitStateL(CState& aState);

private:
	CReqDbCommitTrans(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	};
	
	
	
/**
 Request to Rollback a transaction
*/ 
class CReqDbRollbackTrans : public CCntRequest
	{
public:	
	static CReqDbRollbackTrans* NewLC(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	TAccept VisitStateL(CState& aState);

private:
	CReqDbRollbackTrans(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	};
	
	





/** 
 Parent Class for CReqUpdateCnt & CReqCommitCnt
*/
class CReqUpdate : public CCntRequest
	{
public:	
	TAccept VisitStateL(CState& aState) = 0;
	~CReqUpdate();
	inline CContactItem& Item();

protected:
	CReqUpdate(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	void ConstructL(CCntPackager& aPackager);

private:
	CContactItem* iCntItem;
	};



/** 
 Update a contact item - used in conjunction with Read
*/
class CReqUpdateCnt : public CReqUpdate
	{
public:	
	static CReqUpdateCnt* NewLC(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut, CCntPackager& aPackager);
	TAccept VisitStateL(CState& aState);
	~CReqUpdateCnt(){};

private:
	CReqUpdateCnt(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	};




class CReqSetSpeedDial : public CCntRequest
	{
public:	
	static CReqSetSpeedDial* NewLC(	const TUint aSessionId, 
									const RMessage2& aMessage, 
									const TInt aTimeOut, 
									CContactItemViewDef& aItemViewDef,
									CCntServerSpeedDialManager& aSpeedDialManager,
									const CCntServerSpeedDialTable& aTable,
									MIniFileManager& aIniFileManager);
	TAccept VisitStateL(CState& aState);
	~CReqSetSpeedDial(){};
	const CContactItemViewDef& ItemViewDef();
	TInt SpeedDialIndex();
	TContactItemId TheContactId();
	TInt TheFieldIndex();
	CCntServerSpeedDialManager& SpeedDialManager();
	const CCntServerSpeedDialTable& SpeedDialTable();
	MIniFileManager& IniFileManager();
private:
	CReqSetSpeedDial(	const TUint aSessionId, 
						const RMessage2& aMessage, 
						const TInt aTimeOut, 
						CContactItemViewDef& aItemViewDef,
						CCntServerSpeedDialManager& aSpeedDialManager,
						const CCntServerSpeedDialTable& aTable,
						MIniFileManager& aIniFileManager);
	void ConstructL();
	CContactItemViewDef* iItemViewDef;
	TInt iSpeedDialIndex;
	TContactItemId iContactId;
	TInt iTheFieldIndex;
	CCntServerSpeedDialManager& iSpeedDialManager;
	const CCntServerSpeedDialTable& iTable;
	MIniFileManager& iIniFileManager;
	};



class CReqSetOwnCard : public CReqUpdate
	{
public:	
	static CReqSetOwnCard* NewLC(	const TUint aSessionId, 
									const RMessage2& aMessage, 
									const TInt aTimeOut, 
									CCntPackager& aPackager,
									CContactItemViewDef& aItemViewDef,
									MIniFileManager& aIniFileManager);
	TAccept VisitStateL(CState& aState);
	~CReqSetOwnCard(){};
	const CContactItemViewDef& ItemViewDef();
	TContactItemId TheContactId();
	MIniFileManager& IniFileManager();


private:
	CReqSetOwnCard(	const TUint aSessionId, 
						const RMessage2& aMessage, 
						const TInt aTimeOut, 
						CContactItemViewDef& aItemViewDef,
						MIniFileManager& aIniFileManager);
	CContactItemViewDef* iItemViewDef;
	TContactItemId iContactId;
	MIniFileManager& iIniFileManager;
	};
	
	


/**
 Commit a contact item - used in conjunction with Open
*/ 
class CReqCommitCnt : public CReqUpdate
	{
public:	
	static CReqCommitCnt* NewLC(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut, CCntPackager& aPackager);
	TAccept VisitStateL(CState& aState);
	~CReqCommitCnt(){};

private:
	CReqCommitCnt(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	};




/**
 Parent Class for CReqOpenCnt & CReqReadCnt
*/ 
class CReqRead : public CCntRequest
	{
public:	
	TAccept VisitStateL(CState& aState) = 0;
	~CReqRead();
	const CContactItemViewDef& ItemViewDef();
	inline TContactItemId CntItemId() const;
	void CompleteL(const CContactItem& aCntItem);

protected:
	CReqRead(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut, CCntPackager& aPackager, CContactItemViewDef& aItemViewDef);
	void ConstructL();

private:
	CCntPackager& iPackager;
	CContactItemViewDef* iItemViewDef;
	TBool iViewDefCreated;
	};


/**
 Stop opening the database 
*/ 
class CReqCancelAsyncOpen : public CCntRequest
	{
public:
	static CReqCancelAsyncOpen* NewLC(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	TAccept VisitStateL(CState& aState);
	
protected:
	inline CReqCancelAsyncOpen(const TUint aSessionId);

private:
	CReqCancelAsyncOpen(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	};



/**
 Open a contact item
*/ 
class CReqOpenCnt : public CReqRead
	{
public:	
	static CReqOpenCnt* NewLC(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut, CCntPackager& aPackager, CContactItemViewDef& aItemViewDef);
	TAccept VisitStateL(CState& aState);
	~CReqOpenCnt();

private:
	CReqOpenCnt(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut, CCntPackager& aPackager, CContactItemViewDef& aItemViewDef);
	};






/** 
 Read a contact item
*/
class CReqReadCnt : public CReqRead
	{
public:	
	static  CReqReadCnt* NewLC(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut, CCntPackager& aPackager, CContactItemViewDef& aItemViewDef);
	TAccept VisitStateL(CState& aState);
	~CReqReadCnt();

private:
	CReqReadCnt(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut, CCntPackager& aPackager, CContactItemViewDef& aItemViewDef);
	};




/**
 Delete a contact item
*/ 
class CReqDeleteCnt : public CCntRequest
	{
public:	
	static CReqDeleteCnt* NewLC(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	TAccept VisitStateL(CState& aState);
	~CReqDeleteCnt();
	inline TContactItemId CntItemId() const;
	inline TCntSendEventAction NotificationEventAction() const;

private:
	CReqDeleteCnt(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	};


// Close a contact item - Used in conjunction with open
class CReqCloseCnt : public CCntRequest
	{
public:	
	static CReqCloseCnt* NewLC(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	TAccept VisitStateL(CState& aState);
	~CReqCloseCnt();
	inline TContactItemId CntItemId()const;

private:
	CReqCloseCnt(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	};



// Create a contact item
class CReqCreateCnt : public CCntRequest
	{
public:	
	static CReqCreateCnt* NewLC(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut, CCntPackager& aPackager);
	TAccept VisitStateL(CState& aState);
	~CReqCreateCnt();
	inline CContactItem& Item() const;
private:
	void ConstructL(CCntPackager& aPackager);
	CReqCreateCnt(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
private:
	CContactItem* iCntItem;
	};


/** Backup and Restore requests.*/

/** Backup/restore beginning request.
*/
class CReqBackupRestoreBegin : public CReqInternal
	{
public:	
	static CReqBackupRestoreBegin* NewLC();
	inline ~CReqBackupRestoreBegin();
	TAccept VisitStateL(CState& aState);
	
private:
	inline CReqBackupRestoreBegin();
	};

/** Backup or restore completed request.
*/
class CReqBackupRestoreEnd : public CReqInternal
	{
public:	
	static CReqBackupRestoreEnd* NewLC();
	inline ~CReqBackupRestoreEnd();
	TAccept VisitStateL(CState& aState);
	
private:
	inline CReqBackupRestoreEnd();
	};



/** Low disk space requests.*/


/** Low disk space request.
*/
class CReqDiskSpaceLow : public CReqInternal
	{
public:	
	static CReqDiskSpaceLow* NewLC();
	inline ~CReqDiskSpaceLow();
	TAccept VisitStateL(CState& aState);
	
private:
	inline CReqDiskSpaceLow();
	};

	
/** Normal (i.e. not low) disk space request.
*/
class CReqDiskSpaceNormal : public CReqInternal
	{
public:	
	static CReqDiskSpaceNormal* NewLC();
	inline ~CReqDiskSpaceNormal();
	TAccept VisitStateL(CState& aState);
	
private:
	inline CReqDiskSpaceNormal();
	};


/** Async activity requests.*/


/** Indicate async activity request.
*/
class CReqAsyncActivity : public CCntRequest
	{
public:	
	static CReqAsyncActivity* NewLC(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	TAccept VisitStateL(CState& aState);
	
private:
	CReqAsyncActivity(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	};

	
/** Indicate no async activity request.
*/
class CReqNoAsyncActivity : public CCntRequest
	{
public:	
	static CReqNoAsyncActivity* NewLC(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	TAccept VisitStateL(CState& aState);
	
private:
	CReqNoAsyncActivity(const TUint aSessionId, const RMessage2& aMessage, const TInt aTimeOut);
	};


/* The CReqInternalSessionUnlock is created when a session closes. Any locked contact
   items that the session left locked are removed by this internal request.
   The CReqInternalSessionUnlock is called from the session destructor
*/
class CReqInternalSessionUnlock : public CReqInternal
	{
public:	
	static CReqInternalSessionUnlock* NewLC(TInt aSessionId);
	TAccept VisitStateL(CState& aState);
	inline ~CReqInternalSessionUnlock();

private:
	inline CReqInternalSessionUnlock(TInt aSessionId);
	};
	
/* Open a file asyncronously - this one is used within the server,
   so it does not need to hold a RMessage to Complete().
*/
class CReqInternalAsyncOpen : public CReqAsyncOpen
	{
public:	
	static CReqInternalAsyncOpen* NewLC(const TUint aSessionId, const TDesC& aFileName, TRequestStatus& aStatus);

	// Override these methods so that they do not refer to iMessage which does
	// not exist for this internal request.
	void Complete(TInt aErrorCode = KErrNone);
	
private:
	CReqInternalAsyncOpen(const TUint aSessionId, const TDesC& aFileName, TRequestStatus& aStatus);
	void ConstructL();
	
private:
	TRequestStatus* iStatus;
	};	

// Stop opening the database - this version is used internal to the server
class CReqCancelInternalAsyncOpen : public CReqCancelAsyncOpen
	{
public:
	static CReqCancelInternalAsyncOpen* NewLC(const TUint aSessionId);
	
	// Override these methods so that they do not refer to iMessage which does
	// not exist for this internal request.
	void Complete(TInt aErrorCode = KErrNone);

private:
	inline CReqCancelInternalAsyncOpen(const TUint aSessionId);
	};



/**
 Store for deferred requests, which could not be processed by the state machine.
*/ 
class CRequestStore : public CBase, public MActiveLoopCallBack 
	{
public:
	static CRequestStore* NewL(CCntStateMachine& aStateMachine);
	~CRequestStore();
	void  AppendL   (CCntRequest* aRequest);
	TBool IsEmpty ();
	void  ActivateRequestsL();	
	TBool DoStepL();
	void  DoError(TInt aError);
	void  RemoveD(CCntRequest* aRequest);

private:
	CRequestStore(CCntStateMachine& aStateMachine);
	CCntRequest* Request();
	
private:	
	CCntStateMachine& 		   iStateMachine;
	RPointerArray<CCntRequest> iStore;
	CActiveLoop* 			   iActive;
	CCntRequest* 			   iCurrentRequest;
	TInt					   iNoOfRequests;
	};




inline const TUint CCntRequest::SessionId()  
	{ 
	return iSessionId;
	}

inline const TInt CCntRequest::TimeOut()
    { 
    return iTimeOut;
    }


/**
 This base constructor is used by derived request classes that represent requests
 originating outside the server - from the client session
*/ 
inline CCntRequest::CCntRequest(const TUint aSessionId):iSessionId(aSessionId), iTimeOut(0)
	{
	}
	
/**
 This base constructor is used by derived request class that represent requests
 originating FROM WITHIN the server 
*/
inline CCntRequest::CCntRequest():iSessionId(0), iTimeOut(0)
	{
	}

/**
 The constructor for the parent class of all requests originating within the server
*/
inline CReqInternal::CReqInternal()
	{
	};
	
inline CReqInternal::CReqInternal(const TUint aSessionId) : 
	CCntRequest(aSessionId)
	{
	};
	
inline CReqInternal::~CReqInternal()
	{
	};

inline CContactItem& CReqUpdate::Item() 
	{
	return *iCntItem;
	}

/**
 Get the contact ID
*/
inline TContactItemId CReqRead::CntItemId() const
	{
	return iMessage.Int2();
	}

inline TContactItemId CReqDeleteCnt::CntItemId()const
	{
	return iMessage.Int0();
	}

inline TCntSendEventAction CReqDeleteCnt::NotificationEventAction() const
    {
    return static_cast<TCntSendEventAction>(iMessage.Int1());
    }

inline TContactItemId CReqCloseCnt::CntItemId()const
 	{
 	return iMessage.Int0();
 	}

/**
 Get the Contact Item
*/
inline CContactItem& CReqCreateCnt::Item() const 
	{ 
	return *iCntItem;
	}

inline CReqBackupRestoreBegin::CReqBackupRestoreBegin()
	{
	}

inline CReqBackupRestoreEnd::CReqBackupRestoreEnd()
	{
	}

inline CReqDiskSpaceLow::CReqDiskSpaceLow()
	{
	}

inline CReqDiskSpaceNormal::CReqDiskSpaceNormal()
	{
	}

inline CReqInternalSessionUnlock::~CReqInternalSessionUnlock()
	{
	}

inline CReqInternalSessionUnlock::CReqInternalSessionUnlock(TInt aSessionId) : CReqInternal (aSessionId) 
	{
	}

inline CReqDiskSpaceNormal::~CReqDiskSpaceNormal()
	{
	}

inline CReqDiskSpaceLow::~CReqDiskSpaceLow()
	{
	}

inline CReqBackupRestoreEnd::~CReqBackupRestoreEnd()
	{
	}

inline CReqBackupRestoreBegin::~CReqBackupRestoreBegin()
	{
	}

inline CReqAsyncOpen::CReqAsyncOpen(const TUint aSessionId) : CCntRequest(aSessionId)
	{
	}

inline CReqCancelAsyncOpen::CReqCancelAsyncOpen(const TUint aSessionId) : CCntRequest(aSessionId)
	{
	}

inline CReqCancelInternalAsyncOpen::CReqCancelInternalAsyncOpen(const TUint aSessionId) : CReqCancelAsyncOpen(aSessionId)
	{
	}

#endif //CCNTREQUEST_H