Commit b4f2b571 authored by Björn Richerzhagen's avatar Björn Richerzhagen
Browse files

Updated Location-API

- LocationActuator used to update the current position of a node
- LocationListener includes a pointer to the local host
parent 9d46e30c
/*
* Copyright (c) 2005-2010 KOM – Multimedia Communications Lab
*
* This file is part of Simonstrator.KOM.
*
* Simonstrator.KOM 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 3 of the License, or
* any later version.
*
* PeerfactSim.KOM 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 PeerfactSim.KOM. If not, see <http://www.gnu.org/licenses/>.
*
*/
package de.tudarmstadt.maki.simonstrator.api.component.sensor.location;
/**
* Actuator for location information, allowing "someone" to change a host's
* current location. While this might not be relevant on prototypical
* deployments, it allows us to integrate movement into applications and
* demonstrations without interfacing directly with the platform itself.
*
* @author Bjoern Richerzhagen
*
*/
public interface LocationActuator extends LocationSensor {
/**
* Updates the node's current location with these coordinates. There is no
* guarantee that this operation will succeed. IF the current location
* changed, the {@link LocationSensor} will accurately reflect this.
*
* @param longitude
* (or x)
* @param latitude
* (or y)
*
*/
public void updateCurrentLocation(double longitude, double latitude);
}
......@@ -20,6 +20,8 @@
package de.tudarmstadt.maki.simonstrator.api.component.sensor.location;
import de.tudarmstadt.maki.simonstrator.api.Host;
/**
* @see http://developer.android.com/reference/com/google/android/gms/location/
* LocationListener.html
......@@ -33,6 +35,6 @@ public interface LocationListener {
*
* @param location
*/
public void onLocationChanged(Location location);
public void onLocationChanged(Host host, Location location);
}
......@@ -49,6 +49,10 @@ public interface LocationSensor extends SensorComponent {
* desired interval lengths.
*
* @param request
* (can be null - in this case, the listener will only be
* notified if some other location requests exists and if a new
* location is determined without active search by this specific
* request)
* @param listener
*/
public void requestLocationUpdates(LocationRequest request,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment