Blame ports/MSVC++/2008clr/mpg123clr/id3v2.h

Packit c32a2d
/*
Packit c32a2d
	mpg123clr: MPEG Audio Decoder library Common Language Runtime version.
Packit c32a2d

Packit c32a2d
	copyright 2009 by Malcolm Boczek - free software under the terms of the LGPL 2.1
Packit c32a2d
	mpg123clr.dll is a derivative work of libmpg123 - all original mpg123 licensing terms apply.
Packit c32a2d

Packit c32a2d
	All rights to this work freely assigned to the mpg123 project.
Packit c32a2d
*/
Packit c32a2d
/*
Packit c32a2d
	libmpg123: MPEG Audio Decoder library
Packit c32a2d

Packit c32a2d
	copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1
Packit c32a2d
	see COPYING and AUTHORS files in distribution or http://mpg123.org
Packit c32a2d

Packit c32a2d
*/
Packit c32a2d
/*
Packit c32a2d
	1.8.1.0	04-Aug-09	Initial release.
Packit c32a2d
*/
Packit c32a2d

Packit c32a2d
#pragma once
Packit c32a2d

Packit c32a2d
#pragma warning(disable : 4635)
Packit c32a2d
#include "mpg123.h"
Packit c32a2d
#pragma warning(default : 4635)
Packit c32a2d

Packit c32a2d
#include "string.h"
Packit c32a2d
#include "text.h"
Packit c32a2d

Packit c32a2d
#include <string>
Packit c32a2d
#include <iostream>
Packit c32a2d

Packit c32a2d
#include <vcclr.h>
Packit c32a2d
using namespace std;
Packit c32a2d
using namespace System;
Packit c32a2d
using namespace System::Runtime::InteropServices;
Packit c32a2d

