smf/smfservermodule/smfclient/client/smfclient_p.h
changeset 18 013a02bf2bb0
parent 17 106a4bfcb866
child 19 c412f0526c34
equal deleted inserted replaced
17:106a4bfcb866 18:013a02bf2bb0
     1 /**
       
     2  * Copyright (c) 2010 Sasken Communication Technologies Ltd.
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of the "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  * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
       
    11  *
       
    12  * Contributors:
       
    13  * Manasij Roy, Nalina Hariharan
       
    14  */
       
    15 
       
    16 #ifndef SMFCLIENT_P_H_
       
    17 #define SMFCLIENT_P_H_
       
    18 
       
    19 #include "smfprovider.h"
       
    20 #include "smfobserver.h"
       
    21 #include <QObject>
       
    22 #include <QDateTime>
       
    23 #include <QStringList>
       
    24 #include "smfclient.h"
       
    25 #include "smfclientglobal.h"
       
    26 #include "smfglobal.h"
       
    27 #ifdef Q_OS_SYMBIAN
       
    28 #include "smfclientsymbian.h"
       
    29 #else
       
    30 #include "smfclientqt.h"
       
    31 #endif
       
    32 /**
       
    33  * Private Qt wrapper
       
    34  * Provided to accomodate diff facilities in diff platforms.
       
    35  * Uses Symbian client-server for Symbian
       
    36  * QDbus for linux
       
    37  * QLocalserver for rest of the platforms
       
    38  * Note:- only symbian client-server impl is provided at the moment
       
    39  */
       
    40 class SmfClientPrivate : public smfObserver
       
    41 {
       
    42   Q_OBJECT
       
    43 
       
    44 public:
       
    45 
       
    46   /**
       
    47    * Constructs SmfClientPrivate
       
    48    * @param client SmfClient instance, so that it can directly emit SmfClient's signal
       
    49    */
       
    50   SmfClientPrivate(SmfClient* client=0);
       
    51   ~SmfClientPrivate(){};
       
    52 public:
       
    53   /**
       
    54    * Corresponds to SmfClient::GetServices(const QString )
       
    55    */
       
    56   QList<SmfProvider>* GetServices(const QString serviceName);
       
    57    /**
       
    58     * From smfobserver.
       
    59     * This callback is invoked when requested result is available from
       
    60     * other components of Smf (specially from plugin manager).
       
    61     * @param result Parsed and serialized result.
       
    62     * @param opcode Request code.
       
    63     * @param error Error
       
    64     */
       
    65    void resultsAvailable(QByteArray result,SmfRequestTypeID opcode,SmfError error);
       
    66 private:
       
    67   QList<SmfProvider>* m_baseProvider;
       
    68   //serialized byte array of provider
       
    69   QByteArray m_providerSerialized;
       
    70 #ifdef Q_OS_SYMBIAN
       
    71   CSmfClientSymbian* m_SmfClientPrivate;
       
    72   friend class CSmfClientSymbian;
       
    73 #else
       
    74   SmfClientQt* m_SmfClientPrivate;
       
    75   friend class SmfClientQt;
       
    76 #endif
       
    77   bool m_connected;
       
    78   SmfClient* m_client;
       
    79   //debugging only
       
    80   void writeLog(QString log) const;
       
    81 
       
    82 };
       
    83 
       
    84 #endif /* SMFCLIENT_P_H_ */