LogEntryHelper.java 1.73 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.service.ManagerPackage;

import com.adobe.service.ManagerPackage.LogEntry;
import com.adobe.service.ManagerPackage.StringSeqHelper;
import org.omg.CORBA.Any;
import org.omg.CORBA.IDLType;
import org.omg.CORBA.ORB;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.TCKind;
import org.omg.CORBA.TypeCode;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;

public final class LogEntryHelper {
    private static TypeCode _type = null;

    public static TypeCode type() {
        if (_type == null) {
            _type = ORB.init().create_struct_tc(LogEntryHelper.id(), "LogEntry", new StructMember[]{new StructMember("level", ORB.init().get_primitive_tc(TCKind.from_int(3)), null), new StructMember("templateId", ORB.init().create_wstring_tc(0), null), new StructMember("params", StringSeqHelper.type(), null)});
        }
        return _type;
    }

    public static void insert(Any any, LogEntry s) {
        any.type(LogEntryHelper.type());
        LogEntryHelper.write(any.create_output_stream(), s);
    }

    public static LogEntry extract(Any any) {
        return LogEntryHelper.read(any.create_input_stream());
    }

    public static String id() {
        return "IDL:com/adobe/service/Manager/LogEntry:1.0";
    }

    public static LogEntry read(InputStream in) {
        LogEntry result = new LogEntry();
        result.level = in.read_long();
        result.templateId = in.read_wstring();
        result.params = StringSeqHelper.read(in);
        return result;
    }

    public static void write(OutputStream out, LogEntry s) {
        out.write_long(s.level);
        out.write_wstring(s.templateId);
        StringSeqHelper.write(out, s.params);
    }
}