

/**
 * Copyright (C) 2006-2008 Sun Microsystems, Inc.
 * 
 * Sun Microsystems, Inc. confidential
 * All rights reserved
 *
 * This file is autogenerated by glue-jaxws.xsl, DO NOT EDIT! 
 */

package com.sun.xml.ws.commons.virtualbox;

import java.math.BigInteger;
import java.util.List;
import java.util.UUID;
import javax.xml.ws.Holder;
import javax.xml.ws.WebServiceException;
import com.sun.xml.ws.commons.virtualbox.IUnknown;

import org.virtualbox.service.InvalidObjectFaultMsg;
import org.virtualbox.service.RuntimeFaultMsg;
import org.virtualbox.service.VboxService;
import org.virtualbox.service.VboxPortType;

public class IKeyboard extends IUnknown {

    public static IKeyboard cast(IUnknown other) {
        return new IKeyboard(other.getRef(), other.getRemoteWSPort());
    }

    public IKeyboard(String _this, VboxPortType port) {
        super(_this,port);
    }

    /* method IKeyboard::putScancode(
            [in] long scancode)
     */
    public void putScancode(Integer scancode) {
        try {
            port.iKeyboardPutScancode(_this, scancode);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /* method IKeyboard::putScancodes(
            [in] long scancodes[],
            [return] unsigned long codesStored)
     */
    public Long putScancodes(List<Integer> scancodes) {
        try {
            Long retVal = port.iKeyboardPutScancodes(_this, scancodes);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /* method IKeyboard::putCAD()
     */
    public void putCAD() {
        try {
            port.iKeyboardPutCAD(_this);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
}
