smf/smfservermodule/smfserver/server/smfserverqt_p.h
author cgandhi <chandradeep.gandhi@sasken.com>
Wed, 23 Jun 2010 19:51:49 +0530
changeset 14 a469c0e6e7fb
parent 13 b5d63d5fc252
child 18 013a02bf2bb0
permissions -rw-r--r--
changes for SmfPost, SmfCredentialMgr, PLuginManager, SmfServer. Adding Sample Plugins and Sample Client Applications.

/**
 * Copyright (c) 2010 Sasken Communication Technologies Ltd.
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the "Eclipse Public License v1.0" 
 * which accompanies  this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html"
 *
 * Initial Contributors:
 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
 *
 * Contributors:
 * Manasij Roy, Nalina Hariharan
* Description:
* SMF Server implementation for platforms other than Symbian.
* Uses  QLocalServer-QLocalSocket classes
*
*/

#ifndef SMFSERVERQT_P_H
#define SMFSERVERQT_P_H

#include "smfglobal.h"

#include <QObject>
class SmfServer;
class QLocalServer;
class QLocalSocket;

class SmfServerQt : public QObject
{
    Q_OBJECT

public:
    SmfServerQt(SmfServer* wrapper);
    ~SmfServerQt();

    inline SmfServer *wrapper() const;

    bool start();
    int sessionListCount() const;
    //void writeLog(QString log) const;
    void clientAuthorizationFinished(bool success);
    int findAndServiceclient(int requestID,QByteArray* parsedData,SmfError error);

    ~SmfServerQt() {}
    bool start() {return false;}
    int sessionListCount() const {return 0;}
private slots:
    void newClientConnected();
    void removeFromList();

private:
    SmfServer *m_generic;
    QLocalServer *m_server;
    QList<SmfServerQtSession*> m_sessions;
};

inline SmfServer *SmfServerQt::wrapper() const
{
    return m_generic;
}
    
private:
    SmfServerQt *iServer;
    QLocalSocket *iClientConnection;

};

#endif // SMFSERVERQT_P_H