001/*
002 * To change this template, choose Tools | Templates
003 * and open the template in the editor.
004 */
005package org.anarres.qemu.exec.host.chardev;
006
007import java.util.Map;
008import javax.annotation.Nonnull;
009
010/**
011 *
012 * @author shevek
013 */
014public class UnixStdioCharDevice extends AbstractCharDevice {
015
016    public boolean signal;
017
018    public UnixStdioCharDevice() {
019        super("stdio");
020    }
021
022    @Nonnull
023    public UnixStdioCharDevice withSignal(boolean signal) {
024        this.signal = signal;
025        return this;
026    }
027
028    @Override
029    protected void addProperties(Map<String, Object> m) {
030        super.addProperties(m);
031        m.put("signal", signal ? "on" : "off");
032    }
033
034    @Override
035    public String toString() {
036        return "stdio";
037    }
038}