19
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: A class to simulate sync behaviour for getlist Iterator.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
#ifndef SYNCBEHAVIOUR_H
|
|
22 |
#define SYNCBEHAVIOUR_H
|
|
23 |
|
|
24 |
#include <e32base.h>
|
|
25 |
|
|
26 |
|
|
27 |
class CContactSyncIter:public CActive
|
|
28 |
{
|
|
29 |
CContactSyncIter();
|
|
30 |
|
|
31 |
public:
|
|
32 |
static CContactSyncIter* NewL();
|
|
33 |
|
|
34 |
// Sets the request status to KRequestPending and Starts the Scheduler
|
|
35 |
void Wait();
|
|
36 |
|
|
37 |
//Called from RunL(). Stops the Scheduler
|
|
38 |
void Signal();
|
|
39 |
|
|
40 |
~CContactSyncIter();
|
|
41 |
private:
|
|
42 |
void RunL();
|
|
43 |
void DoCancel();
|
|
44 |
void ConstructL();
|
|
45 |
|
|
46 |
// In case that a scheduler is not already installed
|
|
47 |
CActiveScheduler* iNewscheduler;
|
|
48 |
|
|
49 |
// Used to Wait for completion
|
|
50 |
CActiveSchedulerWait* iWaitScheduler;
|
|
51 |
|
|
52 |
TInt iInstalled;
|
|
53 |
|
|
54 |
};
|
|
55 |
|
|
56 |
#endif //SYNCBEHAVIOUR_H |