Packit c32a2d
namespace mpg123clr
Packit c32a2d
{
Packit c32a2d
	namespace id3
Packit c32a2d
	{
Packit c32a2d
		// Recommended usage when creating reference type on the managed heap (not using stack semantics 
Packit c32a2d
		//  for reference types...) [see Destructors and Finalizers in Visual C++]
Packit c32a2d
		//
Packit c32a2d
		// A ^ myA = gcnew A;
Packit c32a2d
		// try
Packit c32a2d
		// {
Packit c32a2d
		//     use myA
Packit c32a2d
		// }
Packit c32a2d
		// finally
Packit c32a2d
		// {
Packit c32a2d
		//     delete myA;
Packit c32a2d
		// }
Packit c32a2d

Packit c32a2d
		///<summary>Wrapper for mpg123_id3v2.</summary>
Packit c32a2d
		[StructLayout(LayoutKind::Sequential)]
Packit c32a2d
		public ref struct mpg123id3v2
Packit c32a2d
		{
Packit c32a2d
		private:
Packit c32a2d
			mpg123_id3v2* sb;
Packit c32a2d

Packit c32a2d
			array<mpg123text^>^ __clrcall MakeTextList(mpg123_text* ptr, size_t count);
Packit c32a2d

Packit c32a2d
		protected:
Packit c32a2d
			///<summary>Finalizer.
Packit c32a2d
			///<para>Does nothing - wrapper points to underlying memory, this class doesn't allocate memory.</para></summary>
Packit c32a2d
			/// Implementation of CLR Finalize().
Packit c32a2d
			!mpg123id3v2(void);
Packit c32a2d

Packit c32a2d
		internal:
Packit c32a2d
			///<summary>Working Constructor.
Packit c32a2d
			///<para>Maps to mpg123_id3v2 memory.</para>
Packit c32a2d
			///</summary>
Packit c32a2d
			mpg123id3v2(mpg123_id3v2* sb);
Packit c32a2d

Packit c32a2d
		public:
Packit c32a2d
			///<summary>Constructor.
Packit c32a2d
			///<para>Only creates object for use as "out" target in ID3 constructor.</para>
Packit c32a2d
			///</summary>
Packit c32a2d
			mpg123id3v2(void);
Packit c32a2d

Packit c32a2d
			///<summary>Destructor. Used for final object deletion.
Packit c32a2d
			///<para>Calls finalizer for clean disposal of internal (unmanaged) library handles.</para>
Packit c32a2d
			///</summary>
Packit c32a2d
			/// Implementation of CLR Dispose().
Packit c32a2d
			/// ~Destructor and !Finalizer are the prescribed implementation of Dispose() and Finalize().
Packit c32a2d
			/// See Destructors and Finalizers in Visual C++
Packit c32a2d
			~mpg123id3v2(void);
Packit c32a2d

Packit c32a2d
			///<summary>Get the ID3v2 title text.
Packit c32a2d
			///<para>Property returns the last encountered ID3v2 title text.</para>
Packit c32a2d
			///</summary>
Packit c32a2d
			///<value>The last encountered ID3v2 title text.</value>
Packit c32a2d
			property String^ title{String^ __clrcall get();}
Packit c32a2d

Packit c32a2d
			///<summary>Get the ID3v2 artist text.
Packit c32a2d
			///<para>Property returns the last encountered ID3v2 artist text.</para>
Packit c32a2d
			///</summary>
Packit c32a2d
			///<value>The last encountered ID3v2 artist text.</value>
Packit c32a2d
			property String^ artist{String^ __clrcall get();}
Packit c32a2d

Packit c32a2d
			///<summary>Get the ID3v2 album text.
Packit c32a2d
			///<para>Property returns the last encountered ID3v2 album text.</para>
Packit c32a2d
			///</summary>
Packit c32a2d
			///<value>The last encountered ID3v2 album text.</value>
Packit c32a2d
			property String^ album{String^ __clrcall get();}
Packit c32a2d

Packit c32a2d
			///<summary>Get the ID3v2 comment text.
Packit c32a2d
			///<para>Property returns the last encountered ID3v2 comment text.</para>
Packit c32a2d
			///</summary>
Packit c32a2d
			///<value>The last encountered ID3v2 comment text.</value>
Packit c32a2d
			property String^ comment{String^ __clrcall get();}
Packit c32a2d

Packit c32a2d
			///<summary>Get the ID3v2 year text.
Packit c32a2d
			///<para>Property returns the last encountered ID3v2 year text.</para>
Packit c32a2d
			///</summary>
Packit c32a2d
			///<value>The last encountered ID3v2 year text.</value>
Packit c32a2d
			property String^ year{String^ __clrcall get();}
Packit c32a2d

Packit c32a2d
			///<summary>Get the ID3v2 genre text.
Packit c32a2d
			///<para>Property returns the last encountered ID3v2 genre text.</para>
Packit c32a2d
			///</summary>
Packit c32a2d
			///<value>The last encountered ID3v2 genre text.</value>
Packit c32a2d
			property String^ genre{String^ __clrcall get();}
Packit c32a2d

Packit c32a2d
			///<summary>Get the ID3v2 version.
Packit c32a2d
			///<para>Property returns the ID3v2 version.</para>
Packit c32a2d
			///</summary>
Packit c32a2d
			///<value>The ID3v2 version.</value>
Packit c32a2d
			property int version{int __clrcall get();}
Packit c32a2d

Packit c32a2d

Packit c32a2d
			///<summary>Get an array of Comments.
Packit c32a2d
			///<para>Property returns an array of Comments.</para>
Packit c32a2d
			///</summary>
Packit c32a2d
			///<value>An array of Comments.</value>
Packit c32a2d
			property array<mpg123clr::mpg123text^>^ Comments{array<mpg123clr::mpg123text^>^ __clrcall get();};
Packit c32a2d

Packit c32a2d
			///<summary>Get an array of ID3v2 text fields (including USLT).
Packit c32a2d
			///<para>Property returns an array of ID3v2 text fields (including USLT).</para>
Packit c32a2d
			///</summary>
Packit c32a2d
			///<value>An array of ID3v2 text fields (including USLT).</value>
Packit c32a2d
			property array<mpg123clr::mpg123text^>^ Texts{array<mpg123clr::mpg123text^>^ __clrcall get();};
Packit c32a2d

Packit c32a2d
			///<summary>Get an array of extra (TXXX) fields.
Packit c32a2d
			///<para>Property returns an array of extra (TXXX) fields.</para>
Packit c32a2d
			///</summary>
Packit c32a2d
			///<value>An array of extra (TXXX) fields.</value>
Packit c32a2d
			property array<mpg123clr::mpg123text^>^ Extras{array<mpg123clr::mpg123text^>^ __clrcall get();};
Packit c32a2d

Packit c32a2d
		};
Packit c32a2d
	}
Packit c32a2d
}