PushRequest.java 1.34 KB
package com.arellomobile.android.push.request;

import android.content.Context;
import com.arellomobile.android.push.utils.GeneralUtils;
import com.arellomobile.android.push.utils.PreferenceUtils;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;

public abstract class PushRequest
{
  String a = "";
  
  protected void buildParams(Context paramContext, Map<String, Object> paramMap)
    throws JSONException
  {}
  
  public abstract String getMethod();
  
  public final Map<String, Object> getParams(Context paramContext)
    throws JSONException
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put("application", PreferenceUtils.getApplicationId(paramContext));
    localHashMap.put("hwid", GeneralUtils.getDeviceUUID(paramContext));
    localHashMap.put("v", "1.0");
    buildParams(paramContext, localHashMap);
    return localHashMap;
  }
  
  public String getRawResponse()
  {
    return this.a;
  }
  
  public void parseResponse(JSONObject paramJSONObject)
    throws JSONException
  {
    if (paramJSONObject == null) {
      return;
    }
    this.a = paramJSONObject.toString();
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/arellomobile/android/push/request/PushRequest.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */