0N/A/*
2362N/A * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/A#ifndef JDWP_INSTREAM_H
0N/A#define JDWP_INSTREAM_H
0N/A
0N/A#include "transport.h"
0N/A#include "FrameID.h"
0N/A
0N/Astruct bag;
0N/A
0N/Atypedef struct PacketInputStream {
0N/A jbyte *current;
0N/A jint left;
0N/A jdwpError error;
0N/A jdwpPacket packet;
0N/A struct bag *refs;
0N/A} PacketInputStream;
0N/A
0N/Avoid inStream_init(PacketInputStream *stream, jdwpPacket packet);
0N/A
0N/Ajint inStream_id(PacketInputStream *stream);
0N/Ajbyte inStream_command(PacketInputStream *stream);
0N/A
0N/Ajboolean inStream_readBoolean(PacketInputStream *stream);
0N/Ajbyte inStream_readByte(PacketInputStream *stream);
0N/Ajbyte* inStream_readBytes(PacketInputStream *stream,
0N/A int length, jbyte *buf);
0N/Ajchar inStream_readChar(PacketInputStream *stream);
0N/Ajshort inStream_readShort(PacketInputStream *stream);
0N/Ajint inStream_readInt(PacketInputStream *stream);
0N/Ajlong inStream_readLong(PacketInputStream *stream);
0N/Ajfloat inStream_readFloat(PacketInputStream *stream);
0N/Ajdouble inStream_readDouble(PacketInputStream *stream);
0N/Ajlong inStream_readObjectID(PacketInputStream *stream);
0N/AFrameID inStream_readFrameID(PacketInputStream *stream);
0N/AjmethodID inStream_readMethodID(PacketInputStream *stream);
0N/AjfieldID inStream_readFieldID(PacketInputStream *stream);
0N/Ajlocation inStream_readLocation(PacketInputStream *stream);
0N/A
0N/Ajobject inStream_readObjectRef(JNIEnv *env, PacketInputStream *stream);
0N/Ajclass inStream_readClassRef(JNIEnv *env, PacketInputStream *stream);
0N/Ajthread inStream_readThreadRef(JNIEnv *env, PacketInputStream *stream);
0N/AjthreadGroup inStream_readThreadGroupRef(JNIEnv *env, PacketInputStream *stream);
0N/Ajobject inStream_readClassLoaderRef(JNIEnv *env, PacketInputStream *stream);
0N/Ajstring inStream_readStringRef(JNIEnv *env, PacketInputStream *stream);
0N/Ajarray inStream_readArrayRef(JNIEnv *env, PacketInputStream *stream);
0N/A
0N/Achar *inStream_readString(PacketInputStream *stream);
0N/Ajvalue inStream_readValue(struct PacketInputStream *in, jbyte *typeKeyPtr);
0N/A
0N/AjdwpError inStream_skipBytes(PacketInputStream *stream, jint count);
0N/A
0N/Ajboolean inStream_endOfInput(PacketInputStream *stream);
0N/AjdwpError inStream_error(PacketInputStream *stream);
0N/Avoid inStream_clearError(PacketInputStream *stream);
0N/Avoid inStream_destroy(PacketInputStream *stream);
0N/A
0N/A#endif /* _INSTREAM_H */