summaryrefslogtreecommitdiffstats
path: root/tests/manual/examples/twittertimeline/twitter.h
blob: edf1158e64e8faa8bd5f36dfefd5b01cc5aeaa1b (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
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

#ifndef TWITTERTIMELINE_TWITTER_H
#define TWITTERTIMELINE_TWITTER_H

#include <QtCore>
#include <QtNetwork>
#include <QtNetworkAuth>

class Twitter : public QOAuth1
{
    Q_OBJECT

public:
    Twitter(QObject *parent = nullptr);
    Twitter(const std::pair<QString, QString> &clientCredentials, QObject *parent = nullptr);
    Twitter(const QString &screenName,
            const std::pair<QString, QString> &clientCredentials,
            QObject *parent = nullptr);

signals:
    void authenticated();

private:
    Q_DISABLE_COPY(Twitter)

    QOAuthHttpServerReplyHandler *replyHandler = nullptr;
};

#endif // TWITTERTIMELINE_TWITTER_H