moved the platform-specific android code for the new ui
This commit is contained in:
parent
5b8a0881b7
commit
0a1359ed16
31 changed files with 854 additions and 764 deletions
32
client/platforms/android/authResultReceiver.h
Normal file
32
client/platforms/android/authResultReceiver.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
#ifndef AUTHRESULTRECEIVER_H
|
||||
#define AUTHRESULTRECEIVER_H
|
||||
|
||||
#include <QJniObject>
|
||||
|
||||
#include <private/qandroidextras_p.h>
|
||||
|
||||
class AuthResultNotifier : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AuthResultNotifier(QObject *parent = nullptr) : QObject(parent) {};
|
||||
|
||||
signals:
|
||||
void authFailed();
|
||||
void authSuccessful();
|
||||
};
|
||||
|
||||
/* Auth result handler for Android */
|
||||
class AuthResultReceiver final : public QAndroidActivityResultReceiver
|
||||
{
|
||||
public:
|
||||
AuthResultReceiver(QSharedPointer<AuthResultNotifier> ¬ifier);
|
||||
|
||||
void handleActivityResult(int receiverRequestCode, int resultCode, const QJniObject &data) override;
|
||||
|
||||
private:
|
||||
QSharedPointer<AuthResultNotifier> m_notifier;
|
||||
};
|
||||
|
||||
#endif // AUTHRESULTRECEIVER_H
|
Loading…
Add table
Add a link
Reference in a new issue