summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxnavigatorpps.h
blob: cbe0f99621cfd4e38fb989a8f22e57141eb9f264 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (C) 2012 Research In Motion
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#ifndef QQNXNAVIGATORPPS_H
#define QQNXNAVIGATORPPS_H

#include "qqnxabstractnavigator.h"

QT_BEGIN_NAMESPACE

template <typename K, typename V> class QHash;

class QQnxNavigatorPps : public QQnxAbstractNavigator
{
    Q_OBJECT
public:
    explicit QQnxNavigatorPps(QObject *parent = nullptr);
    ~QQnxNavigatorPps();

protected:
    bool requestInvokeUrl(const QByteArray &encodedUrl) override;

private:
    bool openPpsConnection();

    bool sendPpsMessage(const QByteArray &message, const QByteArray &data);
    void parsePPS(const QByteArray &ppsData, QHash<QByteArray, QByteArray> &messageFields);

    int m_fd;
    static const char *navigatorControlPath;
    static const size_t ppsBufferSize;
};

QT_END_NAMESPACE

#endif // QQNXNAVIGATORPPS_H