contentstorage/caclient/inc/cahandlerproxy.h
changeset 83 156f692b1687
child 99 7aaf39b772ac
equal deleted inserted replaced
80:397d00875918 83:156f692b1687
       
     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;
       
    30 
       
    31 class CaHandlerProxy
       
    32 {
       
    33 public:
       
    34 
       
    35     ~CaHandlerProxy();
       
    36 
       
    37     explicit CaHandlerProxy(const QSharedPointer<CaHandlerLoader> &loader);
       
    38 
       
    39     ErrorCode execute(const CaEntry &entry, const QString &commandName);
       
    40 
       
    41 private:
       
    42     CaHandler *getHandler(const CaEntry &entry,
       
    43                           const QString &commandName);
       
    44 
       
    45     typedef QMap<QString, QSharedPointer<CaHandler> > ImplementationMap;
       
    46     typedef ImplementationMap::iterator ImplementationMapIterator;
       
    47 
       
    48     QSharedPointer<CaHandlerLoader> mLoader;
       
    49     ImplementationMap mImplementationMap;
       
    50 };
       
    51 
       
    52 #endif // CAHANDLERPROXY_H