Click here to Skip to main content
12,624,429 members (37,125 online)
Click here to Skip to main content

Stats

57.6K views
1.3K downloads
57 bookmarked
Posted

Using the Skyhook Wireless XPS Positioning Service in Managed Code

, 20 Jan 2009 CPOL
Wrapper and sample programs demonstrating the use of the Skyhook Wireless XPS SDK (hybrid position system using GPS, WiFi Positioning, and Celltower positioning)
WiMoWiFiPositioningService
J2i.Net.FindMe
Assets
Data
LocationLog.sdf
Images
Allowed.bmp
Disallowed.bmp
Sound
Alert.wav
bin
Debug
Assets
Data
LocationLog.sdf
J2i.Net.FindMe.exe
J2i.Net.LocationSettings.dll
J2i.Net.OpenCellID.dll
J2i.Net.WiFiPositioning.dll
Microsoft.WindowsMobile.dll
Microsoft.WindowsMobile.Forms.dll
Microsoft.WindowsMobile.PocketOutlook.dll
Microsoft.WindowsMobile.Samples.Location.dll
wpsapi.dll
WpsProxy.dll
Common
Controls
Interface
J2i.Net.FindMe.csproj.user
J2i.Net.FindMe.idc
Properties
Utility
Web References
VE.Common
common.disco
common.wsdl
CountryRegionInfo.datasource
DataSource.datasource
EntityType.datasource
Reference.map
VersionInfo.datasource
VE.Geocode
GeocodeResponse.datasource
GeocodeService.wsdl
GeocodeService1.wsdl
Reference.map
VE.Imagery
ImageryMetadataResponse.datasource
ImageryService.wsdl
imageryservice1.wsdl
MapUriResponse.datasource
Reference.map
wpsapi.dll
WpsProxy.dll
J2i.Net.LocationSettings
bin
Debug
J2i.Net.LocationSettings.csproj.user
Properties
J2i.Net.MapPoint.RenderMap
bin
Debug
J2i.Net.LocationSettings.dll
J2i.Net.MapPoint.RenderMap.exe
J2i.Net.WiFiPositioning.dll
WpsProxy.dll
J2i.Net.MapPoint.RenderMap.csproj.user
Properties
Web References
VirtualEarthCommon
Address1.datasource
CountryRegionInfo1.datasource
DataSource1.datasource
EntityType1.datasource
FindResults1.datasource
LatLong1.datasource
LineDriveMapImage1.datasource
Location1.datasource
MapImage1.datasource
mappoint.wsdl
MapViewRepresentations1.datasource
PixelCoord1.datasource
Reference.map
Route1.datasource
VersionInfo1.datasource
VirtualEarthImaging
ImageryMetadataResponse.datasource
ImageryService.wsdl
imageryservice1.wsdl
MapUriResponse.datasource
Reference.map
wpsapi.dll
WpsProxy.dll
J2i.Net.OpenCellID
bin
Debug
J2i.Net.OpenCellID.dll
J2i.Net.OpenCellID.pdb
J2i.Net.OpenCellID.csproj.user
Properties
J2i.Net.OpenCellID.Client
bin
Debug
J2i.Net.OpenCellID.Client.exe
J2i.Net.OpenCellID.Client.pdb
J2i.Net.OpenCellID.dll
J2i.Net.OpenCellID.pdb
J2i.Net.OpenCellID.Client.csproj.user
Properties
J2i.Net.WiFiPositioning
bin
Debug
ClassDiagram1.cd
J2i.Net.WiFiPositioning.csproj.user
Properties
wpsapi.dll
WpsProxy.dll
MapPoint.SimpleClient
bin
Debug
J2i.Net.LocationSettings.dll
J2i.Net.WiFiPositioning.dll
MapPoint.SimpleClient.exe
WpsProxy.dll
MapPoint.SimpleClient.csproj.user
Properties
Web References
MapPoint.Service
Address.datasource
CountryRegionInfo.datasource
DataSource.datasource
EntityType.datasource
FindResults.datasource
LatLong.datasource
LineDriveMapImage.datasource
Location.datasource
MapImage.datasource
mappoint.wsdl
MapViewRepresentations.datasource
PixelCoord.datasource
Reference.map
Route.datasource
VersionInfo.datasource
wpsapi.dll
WpsProxy.dll
SetMyKeys
bin
Debug
J2i.Net.LocationSettings.dll
SetMyKeys.exe
Properties
SetMyKeys.csproj.user
SimpleClient
bin
Debug
log4cpp.properties
log4cpp.properties
Properties
SimpleClient.csproj.user
wpsapi.dll
WpsProxy.dll
WpsProxy
Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
Debug
WpsProxy.vcproj.M70.Joel Johnson.user
WpsProxy.vcproj.RDA_LM_001.jjohnson.user
#pragma once

