Showing the changes to interface/src/scripting/GlobalServicesScriptingInterface.h (1 of 3 files). Show all
Unified · Split
| @@ -31,20 +31,21 @@ Q_DECLARE_METATYPE(DownloadInfoResult) · 30 unmodified lines | ||
| 31 | 31 | QScriptValue DownloadInfoResultToScriptValue(QScriptEngine* engine, const DownloadInfoResult& result); |
| 32 | 32 | void DownloadInfoResultFromScriptValue(const QScriptValue& object, DownloadInfoResult& result); |
| 33 | 33 | |
| 34 | − | |
| 35 | 34 | class GlobalServicesScriptingInterface : public QObject { |
| 36 | 35 | Q_OBJECT |
| 37 | − Q_PROPERTY(QString myUsername READ getMyUsername) | |
| 38 | − GlobalServicesScriptingInterface(); | |
| 39 | − ~GlobalServicesScriptingInterface(); | |
| 36 | + | |
| 37 | + Q_PROPERTY(QString username READ getUsername) | |
| 38 | + | |
| 40 | 39 | public: |
| 41 | 40 | static GlobalServicesScriptingInterface* getInstance(); |
| 42 | 41 | |
| 43 | − QString getMyUsername(); | |
| 42 | + const QString& getUsername() const { return AccountManager::getInstance().getAccountInfo().getUsername(); } | |
| 44 | 43 | |
| 45 | 44 | public slots: |
| 46 | 45 | DownloadInfoResult getDownloadInfo(); |
| 47 | 46 | void updateDownloadInfo(); |
| 47 | + | |
| 48 | + void setDiscoverability(const QString& discoverability); | |
| 48 | 49 | |
| 49 | 50 | private slots: |
| 50 | 51 | void loggedOut(); |
| @@ -53,12 +54,13 @@ private slots: · 2 unmodified lines | ||
| 53 | 54 | signals: |
| 54 | 55 | void connected(); |
| 55 | 56 | void disconnected(const QString& reason); |
| 56 | − void incomingMessage(const QString& username, const QString& message); | |
| 57 | − void onlineUsersChanged(const QStringList& usernames); | |
| 58 | 57 | void myUsernameChanged(const QString& username); |
| 59 | 58 | void downloadInfoChanged(DownloadInfoResult info); |
| 60 | 59 | |
| 61 | 60 | private: |
| 61 | + GlobalServicesScriptingInterface(); | |
| 62 | + ~GlobalServicesScriptingInterface(); | |
| 63 | + | |
| 62 | 64 | bool _downloading; |
| 63 | 65 | }; |
| 64 | 66 | |