/* mpg123clr: MPEG Audio Decoder library Common Language Runtime version. copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1 mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply. All rights to this work freely assigned to the mpg123 project. */ /* libmpg123: MPEG Audio Decoder library copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org */ /* 1.8.1.0 04-Aug-09 Initial release. */ #pragma once #pragma warning(disable : 4635) #include "mpg123.h" #pragma warning(default : 4635) #include "string.h" #include #include #include using namespace std; using namespace System; using namespace System::Runtime::InteropServices; namespace mpg123clr { // Recommended usage when creating reference type on the managed heap (not using stack semantics // for reference types...) [see Destructors and Finalizers in Visual C++] // // A ^ myA = gcnew A; // try // { // use myA // } // finally // { // delete myA; // } ///Wrapper for mpg123_text. [StructLayout(LayoutKind::Sequential, CharSet=CharSet::Ansi)] public ref struct mpg123text { private: mpg123_text* sb; internal: ///Constructor. ///Recommended usage: only as tracking marker to existing mpg123_text objects. mpg123text(void); ///Reference Constructor. ///Recommended usage: only as tracking marker to existing mpg123_text objects. mpg123text(mpg123_text* sb); protected: ///Finalizer. ///Does nothing. mpg123text can only be instanced as a reference to an existing mpg123_text object (which is responsible for its own disposal. /// Implementation of CLR Finalize(). !mpg123text(void); public: ///Destructor. Used for final object deletion. ///Calls finalizer. /// /// Implementation of CLR Dispose(). /// ~Destructor and !Finalizer are the prescribed implementation of Dispose() and Finalize(). /// See Destructors and Finalizers in Visual C++ ~mpg123text(void); ///Get a string representation of the 3-letter language code. ///Only COMM and USLT have a language element. ///Property returns string representation of the 3-letter language code. /// ///String representation of the 3-letter language code. property String^ lang{String^ __clrcall get();} ///Get a string representation of the ID3v2 field id. (i.e. TALB, TPE2 etc.) ///Property returns string representation of the ID3v2 field id. (i.e. TALB, TPE2 etc.) /// ///String representation of the ID3v2 field id. (i.e. TALB, TPE2 etc.) property String^ id{String^ __clrcall get();} ///Get a string representation of the description field. ///Only COMM and TXXX have a description element. ///Property returns string representation of the description field. /// ///String representation of the description field. property String^ description{String^ __clrcall get();} ///Get a string representation of the ID3 tag text. ///This is for COMM, TXXX and all the other text fields. ///Property returns string representation of the ID3 tag text. /// ///String representation of the ID3 tag text. property String^ text{String^ __clrcall get();} }; }