package pt.passarola.services;


import android.content.Context;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;
import pt.passarola.utils.rest.RestApi;

/**
 * Created by ruigoncalo on 22/10/15.
 */
@Module(library = true, complete = false)
public class ServicesModule {

    @Provides
    @Singleton
    BusProvider provideBus() {
        return new BusProvider();
    }

    @Provides
    @Singleton
    WebApiService provideWebApiService(RestApi restApi) {
        return new WebApiService(restApi);
    }

    @Provides
    @Singleton
    PlaceProvider providePlaceProvider(BusProvider busProvider, WebApiService webApiService) {
        return new PlaceProvider(busProvider, webApiService);
    }


    @Provides
    @Singleton
    LocationProvider providesLocationProvider(BusProvider busProvider, Context context){
        return new LocationProvider(busProvider, context);
    }
}


@@ -728,17 +728,16 @@
 %0A    %7D%0A%0A
-%0A
     @Pro
@@ -910,12 +910,158 @@
 );%0A    %7D
+%0A%0A    @Provides%0A    @Singleton%0A    BeerProvider providesBeerProvider(BusProvider busProvider)%7B%0A        return new BeerProvider(busProvider);%0A    %7D
 %0A%7D%0A%0A

Add providers to ServicesModules