package fi.cie.chiru.servicefusionar.serviceApi;

import java.util.Vector;

import commands.Command;

import util.Log;
import util.Vec;
import worldData.World;

import fi.cie.chiru.servicefusionar.ServiceFusionSetup;

public class ServiceManager 
{
	private static final String LOG_TAG = "ServiceManager";
	private ServiceFusionSetup setup;
	private Vector<ServiceApplication> serviceApplications;
	private MovieManager movieManager;

	public ServiceManager(ServiceFusionSetup setup)
	{
		this.setup = setup;
		serviceApplications = new Vector<ServiceApplication>();
		movieManager = new MovieManager(this);
	}
	
	public ServiceFusionSetup getSetup()
	{
		return setup;
	}
	
	public MovieManager getMovieManager()
	{
		return movieManager;
	}
	
	public void createApplications()
	{
		SceneParser parser = new SceneParser();
		serviceApplications = parser.parseFile(this, "serviceFusion.txt");
	}
	
	public ServiceApplication getApplication(String appName)
	{
		ServiceApplication serviceApp = null;
		
		for(int i=0; i<serviceApplications.size(); i++)
		{
		    serviceApp = serviceApplications.elementAt(i);
		    
			if(serviceApplications.elementAt(i).getName().compareTo(appName)==0)
		        return serviceApp;
			else
				serviceApp = null;
		}
		return serviceApp;
	}
	
	public void setVisibilityToAllApplications(boolean visible)
	{
		for(int i=0; i<serviceApplications.size(); i++)
		{
			serviceApplications.elementAt(i).setvisible(visible);
		}
	
	}
}

@@ -69,16 +69,48 @@
 ector;%0A%0A
+import android.content.Intent;%0A%0A
 import c
@@ -126,16 +126,16 @@
 ommand;%0A
-
 %0Aimport 
@@ -458,16 +458,52 @@
 Manager;
+%0A%09private MusicManager musicManager;
 %0A%0A%09publi
@@ -669,16 +669,57 @@
 (this);%0A
+%09%09musicManager = new MusicManager(this);%0A
 %09%7D%0A%09%0A%09pu
@@ -815,24 +815,24 @@
 anager()%0A%09%7B%0A
-
 %09%09return mov
@@ -843,24 +843,94 @@
 nager;%0A%09%7D%0A%09%0A
+%09public MusicManager getMusicManager()%0A%09%7B%0A%09%09return musicManager;%0A%09%7D%0A%09%0A
 %09public void

Add MusicManager to the serviceManager class.