package com.splunk.mint;

import android.content.Context;
import java.util.HashMap;
import org.json.JSONException;
import org.json.JSONObject;

class ActionView extends BaseDTO
  implements InterfaceDataType
{
  private Integer domProcessingTime = null;
  private Integer domainLookupTime = null;
  private Long elapsedTime = null;
  private String host = "NA";
  private String lastName = "NA";
  private Integer loadTime = null;
  private Integer serverTime = null;
  private String viewName = "NA";

  public ActionView(EnumActionType paramEnumActionType, String paramString1, Integer paramInteger1, Integer paramInteger2, Integer paramInteger3, String paramString2, Integer paramInteger4, HashMap<String, Object> paramHashMap)
  {
    super(paramEnumActionType, paramHashMap);
    this.viewName = paramString1;
    this.lastName = Properties.lastView;
    this.domainLookupTime = paramInteger1;
    this.domProcessingTime = paramInteger2;
    this.serverTime = paramInteger3;
    this.host = paramString2;
    this.loadTime = paramInteger4;
    Properties.lastView = paramString1;
    long l = System.currentTimeMillis();
    if (Properties.lastViewTime == 0L);
    for (this.elapsedTime = Long.valueOf(0L); ; this.elapsedTime = Long.valueOf(l - Properties.lastViewTime))
    {
      Properties.lastViewTime = l;
      return;
    }
  }

  public static final void logView(String paramString1, Integer paramInteger1, Integer paramInteger2, Integer paramInteger3, String paramString2, Integer paramInteger4, HashMap<String, Object> paramHashMap)
  {
    try
    {
      new ActionView(EnumActionType.view, paramString1, paramInteger1, paramInteger2, paramInteger2, paramString2, paramInteger4, paramHashMap).save(new DataSaver());
      return;
    }
    finally
    {
      localObject = finally;
      throw localObject;
    }
  }

  public static final void logView(String paramString, HashMap<String, Object> paramHashMap)
  {
    try
    {
      new ActionView(EnumActionType.view, paramString, null, null, null, null, null, paramHashMap).save(new DataSaver());
      return;
    }
    finally
    {
      localObject = finally;
      throw localObject;
    }
  }

  public void save(DataSaver paramDataSaver)
  {
    paramDataSaver.save(toJsonLine());
  }

  public void send(Context paramContext, NetSender paramNetSender, boolean paramBoolean)
  {
    paramNetSender.send(toJsonLine(), paramBoolean);
  }

  public void send(NetSender paramNetSender, boolean paramBoolean)
  {
    paramNetSender.send(toJsonLine(), paramBoolean);
  }

  public String toJsonLine()
  {
    JSONObject localJSONObject = getBasicDataFixtureJson();
    try
    {
      Object localObject1;
      Object localObject2;
      label67: Object localObject3;
      label88: Object localObject4;
      label109: Object localObject5;
      if (this.viewName != null)
      {
        localJSONObject.put("current", this.viewName);
        localJSONObject.put("previous", this.lastName);
        if (this.domainLookupTime != null)
          break label187;
        localObject1 = JSONObject.NULL;
        localJSONObject.put("domainLookupTime", localObject1);
        if (this.domProcessingTime != null)
          break label196;
        localObject2 = JSONObject.NULL;
        localJSONObject.put("domProcessingTime", localObject2);
        if (this.serverTime != null)
          break label205;
        localObject3 = JSONObject.NULL;
        localJSONObject.put("serverTime", localObject3);
        if (this.host != null)
          break label214;
        localObject4 = JSONObject.NULL;
        localJSONObject.put("host", localObject4);
        if (this.loadTime != null)
          break label223;
        localObject5 = JSONObject.NULL;
        label130: localJSONObject.put("loadTime", localObject5);
        if (this.elapsedTime != null)
          break label232;
      }
      label187: label196: label205: label214: label223: label232: for (Object localObject6 = JSONObject.NULL; ; localObject6 = this.elapsedTime)
      {
        localJSONObject.put("elapsedTime", localObject6);
        return localJSONObject.toString() + Properties.getSeparator(EnumActionType.view);
        localObject1 = this.domainLookupTime;
        break;
        localObject2 = this.domProcessingTime;
        break label67;
        localObject3 = this.serverTime;
        break label88;
        localObject4 = this.host;
        break label109;
        localObject5 = this.loadTime;
        break label130;
      }
    }
    catch (JSONException localJSONException)
    {
      while (true)
        localJSONException.printStackTrace();
    }
  }
}

/* Location:           C:\Documents and Settings\Cesar Cabello Cea\Mis documentos\Downloads\apk-downloader\com.ikea.kompis-6_dex2jar.jar
 * Qualified Name:     com.splunk.mint.ActionView
 * JD-Core Version:    0.6.2
 */