// The following ifdef block is the standard way of creating macros which make exporting 
// from a DLL simpler. All files within this DLL are compiled with the WPSPROXY_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see 
// WPSPROXY_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
#ifdef WPSPROXY_EXPORTS
#define WPSPROXY_API __declspec(dllexport)
#else
#define WPSPROXY_API __declspec(dllimport)
#endif

#include "wpsapi.h"
	
typedef WPS_Continuation (*WiFiLocationDelegate)(
								WPS_ReturnCode result,
								double	Latitude,
								double Longitude,
								double	hpe,
								int	nap,
								double	speed,
								double	bearing,
								LPWSTR	AddressNumber,
								LPWSTR	AddressLine,
								LPWSTR	City,
								LPWSTR	StateName,
								LPWSTR	StateCode,
								LPWSTR	PostalCode,
								LPWSTR	County,
								LPWSTR	Region,
								LPWSTR	CountryName,
								LPWSTR	CountryCode,
								LPWSTR  Province
								);

typedef WPS_Continuation (*TilingDelegate)(
								UINT tileNumber,
								UINT tileTotal
								);

extern "C" WPSPROXY_API void SetProxy( const LPWSTR address, int port, const LPWSTR user, const LPWSTR password);
extern "C" WPSPROXY_API void SetServerUrl(const LPWSTR url);
extern "C" WPSPROXY_API void SetUserAgent(const LPWSTR ua);
extern "C" WPSPROXY_API WPS_ReturnCode SetTier2Area(const LPWSTR dirpath, unsigned size);
extern "C" WPSPROXY_API WPS_ReturnCode  RegisterUser(LPWSTR existingUser, LPWSTR existingRealm, LPWSTR newUser, LPWSTR newRealm);

extern "C" WPSPROXY_API WPS_ReturnCode Tiling(LPWSTR dirPath, UINT maxDataPerSession, UINT maxDataSizeTotal, TilingDelegate* callback);

extern "C" WPSPROXY_API WPS_ReturnCode PeriodicLocation(LPWSTR userName, LPWSTR realm, WPS_StreetAddressLookup lookupType, unsigned long period, unsigned long iterations, WiFiLocationDelegate* callback);

extern "C" WPSPROXY_API WPS_ReturnCode SetLocalFilesPath(LPWSTR *path, int pathCount);

extern "C" WPSPROXY_API WPS_ReturnCode GetIPLocation (
	LPWSTR	userName,
	LPWSTR	realm, 
	WPS_StreetAddressLookup lookupType,
	double* Latitude,
	double* Longitude,
	LPWSTR	IPAddress,
	LPWSTR	AddressNumber,
	LPWSTR	AddressLine,
	LPWSTR	City,
	LPWSTR	StateName,
	LPWSTR	StateCode,
	LPWSTR	PostalCode,
	LPWSTR	County,
	LPWSTR	Region,
	LPWSTR	CountryName,
	LPWSTR	CountryCode,
	LPWSTR  Province
	);

  extern "C"  WPSPROXY_API WPS_ReturnCode GetWiFiLocation(
								LPWSTR userName, 
								LPWSTR realm, 
								WPS_StreetAddressLookup lookupType, 
								double*	Latitude,
								double* Longitude,
								double*	hpe,
								int*	nap,
								double*	speed,
								double*	bearing,
								LPWSTR	AddressNumber,
								LPWSTR	AddressLine,
								LPWSTR	City,
								LPWSTR	StateName,
								LPWSTR	StateCode,
								LPWSTR	PostalCode,
								LPWSTR	County,
								LPWSTR	Region,
								LPWSTR	CountryName,
								LPWSTR	CountryCode,
								LPWSTR  Province
								);

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Joel Ivory Johnson
Software Developer Razorfish
United States United States
I attended Southern Polytechnic State University and earned a Bachelors of Science in Computer Science and later returned to earn a Masters of Science in Software Engineering.

For the past few years I've been providing solutions to clients using Microsoft technologies for web and Windows applications.

While most of my CodeProject.com articles are centered around Windows Phone it is only one of the areas in which I work and one of my interests. I also have interest in mobile development on Android and iPhone. Professionally I work with several Microsoft technologies including SQL Server technologies, Silverlight/WPF, ASP.Net and others. My recreational development interest are centered around Artificial Inteligence especially in the area of machine vision.

Twitter:@J2iNet

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.161128.1 | Last Updated 20 Jan 2009
Article Copyright 2009 by Joel Ivory Johnson
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid