incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [24/26] qt commit: adding compass support for qt4 & 5
Date Fri, 24 Feb 2012 20:52:11 GMT
adding compass support for qt4 & 5


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/commit/31fe6f4c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/tree/31fe6f4c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/diff/31fe6f4c

Branch: refs/heads/master
Commit: 31fe6f4caae5fa346e16b47c53167144ac122db4
Parents: 86e6fc0
Author: Longwei Su <longwei.su@gmail.com>
Authored: Wed Feb 15 14:05:15 2012 -0500
Committer: Longwei Su <longwei.su@gmail.com>
Committed: Wed Feb 15 14:05:15 2012 -0500

----------------------------------------------------------------------
 cordovaqt.pro                                 |   13 ++-
 qtc_packaging/debian_harmattan/README         |    6 +
 qtc_packaging/debian_harmattan/changelog      |    5 +
 qtc_packaging/debian_harmattan/compat         |    1 +
 qtc_packaging/debian_harmattan/control        |   15 +++
 qtc_packaging/debian_harmattan/copyright      |   40 ++++++
 qtc_packaging/debian_harmattan/manifest.aegis |   70 ++++++++++
 qtc_packaging/debian_harmattan/rules          |   91 +++++++++++++
 src/plugins/compass.cpp                       |   57 +++++++++
 src/plugins/compass.h                         |   51 ++++++++
 www/basic.js                                  |   10 ++
 www/index.html                                |    4 +
 www/js/compass.js                             |  133 ++++++++++++++++++++
 xml/plugins.xml                               |    1 +
 14 files changed, 495 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/31fe6f4c/cordovaqt.pro
----------------------------------------------------------------------
diff --git a/cordovaqt.pro b/cordovaqt.pro
index 11ab062..1a71ab7 100644
--- a/cordovaqt.pro
+++ b/cordovaqt.pro
@@ -23,7 +23,7 @@ symbian:TARGET.CAPABILITY += NetworkServices
 # the following lines and add the respective components to the 
 # MOBILITY variable.
 CONFIG += mobility
-MOBILITY += feedback location systeminfo
+MOBILITY += feedback location systeminfo sensors
 
 SOURCES += main.cpp mainwindow.cpp \
     src/plugins/notification.cpp \
@@ -33,6 +33,7 @@ SOURCES += main.cpp mainwindow.cpp \
     src/pluginregistry.cpp \
     src/plugins/console.cpp \
     src/plugins/connection.cpp \
+    src/plugins/compass.cpp \
     src/cordova.cpp \
     src/cplugin.cpp \
     src/cwebpage.cpp
@@ -44,6 +45,7 @@ HEADERS += mainwindow.h \
     src/pluginregistry.h \
     src/plugins/console.h \
     src/plugins/connection.h \
+    src/plugins/compass.h \
     src/cordova.h \
     src/cplugin.h \
     src/cwebpage.h
@@ -63,4 +65,11 @@ QT += webkit
 include(deployment.pri)
 qtcAddDeployment()
 
-OTHER_FILES +=
+OTHER_FILES += \
+    qtc_packaging/debian_harmattan/rules \
+    qtc_packaging/debian_harmattan/README \
+    qtc_packaging/debian_harmattan/manifest.aegis \
+    qtc_packaging/debian_harmattan/copyright \
+    qtc_packaging/debian_harmattan/control \
+    qtc_packaging/debian_harmattan/compat \
+    qtc_packaging/debian_harmattan/changelog

http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/31fe6f4c/qtc_packaging/debian_harmattan/README
----------------------------------------------------------------------
diff --git a/qtc_packaging/debian_harmattan/README b/qtc_packaging/debian_harmattan/README
new file mode 100644
index 0000000..2165a6f
--- /dev/null
+++ b/qtc_packaging/debian_harmattan/README
@@ -0,0 +1,6 @@
+The Debian Package cordovaqt
+----------------------------
+
+Comments regarding the Package
+
+ -- Longwei Su <longwei@unknown>  Wed, 15 Feb 2012 13:45:00 -0500

