package com.metaio.sdk.jni;

import android.app.Activity;
import android.hardware.Camera;
import android.view.View;
import com.metaio.sdk.CameraView;

public class IMetaioSDKAndroid extends IMetaioSDK
{
  private long swigCPtr;

  public IMetaioSDKAndroid(long paramLong, boolean paramBoolean)
  {
    super(MetaioSDKJNI.IMetaioSDKAndroid_SWIGUpcast(paramLong), paramBoolean);
    this.swigCPtr = paramLong;
  }

  public static long getCPtr(IMetaioSDKAndroid paramIMetaioSDKAndroid)
  {
    if (paramIMetaioSDKAndroid == null)
      return 0L;
    return paramIMetaioSDKAndroid.swigCPtr;
  }

  public static Camera getCamera(Activity paramActivity)
  {
    CameraView localCameraView = (CameraView)getCameraView(paramActivity);
    if (localCameraView != null)
      return localCameraView.getCamera();
    return null;
  }

  public static View getCameraView(Activity paramActivity)
  {
    View localView = paramActivity.findViewById(16908290).findViewWithTag(CameraView.class);
    if ((localView instanceof CameraView))
      return (CameraView)localView;
    return null;
  }

  public static void loadNativeLibs()
    throws UnsatisfiedLinkError
  {
    if (shouldLoadIntelCam())
      System.loadLibrary("camhal");
    System.loadLibrary("avutil");
    System.loadLibrary("avcodec");
    System.loadLibrary("avformat");
    System.loadLibrary("swresample");
    System.loadLibrary("swscale");
    System.loadLibrary("metaiosdk");
  }

  private static boolean shouldLoadIntelCam()
  {
    return false;
  }

  public static boolean startTorch(Activity paramActivity)
  {
    CameraView localCameraView = (CameraView)getCameraView(paramActivity);
    if (localCameraView != null)
      return localCameraView.startTorch();
    return false;
  }

  public static boolean stopTorch(Activity paramActivity)
  {
    CameraView localCameraView = (CameraView)getCameraView(paramActivity);
    if (localCameraView != null)
      return localCameraView.stopTorch();
    return false;
  }

  public void delete()
  {
    try
    {
      if (this.swigCPtr != 0L)
      {
        if (this.swigCMemOwn)
        {
          this.swigCMemOwn = false;
          MetaioSDKJNI.delete_IMetaioSDKAndroid(this.swigCPtr);
        }
        this.swigCPtr = 0L;
      }
      super.delete();
      return;
    }
    finally
    {
    }
  }

  protected void finalize()
  {
    delete();
  }

  public void reloadOpenGLResources()
  {
    MetaioSDKJNI.IMetaioSDKAndroid_reloadOpenGLResources(this.swigCPtr, this);
  }
}

/* Location:           C:\Documents and Settings\Cesar Cabello Cea\Mis documentos\Downloads\apk-downloader\com.ikea.kompis-6_dex2jar.jar
 * Qualified Name:     com.metaio.sdk.jni.IMetaioSDKAndroid
 * JD-Core Version:    0.6.2
 */