ReqImageOpVignetteCompositeView.java 3.76 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.scene7.is.ipp.messages;

import com.scene7.is.ipp.messages.Ipp;
import com.scene7.is.ipp.messages.IppIRCompositeType;
import com.scene7.is.ipp.messages.IppInt;
import com.scene7.is.ipp.messages.Offset;
import com.scene7.is.ipp.messages.OutMessage;
import java.io.IOException;
import java.io.Writer;

public class ReqImageOpVignetteCompositeView
extends OutMessage {
    static int MessageNumber = 3146244;
    private int viewId_;
    private int subId_;
    private int compositeId_;
    private int compositeType_;

    public ReqImageOpVignetteCompositeView(int tag, int viewId, int subId, int compositeId, int compositeType, int headClientId) {
        int fixedLength;
        this.tag_ = tag;
        this.headerClientId_ = headClientId;
        this.viewId_ = viewId;
        this.subId_ = subId;
        this.compositeId_ = compositeId;
        this.compositeType_ = compositeType;
        this.messageLength_ = fixedLength = 16;
        Offset pos = new Offset(0);
        this.headBuffer_ = new byte[32];
        this.bodyBuffer_ = new byte[this.messageLength_];
        Ipp.StuffHeader(this.headBuffer_, this.headerClientId_, tag, MessageNumber, this.messageLength_);
        IppInt.Stuff(this.bodyBuffer_, pos, null, this.viewId_);
        IppInt.Stuff(this.bodyBuffer_, pos, null, this.subId_);
        IppInt.Stuff(this.bodyBuffer_, pos, null, this.compositeId_);
        IppInt.Stuff(this.bodyBuffer_, pos, null, this.compositeType_);
        Ipp.Assert(pos.val == fixedLength, "IppWatermarkType length");
    }

    public ReqImageOpVignetteCompositeView() {
    }

    public void process(int headClientId, int tg, byte[] bf) {
        this.headerClientId_ = headClientId;
        this.tag_ = tg;
        this.messageLength_ = bf.length;
        this.headBuffer_ = new byte[32];
        Ipp.StuffHeader(this.headBuffer_, this.headerClientId_, this.tag_, MessageNumber, this.messageLength_);
        this.bodyBuffer_ = bf;
        Offset pos = new Offset(0);
        this.viewId_ = IppInt.Unstuff(this.bodyBuffer_, pos);
        this.subId_ = IppInt.Unstuff(this.bodyBuffer_, pos);
        this.compositeId_ = IppInt.Unstuff(this.bodyBuffer_, pos);
        this.compositeType_ = IppInt.Unstuff(this.bodyBuffer_, pos);
    }

    public int classification() {
        return 1;
    }

    public int id() {
        return MessageNumber;
    }

    public void print(Writer tf, String heading) throws IOException {
        tf.write("\n");
        tf.write(heading);
        tf.write(": ReqImageOpVignetteCompositeView ");
        Ipp.PrintHex(tf, MessageNumber);
        tf.write("\n");
        tf.write("headClientId: " + this.headerClientId() + "\n");
        Ipp.PrintTag(tf, "tag: ", this.tag());
        tf.write("length: " + this.length());
        tf.write("\n");
        IppInt.Print(tf, "viewId: ", this.viewId_);
        IppInt.Print(tf, "subId: ", this.subId_);
        IppInt.Print(tf, "compositeId: ", this.compositeId_);
        IppIRCompositeType.Print(tf, "compositeType: ", this.compositeType_);
    }

    public String toString() {
        StringBuffer buffer = new StringBuffer();
        buffer.append("ReqImageOpVignetteCompositeView");
        buffer.append("[viewId: " + String.valueOf(this.viewId_) + "],");
        buffer.append("[subId: " + String.valueOf(this.subId_) + "],");
        buffer.append("[compositeId: " + String.valueOf(this.compositeId_) + "],");
        buffer.append("[compositeType: " + String.valueOf(this.compositeType_) + "],");
        return buffer.toString();
    }

    public int viewId() {
        return this.viewId_;
    }

    public int subId() {
        return this.subId_;
    }

    public int compositeId() {
        return this.compositeId_;
    }

    public int compositeType() {
        return this.compositeType_;
    }
}