CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05

以下内容为反编译后的 c1.java 源代码,内容仅作参考


package ak.smack;

import ak.im.sdk.manager.nf;
import ak.im.sdk.manager.ye;
import ak.im.utils.Log;
import com.asim.protobuf.Akeychat;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.xmlpull.v1.XmlPullParser;
public class c1 extends IQ {
    private final String a;
    private final String f4226b;
    Akeychat.SubscribeChannelResponse f4227c;
    private String f4228d;
    private boolean f4229e;

    public static class b extends IQProvider {
        @Override
        public IQ parse(XmlPullParser xmlPullParser, int i) throws Exception {
            c1 c1Var = new c1();
            boolean z = false;
            while (!z) {
                int next = xmlPullParser.next();
                if (next == 4) {
                    c1Var.parseResults(xmlPullParser);
                } else if (next == 3 && xmlPullParser.getName().equals("subscribechannel")) {
                    z = true;
                }
            }
            return c1Var;
        }
    }

    @Override
    protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
        iQChildElementXmlStringBuilder.append(">");
        if (this.f4229e) {
            Akeychat.SubscribeChannelRequest.b newBuilder = Akeychat.SubscribeChannelRequest.newBuilder();
            newBuilder.setInnerId(this.f4226b);
            iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, ak.comm.d.encodeBytes(newBuilder.build().toByteArray()));
        } else {
            String str = this.f4228d;
            if (str != null) {
                iQChildElementXmlStringBuilder.optElement("result", str);
            }
        }
        return iQChildElementXmlStringBuilder;
    }

    public String getResult() {
        return this.f4228d;
    }

    public Akeychat.SubscribeChannelResponse getmProtoResponse() {
        return this.f4227c;
    }

    protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
        try {
            this.f4228d = xmlPullParser.getText();
            Log.i("FollowChannelIQ", "start parse result follow:" + this.f4228d);
            this.f4227c = Akeychat.SubscribeChannelResponse.parseFrom(ak.comm.d.decode(this.f4228d));
        } catch (Exception e2) {
            Log.w("FollowChannelIQ", "encounter excp in parse results" + e2.getMessage());
        }
    }

    private c1() {
        super("subscribechannel", "http://akey.im/protocol/xmpp/iq/subscribechannel");
        this.a = "FollowChannelIQ";
        this.f4226b = null;
    }

    public c1(String str) {
        super("subscribechannel", "http://akey.im/protocol/xmpp/iq/subscribechannel");
        this.a = "FollowChannelIQ";
        setType(IQ.Type.set);
        setTo(ye.getInstance().getServer().getXmppDomain());
        setFrom(nf.getInstance().getUserMe().getJID());
        this.f4226b = str;
        this.f4229e = true;
    }
}