Source

Ikulo / Server / Ikulo.Server.Core / IDecoder.cs

// IDecoder.cs
//
//            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
//                    Version 2, December 2004
//
// Copyright (C) 2008 Johannes Athmer
//
// Everyone is permitted to copy and distribute verbatim or modified
// copies of this license document, and changing it is allowed as long
// as the name is changed.
//
//            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
//   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
//
//  0. You just DO WHAT THE FUCK YOU WANT TO.
//
//  This program is free software. It comes without any warranty, to
//  the extent permitted by applicable law. You can redistribute it
//  and/or modify it under the terms of the Do What The Fuck You Want
//  To Public License, Version 2, as published by Sam Hocevar. See
//  http://sam.zoy.org/wtfpl/COPYING for more details.

namespace Ikulo.Server.Core
{
	using System;
	using System.IO;
	
	/// <summary>
	/// A generic audio or video decoder.
	/// </summary>
	public interface IDecoder
	{
		/// <summary>
		/// Decodes the file at the given <paramref name="path"/>.
		/// </summary>
		/// <param name="path">
		/// Path to an existing file which should be decoded.
		/// </param>
		/// <returns>
		/// A <see cref="Stream"/> containing the decoded file
		/// from <paramref name="path"/>.
		/// </returns>
		Stream Decode(string path);
		
		/// <summary>
		/// Decodes the given <paramref name="file"/>.
		/// </summary>
		/// <param name="file">
		/// A <see cref="FileInfo"/> containing information on the
		/// file to decode.
		/// </param>
		/// <returns>
		/// A <see cref="Stream"/> containing the decoded <paramref name="file"/>.
		/// </returns>
		Stream Decode(FileInfo file);
		
		/// <summary>
		/// Decodes the given <paramref name="stream"/>.
		/// </summary>
		/// <param name="stream">
		/// A <see cref="Stream"/> containing the data to decode.
		/// </param>
		/// <returns>
		/// A <see cref="Stream"/> containing the decoded <paramref name="stream"/>.
		/// </returns>
		Stream Decode(Stream stream);
		
		/// <summary>
		/// Decodes the given <paramref name="buffer"/>.
		/// </summary>
		/// <param name="buffer">
		/// An <see cref="Array"/> of <see cref="Byte"/>s to decode.
		/// </param>
		/// <returns>
		/// A <see cref="Stream"/> containing the decoded <paramref name="buffer"/>.
		/// </returns>
		Stream Decode(byte[] buffer);
	}
}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.