//
// DO NOT MODIFY!!! This file was machine generated. DO NOT MODIFY!!!
// 
// Copyright (c) 2014 Vincent W. Chen.
// 
// This file is part of XJavaB.
// 
// XJavaB is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// XJavaB is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public License
// along with XJavaB.  If not, see <http://www.gnu.org/licenses/>.
//


package com.noodlewiz.xjavab.ext.dri2.internal;

import java.nio.ByteBuffer;
import com.noodlewiz.xjavab.core.XReply;

public class ReplyDispatcher
    implements com.noodlewiz.xjavab.core.internal.ReplyDispatcher
{


    @Override
    public XReply dispatch(final ByteBuffer __xjb_buf, final short __xjb_opcode) {
        switch (__xjb_opcode) {
            case  0 :
                return ReplyUnpacker.unpackQueryVersion(__xjb_buf);
            case  1 :
                return ReplyUnpacker.unpackConnect(__xjb_buf);
            case  2 :
                return ReplyUnpacker.unpackAuthenticate(__xjb_buf);
            case  5 :
                return ReplyUnpacker.unpackGetBuffers(__xjb_buf);
            case  6 :
                return ReplyUnpacker.unpackCopyRegion(__xjb_buf);
            case  7 :
                return ReplyUnpacker.unpackGetBuffersWithFormat(__xjb_buf);
            case  8 :
                return ReplyUnpacker.unpackSwapBuffers(__xjb_buf);
            case  9 :
                return ReplyUnpacker.unpackGetMSC(__xjb_buf);
            case  10 :
                return ReplyUnpacker.unpackWaitMSC(__xjb_buf);
            case  11 :
                return ReplyUnpacker.unpackWaitSBC(__xjb_buf);
            case  13 :
                return ReplyUnpacker.unpackGetParam(__xjb_buf);
            default:
                throw new IllegalArgumentException(("Invalid reply opcode: "+ __xjb_opcode));
        }
    }

}
