FileLoadOperation.smali

.class public Lim/tpelyyftgw/tgnet/FileLoadOperation;
.super Ljava/lang/Object;
.source "FileLoadOperation.java"


# instance fields
.field private address:J

.field private delegate:Lim/tpelyyftgw/tgnet/FileLoadOperationDelegate;

.field private isForceRequest:Z

.field private started:Z


# direct methods
.method static constructor <clinit>()V
    .registers 1

    return-void
.end method

.method public constructor <init>(IJJJI[B[BLjava/lang/String;IILjava/io/File;Ljava/io/File;Lim/tpelyyftgw/tgnet/FileLoadOperationDelegate;)V
    .registers 34
    .param p1, "dc_id"    # I
    .param p2, "id"    # J
    .param p4, "volume_id"    # J
    .param p6, "access_hash"    # J
    .param p8, "local_id"    # I
    .param p9, "encKey"    # [B
    .param p10, "encIv"    # [B
    .param p11, "extension"    # Ljava/lang/String;
    .param p12, "version"    # I
    .param p13, "size"    # I
    .param p14, "dest"    # Ljava/io/File;
    .param p15, "temp"    # Ljava/io/File;
    .param p16, "fileLoadOperationDelegate"    # Lim/tpelyyftgw/tgnet/FileLoadOperationDelegate;

    .line 14
    move-object/from16 v0, p0

    invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V

    .line 15
    invoke-virtual/range {p14 .. p14}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v14

    invoke-virtual/range {p15 .. p15}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v15

    move/from16 v1, p1

    move-wide/from16 v2, p2

    move-wide/from16 v4, p4

    move-wide/from16 v6, p6

    move/from16 v8, p8

    move-object/from16 v9, p9

    move-object/from16 v10, p10

    move-object/from16 v11, p11

    move/from16 v12, p12

    move/from16 v13, p13

    move-object/from16 v16, p16

    invoke-static/range {v1 .. v16}, Lim/tpelyyftgw/tgnet/FileLoadOperation;->native_createLoadOpetation(IJJJI[B[BLjava/lang/String;IILjava/lang/String;Ljava/lang/String;Ljava/lang/Object;)J

    move-result-wide v1

    iput-wide v1, v0, Lim/tpelyyftgw/tgnet/FileLoadOperation;->address:J

    .line 16
    move-object/from16 v1, p16

    iput-object v1, v0, Lim/tpelyyftgw/tgnet/FileLoadOperation;->delegate:Lim/tpelyyftgw/tgnet/FileLoadOperationDelegate;

    .line 17
    return-void
.end method

.method public static native native_cancelLoadOperation(J)V
.end method

.method public static native native_createLoadOpetation(IJJJI[B[BLjava/lang/String;IILjava/lang/String;Ljava/lang/String;Ljava/lang/Object;)J
.end method

.method public static native native_startLoadOperation(J)V
.end method


# virtual methods
.method public cancel()V
    .registers 6

    .line 40
    iget-boolean v0, p0, Lim/tpelyyftgw/tgnet/FileLoadOperation;->started:Z

    if-eqz v0, :cond_11

    iget-wide v0, p0, Lim/tpelyyftgw/tgnet/FileLoadOperation;->address:J

    const-wide/16 v2, 0x0

    cmp-long v4, v0, v2

    if-nez v4, :cond_d

    goto :goto_11

    .line 43
    :cond_d
    invoke-static {v0, v1}, Lim/tpelyyftgw/tgnet/FileLoadOperation;->native_cancelLoadOperation(J)V

    .line 44
    return-void

    .line 41
    :cond_11
    :goto_11
    return-void
.end method

.method public isForceRequest()Z
    .registers 2

    .line 24
    iget-boolean v0, p0, Lim/tpelyyftgw/tgnet/FileLoadOperation;->isForceRequest:Z

    return v0
.end method

.method public setForceRequest(Z)V
    .registers 2
    .param p1, "forceRequest"    # Z

    .line 20
    iput-boolean p1, p0, Lim/tpelyyftgw/tgnet/FileLoadOperation;->isForceRequest:Z

    .line 21
    return-void
.end method

.method public start()V
    .registers 6

    .line 28
    iget-boolean v0, p0, Lim/tpelyyftgw/tgnet/FileLoadOperation;->started:Z

    if-eqz v0, :cond_5

    .line 29
    return-void

    .line 31
    :cond_5
    iget-wide v0, p0, Lim/tpelyyftgw/tgnet/FileLoadOperation;->address:J

    const-wide/16 v2, 0x0

    cmp-long v4, v0, v2

    if-nez v4, :cond_14

    .line 32
    iget-object v0, p0, Lim/tpelyyftgw/tgnet/FileLoadOperation;->delegate:Lim/tpelyyftgw/tgnet/FileLoadOperationDelegate;

    const/4 v1, 0x0

    invoke-interface {v0, v1}, Lim/tpelyyftgw/tgnet/FileLoadOperationDelegate;->onFailed(I)V

    .line 33
    return-void

    .line 35
    :cond_14
    const/4 v2, 0x1

    iput-boolean v2, p0, Lim/tpelyyftgw/tgnet/FileLoadOperation;->started:Z

    .line 36
    invoke-static {v0, v1}, Lim/tpelyyftgw/tgnet/FileLoadOperation;->native_startLoadOperation(J)V

    .line 37
    return-void
.end method

.method public wasStarted()Z
    .registers 2

    .line 47
    iget-boolean v0, p0, Lim/tpelyyftgw/tgnet/FileLoadOperation;->started:Z

    return v0
.end method