http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/31fe6f4c/qtc_packaging/debian_harmattan/changelog
----------------------------------------------------------------------
diff --git a/qtc_packaging/debian_harmattan/changelog b/qtc_packaging/debian_harmattan/changelog
new file mode 100644
index 0000000..c8066af
--- /dev/null
+++ b/qtc_packaging/debian_harmattan/changelog
@@ -0,0 +1,5 @@
+cordovaqt (0.0.1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Longwei Su <longwei@unknown>  Wed, 15 Feb 2012 13:45:00 -0500

http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/31fe6f4c/qtc_packaging/debian_harmattan/compat
----------------------------------------------------------------------
diff --git a/qtc_packaging/debian_harmattan/compat b/qtc_packaging/debian_harmattan/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/qtc_packaging/debian_harmattan/compat
@@ -0,0 +1 @@
+7

http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/31fe6f4c/qtc_packaging/debian_harmattan/control
----------------------------------------------------------------------
diff --git a/qtc_packaging/debian_harmattan/control b/qtc_packaging/debian_harmattan/control
new file mode 100644
index 0000000..eaed2c7
--- /dev/null
+++ b/qtc_packaging/debian_harmattan/control
@@ -0,0 +1,15 @@
+Source: cordovaqt
+Section: user/other
+Priority: optional
+Maintainer: Longwei Su <longwei@unknown>
+Build-Depends: debhelper (>= 5), libqt4-dev
+Standards-Version: 3.7.3
+Homepage: <insert the upstream URL, if relevant>
+
+Package: cordovaqt
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: <insert up to 60 chars description>
+ <insert long description, indented with spaces>
+XSBC-Maemo-Display-Name: cordovaqt
+XB-Maemo-Icon-26: iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAFbxJREFUeJzVe2mQXNd13nfOvW/rbsxgsAwwmAEGy1CkIFAkQ0hiSLoSxZGoOBaLZSYVK04lEVxy5KRcLitRREZOWEpVYkm2krIWJymlLFqLy7Ik2xWVFEUJZYlkSFDUZoibwQUYLANgBsBg1u737r3n5Md7r9EDDmYhICU5VV3dffvdd+/53tnPbcJPkfaNjIx5xW8S0S+oSgzgRQKeUeAIiF7QECYN0RSF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NFjcx7RNUq8N3xqfGzgfklIp2C0rtJ9evHJo+dGz9z5gUA2LZtW8KEl09MnnjlxIkT0yDhoaGhBIRDauwfN
 Ez8NVU6pCx3KdBhYwwAEpU+VRxkxnuMMcrQ/6Cid4HNNwDaBOVG9e+V+eOnT/4XNeZhQMcBvnU1dtYlAUVREAgXXzl16se943uHd3U/qypBiAnhvKg263FiNBEA7RFIQnXImvmRY6dO3VeP79q1a4h9+DkoHhwaGrr/xMSpT+0Z3nkjoHdGRdSnkf8LJnz02OmT7xjdMfIjBqyKKBO3AFAcQtOBGkw6f10BiONYfbv9qsKH0OVDFUSkSmrIJR+Hdf9kz8iIhcg2Uf3+uXPnFnbvGGn3TG2fO3duYXTnzkdHR0buY+C0itx3/MSJD46OjPx7qH4sJTO5e8fwWSXMAQiW2+LVvKJEG3YPD78HqqMgekoAMBB2Dw9/wSlFAFIN/rur8bSuM3VTU1My0Oz/8aX52Yne8b6NG2eV6NzMzEzn1pkZf2nTwMvHJ44f7282pizQ8EA7y/OvXmi3i82tjc9Mz8+cAYCB/v4jl2ZnT28dHHw2FEVTVY2KPD0zPz81Mzv7Qquv7+ss8hgxfTswfRiq//3YmTPP9w0MfJWDKsGcV8gnDNO3oXSnEt4MkV9Uw7Mk4SPjZ8++vB7+/r+m0R3DHxndMbzuP1D/H8WLTfcZoftSAAAAAElFTkSuQmCC

http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/31fe6f4c/qtc_packaging/debian_harmattan/copyright
----------------------------------------------------------------------
diff --git a/qtc_packaging/debian_harmattan/copyright b/qtc_packaging/debian_harmattan/copyright
new file mode 100644
index 0000000..f01c3b0
--- /dev/null
+++ b/qtc_packaging/debian_harmattan/copyright
@@ -0,0 +1,40 @@
+This package was debianized by Longwei Su <longwei@unknown> on
+Wed, 15 Feb 2012 13:45:00 -0500.
+
+It was downloaded from <url://example.com>
+
+Upstream Author(s):
+
+    <put author's name and email here>
+    <likewise for another author>
+
+Copyright:
+
+    <Copyright (C) YYYY Name OfAuthor>
+    <likewise for another author>
+
+License:
+
+    This package is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This package is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this package; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
+The Debian packaging is (C) 2012, Longwei Su <longwei@unknown> and
+is licensed under the GPL, see above.
+
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.

http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/31fe6f4c/qtc_packaging/debian_harmattan/manifest.aegis
----------------------------------------------------------------------
diff --git a/qtc_packaging/debian_harmattan/manifest.aegis b/qtc_packaging/debian_harmattan/manifest.aegis
new file mode 100644
index 0000000..2041bc9
--- /dev/null
+++ b/qtc_packaging/debian_harmattan/manifest.aegis
@@ -0,0 +1,70 @@
+AutoGenerateAegisFile
+<!-- Aegis manifest declares the security credentials required by an
+     application to run correctly. By default, a manifest file will be
+     created or updated automatically as a part of build.
+
+     The detection of required credentials is based on static scan of
+     application binaries. In some cases, the scan may not be able to
+     detect the correct set of permissions. If this is the case, you must
+     declare the credentials required by your application in this file.
+
+     To create a manifest file automatically as a part of build (DEFAULT):
+
+      * Make sure this file starts with the string "AutoGenerateAegisFile" (without quotes).
+      * Alternatively, it can also be completely empty.
+
+     To provide a manifest yourself:
+
+      * List the correct credentials for the application in this file.
+      * Some commented-out examples of often required tokens are provided.
+      * Ensure the path to your application binary given in
+        '<for path="/path/to/app" />' is correct.
+      * Please do not request more credentials than what your application
+        actually requires.
+
+     To disable manifest file:
+
+      * Replace this file with a file starting with the string "NoAegisFile" (without quotes).
+      * Final application package will not contain a manifest.
+
+-->
+<aegis>
+	<request policy="add">
+
+		<!-- Make a GSM call, send text messages (SMS). -->
+	<!--
+		<credential name="Cellular" />
+	-->
+
+		<!-- Access Facebook social data. -->
+	<!--
+		<credential name="FacebookSocial" />
+	-->
+
+		<!-- Read access to data stored in tracker. -->
+	<!--
+		<credential name="TrackerReadAccess" />
+	-->
+
+		<!-- Read and write access to data stored in tracker. -->
+	<!--
+		<credential name="TrackerWriteAccess" />
+	-->
+
+		<!-- Read Location information. -->
+	<!--
+		<credential name="Location" />
+	-->
+
+		<!-- Access to Audio, Multimedia and Camera. -->
+	<!--
+		<credential name="GRP::pulse-access" />
+		<credential name="GRP::video" />
+		<credential name="GRP::audio" />
+	-->
+
+	</request>
+
+	<for path="/opt/cordovaqt/bin/cordovaqt" />
+	<for path="applauncherd-launcher::/usr/bin/applauncherd.bin" id="" />
+</aegis>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/31fe6f4c/qtc_packaging/debian_harmattan/rules
----------------------------------------------------------------------
diff --git a/qtc_packaging/debian_harmattan/rules b/qtc_packaging/debian_harmattan/rules
new file mode 100755
index 0000000..06d4854
--- /dev/null
+++ b/qtc_packaging/debian_harmattan/rules
@@ -0,0 +1,91 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+
+
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# qmake PREFIX=/usr# Uncomment this line for use without Qt Creator
+
+	touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp  
+	dh_testdir
+
+	# Add here commands to compile the package.
+	# $(MAKE) # Uncomment this line for use without Qt Creator
+	#docbook-to-man debian/cordovaqt.sgml > cordovaqt.1
+
+	touch $@
+
+clean: 
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+
+	# Add here commands to clean up after the build process.
+	$(MAKE) clean
+
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+
+	# Add here commands to install the package into debian/cordovaqt.
+	$(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/cordovaqt install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs 
+	dh_installdocs
+	dh_installexamples
+#	dh_install
+#	dh_installmenu
+#	dh_installdebconf	
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_python
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_perl
+#	dh_makeshlibs
+	dh_installdeb
+	# dh_shlibdeps # Uncomment this line for use without Qt Creator
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure

http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/31fe6f4c/src/plugins/compass.cpp
----------------------------------------------------------------------
diff --git a/src/plugins/compass.cpp b/src/plugins/compass.cpp
new file mode 100644
index 0000000..676cb68
--- /dev/null
+++ b/src/plugins/compass.cpp
@@ -0,0 +1,57 @@
+/*
+ *  Copyright 2011  Integrated Computer Solutions - http://www.ics.com
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+#include "compass.h"
+#include "../pluginregistry.h"
+#include <QtSensors/QCompass>
+
+Compass* Compass::m_compass = new Compass();
+
+
+Compass::Compass() :CPlugin()
+{
+    PluginRegistry::getRegistry()->registerPlugin( "com.phonegap.Compass", this );
+}
+
+void Compass::init() {
+    m_azymuth = 0;
+    m_accuracy = 0;
+    m_compassSource = new QCompass(this);
+    m_compassSource->connectToBackend();
+    m_compassSource->start();
+    connect(m_compassSource,SIGNAL(readingChanged()), SLOT(updateSensor()));
+}
+
+void Compass::getCurrentHeading(int scId, int ecId, QVariantMap p_options) {
+    Q_UNUSED(p_options)
+    m_successCallbacks << scId;
+    m_errorCallbacks << ecId;
+
+    QString callbackArguments = "Heading.cast( " + QString::number(m_azymuth) + " )";
+
+    for( int i = 0; i < m_successCallbacks.size(); i++ ) {
+        this->callback( m_successCallbacks.at( i ), callbackArguments );
+    }
+
+    m_errorCallbacks.clear();
+    m_successCallbacks.clear();
+}
+
+void Compass::updateSensor(){
+    QCompassReading *heading = m_compassSource->reading();
+    m_azymuth = heading->azimuth();
+    m_accuracy = heading->calibrationLevel();
+}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/31fe6f4c/src/plugins/compass.h
----------------------------------------------------------------------
diff --git a/src/plugins/compass.h b/src/plugins/compass.h
new file mode 100644
index 0000000..f34004d
--- /dev/null
+++ b/src/plugins/compass.h
@@ -0,0 +1,51 @@
+/*
+ *  Copyright 2011  Integrated Computer Solutions - http://www.ics.com
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+#ifndef COMPASS_H
+#define COMPASS_H
+
+#include "../cplugin.h"
+#include <QtSensors/QCompass>
+#include <QList>
+
+QTM_USE_NAMESPACE
+
+class Compass : public CPlugin
+{
+    Q_OBJECT
+public:
+    explicit Compass();
+    void init();
+
+
+signals:
+
+public slots:
+    void getCurrentHeading( int scId, int ecId, QVariantMap p_options);
+
+protected slots:
+    void updateSensor();
+
+private:
+    static Compass *m_compass;
+    QCompass* m_compassSource;
+    QList<int> m_successCallbacks;
+    QList<int> m_errorCallbacks;
+    double m_azymuth;
+    double m_accuracy;
+};
+
+#endif // COMPASS_H

http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/31fe6f4c/www/basic.js
----------------------------------------------------------------------
diff --git a/www/basic.js b/www/basic.js
index 145e961..58b0671 100644
--- a/www/basic.js
+++ b/www/basic.js
@@ -43,6 +43,16 @@ function getCurrentPosition() {
                                              { maximumAge: 3000, timeout: 5000, enableHighAccuracy:
true } );
 }
 
+function getCurrentHeading() {
+    navigator.compass.getCurrentHeading( function( heading ) {
+                                            get( "heading_val" ).innerHTML = heading.dir;
+                                             },
+                                             function( error ) {
+                                                 get( "heading_val" ).innerHTML = error.code
+ ": "  + error.message;
+                                             },
+                                             {timestamp: (new Date()).getTime()} );
+}
+
 function test_requestFileSystem() {
     window.requestFileSystem( LocalFileSystem.PERSISTENT, 0, function( p_fileSystem ) {
                                  get( "debug_output" ).innerHTML = p_fileSystem.name + "
/ " + p_fileSystem.root.fullPath;

http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/31fe6f4c/www/index.html
----------------------------------------------------------------------
diff --git a/www/index.html b/www/index.html
index 8f0a208..0866b96 100644
--- a/www/index.html
+++ b/www/index.html
@@ -12,6 +12,7 @@
         <script language="javascript" type="text/javascript" src="js/file.js"></script>
         <script language="javascript" type="text/javascript" src="js/geolocation.js"></script>
         <script language="javascript" type="text/javascript" src="js/notification.js"></script>
+        <script language="javascript" type="text/javascript" src="js/compass.js"></script>
 
         <script language="javascript" type="text/javascript" src="basic.js"></script>
     </head>
@@ -33,5 +34,8 @@
         <br />
         <div id="position_val"> Location </div>
         <br />
+        <input type="button" value="getCurrentHeading" onclick="getCurrentHeading();">
+        <br />
+        <div id="heading_val"> Heading </div>
     </body>
 </html>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/31fe6f4c/www/js/compass.js
----------------------------------------------------------------------
diff --git a/www/js/compass.js b/www/js/compass.js
new file mode 100644
index 0000000..f6a957c
--- /dev/null
+++ b/www/js/compass.js
@@ -0,0 +1,133 @@
+/*
+ *  Copyright 2011  Integrated Computer Solutions - http://www.ics.com
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+//compass interface http://docs.phonegap.com/en/1.0.0/phonegap_compass_compass.md.html
+
+
+function Heading() {
+};
+
+Heading.cast = function( p_heading, p_accuracy ) {
+    var heading = new Heading();
+    heading.dir = p_heading;
+    return heading;
+};
+
+Heading.prototype.dir = null;
+Heading.prototype.accuracy = null;
+
+
+//HeadingError
+
+function HeadingError() {
+};
+
+HeadingError.cast = function( p_code, p_message ) {
+    var headingError = new HeadingError();
+    headingError.code = p_code;
+    headingError.message = p_message;
+
+    return headingError;
+};
+
+HeadingError.COMPASS_INTERNAL_ERR = 1;
+HeadingError.COMPASS_NOT_SUPPORTED = 2;
+
+HeadingError.prototype.code = 0;
+HeadingError.prototype.message = "";
+
+/**
+ * HeadingOptions interface
+ */
+function HeadingOptions() {
+};
+
+//HeadingOptions.prototype.magneticHeading = 0;
+//HeadingOptions.prototype.trueHeading = 0;//
+//HeadingOptions.prototype.headingAccuracy = 0;
+//HeadingOptions.prototype.timestamp = 0;
+
+
+/**
+ * Compass interface
+ */
+function Compass() {
+};
+
+Compass.prototype.watchIds = [];
+Compass.prototype.cachedHeading = null;
+
+Compass.prototype.getCurrentHeading = function( successCallback, errorCallback, options )
{
+    // Check the callbacks
+    if( typeof successCallback !== "function" ) return;
+    if( typeof errorCallback !== "function" ) errorCallback = function() {};
+    var headingOptions = new HeadingOptions();
+
+    // Check the timestamp
+    if( this.cachedHeading !== null &&
+            (this.cachedHeading.timestamp <= (new Date()).getTime) ) {
+        successCallback( this.cachedHeading );
+        return;
+    }
+
+    // Call the native function and query for a new heading
+    var me = this;
+    PhoneGap.exec( function( p_heading ) {
+                      received = true;
+                      me.cachedHeading = p_heading;
+                      successCallback( p_heading );
+                  }, errorCallback, "com.phonegap.Compass", "getCurrentHeading", [ headingOptions
] );
+};
+
+Compass.prototype.watchHeading = function( successCallback, errorCallback, options ) {
+    // Check the callbacks
+    if( typeof successCallback !== "function" ) return;
+    if( typeof errorCallback !== "function" ) errorCallback = function() {};
+
+    var watchId = this.watchIds.length + 1; // +1 in order to avoid 0 as watchId
+    this.watchIds[watchId] = true;
+    var me = this;
+
+    function doWatch() {
+        me.getCurrentHeading( function( p_heading ) {
+                                    if( !me.watchIds[watchId] ) return;
+                                    successCallback( p_heading );
+                                    // Wait some time before starting again
+                                    setTimeout( doWatch, 100 );
+                                }, function( p_headingError ) {
+                                    if( !me.watchIds[watchId] ) return;
+
+                                    errorCallback( p_headingError );
+                                    // Wait some time before starting again
+                                    setTimeout( doWatch, 100 );
+                                }, options );
+    }
+
+    // Start watching for heading changes (slight delay, in order to simulate asynchronous
behaviour)
+    setTimeout( doWatch, 100 );
+
+    return watchId;
+};
+
+Compass.prototype.clearWatch = function( watchId ) {
+    this.watchIds[watchId] = false;
+};
+
+/**
+ * Add the compass object to the navigator
+ */
+PhoneGap.addConstructor( "com.phonegap.Compass", function () {
+                            navigator.compass = new Compass();} );

http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/31fe6f4c/xml/plugins.xml
----------------------------------------------------------------------
diff --git a/xml/plugins.xml b/xml/plugins.xml
index f39af09..9d653aa 100644
--- a/xml/plugins.xml
+++ b/xml/plugins.xml
@@ -6,6 +6,7 @@
     <plugin name="Device" value="com.phonegap.Device"/>
     <plugin name="Console" value="com.phonegap.Console"/>
     <plugin name="Connection" value="com.phonegap.Connection"/>
+    <plugin name="Compass" value="com.phonegap.Compass"/>
 
 <!--    <plugin name="Compass" value="com.phonegap.CompassListener"/>
     <plugin name="Media" value="com.phonegap.AudioHandler"/>


Mime
View raw message