CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 n1.java 源代码,内容仅作参考
package ak.smack;
import android.text.TextUtils;
import androidx.constraintlayout.core.motion.utils.TypedValues;
import com.alibaba.fastjson.JSONObject;
import com.asim.protobuf.Akeychat;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.xmlpull.v1.XmlPullParser;
@kotlin.j(d1 = {"\u0000T\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u0000 &2\u00020\u0001:\u0002&'BC\b\u0016\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\b\u0010\u0006\u001a\u0004\u0018\u00010\u0005\u0012\b\u0010\u0007\u001a\u0004\u0018\u00010\b\u0012\u0006\u0010\t\u001a\u00020\u0003\u0012\u0006\u0010\n\u001a\u00020\u000b\u0012\u0006\u0010\f\u001a\u00020\r¢\u0006\u0002\u0010\u000eB\u0007\b\u0016¢\u0006\u0002\u0010\u000fJ\u0010\u0010\u001e\u001a\u00020\u001f2\u0006\u0010 \u001a\u00020\u001fH\u0014J\b\u0010!\u001a\u0004\u0018\u00010\u0019J\u000e\u0010\"\u001a\u00020#2\u0006\u0010$\u001a\u00020%R\u000e\u0010\f\u001a\u00020\rX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0010\u001a\u00020\u0011X\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u0012\u001a\u0004\u0018\u00010\bX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0013\u001a\u00020\u0003X\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u0014\u001a\u0004\u0018\u00010\u0005X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0015\u001a\u00020\u0005X\u0082D¢\u0006\u0002\n\u0000R\u000e\u0010\u0016\u001a\u00020\u0005X\u0082D¢\u0006\u0002\n\u0000R\u000e\u0010\u0017\u001a\u00020\u0005X\u0082D¢\u0006\u0002\n\u0000R\u0010\u0010\u0018\u001a\u0004\u0018\u00010\u0019X\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u001a\u001a\u0004\u0018\u00010\u0005X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u001b\u001a\u00020\u0005X\u0082D¢\u0006\u0002\n\u0000R\u000e\u0010\u001c\u001a\u00020\u0005X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u001d\u001a\u00020\u0003X\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006("}, d2 = {"Lak/smack/GetUploadTokenIQ;", "Lorg/jivesoftware/smack/packet/IQ;", TypedValues.TransitionType.S_DURATION, "", "scope", "", "name", "chatType", "Lcom/asim/protobuf/Akeychat$ChatType;", "size", "ft", "Lak/smack/IQFromTo;", "attType", "", "(JLjava/lang/String;Ljava/lang/String;Lcom/asim/protobuf/Akeychat$ChatType;JLak/smack/IQFromTo;I)V", "()V", "isSend", "", "mChatType", "mDuration", "mName", "mPolicyReturnBody", "mPolicyReturnDetectMime", "mPolicyReturnScope", "mResponse", "Lcom/asim/protobuf/Akeychat$GetUploadToketResponse;", "mResult", "mReturnBody", "mScope", "uploadFileSize", "getIQChildElementBuilder", "Lorg/jivesoftware/smack/packet/IQ$IQChildElementXmlStringBuilder;", "xml", "getmResponse", "parseResults", "", "parser", "Lorg/xmlpull/v1/XmlPullParser;", "Companion", "Provider", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public final class n1 extends IQ {
@NotNull
public static final a a = new a(null);
private long f4522b;
@NotNull
private String f4523c;
@Nullable
private Akeychat.GetUploadToketResponse f4524d;
@NotNull
private final String f4525e;
@NotNull
private final String f;
@NotNull
private final String g;
@NotNull
private final String h;
@Nullable
private String i;
private boolean j;
@Nullable
private String k;
@Nullable
private Akeychat.ChatType l;
private long m;
private int n;
@kotlin.j(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000¨\u0006\u0006"}, d2 = {"Lak/smack/GetUploadTokenIQ$Companion;", "", "()V", "ELEMENT", "", "NAMESPACE", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public static final class a {
private a() {
}
public a(kotlin.jvm.internal.o oVar) {
this();
}
}
@kotlin.j(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0003J\u0018\u0010\u0004\u001a\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\bH\u0016¨\u0006\t"}, d2 = {"Lak/smack/GetUploadTokenIQ$Provider;", "Lorg/jivesoftware/smack/provider/IQProvider;", "Lorg/jivesoftware/smack/packet/IQ;", "()V", "parse", "parser", "Lorg/xmlpull/v1/XmlPullParser;", "initDepth", "", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public static final class b extends IQProvider<IQ> {
@Override
@NotNull
public IQ parse(@NotNull XmlPullParser parser, int i) throws Exception {
kotlin.jvm.internal.r.checkNotNullParameter(parser, "parser");
n1 n1Var = new n1();
boolean z = false;
while (!z) {
int next = parser.next();
if (next != 3) {
if (next == 4) {
n1Var.parseResults(parser);
}
} else if (kotlin.jvm.internal.r.areEqual(parser.getName(), "uploadtoken")) {
z = true;
}
}
return n1Var;
}
}
public n1(long j, @NotNull String scope, @Nullable String str, @Nullable Akeychat.ChatType chatType, long j2, @NotNull q1 ft, int i) {
super("uploadtoken", "http://akey.im/protocol/xmpp/iq/uploadtoken");
kotlin.jvm.internal.r.checkNotNullParameter(scope, "scope");
kotlin.jvm.internal.r.checkNotNullParameter(ft, "ft");
this.f4522b = -1L;
this.f4523c = "";
this.f4525e = "returnBody";
this.f = "scope";
this.g = "detectMime";
this.h = "{\"key\":$(key),\"hash\":$(etag),\"size\":$(fsize),\"mimeType\":$(mimeType),\"width\":$(imageInfo.width),\"height\":$(imageInfo.height)}";
this.k = "";
this.n = -1;
if (j >= 0) {
this.j = true;
this.k = str;
this.l = chatType;
this.m = j2;
this.f4522b = j;
this.f4523c = scope;
setType(IQ.Type.get);
setTo(ft.getTo());
this.n = i;
return;
}
throw new IllegalArgumentException(kotlin.jvm.internal.r.stringPlus("illegal params:", Long.valueOf(j)));
}
@Override
@NotNull
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(@NotNull IQ.IQChildElementXmlStringBuilder xml) {
kotlin.jvm.internal.r.checkNotNullParameter(xml, "xml");
xml.append(">");
if (this.j) {
Akeychat.GetUploadTokeRequest.b newBuilder = Akeychat.GetUploadTokeRequest.newBuilder();
if (this.f4522b != -1 && !TextUtils.isEmpty(this.f4523c)) {
JSONObject jSONObject = new JSONObject();
jSONObject.put((JSONObject) this.f, this.f4523c);
jSONObject.put((JSONObject) this.g, (String) 0);
jSONObject.put((JSONObject) this.f4525e, this.h);
newBuilder.setPolicy(jSONObject.toJSONString());
newBuilder.setDuration(this.f4522b / 1000);
if (!TextUtils.isEmpty(this.k)) {
newBuilder.setReceiver(this.k);
newBuilder.setType(this.l);
newBuilder.setSize(this.m);
}
int i = this.n;
if (i >= 0) {
newBuilder.setAttType(Akeychat.AttType.valueOf(i));
}
}
xml.optElement(HiAnalyticsConstant.Direction.REQUEST, ak.comm.d.encodeBytes(newBuilder.build().toByteArray()));
} else {
xml.optElement("result", this.i);
}
return xml;
}
@Nullable
public final Akeychat.GetUploadToketResponse getmResponse() {
return this.f4524d;
}
public final void parseResults(@NotNull XmlPullParser parser) throws Exception {
kotlin.jvm.internal.r.checkNotNullParameter(parser, "parser");
try {
String text = parser.getText();
this.i = text;
this.f4524d = Akeychat.GetUploadToketResponse.parseFrom(ak.comm.d.decode(text));
} catch (Exception e2) {
e2.printStackTrace();
}
}
public n1() {
super("uploadtoken", "http://akey.im/protocol/xmpp/iq/uploadtoken");
this.f4522b = -1L;
this.f4523c = "";
this.f4525e = "returnBody";
this.f = "scope";
this.g = "detectMime";
this.h = "{\"key\":$(key),\"hash\":$(etag),\"size\":$(fsize),\"mimeType\":$(mimeType),\"width\":$(imageInfo.width),\"height\":$(imageInfo.height)}";
this.k = "";
this.n = -1;
}
}