// Path: library/src/main/java/de/tubs/ibr/dtn/api/ServiceNotAvailableException.java
// public class ServiceNotAvailableException extends Exception {
// 
// 	/**
// 	 * 
// 	 */
// 	private static final long serialVersionUID = 876730276266296815L;
// 	
// 	public ServiceNotAvailableException() {}
// 
//     public ServiceNotAvailableException(Exception innerException) {
//         this.innerException = innerException;
//     }
//     
// 	public ServiceNotAvailableException(String what) {
// 		this.what = null;
// 	}
// 	
//     @Override
// 	public String toString() {
//     	if ((innerException == null) && (what == null)) return super.toString();
//     	return "ServiceNotAvailableException: " + ((innerException == null) ? what : innerException.toString());
// 	}
// 
// 	public Exception innerException = null;
//     public String what = null;
// }


import java.util.List;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.net.Uri;
import de.tubs.ibr.dtn.api.ServiceNotAvailableException;
package de.tubs.ibr.dtn;



public class Services {
	/**
	 * Version = 0 (< 1.0)
	 * Version = 1 (>= 1.0)
	 */
	public static final Integer VERSION_APPLICATION = 1;
	
	/**
	 * Version = 0 (< 1.0)
	 * Version = 1 (>= 1.0)
	 */
	public static final Integer VERSION_MANAGER = 1;
	
	/**
	 * Version = 0 (< 1.0)
	 * Version = 1 (>= 1.0)
	 */
	public static final Integer VERSION_SECURITY = 1;
	
	public static final Service SERVICE_APPLICATION = new Service(DTNService.class.getName(), VERSION_APPLICATION);
	public static final Service SERVICE_MANAGER = new Service(DtnManager.class.getName(), VERSION_MANAGER);
	public static final Service SERVICE_SECURITY = new Service(SecurityService.class.getName(), VERSION_SECURITY);
	
	public static final String EXTRA_VERSION = "de.tubs.ibr.dtn.Service.VERSION";
	public static final String EXTRA_NAME = "de.tubs.ibr.dtn.Service.NAME";
	
	public static class Service {
		private final String mClassName;
		private final Integer mVersion;
		
		private Service(String className, Integer version) {
			mClassName = className;
			mVersion = version;
		}
		
		public String getClassName() {
			return mClassName;
		}
		
		public Integer getVersion() {
			return mVersion;
		}
		
// Path: library/src/main/java/de/tubs/ibr/dtn/api/ServiceNotAvailableException.java
// public class ServiceNotAvailableException extends Exception {
// 
// 	/**
// 	 * 
// 	 */
// 	private static final long serialVersionUID = 876730276266296815L;
// 	
// 	public ServiceNotAvailableException() {}
// 
//     public ServiceNotAvailableException(Exception innerException) {
//         this.innerException = innerException;
//     }
//     
// 	public ServiceNotAvailableException(String what) {
// 		this.what = null;
// 	}
// 	
//     @Override
// 	public String toString() {
//     	if ((innerException == null) && (what == null)) return super.toString();
//     	return "ServiceNotAvailableException: " + ((innerException == null) ? what : innerException.toString());
// 	}
// 
// 	public Exception innerException = null;
//     public String what = null;
// }


// Path: library/src/main/java/de/tubs/ibr/dtn/Services.java
import java.util.List;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.net.Uri;
import de.tubs.ibr.dtn.api.ServiceNotAvailableException;

package de.tubs.ibr.dtn;



public class Services {
	/**
	 * Version = 0 (< 1.0)
	 * Version = 1 (>= 1.0)
	 */
	public static final Integer VERSION_APPLICATION = 1;
	
	/**
	 * Version = 0 (< 1.0)
	 * Version = 1 (>= 1.0)
	 */
	public static final Integer VERSION_MANAGER = 1;
	
	/**
	 * Version = 0 (< 1.0)
	 * Version = 1 (>= 1.0)
	 */
	public static final Integer VERSION_SECURITY = 1;
	
	public static final Service SERVICE_APPLICATION = new Service(DTNService.class.getName(), VERSION_APPLICATION);
	public static final Service SERVICE_MANAGER = new Service(DtnManager.class.getName(), VERSION_MANAGER);
	public static final Service SERVICE_SECURITY = new Service(SecurityService.class.getName(), VERSION_SECURITY);
	
	public static final String EXTRA_VERSION = "de.tubs.ibr.dtn.Service.VERSION";
	public static final String EXTRA_NAME = "de.tubs.ibr.dtn.Service.NAME";
	
	public static class Service {
		private final String mClassName;
		private final Integer mVersion;
		
		private Service(String className, Integer version) {
			mClassName = className;
			mVersion = version;
		}
		
		public String getClassName() {
			return mClassName;
		}
		
		public Integer getVersion() {
			return mVersion;
		}
		
		public Intent getIntent(Context context, String action) throws ServiceNotAvailableException {