Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-release > by-pkgid > 1b812d1b0e765bcc0430721ff58676d2 > files > 300

libid3_3.8_3-devel-3.8.3-19.mga1.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>id3lib: src/tag.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="id3lib.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>src/tag.cpp</h1><a href="tag_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// $Id: tag.cpp,v 1.55 2003/03/02 13:35:58 t1mpy Exp $</span>
<a name="l00002"></a>00002 
<a name="l00003"></a>00003 <span class="comment">// id3lib: a C++ library for creating and manipulating id3v1/v2 tags</span>
<a name="l00004"></a>00004 <span class="comment">// Copyright 1999, 2000  Scott Thomas Haug</span>
<a name="l00005"></a>00005 <span class="comment">// Copyright 2002 Thijmen Klok (thijmen@id3lib.org)</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 <span class="comment">// This library is free software; you can redistribute it and/or modify it</span>
<a name="l00008"></a>00008 <span class="comment">// under the terms of the GNU Library General Public License as published by</span>
<a name="l00009"></a>00009 <span class="comment">// the Free Software Foundation; either version 2 of the License, or (at your</span>
<a name="l00010"></a>00010 <span class="comment">// option) any later version.</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// This library is distributed in the hope that it will be useful, but WITHOUT</span>
<a name="l00013"></a>00013 <span class="comment">// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or</span>
<a name="l00014"></a>00014 <span class="comment">// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public</span>
<a name="l00015"></a>00015 <span class="comment">// License for more details.</span>
<a name="l00016"></a>00016 <span class="comment">//</span>
<a name="l00017"></a>00017 <span class="comment">// You should have received a copy of the GNU Library General Public License</span>
<a name="l00018"></a>00018 <span class="comment">// along with this library; if not, write to the Free Software Foundation,</span>
<a name="l00019"></a>00019 <span class="comment">// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="comment">// The id3lib authors encourage improvements and optimisations to be sent to</span>
<a name="l00022"></a>00022 <span class="comment">// the id3lib coordinator.  Please see the README file for details on where to</span>
<a name="l00023"></a>00023 <span class="comment">// send such submissions.  See the AUTHORS file for a list of people who have</span>
<a name="l00024"></a>00024 <span class="comment">// contributed to id3lib.  See the ChangeLog file for a list of changes to</span>
<a name="l00025"></a>00025 <span class="comment">// id3lib.  These files are distributed with id3lib at</span>
<a name="l00026"></a>00026 <span class="comment">// http://download.sourceforge.net/id3lib/</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="comment">//#include &quot;readers.h&quot;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;<a class="code" href="writers_8h.html">writers.h</a>&quot;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &quot;<a class="code" href="tag__impl_8h.html">tag_impl.h</a>&quot;</span> <span class="comment">//has &lt;stdio.h&gt; &quot;tag.h&quot; &quot;header_tag.h&quot; &quot;frame.h&quot; &quot;field.h&quot; &quot;spec.h&quot; &quot;id3lib_strings.h&quot; &quot;utils.h&quot;</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="keyword">using namespace </span>dami;
<a name="l00033"></a>00033 
<a name="l00289"></a><a class="code" href="class_i_d3___tag.html#a0dc79f55e62b6ec643ed0006d1151074">00289</a> <a class="code" href="class_i_d3___tag.html#a0dc79f55e62b6ec643ed0006d1151074" title="Default constructor; it can accept an optional filename as a parameter.">ID3_Tag::ID3_Tag</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name)
<a name="l00290"></a>00290   : _impl(new <a class="code" href="class_i_d3___tag_impl.html">ID3_TagImpl</a>(name))
<a name="l00291"></a>00291 {
<a name="l00292"></a>00292 }
<a name="l00293"></a>00293 
<a name="l00298"></a><a class="code" href="class_i_d3___tag.html#a08c1ee11b0daaad04ea0cc3dd2392419">00298</a> <a class="code" href="class_i_d3___tag.html#a0dc79f55e62b6ec643ed0006d1151074" title="Default constructor; it can accept an optional filename as a parameter.">ID3_Tag::ID3_Tag</a>(<span class="keyword">const</span> <a class="code" href="class_i_d3___tag.html" title="The representative class of an id3 tag.">ID3_Tag</a> &amp;tag)
<a name="l00299"></a>00299   : _impl(new <a class="code" href="class_i_d3___tag_impl.html">ID3_TagImpl</a>(tag))
<a name="l00300"></a>00300 {
<a name="l00301"></a>00301 }
<a name="l00302"></a>00302 
<a name="l00303"></a><a class="code" href="class_i_d3___tag.html#a22029d144e0d5d3d543806e6ed212a61">00303</a> <a class="code" href="class_i_d3___tag.html#a22029d144e0d5d3d543806e6ed212a61">ID3_Tag::~ID3_Tag</a>()
<a name="l00304"></a>00304 {
<a name="l00305"></a>00305   <span class="keyword">delete</span> _impl;
<a name="l00306"></a>00306 }
<a name="l00307"></a>00307 
<a name="l00314"></a><a class="code" href="class_i_d3___tag.html#a508bc38d003f1e08690174322531b5b1">00314</a> <span class="keywordtype">void</span> <a class="code" href="class_i_d3___tag.html#a508bc38d003f1e08690174322531b5b1" title="Clears the object and disassociates it from any files.">ID3_Tag::Clear</a>()
<a name="l00315"></a>00315 {
<a name="l00316"></a>00316   _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#aecefdec6496ad64c3e73ab77c034bab9">Clear</a>();
<a name="l00317"></a>00317 }
<a name="l00318"></a>00318 
<a name="l00319"></a>00319 
<a name="l00343"></a><a class="code" href="class_i_d3___tag.html#a08cde02eb3fff5b44f474ff531466fd0">00343</a> <span class="keywordtype">bool</span> <a class="code" href="class_i_d3___tag.html#a08cde02eb3fff5b44f474ff531466fd0" title="Indicates whether the tag has been altered since the last parse, render, or update...">ID3_Tag::HasChanged</a>()<span class="keyword"> const</span>
<a name="l00344"></a>00344 <span class="keyword"></span>{
<a name="l00345"></a>00345   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a40d14bc7566d3f2fb7ae640510a97cb0">HasChanged</a>();
<a name="l00346"></a>00346 }
<a name="l00347"></a>00347 
<a name="l00378"></a><a class="code" href="class_i_d3___tag.html#a8da50449a6e1012f497ef2c285fc3089">00378</a> <span class="keywordtype">size_t</span> <a class="code" href="class_i_d3___tag.html#a8da50449a6e1012f497ef2c285fc3089" title="Returns an over estimate of the number of bytes required to store a binary version...">ID3_Tag::Size</a>()<span class="keyword"> const</span>
<a name="l00379"></a>00379 <span class="keyword"></span>{
<a name="l00380"></a>00380   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#ad2c9a88974f03858820ab5e3aa7a2fb2">Size</a>();
<a name="l00381"></a>00381 }
<a name="l00382"></a>00382 
<a name="l00400"></a><a class="code" href="class_i_d3___tag.html#a9018b800f8d0a59185d89c15077cec4c">00400</a> <span class="keywordtype">bool</span> <a class="code" href="class_i_d3___tag.html#a9018b800f8d0a59185d89c15077cec4c" title="Turns unsynchronization on or off, dependant on the value of the boolean parameter...">ID3_Tag::SetUnsync</a>(<span class="keywordtype">bool</span> b)
<a name="l00401"></a>00401 {
<a name="l00402"></a>00402   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#ab071074452a16728bff5176e054965fa">SetUnsync</a>(b);
<a name="l00403"></a>00403 }
<a name="l00404"></a>00404 
<a name="l00405"></a>00405 
<a name="l00419"></a><a class="code" href="class_i_d3___tag.html#ab204dfa865279652a34a41c2171c69c5">00419</a> <span class="keywordtype">bool</span> <a class="code" href="class_i_d3___tag.html#ab204dfa865279652a34a41c2171c69c5" title="Turns extended header rendering on or off, dependant on the value of the boolean...">ID3_Tag::SetExtendedHeader</a>(<span class="keywordtype">bool</span> ext)
<a name="l00420"></a>00420 {
<a name="l00421"></a>00421   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a8395c9a3407c9744bbdfc92063dc63ca">SetExtended</a>(ext);
<a name="l00422"></a>00422 }
<a name="l00423"></a>00423 
<a name="l00453"></a><a class="code" href="class_i_d3___tag.html#a170e2dcfbb8bd217dfce1f33aecb4501">00453</a> <span class="keywordtype">bool</span> <a class="code" href="class_i_d3___tag.html#a170e2dcfbb8bd217dfce1f33aecb4501" title="Turns padding on or off, dependant on the value of the boolean parameter.">ID3_Tag::SetPadding</a>(<span class="keywordtype">bool</span> pad)
<a name="l00454"></a>00454 {
<a name="l00455"></a>00455   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a88fb683e9e9339f5efaa251d31a0c37e">SetPadding</a>(pad);
<a name="l00456"></a>00456 }
<a name="l00457"></a>00457 
<a name="l00458"></a><a class="code" href="class_i_d3___tag.html#a10e2f553c2dd030622fd8f6b83b4934f">00458</a> <span class="keywordtype">bool</span> <a class="code" href="class_i_d3___tag.html#a10e2f553c2dd030622fd8f6b83b4934f">ID3_Tag::SetExperimental</a>(<span class="keywordtype">bool</span> exp)
<a name="l00459"></a>00459 {
<a name="l00460"></a>00460   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a2563b590f06c1fc7e877ecc1b13f2753">SetExperimental</a>(exp);
<a name="l00461"></a>00461 }
<a name="l00462"></a>00462 
<a name="l00463"></a><a class="code" href="class_i_d3___tag.html#a220d08e1763ba1c2f222e5cebdcc91f2">00463</a> <span class="keywordtype">bool</span> <a class="code" href="class_i_d3___tag.html#a220d08e1763ba1c2f222e5cebdcc91f2">ID3_Tag::GetUnsync</a>()<span class="keyword"> const</span>
<a name="l00464"></a>00464 <span class="keyword"></span>{
<a name="l00465"></a>00465   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#ae53a990acbed33819a48dfad94a16df9">GetUnsync</a>();
<a name="l00466"></a>00466 }
<a name="l00467"></a>00467 
<a name="l00468"></a><a class="code" href="class_i_d3___tag.html#a4635c3c7e1ab2d829d9b5c6e690e557a">00468</a> <span class="keywordtype">bool</span> <a class="code" href="class_i_d3___tag.html#a4635c3c7e1ab2d829d9b5c6e690e557a">ID3_Tag::GetExtendedHeader</a>()<span class="keyword"> const</span>
<a name="l00469"></a>00469 <span class="keyword"></span>{
<a name="l00470"></a>00470   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a1d01fe225c2e1f30ebf9d00d81f2acac">GetExtended</a>();
<a name="l00471"></a>00471 }
<a name="l00472"></a>00472 
<a name="l00473"></a><a class="code" href="class_i_d3___tag.html#aa1b401965b163a7258356df071431153">00473</a> <span class="keywordtype">bool</span> <a class="code" href="class_i_d3___tag.html#aa1b401965b163a7258356df071431153">ID3_Tag::GetExperimental</a>()<span class="keyword"> const</span>
<a name="l00474"></a>00474 <span class="keyword"></span>{
<a name="l00475"></a>00475   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#ae6c469a8e6d84b395a18d31069ad15c5">GetExperimental</a>();
<a name="l00476"></a>00476 }
<a name="l00477"></a>00477 
<a name="l00478"></a><a class="code" href="class_i_d3___tag.html#a03dce6ffdd08ee2683e6dab044388ebd">00478</a> <span class="keywordtype">void</span> <a class="code" href="class_i_d3___tag.html#a03dce6ffdd08ee2683e6dab044388ebd">ID3_Tag::AddFrame</a>(<span class="keyword">const</span> <a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a>&amp; frame)
<a name="l00479"></a>00479 {
<a name="l00480"></a>00480   _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a3ff5cd5395b028d9c139a126d19a49a2">AddFrame</a>(frame);
<a name="l00481"></a>00481 }
<a name="l00482"></a>00482 
<a name="l00502"></a><a class="code" href="class_i_d3___tag.html#a2066785f37d783a0fc9b78f2bc286724">00502</a> <span class="keywordtype">void</span> <a class="code" href="class_i_d3___tag.html#a03dce6ffdd08ee2683e6dab044388ebd">ID3_Tag::AddFrame</a>(<span class="keyword">const</span> <a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a>* frame)
<a name="l00503"></a>00503 {
<a name="l00504"></a>00504   _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a3ff5cd5395b028d9c139a126d19a49a2">AddFrame</a>(frame);
<a name="l00505"></a>00505 }
<a name="l00506"></a>00506 
<a name="l00521"></a><a class="code" href="class_i_d3___tag.html#a8760bcb5321fc95ee0e91a2057b4eb9c">00521</a> <span class="keywordtype">bool</span> <a class="code" href="class_i_d3___tag.html#a8760bcb5321fc95ee0e91a2057b4eb9c" title="Attaches a frame to the tag; the tag takes responsibility for releasing the frame&amp;#39;s...">ID3_Tag::AttachFrame</a>(<a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a> *frame)
<a name="l00522"></a>00522 {
<a name="l00523"></a>00523   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#adaf0656b5f9424cbefb336e48c711398">AttachFrame</a>(frame);
<a name="l00524"></a>00524 }
<a name="l00525"></a>00525 
<a name="l00526"></a>00526 
<a name="l00547"></a><a class="code" href="class_i_d3___tag.html#ae21522e16cb899c5cd1c42d8f7fdfad9">00547</a> <a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a>* <a class="code" href="class_i_d3___tag.html#ae21522e16cb899c5cd1c42d8f7fdfad9" title="Removes a frame from the tag.">ID3_Tag::RemoveFrame</a>(<span class="keyword">const</span> <a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a> *frame)
<a name="l00548"></a>00548 {
<a name="l00549"></a>00549   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#aa7383022843524900331840320d301c8">RemoveFrame</a>(frame);
<a name="l00550"></a>00550 }
<a name="l00551"></a>00551 
<a name="l00552"></a><a class="code" href="class_i_d3___tag.html#a12e3366fdda75e8a144e20b243d38554">00552</a> <span class="keywordtype">bool</span> <a class="code" href="class_i_d3___tag.html#a9c721743131858720f074401a6e07b0f">ID3_Tag::Parse</a>(<a class="code" href="class_i_d3___reader.html">ID3_Reader</a>&amp; reader)
<a name="l00553"></a>00553 {
<a name="l00554"></a>00554   <span class="keywordflow">return</span> <a class="code" href="namespacedami_1_1id3_1_1v1.html#addaa98a35f9c527e4b64c5441ad31475">id3::v2::parse</a>(*_impl, reader);
<a name="l00555"></a>00555 }
<a name="l00556"></a>00556 
<a name="l00557"></a><a class="code" href="class_i_d3___tag.html#a9c721743131858720f074401a6e07b0f">00557</a> <span class="keywordtype">size_t</span> <a class="code" href="class_i_d3___tag.html#a9c721743131858720f074401a6e07b0f">ID3_Tag::Parse</a>(<span class="keyword">const</span> <a class="code" href="globals_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>* buffer, <span class="keywordtype">size_t</span> bytes)
<a name="l00558"></a>00558 {
<a name="l00559"></a>00559   <a class="code" href="class_i_d3___memory_reader.html">ID3_MemoryReader</a> mr(buffer, bytes);
<a name="l00560"></a>00560   <a class="code" href="class_i_d3___reader.html#a83194ea4d4e04e81302b095e9aa2275a">ID3_Reader::pos_type</a> beg = mr.<a class="code" href="class_i_d3___memory_reader.html#a2c55aed7fecd258ca9978d1ff11c8cad" title="Return the current position in the reader.">getCur</a>();
<a name="l00561"></a>00561   <a class="code" href="namespacedami_1_1id3_1_1v1.html#addaa98a35f9c527e4b64c5441ad31475">id3::v2::parse</a>(*_impl, mr);
<a name="l00562"></a>00562   <span class="keywordflow">return</span> mr.<a class="code" href="class_i_d3___memory_reader.html#a4f146a43b254394359d75646b603d0e2" title="Return the ending position in the reader.">getEnd</a>() - beg;
<a name="l00563"></a>00563 }
<a name="l00564"></a>00564 
<a name="l00604"></a>00604 <span class="keywordtype">size_t</span> <a class="code" href="class_i_d3___tag.html#a9c721743131858720f074401a6e07b0f">ID3_Tag::Parse</a>(<span class="keyword">const</span> <a class="code" href="globals_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a> header[<a class="code" href="globals_8h.html#ab868d84472615bfe3b84411ae816334a">ID3_TAGHEADERSIZE</a>], <span class="keyword">const</span> <a class="code" href="globals_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a> *buffer)
<a name="l00605"></a>00605 {
<a name="l00606"></a>00606   <span class="keywordtype">size_t</span> size = <a class="code" href="class_i_d3___tag.html#abeaf68b668a689f2ce50094131b9183b" title="Analyses a buffer to determine if we have a valid ID3v2 tag header.">ID3_Tag::IsV2Tag</a>(header);
<a name="l00607"></a>00607   <span class="keywordflow">if</span> (0 == size)
<a name="l00608"></a>00608   {
<a name="l00609"></a>00609     <span class="keywordflow">return</span> 0;
<a name="l00610"></a>00610   }
<a name="l00611"></a>00611   BString buf;
<a name="l00612"></a>00612   buf.reserve(<a class="code" href="class_i_d3___tag_header.html#a4182519e23dc329bdf25ab1213bd6096a74cf4937e78303a0b961dfb12c9f2b04">ID3_TagHeader::SIZE</a> + size);
<a name="l00613"></a>00613   buf.append(reinterpret_cast&lt;const BString::value_type *&gt;(header),
<a name="l00614"></a>00614              <a class="code" href="class_i_d3___tag_header.html#a4182519e23dc329bdf25ab1213bd6096a74cf4937e78303a0b961dfb12c9f2b04">ID3_TagHeader::SIZE</a>);
<a name="l00615"></a>00615   buf.append(reinterpret_cast&lt;const BString::value_type *&gt;(buffer), size);
<a name="l00616"></a>00616   <span class="keywordflow">return</span> this-&gt;<a class="code" href="class_i_d3___tag.html#a9c721743131858720f074401a6e07b0f">Parse</a>(buf.data(), buf.size());
<a name="l00617"></a>00617 }
<a name="l00618"></a>00618 
<a name="l00647"></a><a class="code" href="class_i_d3___tag.html#aa0c457802a29e1cfca0518697041a684">00647</a> <span class="keywordtype">size_t</span> <a class="code" href="class_i_d3___tag.html#aa0c457802a29e1cfca0518697041a684" title="Renders the tag and writes it to the attached file; the type of tag rendered can...">ID3_Tag::Render</a>(<a class="code" href="globals_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>* buffer, <a class="code" href="globals_8h.html#a2d783dffbb1bb13e23080984b277b348" title="The various types of tags that id3lib can handle.">ID3_TagType</a> tt)<span class="keyword"> const</span>
<a name="l00648"></a>00648 <span class="keyword"></span>{
<a name="l00649"></a>00649   <a class="code" href="class_i_d3___memory_writer.html">ID3_MemoryWriter</a> mw(buffer, -1);
<a name="l00650"></a>00650   <span class="keywordflow">return</span> this-&gt;<a class="code" href="class_i_d3___tag.html#aa0c457802a29e1cfca0518697041a684" title="Renders the tag and writes it to the attached file; the type of tag rendered can...">Render</a>(mw, tt);
<a name="l00651"></a>00651 }
<a name="l00652"></a>00652 
<a name="l00653"></a><a class="code" href="class_i_d3___tag.html#a3bbdeb56c5ac9da37f923345e944a188">00653</a> <span class="keywordtype">size_t</span> <a class="code" href="class_i_d3___tag.html#aa0c457802a29e1cfca0518697041a684" title="Renders the tag and writes it to the attached file; the type of tag rendered can...">ID3_Tag::Render</a>(<a class="code" href="class_i_d3___writer.html">ID3_Writer</a>&amp; writer, <a class="code" href="globals_8h.html#a2d783dffbb1bb13e23080984b277b348" title="The various types of tags that id3lib can handle.">ID3_TagType</a> tt)<span class="keyword"> const</span>
<a name="l00654"></a>00654 <span class="keyword"></span>{
<a name="l00655"></a>00655   <a class="code" href="class_i_d3___writer.html#acc8ea5caeb95f604ab658d6ccd50b13c">ID3_Writer::pos_type</a> beg = writer.<a class="code" href="class_i_d3___writer.html#ab1e742def0bdb4d9f209537c1eff004e" title="Return the next position that will be written to.">getCur</a>();
<a name="l00656"></a>00656   <span class="keywordflow">if</span> (<a class="code" href="globals_8h.html#a2d783dffbb1bb13e23080984b277b348a4ff91179fcf70ae9d26c87d7a34bd42a" title="Represents an id3v2 tag.">ID3TT_ID3V2</a> &amp; tt)
<a name="l00657"></a>00657   {
<a name="l00658"></a>00658     <a class="code" href="namespacedami_1_1id3_1_1v1.html#aeb5143c535f4bc42e6e13b429e4197e5">id3::v2::render</a>(writer, *<span class="keyword">this</span>);
<a name="l00659"></a>00659   }
<a name="l00660"></a>00660   <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="globals_8h.html#a2d783dffbb1bb13e23080984b277b348ad874770876eb09c8d37ed7f6e60546f8" title="Represents an id3v1 or id3v1.1 tag.">ID3TT_ID3V1</a> &amp; tt)
<a name="l00661"></a>00661   {
<a name="l00662"></a>00662     <a class="code" href="namespacedami_1_1id3_1_1v1.html#aeb5143c535f4bc42e6e13b429e4197e5">id3::v1::render</a>(writer, *<span class="keyword">this</span>);
<a name="l00663"></a>00663   }
<a name="l00664"></a>00664   <span class="keywordflow">return</span> writer.<a class="code" href="class_i_d3___writer.html#ab1e742def0bdb4d9f209537c1eff004e" title="Return the next position that will be written to.">getCur</a>() - beg;
<a name="l00665"></a>00665 }
<a name="l00666"></a>00666 
<a name="l00667"></a>00667 
<a name="l00704"></a><a class="code" href="class_i_d3___tag.html#abd5f6a802f6fca6ec4687533de031bed">00704</a> <span class="keywordtype">size_t</span> <a class="code" href="class_i_d3___tag.html#abd5f6a802f6fca6ec4687533de031bed" title="Attaches a file to the tag, parses the file, and adds any tag information found in...">ID3_Tag::Link</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *fileInfo, <a class="code" href="globals_8h.html#ab20eda11df95fbb997872386ec0d6004">flags_t</a> flags)
<a name="l00705"></a>00705 {
<a name="l00706"></a>00706   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a9c71ba17ca8cfd45b6bb77209a20c314">Link</a>(fileInfo, flags);
<a name="l00707"></a>00707 }
<a name="l00708"></a>00708 
<a name="l00712"></a><a class="code" href="class_i_d3___tag.html#a790a452e26506217bb13c5d49b60be14">00712</a> <span class="keywordtype">size_t</span> <a class="code" href="class_i_d3___tag.html#abd5f6a802f6fca6ec4687533de031bed" title="Attaches a file to the tag, parses the file, and adds any tag information found in...">ID3_Tag::Link</a>(<a class="code" href="class_i_d3___reader.html">ID3_Reader</a> &amp;reader, <a class="code" href="globals_8h.html#ab20eda11df95fbb997872386ec0d6004">flags_t</a> flags)
<a name="l00713"></a>00713 {
<a name="l00714"></a>00714   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a9c71ba17ca8cfd45b6bb77209a20c314">Link</a>(reader, flags);
<a name="l00715"></a>00715 }
<a name="l00716"></a>00716 
<a name="l00717"></a><a class="code" href="class_i_d3___tag.html#a568548096a28d9cf05d1d772b97540a0">00717</a> <a class="code" href="globals_8h.html#ab20eda11df95fbb997872386ec0d6004">flags_t</a> <a class="code" href="class_i_d3___tag.html#a568548096a28d9cf05d1d772b97540a0">ID3_Tag::Update</a>(<a class="code" href="globals_8h.html#ab20eda11df95fbb997872386ec0d6004">flags_t</a> flags)
<a name="l00718"></a>00718 {
<a name="l00719"></a>00719   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a8ccdc3a4ddc9541c95026d4299e17603">Update</a>(flags);
<a name="l00720"></a>00720 }
<a name="l00721"></a>00721 
<a name="l00727"></a><a class="code" href="class_i_d3___tag.html#afc3f8630ba475b8769f25f260b6cda1f">00727</a> <span class="keyword">const</span> <a class="code" href="struct_mp3___headerinfo.html">Mp3_Headerinfo</a>* <a class="code" href="class_i_d3___tag.html#afc3f8630ba475b8769f25f260b6cda1f" title="Get&amp;#39;s the mp3 Info like bitrate, mpeg version, etc.">ID3_Tag::GetMp3HeaderInfo</a>()<span class="keyword"> const</span>
<a name="l00728"></a>00728 <span class="keyword"></span>{
<a name="l00729"></a>00729   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#af30e39b57dc9d0782a3ecea70730e92c">GetMp3HeaderInfo</a>();
<a name="l00730"></a>00730 }
<a name="l00731"></a>00731 
<a name="l00738"></a><a class="code" href="class_i_d3___tag.html#a19cfedd73d6859e911a45544f1eed35f">00738</a> <a class="code" href="globals_8h.html#ab20eda11df95fbb997872386ec0d6004">flags_t</a> <a class="code" href="class_i_d3___tag.html#a19cfedd73d6859e911a45544f1eed35f" title="Strips the tag(s) from the attached file.">ID3_Tag::Strip</a>(<a class="code" href="globals_8h.html#ab20eda11df95fbb997872386ec0d6004">flags_t</a> flags)
<a name="l00739"></a>00739 {
<a name="l00740"></a>00740   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a0126d01a8f40ac61a94e2805a8adef16">Strip</a>(flags);
<a name="l00741"></a>00741 }
<a name="l00742"></a>00742 
<a name="l00743"></a><a class="code" href="class_i_d3___tag.html#aa7a1b21d6e7dd1c162809d6cf566f790">00743</a> <span class="keywordtype">size_t</span> <a class="code" href="class_i_d3___tag.html#aa7a1b21d6e7dd1c162809d6cf566f790">ID3_Tag::GetPrependedBytes</a>()<span class="keyword"> const</span>
<a name="l00744"></a>00744 <span class="keyword"></span>{
<a name="l00745"></a>00745   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a9b2279334b6bc5f4a2564b529fe92b03">GetPrependedBytes</a>();
<a name="l00746"></a>00746 }
<a name="l00747"></a>00747 
<a name="l00748"></a><a class="code" href="class_i_d3___tag.html#a3d099bdf39c01583c544f4eceabe324f">00748</a> <span class="keywordtype">size_t</span> <a class="code" href="class_i_d3___tag.html#a3d099bdf39c01583c544f4eceabe324f">ID3_Tag::GetAppendedBytes</a>()<span class="keyword"> const</span>
<a name="l00749"></a>00749 <span class="keyword"></span>{
<a name="l00750"></a>00750   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a5bc6c9c5cd3eb1d1b23a7cd46ed0730d">GetAppendedBytes</a>();
<a name="l00751"></a>00751 }
<a name="l00752"></a>00752 
<a name="l00753"></a><a class="code" href="class_i_d3___tag.html#a3fae6f2d9f25984dc505fe28ef3a60a2">00753</a> <span class="keywordtype">size_t</span> <a class="code" href="class_i_d3___tag.html#a3fae6f2d9f25984dc505fe28ef3a60a2">ID3_Tag::GetFileSize</a>()<span class="keyword"> const</span>
<a name="l00754"></a>00754 <span class="keyword"></span>{
<a name="l00755"></a>00755   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a4c667c682aba07ab731050662b6afead">GetFileSize</a>();
<a name="l00756"></a>00756 }
<a name="l00757"></a>00757 
<a name="l00758"></a><a class="code" href="class_i_d3___tag.html#a4b4888c48b2623b86c0e3a6d7b4080c4">00758</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="class_i_d3___tag.html#a4b4888c48b2623b86c0e3a6d7b4080c4">ID3_Tag::GetFileName</a>()<span class="keyword"> const</span>
<a name="l00759"></a>00759 <span class="keyword"></span>{
<a name="l00760"></a>00760   <span class="comment">//fix because GetFileName need to return a pointer which keeps to be valid</span>
<a name="l00761"></a>00761   String fn = _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a66ff56b585189b1e393b9a33c81bd6f2">GetFileName</a>();
<a name="l00762"></a>00762   <span class="keywordflow">if</span> (fn.size())
<a name="l00763"></a>00763   {
<a name="l00764"></a>00764     memset((<span class="keywordtype">char</span> *)_tmp_filename, 0, ID3_PATH_LENGTH);
<a name="l00765"></a>00765     memmove((<span class="keywordtype">char</span> *)_tmp_filename, fn.c_str(), fn.size());
<a name="l00766"></a>00766     <span class="keywordflow">return</span> _tmp_filename; <span class="comment">//_impl-&gt;GetFileName().c_str();</span>
<a name="l00767"></a>00767   }
<a name="l00768"></a>00768   <span class="keywordflow">else</span>
<a name="l00769"></a>00769     <span class="keywordflow">return</span> <a class="code" href="globals_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>;
<a name="l00770"></a>00770 }
<a name="l00771"></a>00771 
<a name="l00773"></a>00773 
<a name="l00836"></a><a class="code" href="class_i_d3___tag.html#aad2a8e5a801bc09eac967d24ff3539c3">00836</a> <a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a>* <a class="code" href="class_i_d3___tag.html#aad2a8e5a801bc09eac967d24ff3539c3" title="Finds frame with given frame id, fld id, and integer data.">ID3_Tag::Find</a>(<a class="code" href="globals_8h.html#a78f454bf66f16b1e1c9f8e37bda9ab8a" title="Enumeration of the different types of frames recognized by id3lib.">ID3_FrameID</a> <span class="keywordtype">id</span>)<span class="keyword"> const</span>
<a name="l00837"></a>00837 <span class="keyword"></span>{
<a name="l00838"></a>00838   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#ae2a17dca1c627e387cc4e351fff11eeb">Find</a>(<span class="keywordtype">id</span>);
<a name="l00839"></a>00839 }
<a name="l00840"></a>00840 
<a name="l00842"></a><a class="code" href="class_i_d3___tag.html#a333ea1770421c552942743d52eaa8ef1">00842</a> <a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a>* <a class="code" href="class_i_d3___tag.html#aad2a8e5a801bc09eac967d24ff3539c3" title="Finds frame with given frame id, fld id, and integer data.">ID3_Tag::Find</a>(<a class="code" href="globals_8h.html#a78f454bf66f16b1e1c9f8e37bda9ab8a" title="Enumeration of the different types of frames recognized by id3lib.">ID3_FrameID</a> <span class="keywordtype">id</span>, <a class="code" href="globals_8h.html#a23cab982426a968437cd731900cfeb2c" title="Enumeration of the different types of fields in a frame.">ID3_FieldID</a> fld, uint32 data)<span class="keyword"> const</span>
<a name="l00843"></a>00843 <span class="keyword"></span>{
<a name="l00844"></a>00844   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#ae2a17dca1c627e387cc4e351fff11eeb">Find</a>(<span class="keywordtype">id</span>, fld, data);
<a name="l00845"></a>00845 }
<a name="l00846"></a>00846 
<a name="l00848"></a><a class="code" href="class_i_d3___tag.html#a0332dbbf23286e7a60da4687f4626718">00848</a> <a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a>* <a class="code" href="class_i_d3___tag.html#aad2a8e5a801bc09eac967d24ff3539c3" title="Finds frame with given frame id, fld id, and integer data.">ID3_Tag::Find</a>(<a class="code" href="globals_8h.html#a78f454bf66f16b1e1c9f8e37bda9ab8a" title="Enumeration of the different types of frames recognized by id3lib.">ID3_FrameID</a> <span class="keywordtype">id</span>, <a class="code" href="globals_8h.html#a23cab982426a968437cd731900cfeb2c" title="Enumeration of the different types of fields in a frame.">ID3_FieldID</a> fld, <span class="keyword">const</span> <span class="keywordtype">char</span>* data)<span class="keyword"> const</span>
<a name="l00849"></a>00849 <span class="keyword"></span>{
<a name="l00850"></a>00850   String str(data);
<a name="l00851"></a>00851   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#ae2a17dca1c627e387cc4e351fff11eeb">Find</a>(<span class="keywordtype">id</span>, fld, str);
<a name="l00852"></a>00852 }
<a name="l00853"></a>00853 
<a name="l00855"></a><a class="code" href="class_i_d3___tag.html#aeaa81b2096ac9915574789d2c5560e3b">00855</a> <a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a>* <a class="code" href="class_i_d3___tag.html#aad2a8e5a801bc09eac967d24ff3539c3" title="Finds frame with given frame id, fld id, and integer data.">ID3_Tag::Find</a>(<a class="code" href="globals_8h.html#a78f454bf66f16b1e1c9f8e37bda9ab8a" title="Enumeration of the different types of frames recognized by id3lib.">ID3_FrameID</a> <span class="keywordtype">id</span>, <a class="code" href="globals_8h.html#a23cab982426a968437cd731900cfeb2c" title="Enumeration of the different types of fields in a frame.">ID3_FieldID</a> fld, <span class="keyword">const</span> <a class="code" href="globals_8h.html#a781c2cce7ea2af8192d5f83427044add">unicode_t</a>* data)<span class="keyword"> const</span>
<a name="l00856"></a>00856 <span class="keyword"></span>{
<a name="l00857"></a>00857   WString str = toWString(data, ucslen(data));
<a name="l00858"></a>00858   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#ae2a17dca1c627e387cc4e351fff11eeb">Find</a>(<span class="keywordtype">id</span>, fld, str);
<a name="l00859"></a>00859 }
<a name="l00860"></a>00860 
<a name="l00868"></a><a class="code" href="class_i_d3___tag.html#ab7fb08aebef7b5f3532bb98fcca94789">00868</a> <span class="keywordtype">size_t</span> <a class="code" href="class_i_d3___tag.html#ab7fb08aebef7b5f3532bb98fcca94789" title="Returns the number of frames present in the tag object.">ID3_Tag::NumFrames</a>()<span class="keyword"> const</span>
<a name="l00869"></a>00869 <span class="keyword"></span>{
<a name="l00870"></a>00870   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a3b8ddbfa27a87dc083bce598a15a3881">NumFrames</a>();
<a name="l00871"></a>00871 }
<a name="l00872"></a>00872 
<a name="l00887"></a>00887 <span class="comment">/*</span>
<a name="l00888"></a>00888 <span class="comment">ID3_Frame* ID3_Tag::GetFrameNum(size_t num) const</span>
<a name="l00889"></a>00889 <span class="comment">{</span>
<a name="l00890"></a>00890 <span class="comment">  const size_t numFrames = this-&gt;NumFrames();</span>
<a name="l00891"></a>00891 <span class="comment">  if (num &gt;= numFrames)</span>
<a name="l00892"></a>00892 <span class="comment">  {</span>
<a name="l00893"></a>00893 <span class="comment">    return NULL;</span>
<a name="l00894"></a>00894 <span class="comment">  }</span>
<a name="l00895"></a>00895 <span class="comment"></span>
<a name="l00896"></a>00896 <span class="comment">  ID3_Frame* frame = NULL;</span>
<a name="l00897"></a>00897 <span class="comment">  size_t curNum = 0;</span>
<a name="l00898"></a>00898 <span class="comment">  // search from the cursor to the end</span>
<a name="l00899"></a>00899 <span class="comment">  for (ID3_TagImpl::const_iterator cur = _impl-&gt;begin(); cur != _impl-&gt;end(); ++cur)</span>
<a name="l00900"></a>00900 <span class="comment">  {</span>
<a name="l00901"></a>00901 <span class="comment">    if (curNum++ == num)</span>
<a name="l00902"></a>00902 <span class="comment">    {</span>
<a name="l00903"></a>00903 <span class="comment">      frame = *cur;</span>
<a name="l00904"></a>00904 <span class="comment">      break;</span>
<a name="l00905"></a>00905 <span class="comment">    }</span>
<a name="l00906"></a>00906 <span class="comment">  }</span>
<a name="l00907"></a>00907 <span class="comment"></span>
<a name="l00908"></a>00908 <span class="comment">  return frame;</span>
<a name="l00909"></a>00909 <span class="comment">}</span>
<a name="l00910"></a>00910 <span class="comment">*/</span>
<a name="l00911"></a>00911 
<a name="l00920"></a>00920 <span class="comment">/*</span>
<a name="l00921"></a>00921 <span class="comment">ID3_Frame* ID3_Tag::operator[](size_t index) const</span>
<a name="l00922"></a>00922 <span class="comment">{</span>
<a name="l00923"></a>00923 <span class="comment">  return this-&gt;GetFrameNum(index);</span>
<a name="l00924"></a>00924 <span class="comment">}</span>
<a name="l00925"></a>00925 <span class="comment">*/</span>
<a name="l00926"></a>00926 
<a name="l00927"></a><a class="code" href="class_i_d3___tag.html#a740838c66f36f5c22afd90f450823d1b">00927</a> <a class="code" href="class_i_d3___tag.html" title="The representative class of an id3 tag.">ID3_Tag</a>&amp; <a class="code" href="class_i_d3___tag.html#a740838c66f36f5c22afd90f450823d1b" title="Deprecated.">ID3_Tag::operator=</a>( <span class="keyword">const</span> <a class="code" href="class_i_d3___tag.html" title="The representative class of an id3 tag.">ID3_Tag</a> &amp;rTag )
<a name="l00928"></a>00928 {
<a name="l00929"></a>00929   <span class="keywordflow">if</span> (<span class="keyword">this</span> != &amp;rTag)
<a name="l00930"></a>00930   {
<a name="l00931"></a>00931     *_impl = rTag;
<a name="l00932"></a>00932   }
<a name="l00933"></a>00933   <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00934"></a>00934 }
<a name="l00935"></a>00935 
<a name="l00936"></a><a class="code" href="class_i_d3___tag.html#a6835ba87275d0ec02a5ffbcc5c800b05">00936</a> <span class="keywordtype">bool</span> <a class="code" href="class_i_d3___tag.html#a6835ba87275d0ec02a5ffbcc5c800b05" title="Deprecated.">ID3_Tag::HasTagType</a>(<a class="code" href="globals_8h.html#a2d783dffbb1bb13e23080984b277b348" title="The various types of tags that id3lib can handle.">ID3_TagType</a> tt)<span class="keyword"> const</span>
<a name="l00937"></a>00937 <span class="keyword"></span>{
<a name="l00938"></a>00938   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a519cca5467a7369bb366575e7bc6ce06">HasTagType</a>(tt);
<a name="l00939"></a>00939 }
<a name="l00940"></a>00940 
<a name="l00941"></a><a class="code" href="class_i_d3___tag.html#a4a13b5780927176a9d10ad3f97c7acd4">00941</a> <a class="code" href="globals_8h.html#a48b13eb6cb3c520195901516dee1e612">ID3_V2Spec</a> <a class="code" href="class_i_d3___tag.html#a4a13b5780927176a9d10ad3f97c7acd4" title="Deprecated.">ID3_Tag::GetSpec</a>()<span class="keyword"> const</span>
<a name="l00942"></a>00942 <span class="keyword"></span>{
<a name="l00943"></a>00943   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#aaa19382ddecd2604e88c086c8ccd3982">GetSpec</a>();
<a name="l00944"></a>00944 }
<a name="l00945"></a>00945 
<a name="l00946"></a><a class="code" href="class_i_d3___tag.html#adb08a9c5db44f82b2b07232570d0d17a">00946</a> <span class="keywordtype">bool</span> <a class="code" href="class_i_d3___tag.html#adb08a9c5db44f82b2b07232570d0d17a" title="Deprecated.">ID3_Tag::SetSpec</a>(<a class="code" href="globals_8h.html#a48b13eb6cb3c520195901516dee1e612">ID3_V2Spec</a> spec)
<a name="l00947"></a>00947 {
<a name="l00948"></a>00948   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a18f28fbd3a542be06879c28a7fc78e85">SetSpec</a>(spec);
<a name="l00949"></a>00949 }
<a name="l00950"></a>00950 
<a name="l00955"></a><a class="code" href="class_i_d3___tag.html#abeaf68b668a689f2ce50094131b9183b">00955</a> <span class="keywordtype">size_t</span> <a class="code" href="class_i_d3___tag.html#abeaf68b668a689f2ce50094131b9183b" title="Analyses a buffer to determine if we have a valid ID3v2 tag header.">ID3_Tag::IsV2Tag</a>(<span class="keyword">const</span> <a class="code" href="globals_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>* <span class="keyword">const</span> data)
<a name="l00956"></a>00956 {
<a name="l00957"></a>00957   <a class="code" href="class_i_d3___memory_reader.html">ID3_MemoryReader</a> mr(data, <a class="code" href="class_i_d3___tag_header.html#a4182519e23dc329bdf25ab1213bd6096a74cf4937e78303a0b961dfb12c9f2b04">ID3_TagHeader::SIZE</a>);
<a name="l00958"></a>00958   <span class="keywordflow">return</span> <a class="code" href="class_i_d3___tag.html#abeaf68b668a689f2ce50094131b9183b" title="Analyses a buffer to determine if we have a valid ID3v2 tag header.">ID3_TagImpl::IsV2Tag</a>(mr);
<a name="l00959"></a>00959 }
<a name="l00960"></a>00960 
<a name="l00961"></a><a class="code" href="class_i_d3___tag.html#a74b5b1d4a3ac3f1d39b1d21d2adac988">00961</a> <span class="keywordtype">size_t</span> <a class="code" href="class_i_d3___tag.html#abeaf68b668a689f2ce50094131b9183b" title="Analyses a buffer to determine if we have a valid ID3v2 tag header.">ID3_Tag::IsV2Tag</a>(<a class="code" href="class_i_d3___reader.html">ID3_Reader</a>&amp; reader)
<a name="l00962"></a>00962 {
<a name="l00963"></a>00963   <span class="keywordflow">return</span> <a class="code" href="class_i_d3___tag.html#abeaf68b668a689f2ce50094131b9183b" title="Analyses a buffer to determine if we have a valid ID3v2 tag header.">ID3_TagImpl::IsV2Tag</a>(reader);
<a name="l00964"></a>00964 }
<a name="l00965"></a>00965 
<a name="l00967"></a><a class="code" href="class_i_d3___tag.html#a731acce2e9aedac99225f942ae530850">00967</a> <span class="keywordtype">void</span> <a class="code" href="class_i_d3___tag.html#a731acce2e9aedac99225f942ae530850" title="Deprecated.">ID3_Tag::AddNewFrame</a>(<a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a>* f)
<a name="l00968"></a>00968 {
<a name="l00969"></a>00969   _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#adaf0656b5f9424cbefb336e48c711398">AttachFrame</a>(f);
<a name="l00970"></a>00970 }
<a name="l00971"></a>00971 
<a name="l00988"></a><a class="code" href="class_i_d3___tag.html#ac3ff4910169e70101c0f92429f52feec">00988</a> <span class="keywordtype">void</span> <a class="code" href="class_i_d3___tag.html#ac3ff4910169e70101c0f92429f52feec" title="Copies an array of frames to the tag.">ID3_Tag::AddFrames</a>(<span class="keyword">const</span> <a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a> *frames, <span class="keywordtype">size_t</span> numFrames)
<a name="l00989"></a>00989 {
<a name="l00990"></a>00990   <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = numFrames - 1; i &gt;= 0; i--)
<a name="l00991"></a>00991   {
<a name="l00992"></a>00992     this-&gt;<a class="code" href="class_i_d3___tag.html#a03dce6ffdd08ee2683e6dab044388ebd">AddFrame</a>(frames[i]);
<a name="l00993"></a>00993   }
<a name="l00994"></a>00994 }
<a name="l00995"></a>00995 
<a name="l00996"></a><a class="code" href="class_i_d3___tag.html#af95a4ceea9d82dcb28c45dbf9f8788af">00996</a> <span class="keywordtype">size_t</span> <a class="code" href="class_i_d3___tag.html#abd5f6a802f6fca6ec4687533de031bed" title="Attaches a file to the tag, parses the file, and adds any tag information found in...">ID3_Tag::Link</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *fileInfo, <span class="keywordtype">bool</span> parseID3v1, <span class="keywordtype">bool</span> parseLyrics3)
<a name="l00997"></a>00997 {
<a name="l00998"></a>00998   <span class="keywordflow">return</span> _impl-&gt;<a class="code" href="class_i_d3___tag_impl.html#a9c71ba17ca8cfd45b6bb77209a20c314">Link</a>(fileInfo, parseID3v1, parseLyrics3);
<a name="l00999"></a>00999 }
<a name="l01000"></a>01000 
<a name="l01001"></a><a class="code" href="class_i_d3___tag.html#a163ae862d97c15831d5d34429e4e42f0">01001</a> <span class="keywordtype">void</span> <a class="code" href="class_i_d3___tag.html#a163ae862d97c15831d5d34429e4e42f0" title="Deprecated.">ID3_Tag::SetCompression</a>(<span class="keywordtype">bool</span> b)
<a name="l01002"></a>01002 {
<a name="l01003"></a>01003   ;
<a name="l01004"></a>01004 }
<a name="l01005"></a>01005 
<a name="l01006"></a><a class="code" href="class_i_d3___tag.html#a7bfcb4d511f3c11e938df79c8f60232d">01006</a> <span class="keywordtype">bool</span> <a class="code" href="class_i_d3___tag.html#a7bfcb4d511f3c11e938df79c8f60232d" title="Deprecated.">ID3_Tag::HasLyrics</a>()<span class="keyword"> const</span>
<a name="l01007"></a>01007 <span class="keyword"></span>{
<a name="l01008"></a>01008   <span class="keywordflow">return</span> this-&gt;<a class="code" href="class_i_d3___tag.html#a6835ba87275d0ec02a5ffbcc5c800b05" title="Deprecated.">HasTagType</a>(<a class="code" href="globals_8h.html#a2d783dffbb1bb13e23080984b277b348ad02523404c43bb0f9f8989cc5cd20eac">ID3TT_LYRICS</a>);
<a name="l01009"></a>01009 }
<a name="l01010"></a><a class="code" href="class_i_d3___tag.html#aaf0eb3f834d8daa509eec0b163e8708c">01010</a> <span class="keywordtype">bool</span> <a class="code" href="class_i_d3___tag.html#aaf0eb3f834d8daa509eec0b163e8708c" title="Deprecated.">ID3_Tag::HasV2Tag</a>()<span class="keyword">  const</span>
<a name="l01011"></a>01011 <span class="keyword"></span>{
<a name="l01012"></a>01012   <span class="keywordflow">return</span> this-&gt;<a class="code" href="class_i_d3___tag.html#a6835ba87275d0ec02a5ffbcc5c800b05" title="Deprecated.">HasTagType</a>(<a class="code" href="globals_8h.html#a2d783dffbb1bb13e23080984b277b348a4ff91179fcf70ae9d26c87d7a34bd42a" title="Represents an id3v2 tag.">ID3TT_ID3V2</a>);
<a name="l01013"></a>01013 }
<a name="l01014"></a><a class="code" href="class_i_d3___tag.html#a803c9b22df40b44acab45d106a80fdfc">01014</a> <span class="keywordtype">bool</span> <a class="code" href="class_i_d3___tag.html#a803c9b22df40b44acab45d106a80fdfc" title="Deprecated.">ID3_Tag::HasV1Tag</a>()<span class="keyword">  const</span>
<a name="l01015"></a>01015 <span class="keyword"></span>{
<a name="l01016"></a>01016   <span class="keywordflow">return</span> this-&gt;<a class="code" href="class_i_d3___tag.html#a6835ba87275d0ec02a5ffbcc5c800b05" title="Deprecated.">HasTagType</a>(<a class="code" href="globals_8h.html#a2d783dffbb1bb13e23080984b277b348ad874770876eb09c8d37ed7f6e60546f8" title="Represents an id3v1 or id3v1.1 tag.">ID3TT_ID3V1</a>);
<a name="l01017"></a>01017 }
<a name="l01018"></a>01018 
<a name="l01038"></a><a class="code" href="class_i_d3___tag.html#ac74d4752c81d898abc947e6a0026cd9f">01038</a> <a class="code" href="class_i_d3___tag.html" title="The representative class of an id3 tag.">ID3_Tag</a>&amp; <a class="code" href="class_i_d3___tag.html#ac74d4752c81d898abc947e6a0026cd9f">ID3_Tag::operator&lt;&lt;</a>(<span class="keyword">const</span> <a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a>&amp; frame)
<a name="l01039"></a>01039 {
<a name="l01040"></a>01040   this-&gt;<a class="code" href="class_i_d3___tag.html#a03dce6ffdd08ee2683e6dab044388ebd">AddFrame</a>(frame);
<a name="l01041"></a>01041   <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l01042"></a>01042 }
<a name="l01043"></a>01043 
<a name="l01044"></a>01044 
<a name="l01045"></a><a class="code" href="class_i_d3___tag.html#ad6636fc2d107312609266a10c38adcfe">01045</a> <a class="code" href="class_i_d3___tag.html" title="The representative class of an id3 tag.">ID3_Tag</a>&amp; <a class="code" href="class_i_d3___tag.html#ac74d4752c81d898abc947e6a0026cd9f">ID3_Tag::operator&lt;&lt;</a>(<span class="keyword">const</span> <a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a>* frame)
<a name="l01046"></a>01046 {
<a name="l01047"></a>01047   <span class="keywordflow">if</span> (frame)
<a name="l01048"></a>01048   {
<a name="l01049"></a>01049     this-&gt;<a class="code" href="class_i_d3___tag.html#a03dce6ffdd08ee2683e6dab044388ebd">AddFrame</a>(frame);
<a name="l01050"></a>01050   }
<a name="l01051"></a>01051   <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l01052"></a>01052 }
<a name="l01053"></a>01053 
<a name="l01054"></a><a class="code" href="tag_8cpp.html#ab6d324d77a1d4aef5eca866d7efce5a1">01054</a> int32 <a class="code" href="tag_8cpp.html#ab6d324d77a1d4aef5eca866d7efce5a1">ID3_IsTagHeader</a>(<span class="keyword">const</span> <a class="code" href="globals_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a> data[ID3_TAGHEADERSIZE])
<a name="l01055"></a>01055 {
<a name="l01056"></a>01056   <span class="keywordtype">size_t</span> size = <a class="code" href="class_i_d3___tag.html#abeaf68b668a689f2ce50094131b9183b" title="Analyses a buffer to determine if we have a valid ID3v2 tag header.">ID3_Tag::IsV2Tag</a>(data);
<a name="l01057"></a>01057 
<a name="l01058"></a>01058   <span class="keywordflow">if</span> (!size)
<a name="l01059"></a>01059   {
<a name="l01060"></a>01060     <span class="keywordflow">return</span> -1;
<a name="l01061"></a>01061   }
<a name="l01062"></a>01062 
<a name="l01063"></a>01063   <span class="keywordflow">return</span> size - <a class="code" href="class_i_d3___tag_header.html#a4182519e23dc329bdf25ab1213bd6096a74cf4937e78303a0b961dfb12c9f2b04">ID3_TagHeader::SIZE</a>;
<a name="l01064"></a>01064 }
<a name="l01065"></a>01065 
<a name="l01066"></a>01066 
<a name="l01067"></a>01067 <span class="keyword">namespace</span>
<a name="l01068"></a>01068 {
<a name="l01069"></a>01069   <span class="keyword">class </span>IteratorImpl : <span class="keyword">public</span> <a class="code" href="class_i_d3___tag.html" title="The representative class of an id3 tag.">ID3_Tag</a>::Iterator
<a name="l01070"></a>01070   {
<a name="l01071"></a>01071     <a class="code" href="class_i_d3___tag_impl.html#a65a396e4561ed22e3feebc4e30c91bf4">ID3_TagImpl::iterator</a> _cur;
<a name="l01072"></a>01072     <a class="code" href="class_i_d3___tag_impl.html#a65a396e4561ed22e3feebc4e30c91bf4">ID3_TagImpl::iterator</a> _end;
<a name="l01073"></a>01073   <span class="keyword">public</span>:
<a name="l01074"></a>01074     IteratorImpl(<a class="code" href="class_i_d3___tag_impl.html">ID3_TagImpl</a>&amp; tag)
<a name="l01075"></a>01075       : _cur(tag.begin()), _end(tag.end())
<a name="l01076"></a>01076     {
<a name="l01077"></a>01077     }
<a name="l01078"></a>01078 
<a name="l01079"></a>01079     <a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a>* GetNext()
<a name="l01080"></a>01080     {
<a name="l01081"></a>01081       <a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a>* next = <a class="code" href="globals_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>;
<a name="l01082"></a>01082       <span class="keywordflow">while</span> (next == <a class="code" href="globals_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> &amp;&amp; _cur != _end)
<a name="l01083"></a>01083       {
<a name="l01084"></a>01084         next = *_cur;
<a name="l01085"></a>01085         ++_cur;
<a name="l01086"></a>01086       }
<a name="l01087"></a>01087       <span class="keywordflow">return</span> next;
<a name="l01088"></a>01088     }
<a name="l01089"></a>01089   };
<a name="l01090"></a>01090 
<a name="l01091"></a>01091 
<a name="l01092"></a>01092   <span class="keyword">class </span>ConstIteratorImpl : <span class="keyword">public</span> <a class="code" href="class_i_d3___tag.html" title="The representative class of an id3 tag.">ID3_Tag</a>::ConstIterator
<a name="l01093"></a>01093   {
<a name="l01094"></a>01094     <a class="code" href="class_i_d3___tag_impl.html#aa682023c07df47c19db046540d260d08">ID3_TagImpl::const_iterator</a> _cur;
<a name="l01095"></a>01095     <a class="code" href="class_i_d3___tag_impl.html#aa682023c07df47c19db046540d260d08">ID3_TagImpl::const_iterator</a> _end;
<a name="l01096"></a>01096   <span class="keyword">public</span>:
<a name="l01097"></a>01097     ConstIteratorImpl(<a class="code" href="class_i_d3___tag_impl.html">ID3_TagImpl</a>&amp; tag)
<a name="l01098"></a>01098       : _cur(tag.begin()), _end(tag.end())
<a name="l01099"></a>01099     {
<a name="l01100"></a>01100     }
<a name="l01101"></a>01101     <span class="keyword">const</span> <a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a>* GetNext()
<a name="l01102"></a>01102     {
<a name="l01103"></a>01103       <a class="code" href="class_i_d3___frame.html" title="The representative class of an id3v2 frame.">ID3_Frame</a>* next = <a class="code" href="globals_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>;
<a name="l01104"></a>01104       <span class="keywordflow">while</span> (next == <a class="code" href="globals_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> &amp;&amp; _cur != _end)
<a name="l01105"></a>01105       {
<a name="l01106"></a>01106         next = *_cur;
<a name="l01107"></a>01107         ++_cur;
<a name="l01108"></a>01108       }
<a name="l01109"></a>01109       <span class="keywordflow">return</span> next;
<a name="l01110"></a>01110     }
<a name="l01111"></a>01111   };
<a name="l01112"></a>01112 }
<a name="l01113"></a>01113 
<a name="l01114"></a>01114 <a class="code" href="class_i_d3___tag_1_1_iterator.html">ID3_Tag::Iterator</a>*
<a name="l01115"></a><a class="code" href="class_i_d3___tag.html#ad63ed5e405467892b3d4413b185c43ba">01115</a> <a class="code" href="class_i_d3___tag.html#ad63ed5e405467892b3d4413b185c43ba">ID3_Tag::CreateIterator</a>()
<a name="l01116"></a>01116 {
<a name="l01117"></a>01117   <span class="keywordflow">return</span> <span class="keyword">new</span> IteratorImpl(*_impl);
<a name="l01118"></a>01118 }
<a name="l01119"></a>01119 
<a name="l01120"></a>01120 <a class="code" href="class_i_d3___tag_1_1_const_iterator.html">ID3_Tag::ConstIterator</a>*
<a name="l01121"></a><a class="code" href="class_i_d3___tag.html#af3d9a113387ef0ba1fd98472d5fedb02">01121</a> <a class="code" href="class_i_d3___tag.html#ad63ed5e405467892b3d4413b185c43ba">ID3_Tag::CreateIterator</a>()<span class="keyword"> const</span>
<a name="l01122"></a>01122 <span class="keyword"></span>{
<a name="l01123"></a>01123   <span class="keywordflow">return</span> <span class="keyword">new</span> ConstIteratorImpl(*_impl);
<a name="l01124"></a>01124 }
<a name="l01125"></a>01125 
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Wed Jan 12 23:46:35 2011 for id3lib by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>