package it.near.sdk.Push;

import android.content.Intent;

import it.near.sdk.Reactions.Content.Content;
import it.near.sdk.Utils.CoreContentsListener;
import it.near.sdk.Reactions.Coupon.Coupon;
import it.near.sdk.Reactions.CustomJSON.CustomJSON;
import it.near.sdk.Reactions.Feedback.Feedback;
import it.near.sdk.Reactions.Poll.Poll;
import it.near.sdk.Reactions.SimpleNotification.SimpleNotification;
import it.near.sdk.Utils.BaseIntentService;
import it.near.sdk.Utils.NearUtils;

/**
 * @author cattaneostefano.
 */
public class FcmIntentService extends BaseIntentService implements CoreContentsListener {

    private static String TAG = "FcmIntentService";

    /**
     * Creates an IntentService.  Invoked by your subclass's constructor.
     */
    public FcmIntentService() {
        super(TAG);
    }

    @Override
    protected void onHandleIntent(Intent intent) {
        NearUtils.parseCoreContents(intent, this);
        FcmBroadcastReceiver.completeWakefulIntent(intent);
    }

    @Override
    public void getPollNotification(Intent intent, Poll notification, String recipeId) {
        sendSimpleNotification(intent);
    }

    @Override
    public void getContentNotification(Intent intent, Content notification, String recipeId) {
        sendSimpleNotification(intent);
    }

    @Override
    public void getCouponNotification(Intent intent, Coupon notification, String recipeId) {
        sendSimpleNotification(intent);
    }

    @Override
    public void getCustomJSONNotification(Intent intent, CustomJSON notification, String recipeId) {
        // TODO this was a custom json, implementation may vary, it's usually overriden
    }

    @Override
    public void getSimpleNotification(Intent intent, SimpleNotification s_notif, String recipeId) {
        sendSimpleNotification(intent);
    }

    @Override
    public void getFeedbackNotification(Intent intent, Feedback s_notif, String recipeId) {
        sendSimpleNotification(intent);
    }

}

@@ -1021,17 +1021,17 @@
 c void g
-e
+o
 tPollNot
@@ -1171,17 +1171,17 @@
 c void g
-e
+o
 tContent
@@ -1327,17 +1327,17 @@
 c void g
-e
+o
 tCouponN
@@ -1481,17 +1481,17 @@
 c void g
-e
+o
 tCustomJ
@@ -1691,17 +1691,17 @@
 c void g
-e
+o
 tSimpleN
@@ -1852,17 +1852,17 @@
 c void g
-e
+o
 tFeedbac

rename a few callback methods default implementation names