smf/smfservermodule/smfclient/client/smfclientqt.h
author James Aley <jamesa@symbian.org>
Fri, 21 May 2010 16:50:44 +0100
changeset 12 5bed45b14781
parent 10 77a56c951f86
child 13 b5d63d5fc252
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
     1
/**
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
     2
 * Copyright (c) 2010 Sasken Communication Technologies Ltd.
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
     3
 * All rights reserved.
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
     5
 * under the terms of the "Eclipse Public License v1.0"
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
     6
 * which accompanies  this distribution, and is available
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html"
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
     8
 *
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
     9
 * Initial Contributors:
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    10
 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    11
 *
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    12
 * Contributors:
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    13
 * Manasij Roy, Nalina Hariharan
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    14
 */
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    15
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    16
#ifndef SMFCLIENTQT_H
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    17
#define SMFCLIENTQT_H
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    18
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    19
#include <QObject>
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    20
#include <QByteArray>
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    21
#include <QString>
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    22
#include "smfglobal.h"
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    23
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    24
class SmfClientQt : public QObject
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    25
{
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    26
Q_OBJECT
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    27
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    28
public:
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    29
    explicit SmfClientQt(QObject *parent = 0);
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    30
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    31
public:
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    32
    /**
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    33
     * Send a request to the server.
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    34
     * @param aSerializedData serialized by the caller.
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    35
     * @param aInterfaceName Interface name
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    36
     * @param requestType Opcode
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    37
     */
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    38
    int sendRequest(QByteArray& aSerializedData,
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    39
                QString aInterfaceName,
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    40
                SmfRequestTypeID requestType);
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    41
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    42
    /**
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    43
     * This overloaded API is for ESmfGetServices, where data should be
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    44
     * fetched synchronously
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    45
     */
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    46
    QByteArray sendRequest(QString aInterfaceName,
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    47
                SmfRequestTypeID requestType);
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    48
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    49
    /**
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    50
     * For testing purpose only
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    51
     */
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    52
    int sendDummyRequest(QByteArray* provider,QString aInterfaceName,
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    53
                SmfRequestTypeID requestType);
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    54
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    55
    /**
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    56
    * CancelRequest.
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    57
    * Cancels an outstanding request.
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    58
    */
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    59
    void CancelRequest();
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    60
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    61
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    62
signals:
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    63
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    64
public slots:
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    65
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    66
};
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    67
77a56c951f86 Fixed build for Qt desktop
James Aley <jamesa@symbian.org>
parents:
diff changeset
    68
#endif // SMFCLIENTQT_H