File indexing completed on 2025-01-19 03:55:37

0001 #ifndef MSGRAPH_H
0002 #define MSGRAPH_H
0003 
0004 #include <QObject>
0005 
0006 #include "o2msgraph.h"
0007 
0008 class MsgraphDemo : public QObject
0009 {
0010     Q_OBJECT
0011 
0012 public:
0013     explicit MsgraphDemo(QObject *parent = 0);
0014 
0015 signals:
0016     void extraTokensReady(const QVariantMap &extraTokens);
0017     void linkingFailed();
0018     void linkingSucceeded();
0019     void userPrincipalNameReceived();
0020     void userPrincipalNameFailed();
0021 
0022 public slots:
0023     void doOAuth(O2::GrantFlow grantFlowType);
0024     void getUserPrincipalName();
0025 
0026 private slots:
0027     void onLinkedChanged();
0028     void onLinkingSucceeded();
0029     void onOpenBrowser(const QUrl &url);
0030     void onCloseBrowser();
0031     void onFinished(int, QNetworkReply::NetworkError, QByteArray);
0032 
0033 private:
0034     O2Msgraph *o2Msgraph_;
0035     int requestId_;
0036 };
0037 
0038 #endif // MSGRAPHDEMO_H