smf/smfservermodule/smfserver/server/smfserverqt_p.h
author James Aley <jamesa@symbian.org>
Fri, 21 May 2010 15:45:10 +0100
changeset 10 77a56c951f86
parent 7 be09cf1f39dd
child 13 b5d63d5fc252
permissions -rw-r--r--
Fixed build for Qt desktop
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     1
/**
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     2
 * Copyright (c) 2010 Sasken Communication Technologies Ltd.
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     3
 * All rights reserved.
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     5
 * under the terms of the "Eclipse Public License v1.0" 
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     6
 * which accompanies  this distribution, and is available
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html"
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     8
 *
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     9
 * Initial Contributors:
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    10
 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    11
 *
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    12
 * Contributors:
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    13
 * Manasij Roy, Nalina Hariharan
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    14
 * Description:
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    15
 * SMF Server implementation for platforms other than Symbian.
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    16
 * Uses  QLocalServer-QLocalSocket classes
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    17
 *
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    18
 */
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    19
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    20
#ifndef SMFSERVERQT_P_H
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    21
#define SMFSERVERQT_P_H
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    22
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    23
#include "smfglobal.h"
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    24
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    25
#include <QObject>
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    26
class QLocalServer;
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    27
class QLocalSocket;
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    28
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    29
class SmfServerQt : public QObject
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    30
{
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    31
    Q_OBJECT
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    32
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    33
public:
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    34
    SmfServerQt();
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    35
    ~SmfServerQt();
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    36
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    37
    bool start();
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    38
    int sessionListCount() const;
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    39
    void writeLog(QString log) const;
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    40
    void clientAuthorizationFinished(bool success);
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    41
    int findAndServiceclient(int requestID,QByteArray* parsedData,SmfError error);
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    42
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    43
private slots:
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    44
    void newClientConnected();
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    45
    void removeFromList();
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    46
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    47
private:
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    48
    QLocalServer *m_server;
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    49
    QLocalSocket *m_client;
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    50
};
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    51
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    52
class SmfServerQtSession : public QObject
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    53
{
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    54
    Q_OBJECT
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    55
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    56
public:
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    57
    SmfServerQtSession(QLocalSocket *clientConnection, SmfServerQt *server);
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    58
    ~SmfServerQtSession();
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    59
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    60
    void clientAuthorizationFinished(bool success);
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    61
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    62
public slots:
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    63
    void readDataFromClient();
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    64
    
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    65
private:
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    66
    SmfServerQt *m_server;
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    67
    QLocalSocket *m_clientConnection;
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    68
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    69
};
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    70
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    71
#endif // SMFSERVERQT_P_H