WPS SDK
The WPS Core Engine SDK leverages a series of simple APIs to facilitate device deployment and application integration. Using straightforward commands, such as 'Get Location', WPS lets application developers focus on building great end-user location-based applications without worrying about building the location-engine to make them work.
Below is a sample use of the WPS API that prints the user's location (latitude, longitude).
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "wpsapi.h"
int main(int argc, char *argv[])
{
WPS_SimpleAuthentication authentication;
authentication.username = argv[1];
authentication.realm = argv[2];
WPS_Location* location;
WPS_ReturnCode rc = WPS_location(&authentication,
WPS_NO_STREET_ADDRESS_LOOKUP,
&location);
if (rc == WPS_OK)
{
printf("%f, %f\n", location->latitude, location->longitude);
WPS_free_location(location);
}
return 0;
}