1// BEGIN LICENSE BLOCK 2// Version: CMPL 1.1 3// 4// The contents of this file are subject to the Cisco-style Mozilla Public 5// License Version 1.1 (the "License"); you may not use this file except 6// in compliance with the License. You may obtain a copy of the License 7// at www.eclipse-clp.org/license. 8// 9// Software distributed under the License is distributed on an "AS IS" 10// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 11// the License for the specific language governing rights and limitations 12// under the License. 13// 14// The Original Code is The ECLiPSe Constraint Logic Programming System. 15// The Initial Developer of the Original Code is Cisco Systems, Inc. 16// Portions created by the Initial Developer are 17// Copyright (C) 2000 - 2006 Cisco Systems, Inc. All Rights Reserved. 18// 19// Contributor(s): Stefano Novello / Josh Singer, Parc Technologies 20// 21// END LICENSE BLOCK 22 23//Title: Java/ECLiPSe Interface 24//Version: $Id: NativeEclipse.java,v 1.1 2006/09/23 01:54:10 snovello Exp $ 25//Author: Stefano Novello / Josh Singer 26//Company: Parc Technogies Ltd. 27//Description: Java interface to C ECLiPSe embedding code. 28package com.parctechnologies.eclipse; 29 30class NativeEclipse { 31 32 static native int chdir(String dir) ; 33 34 static native int resetdir() ; 35 36 static native int init() ; 37 38 static native int resume() ; 39 40 static native int resumeLong(Integer stream); 41 42 static native int setOption(int opt, int val); 43 44 static native int setOption(int opt, String val); 45 46 static native int setOption(int opt, String[] vals); 47 48 static native int QueueWrite(int streamid,byte b[], int off, int len); 49 50 static native int QueueRead(int streamid,int off,int len,byte[] b); 51 52 static native int QueueWriteByte(int streamid, byte b); 53 54 static native int QueueReadByte(int streamid); 55 56 static native int QueueAvailable(int streamid); 57 58 static native int StreamNumber(String Name); 59 60 // returns a status value, if it's PFLUSHIO or PWAITTIO, Stream 61 // is set to the id of the stream 62 static native int HandleEvents(Integer Stream); 63 64 static native void Cleanup(); 65 66} 67