/****************************************************************************** libx42.net - skinned vertex animation library (.NET API) Copyright (C) 2007 HermitWorks Entertainment Corporation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA. ******************************************************************************/ #pragma once namespace Libx42 { public ref class IOProgressEventArgs : public EventArgs { public: IOProgressEventArgs( Int64 position, String ^message ) : pos( position ), msg( message ) { } property Int64 Position { Int64 get( void ) { return pos; } } property String ^Message { String^ get( void ) { return msg; } } private: Int64 pos; String ^msg; }; private ref class StreamAdapter { public: StreamAdapter( System::IO::Stream ^stream ); property System::IO::Stream^ BaseStream { System::IO::Stream^ get( void ) { return stm; } } property x42inStream_t* InStream { x42inStream_t* get( void ); } property x42outStream_t* OutStream { x42outStream_t* get( void ); } internal: ::cli::array< Byte >^ GetBuffer( uint cb ); private: System::IO::Stream ^stm; System::Runtime::InteropServices::GCHandle gch; ::cli::array< Byte > ^buf; x42inStream_t *inStm; x42outStream_t *outStm; ~StreamAdapter( void ); !StreamAdapter( void ); }; };