// Path: robota/src/main/java/com/uphyca/robota/InjectionUtils.java
// public abstract class InjectionUtils {
// 
//     private InjectionUtils() {
//     }
// 
//     public static ObjectGraph getObjectGraph(Context context) {
//         return RobotaApplication.class.cast(context.getApplicationContext())
//                                        .getObjectGraph();
//     }
// }


import android.app.IntentService;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import com.uphyca.idobata.Idobata;
import com.uphyca.idobata.IdobataError;
import com.uphyca.robota.InjectionUtils;
import javax.inject.Inject;
/*
 * Copyright (C) 2014 uPhyca Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.uphyca.robota.service;




/**
 * @author Sosuke Masui (masui@uphyca.com)
 */
public class PostTextService extends IntentService {

    private static final String EXTRA_ROOM_URI = "room_uri";
    private static final String EXTRA_SOURCE = "source";

    public static void postText(Context context, Uri roomUri, String source) {
        Intent intent = new Intent(context, PostTextService.class).putExtra(EXTRA_SOURCE, source)
                                                                  .putExtra(EXTRA_ROOM_URI, roomUri);
        context.startService(intent);
    }

    @Inject
    Idobata mIdobata;

    public PostTextService() {
        super("PostTextService");
    }

    @Override
    public void onCreate() {
        super.onCreate();
// Path: robota/src/main/java/com/uphyca/robota/InjectionUtils.java
// public abstract class InjectionUtils {
// 
//     private InjectionUtils() {
//     }
// 
//     public static ObjectGraph getObjectGraph(Context context) {
//         return RobotaApplication.class.cast(context.getApplicationContext())
//                                        .getObjectGraph();
//     }
// }


// Path: robota/src/main/java/com/uphyca/robota/service/PostTextService.java
import android.app.IntentService;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import com.uphyca.idobata.Idobata;
import com.uphyca.idobata.IdobataError;
import com.uphyca.robota.InjectionUtils;
import javax.inject.Inject;

/*
 * Copyright (C) 2014 uPhyca Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.uphyca.robota.service;




/**
 * @author Sosuke Masui (masui@uphyca.com)
 */
public class PostTextService extends IntentService {

    private static final String EXTRA_ROOM_URI = "room_uri";
    private static final String EXTRA_SOURCE = "source";

    public static void postText(Context context, Uri roomUri, String source) {
        Intent intent = new Intent(context, PostTextService.class).putExtra(EXTRA_SOURCE, source)
                                                                  .putExtra(EXTRA_ROOM_URI, roomUri);
        context.startService(intent);
    }

    @Inject
    Idobata mIdobata;

    public PostTextService() {
        super("PostTextService");
    }

    @Override
    public void onCreate() {
        super.onCreate();
        InjectionUtils.getObjectGraph(this)