-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathqmlapi.h
71 lines (50 loc) · 1.71 KB
/
qmlapi.h
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef QMLAPI_H
#define QMLAPI_H
#include <QObject>
#include <QVariant>
#ifdef Q_OS_SYMBIAN
#include <eikcmobs.h>
#endif
namespace QJson { class Parser; }
#ifdef Q_OS_SYMBIAN
class QmlApi : public QObject, public MEikCommandObserver
#else
class QmlApi : public QObject
#endif
{
Q_OBJECT
public:
explicit QmlApi(QObject *parent = 0);
~QmlApi();
Q_INVOKABLE QString getCookieToken();
Q_INVOKABLE QString getUserId();
Q_INVOKABLE void saveUserId(const QString& id);
Q_INVOKABLE void logout();
Q_INVOKABLE int getVolume();
Q_INVOKABLE void saveVolume(const int& volume);
Q_INVOKABLE QString getPlayMode();
Q_INVOKABLE void savePlayMode(const QString& playMode);
Q_INVOKABLE void takeScreenShot();
Q_INVOKABLE void showNotification(const QString& title, const QString& text,
const int& commandId = 0);
Q_INVOKABLE QVariant jsonParse(const QString& text);
Q_INVOKABLE bool compareVariant(const QVariant& left, const QVariant& right);
Q_INVOKABLE QString getNetEaseImageUrl(const QString& imgId);
Q_INVOKABLE bool isFileExists(const QString& fileName);
Q_INVOKABLE bool removeFile(const QString& fileName);
Q_INVOKABLE QString cleanPath(const QString& path);
Q_INVOKABLE QString getHomePath() const;
Q_INVOKABLE QString selectFolder(const QString& title, const QString& defaultDir);
// For Symbian OS only
Q_INVOKABLE bool showAccessPointTip();
Q_INVOKABLE void clearAccessPointTip();
Q_INVOKABLE void launchSettingApp();
#ifdef Q_OS_SYMBIAN
void ProcessCommandL(TInt aCommandId);
#endif
signals:
void processCommand(int commandId);
private:
QJson::Parser* mParser;
};
#endif // QMLAPI_H