package com.tencent.mm.plugin.story.model.g;

import a.f.b.j;
import a.l;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.i.c;
import com.tencent.mm.i.d;
import com.tencent.mm.i.g.a;
import com.tencent.mm.plugin.story.model.g;
import com.tencent.mm.sdk.platformtools.ab;
import java.io.ByteArrayOutputStream;

@l(dWo = {1, 1, 13}, dWp = {"\u0000?\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0012\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J4\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u00032\b\u0010\u0007\u001a\u0004\u0018\u00010\b2\b\u0010\t\u001a\u0004\u0018\u00010\n2\u0006\u0010\u000b\u001a\u00020\fH\u0016J\u001a\u0010\r\u001a\u0004\u0018\u00010\u000e2\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u000f\u001a\u00020\u000eH\u0016J\u0018\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0012\u001a\u00020\u0013H\u0016¨\u0006\u0014"}, dWq = {"com/tencent/mm/plugin/story/model/upload/StorySightCdnUpload$cdnCallback$1", "Lcom/tencent/mm/cdn/keep_TaskInfo$TaskCallback;", "callback", "", "mediaId", "", "startRet", "progressInfo", "Lcom/tencent/mm/cdn/keep_ProgressInfo;", "sceneResult", "Lcom/tencent/mm/cdn/keep_SceneResult;", "onlyCheckExist", "", "decodePrepareResponse", "", "inbuf", "getCdnAuthInfo", "", "buff", "Ljava/io/ByteArrayOutputStream;", "plugin-story_release"})
public final class b$a implements a {
    final /* synthetic */ b rXJ;

    b$a(b bVar) {
        this.rXJ = bVar;
    }

    public final int a(String str, int i, c cVar, d dVar, boolean z) {
        AppMethodBeat.i(109443);
        j.p(str, "mediaId");
        if (i == -21005) {
            ab.d(this.rXJ.TAG, "cdntra cdnCallback1 clientid:%s startRet:%d proginfo:[%s] res:[%s]", new Object[]{this.rXJ.fFa, Integer.valueOf(i), cVar, dVar});
            this.rXJ.rXI.a(0, true, (g) this.rXJ);
            AppMethodBeat.o(109443);
        } else if (dVar != null && dVar.field_retCode == 0) {
            ab.i(this.rXJ.TAG, "cdntra cdnCallback2 clientid:%s startRet:%d proginfo:[%s] res:[%s]", new Object[]{this.rXJ.fFa, Integer.valueOf(i), cVar, dVar});
            b bVar = this.rXJ;
            String str2 = dVar.field_fileUrl;
            j.o(str2, "sceneResult.field_fileUrl");
            com.tencent.mm.plugin.story.h.a.a aVar = com.tencent.mm.plugin.story.h.a.sdm;
            int cAU = com.tencent.mm.plugin.story.h.a.cAU();
            String str3 = dVar.field_thumbUrl;
            j.o(str3, "sceneResult.field_thumbUrl");
            com.tencent.mm.plugin.story.h.a.a aVar2 = com.tencent.mm.plugin.story.h.a.sdm;
            int cAU2 = com.tencent.mm.plugin.story.h.a.cAU();
            StringBuilder stringBuilder = new StringBuilder("upload_ + ");
            String str4 = this.rXJ.fFa;
            if (str4 == null) {
                str4 = "null";
            }
            bVar.a(str2, cAU, str3, cAU2, stringBuilder.append(str4).toString());
            this.rXJ.rXI.a(0, true, (g) this.rXJ);
            AppMethodBeat.o(109443);
        } else if (dVar != null && dVar.field_retCode != 0) {
            ab.i(this.rXJ.TAG, "cdntra cdnCallback3 clientid:%s startRet:%d proginfo:[%s] res:[%s]", new Object[]{this.rXJ.fFa, Integer.valueOf(i), cVar, dVar});
            this.rXJ.czv();
            this.rXJ.rXI.a(dVar.field_retCode, false, (g) this.rXJ);
            AppMethodBeat.o(109443);
        } else if (i != 0) {
            ab.i(this.rXJ.TAG, "cdntra cdnCallback4 clientid:%s startRet:%d proginfo:[%s] res:[%s]", new Object[]{this.rXJ.fFa, Integer.valueOf(i), cVar, dVar});
            this.rXJ.czv();
            this.rXJ.rXI.a(i, false, (g) this.rXJ);
            AppMethodBeat.o(109443);
        } else {
            ab.d(this.rXJ.TAG, "cdntra cdnCallback5 clientid:%s startRet:%d proginfo:[%s] res:[%s]", new Object[]{this.rXJ.fFa, Integer.valueOf(i), cVar, dVar});
            AppMethodBeat.o(109443);
        }
        return 0;
    }

    public final void a(String str, ByteArrayOutputStream byteArrayOutputStream) {
        AppMethodBeat.i(109444);
        j.p(str, "mediaId");
        j.p(byteArrayOutputStream, "buff");
        AppMethodBeat.o(109444);
    }

    public final byte[] l(String str, byte[] bArr) {
        AppMethodBeat.i(109445);
        j.p(str, "mediaId");
        j.p(bArr, "inbuf");
        AppMethodBeat.o(109445);
        return null;
    }
}
