smf/smfservermodule/smfserver/server/smfserverqt_p.h
author James Aley <jamesa@symbian.org>
Mon, 07 Jun 2010 11:43:45 +0100
changeset 13 b5d63d5fc252
parent 10 77a56c951f86
child 14 a469c0e6e7fb
permissions -rw-r--r--
Basic functionality on desktop server build. Started a test for GetServices
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>
13
b5d63d5fc252 Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents: 10
diff changeset
    26
class SmfServer;
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    27
class QLocalServer;
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    28
class QLocalSocket;
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    29
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    30
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
    31
{
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    32
    Q_OBJECT
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    33
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    34
public:
13
b5d63d5fc252 Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents: 10
diff changeset
    35
    SmfServerQt(SmfServer* wrapper);
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    36
    ~SmfServerQt();
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    37
13
b5d63d5fc252 Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents: 10
diff changeset
    38
    inline SmfServer *wrapper() const;
b5d63d5fc252 Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents: 10
diff changeset
    39
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    40
    bool start();
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    41
    int sessionListCount() const;
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    42
    void writeLog(QString log) const;
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    43
    void clientAuthorizationFinished(bool success);
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    44
    int findAndServiceclient(int requestID,QByteArray* parsedData,SmfError error);
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    45
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    46
private slots:
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    47
    void newClientConnected();
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    48
    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
    49
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    50
private:
13
b5d63d5fc252 Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents: 10
diff changeset
    51
    SmfServer *m_generic;
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    52
    QLocalServer *m_server;
13
b5d63d5fc252 Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents: 10
diff changeset
    53
    QList<SmfServerQtSession*> m_sessions;
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    54
};
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    55
13
b5d63d5fc252 Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents: 10
diff changeset
    56
inline SmfServer *SmfServerQt::wrapper() const
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    57
{
13
b5d63d5fc252 Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents: 10
diff changeset
    58
    return m_generic;
b5d63d5fc252 Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents: 10
diff changeset
    59
}
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    60
7
be09cf1f39dd Updating the source code for plugin manager, transport manager, smfserver and smf client.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    61
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents: 7
diff changeset
    62
#endif // SMFSERVERQT_P_H