96
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 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:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef CAHANDLERPROXY_H
|
|
19 |
#define CAHANDLERPROXY_H
|
|
20 |
|
|
21 |
#include <QMap>
|
|
22 |
#include <QString>
|
|
23 |
#include <QSharedPointer>
|
|
24 |
|
|
25 |
#include <cadefs.h>
|
|
26 |
|
|
27 |
#include "cahandlerloader.h"
|
|
28 |
|
|
29 |
class CaEntry;
|
127
|
30 |
class CaHandlersPreloader;
|
96
|
31 |
|
|
32 |
class CaHandlerProxy
|
|
33 |
{
|
|
34 |
public:
|
|
35 |
|
|
36 |
~CaHandlerProxy();
|
|
37 |
|
|
38 |
explicit CaHandlerProxy(const QSharedPointer<CaHandlerLoader> &loader);
|
|
39 |
|
116
|
40 |
int execute(const CaEntry &entry, const QString &commandName,
|
|
41 |
QObject* receiver = NULL, const char* member = NULL);
|
127
|
42 |
|
|
43 |
void preloadHandlers();
|
96
|
44 |
|
|
45 |
private:
|
127
|
46 |
CaHandler *getHandler(const QString &entryTypeName);
|
96
|
47 |
|
127
|
48 |
typedef QMap< QString, QSharedPointer<CaHandler> > ImplementationMap;
|
96
|
49 |
typedef ImplementationMap::iterator ImplementationMapIterator;
|
|
50 |
|
|
51 |
QSharedPointer<CaHandlerLoader> mLoader;
|
|
52 |
ImplementationMap mImplementationMap;
|
127
|
53 |
|
|
54 |
CaHandlersPreloader *mHandlersPreloader; /// Own;
|
|
55 |
|
|
56 |
friend class CaHandlersPreloader;
|
96
|
57 |
};
|
|
58 |
|
|
59 |
#endif // CAHANDLERPROXY_H
|