51
|
1 |
/*
|
|
2 |
* Copyright (c) 2006 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 "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: Testing context wrapper
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef CPRFWTESTCONTEXTWRAPPERMGR_H
|
|
20 |
#define CPRFWTESTCONTEXTWRAPPERMGR_H
|
|
21 |
|
|
22 |
#include <e32base.h>
|
|
23 |
#include <ximpbase.h>
|
|
24 |
|
|
25 |
#include "prfwteststatuseventlistener.h"
|
|
26 |
|
|
27 |
class MXIMPClient;
|
|
28 |
class CXIMPTestContextWrapper;
|
|
29 |
class MXIMPContext;
|
|
30 |
class CXIMPTestStatusEventListener;
|
|
31 |
class CXIMPTestMessenger;
|
|
32 |
|
|
33 |
/**
|
|
34 |
* Manager for wrappers.
|
|
35 |
* Owns the wrappers and provides convenience methods for
|
|
36 |
* test code.
|
|
37 |
*
|
|
38 |
* @since S60 v4.0
|
|
39 |
*/
|
|
40 |
class CXIMPTestContextWrapperMgr : public CBase
|
|
41 |
{
|
|
42 |
public:
|
|
43 |
|
|
44 |
IMPORT_C static CXIMPTestContextWrapperMgr* NewL();
|
|
45 |
virtual ~CXIMPTestContextWrapperMgr();
|
|
46 |
|
|
47 |
private:
|
|
48 |
|
|
49 |
CXIMPTestContextWrapperMgr();
|
|
50 |
void ConstructL();
|
|
51 |
|
|
52 |
public:
|
|
53 |
|
|
54 |
/**
|
|
55 |
* Creates a wrapper. The presence client can be given for wrappers
|
|
56 |
* which share a presence client.
|
|
57 |
* @param aClientIndex Use the client from this wrapper
|
|
58 |
* If aClientIndex is KErrNotFound, creates a new client.
|
|
59 |
*/
|
|
60 |
IMPORT_C void CreateWrapperL( TInt aClientIndex = KErrNotFound );
|
|
61 |
|
|
62 |
/**
|
|
63 |
* Direct access to a wrapper. Ownership NOT transferred.
|
|
64 |
* @param aIndex The index of desired wrapper
|
|
65 |
*/
|
|
66 |
IMPORT_C CXIMPTestContextWrapper* GetWrapperL( TInt aIndex );
|
|
67 |
|
|
68 |
/**
|
|
69 |
* Count of wrappers
|
|
70 |
*/
|
|
71 |
IMPORT_C TInt WrapperCount() const;
|
|
72 |
|
|
73 |
private: // data
|
|
74 |
|
|
75 |
RXIMPObjOwningPtrArray<CXIMPTestContextWrapper> iWrappers;
|
|
76 |
RXIMPObjOwningPtrArray<MXIMPClient> iPrClients;
|
|
77 |
|
|
78 |
TInt iIndex;
|
|
79 |
};
|
|
80 |
|
|
81 |
#endif // CPRFWTESTCONTEXTWRAPPERMGR_H
|