cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bennma...@apache.org
Subject git commit: first pass at wp7 support
Date Tue, 28 May 2013 00:28:47 GMT
Updated Branches:
  refs/heads/master 4fa66bea0 -> f8acec229


first pass at wp7 support


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/commit/f8acec22
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/f8acec22
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/f8acec22

Branch: refs/heads/master
Commit: f8acec22929f3e187f267476cfd68cdd3f8b05f6
Parents: 4fa66be
Author: Benn Mapes <benn.mapes@gmail.com>
Authored: Mon May 27 17:26:34 2013 -0700
Committer: Benn Mapes <benn.mapes@gmail.com>
Committed: Mon May 27 17:28:18 2013 -0700

----------------------------------------------------------------------
 plugin.xml             |   14 +++++++++++++-
 src/wp7/GeoLocation.cs |   34 ++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/f8acec22/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 97b0473..621e757 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
 xmlns:android="http://schemas.android.com/apk/res/android"
 id="org.apache.cordova.core.GeoBroker"
     version="0.1.0">
@@ -50,4 +50,16 @@ id="org.apache.cordova.core.GeoBroker"
         <header-file src="src/ios/CDVLocation.h" />
 	    <source-file src="src/ios/CDVLocation.m" />
     </platform>
+
+    <!-- wp7 -->
+    <platform name="wp7">
+        <config-file target="config.xml" parent="/*">
+            <feature name="GeoLocation">
+                <param name="wp-package" value="GeoLocation"/>
+            </feature>
+        </config-file>
+
+        <source-file src="src/wp7/GeoLocation.cs" />
+    </platform>
+    
 </plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/f8acec22/src/wp7/GeoLocation.cs
----------------------------------------------------------------------
diff --git a/src/wp7/GeoLocation.cs b/src/wp7/GeoLocation.cs
new file mode 100644
index 0000000..c53cb29
--- /dev/null
+++ b/src/wp7/GeoLocation.cs
@@ -0,0 +1,34 @@
+/*  
+	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.
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Runtime.Serialization;
+using System.Threading;
+using System.Device.Location;
+
+namespace WPCordovaClassLib.Cordova.Commands
+{
+    /// <summary>
+    /// This is a command stub, the browser provides the correct implementation.  We use
this to trigger the static analyzer that we require this permission 
+    /// </summary>
+    public class GeoLocation
+    {
+        /* Unreachable code, by design -jm */
+        private void triggerGeoInclusion()
+        {
+            new GeoCoordinateWatcher();
+        }
+    }
+}


Mime
View raw message