// Path: app/src/main/java/be/artoria/belfortapp/mixare/mgr/downloader/DownloadManager.java
// public interface DownloadManager {
// 
// 	/**
// 	 * Possible state of this Manager
// 	 */
// 	enum DownloadManagerState {
// 		OnLine, //manage downlad request 
// 		OffLine, // No OnLine
// 		Downloading, //Process some Download Request
// 		Confused // Internal state not congruent
// 	}
// 
// 	/**
// 	 * Reset all Request and Responce
// 	 */
// 	void resetActivity();
// 
// 	/**
// 	 * Submit new DownloadRequest
// 	 * 
// 	 * @param job
// 	 * @return reference Of Job or null if job is rejected
// 	 */
// 	String submitJob(DownloadRequest job);
// 
// 	/**
// 	 * Get result of job if exist, null otherwise
// 	 *
// 	 * @return result 
// 	 */
// 	DownloadResult getReqResult();
// 
// 	/**
// 	 * Pseudo Iterator on results 
// 	 * @return actual Download Result
// 	 */
// 	DownloadResult getNextResult();
// 
// 	/**
// 	 * Gets the number of downloaded results
// 	 * @return the number of results
// 	 */
// 	int getResultSize();
// 	
// 	/**
// 	 * check if all Download request is done
// 	 *  
// 	 * @return BOOLEAN
// 	 */
// 	Boolean isDone();
// 
// 	/**
// 	 * Request to active the service
// 	 */
// 	void switchOn();
// 
// 	/**
// 	 * Request to deactive the service
// 	 */
// 	void switchOff();
// 
// 	/**
// 	 * Request state of service
// 	 * @return
// 	 */
// 	DownloadManagerState getState();
// 
// }


import be.artoria.belfortapp.mixare.mgr.downloader.DownloadManager;
import android.hardware.GeomagneticField;
import android.location.Location;
/*
 * Copyright (C) 2012- Peer internet solutions & Finalist IT Group
 * 
 * This file is part of be.artoria.belfortapp.mixare.
 * 
 * This program 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 
 * (at your option) any later version. 
 * 
 * This program 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 program. If not, see <http://www.gnu.org/licenses/>
 */
package be.artoria.belfortapp.mixare.mgr.location;



/**
 * This class is repsonsible for finding the location, and sending it back to
 * the mixcontext.
 */
public interface LocationFinder {

	/**
	 * Possible status of LocationFinder
	 */
	public enum LocationFinderState {
		Active, // Providing Location Information
		Inactive, // No-Active
		Confused // Same problem in internal state
	}

	/**
	 * Finds the location through the providers  
	 * @param ctx
	 * @return
	 */
	void findLocation();

	/**
	 * A working location provider has been found: check if 
	 * the found location has the best accuracy.
	 */
	void locationCallback(String provider);
	
	/**
	 * Returns the current location.
	 */
	Location getCurrentLocation();

	/**
	 * Gets the location that was used in the last download for
	 * datasources.
	 * @return
	 */
	Location getLocationAtLastDownload();

	/**
	 * Sets the property to the location with the last successfull download.
	 */
	void setLocationAtLastDownload(Location locationAtLastDownload);

	/**
	 * Set the DownloadManager manager at this service
	 * 
	 * @param downloadManager
	 */
// Path: app/src/main/java/be/artoria/belfortapp/mixare/mgr/downloader/DownloadManager.java
// public interface DownloadManager {
// 
// 	/**
// 	 * Possible state of this Manager
// 	 */
// 	enum DownloadManagerState {
// 		OnLine, //manage downlad request 
// 		OffLine, // No OnLine
// 		Downloading, //Process some Download Request
// 		Confused // Internal state not congruent
// 	}
// 
// 	/**
// 	 * Reset all Request and Responce
// 	 */
// 	void resetActivity();
// 
// 	/**
// 	 * Submit new DownloadRequest
// 	 * 
// 	 * @param job
// 	 * @return reference Of Job or null if job is rejected
// 	 */
// 	String submitJob(DownloadRequest job);
// 
// 	/**
// 	 * Get result of job if exist, null otherwise
// 	 *
// 	 * @return result 
// 	 */
// 	DownloadResult getReqResult();
// 
// 	/**
// 	 * Pseudo Iterator on results 
// 	 * @return actual Download Result
// 	 */
// 	DownloadResult getNextResult();
// 
// 	/**
// 	 * Gets the number of downloaded results
// 	 * @return the number of results
// 	 */
// 	int getResultSize();
// 	
// 	/**
// 	 * check if all Download request is done
// 	 *  
// 	 * @return BOOLEAN
// 	 */
// 	Boolean isDone();
// 
// 	/**
// 	 * Request to active the service
// 	 */
// 	void switchOn();
// 
// 	/**
// 	 * Request to deactive the service
// 	 */
// 	void switchOff();
// 
// 	/**
// 	 * Request state of service
// 	 * @return
// 	 */
// 	DownloadManagerState getState();
// 
// }


// Path: app/src/main/java/be/artoria/belfortapp/mixare/mgr/location/LocationFinder.java
import be.artoria.belfortapp.mixare.mgr.downloader.DownloadManager;
import android.hardware.GeomagneticField;
import android.location.Location;

/*
 * Copyright (C) 2012- Peer internet solutions & Finalist IT Group
 * 
 * This file is part of be.artoria.belfortapp.mixare.
 * 
 * This program 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 
 * (at your option) any later version. 
 * 
 * This program 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 program. If not, see <http://www.gnu.org/licenses/>
 */
package be.artoria.belfortapp.mixare.mgr.location;



/**
 * This class is repsonsible for finding the location, and sending it back to
 * the mixcontext.
 */
public interface LocationFinder {

	/**
	 * Possible status of LocationFinder
	 */
	public enum LocationFinderState {
		Active, // Providing Location Information
		Inactive, // No-Active
		Confused // Same problem in internal state
	}

	/**
	 * Finds the location through the providers  
	 * @param ctx
	 * @return
	 */
	void findLocation();

	/**
	 * A working location provider has been found: check if 
	 * the found location has the best accuracy.
	 */
	void locationCallback(String provider);
	
	/**
	 * Returns the current location.
	 */
	Location getCurrentLocation();

	/**
	 * Gets the location that was used in the last download for
	 * datasources.
	 * @return
	 */
	Location getLocationAtLastDownload();

	/**
	 * Sets the property to the location with the last successfull download.
	 */
	void setLocationAtLastDownload(Location locationAtLastDownload);

	/**
	 * Set the DownloadManager manager at this service
	 * 
	 * @param downloadManager
	 */
	void setDownloadManager(DownloadManager downloadManager);