summaryrefslogtreecommitdiff
path: root/daemon/jskitobjects.h
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2014-12-01 02:21:30 +0100
committerJavier <dev.git@javispedro.com>2014-12-01 02:21:30 +0100
commit1e3794c476caf5c41360c36cc13c8425ec0dd26c (patch)
treef86693c5e17671f821871f95e462f299170277e0 /daemon/jskitobjects.h
parentcf405034b49e5e8ba7a8d22522878c8834b8d4ae (diff)
implement message passing around jskit apps and watch
Diffstat (limited to 'daemon/jskitobjects.h')
-rw-r--r--daemon/jskitobjects.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/daemon/jskitobjects.h b/daemon/jskitobjects.h
index 2375084..c59bfac 100644
--- a/daemon/jskitobjects.h
+++ b/daemon/jskitobjects.h
@@ -10,7 +10,7 @@ class JSKitPebble : public QObject
LOG4QT_DECLARE_QCLASS_LOGGER
public:
- explicit JSKitPebble(JSKitManager *mgr);
+ explicit JSKitPebble(const AppInfo &appInfo, JSKitManager *mgr);
Q_INVOKABLE void addEventListener(const QString &type, QJSValue function);
Q_INVOKABLE void removeEventListener(const QString &type, QJSValue function);
@@ -24,10 +24,22 @@ public:
void invokeCallbacks(const QString &type, const QJSValueList &args = QJSValueList());
private:
+ AppInfo _appInfo;
JSKitManager *_mgr;
QHash<QString, QList<QJSValue>> _callbacks;
};
+class JSKitConsole : public QObject
+{
+ Q_OBJECT
+ LOG4QT_DECLARE_QCLASS_LOGGER
+
+public:
+ explicit JSKitConsole(JSKitManager *mgr);
+
+ Q_INVOKABLE void log(const QString &msg);
+};
+
class JSKitLocalStorage : public QObject
{
Q_OBJECT