Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > 5e58c3b49fd1e75d37317298900a6262 > files > 134

lib64mspack-devel-0.5-0.2.alpha.1.mga6.x86_64.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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libmspack: mscab_decompressor Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libmspack
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">mscab_decompressor Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A decompressor for .CAB (Microsoft Cabinet) files.  
 <a href="structmscab__decompressor.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="mspack_8h_source.html">mspack.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:a37076a6eb7f46c66c3b180825b118d49"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structmscabd__cabinet.html">mscabd_cabinet</a> *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmscab__decompressor.html#a37076a6eb7f46c66c3b180825b118d49">open</a> )(struct <a class="el" href="structmscab__decompressor.html">mscab_decompressor</a> *self, const char *filename)</td></tr>
<tr class="memdesc:a37076a6eb7f46c66c3b180825b118d49"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens a cabinet file and reads its contents.  <a href="#a37076a6eb7f46c66c3b180825b118d49">More...</a><br /></td></tr>
<tr class="separator:a37076a6eb7f46c66c3b180825b118d49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50a79860e92ef580afe654fbe16f6758"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmscab__decompressor.html#a50a79860e92ef580afe654fbe16f6758">close</a> )(struct <a class="el" href="structmscab__decompressor.html">mscab_decompressor</a> *self, struct <a class="el" href="structmscabd__cabinet.html">mscabd_cabinet</a> *cab)</td></tr>
<tr class="memdesc:a50a79860e92ef580afe654fbe16f6758"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes a previously opened cabinet or cabinet set.  <a href="#a50a79860e92ef580afe654fbe16f6758">More...</a><br /></td></tr>
<tr class="separator:a50a79860e92ef580afe654fbe16f6758"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6eb77aa755605284b72c6ee89045ad74"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structmscabd__cabinet.html">mscabd_cabinet</a> *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmscab__decompressor.html#a6eb77aa755605284b72c6ee89045ad74">search</a> )(struct <a class="el" href="structmscab__decompressor.html">mscab_decompressor</a> *self, const char *filename)</td></tr>
<tr class="memdesc:a6eb77aa755605284b72c6ee89045ad74"><td class="mdescLeft">&#160;</td><td class="mdescRight">Searches a regular file for embedded cabinets.  <a href="#a6eb77aa755605284b72c6ee89045ad74">More...</a><br /></td></tr>
<tr class="separator:a6eb77aa755605284b72c6ee89045ad74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3efd89b8cc66689ba56b87dbce36eb63"><td class="memItemLeft" align="right" valign="top">int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmscab__decompressor.html#a3efd89b8cc66689ba56b87dbce36eb63">append</a> )(struct <a class="el" href="structmscab__decompressor.html">mscab_decompressor</a> *self, struct <a class="el" href="structmscabd__cabinet.html">mscabd_cabinet</a> *cab, struct <a class="el" href="structmscabd__cabinet.html">mscabd_cabinet</a> *nextcab)</td></tr>
<tr class="memdesc:a3efd89b8cc66689ba56b87dbce36eb63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Appends one <a class="el" href="structmscabd__cabinet.html" title="A structure which represents a single cabinet file. ">mscabd_cabinet</a> to another, forming or extending a cabinet set.  <a href="#a3efd89b8cc66689ba56b87dbce36eb63">More...</a><br /></td></tr>
<tr class="separator:a3efd89b8cc66689ba56b87dbce36eb63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e93022538b4c27ebafb7ad969786a67"><td class="memItemLeft" align="right" valign="top">int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmscab__decompressor.html#a3e93022538b4c27ebafb7ad969786a67">prepend</a> )(struct <a class="el" href="structmscab__decompressor.html">mscab_decompressor</a> *self, struct <a class="el" href="structmscabd__cabinet.html">mscabd_cabinet</a> *cab, struct <a class="el" href="structmscabd__cabinet.html">mscabd_cabinet</a> *prevcab)</td></tr>
<tr class="memdesc:a3e93022538b4c27ebafb7ad969786a67"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prepends one <a class="el" href="structmscabd__cabinet.html" title="A structure which represents a single cabinet file. ">mscabd_cabinet</a> to another, forming or extending a cabinet set.  <a href="#a3e93022538b4c27ebafb7ad969786a67">More...</a><br /></td></tr>
<tr class="separator:a3e93022538b4c27ebafb7ad969786a67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0bb7f921f3972c7e679c693fafd4ac11"><td class="memItemLeft" align="right" valign="top">int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmscab__decompressor.html#a0bb7f921f3972c7e679c693fafd4ac11">extract</a> )(struct <a class="el" href="structmscab__decompressor.html">mscab_decompressor</a> *self, struct <a class="el" href="structmscabd__file.html">mscabd_file</a> *file, const char *filename)</td></tr>
<tr class="memdesc:a0bb7f921f3972c7e679c693fafd4ac11"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extracts a file from a cabinet or cabinet set.  <a href="#a0bb7f921f3972c7e679c693fafd4ac11">More...</a><br /></td></tr>
<tr class="separator:a0bb7f921f3972c7e679c693fafd4ac11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a3d1afa0318084a7d1b90b9a61674fd"><td class="memItemLeft" align="right" valign="top">int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmscab__decompressor.html#a4a3d1afa0318084a7d1b90b9a61674fd">set_param</a> )(struct <a class="el" href="structmscab__decompressor.html">mscab_decompressor</a> *self, int param, int value)</td></tr>
<tr class="memdesc:a4a3d1afa0318084a7d1b90b9a61674fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a CAB decompression engine parameter.  <a href="#a4a3d1afa0318084a7d1b90b9a61674fd">More...</a><br /></td></tr>
<tr class="separator:a4a3d1afa0318084a7d1b90b9a61674fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52ce4ec6de535a4cee0432ce897124ca"><td class="memItemLeft" align="right" valign="top">int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmscab__decompressor.html#a52ce4ec6de535a4cee0432ce897124ca">last_error</a> )(struct <a class="el" href="structmscab__decompressor.html">mscab_decompressor</a> *self)</td></tr>
<tr class="memdesc:a52ce4ec6de535a4cee0432ce897124ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the error code set by the most recently called method.  <a href="#a52ce4ec6de535a4cee0432ce897124ca">More...</a><br /></td></tr>
<tr class="separator:a52ce4ec6de535a4cee0432ce897124ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A decompressor for .CAB (Microsoft Cabinet) files. </p>
<p>All fields are READ ONLY.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="mspack_8h.html#a9964981ec0e6f49814301101e1708f95" title="Creates a new CAB decompressor. ">mspack_create_cab_decompressor()</a>, <a class="el" href="mspack_8h.html#a13e9100ea34b16693cacb92b212ccadc" title="Destroys an existing CAB decompressor. ">mspack_destroy_cab_decompressor()</a> </dd></dl>
</div><h2 class="groupheader">Field Documentation</h2>
<a id="a3efd89b8cc66689ba56b87dbce36eb63"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3efd89b8cc66689ba56b87dbce36eb63">&#9670;&nbsp;</a></span>append</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* mscab_decompressor::append) (struct <a class="el" href="structmscab__decompressor.html">mscab_decompressor</a> *self, struct <a class="el" href="structmscabd__cabinet.html">mscabd_cabinet</a> *cab, struct <a class="el" href="structmscabd__cabinet.html">mscabd_cabinet</a> *nextcab)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Appends one <a class="el" href="structmscabd__cabinet.html" title="A structure which represents a single cabinet file. ">mscabd_cabinet</a> to another, forming or extending a cabinet set. </p>
<p>This will attempt to append one cabinet to another such that <code>(cab-&gt;nextcab == nextcab) &amp;&amp; (nextcab-&gt;prevcab == cab)</code> and any folders split between the two cabinets are merged.</p>
<p>The cabinets MUST be part of a cabinet set &ndash; a cabinet set is a cabinet that spans more than one physical cabinet file on disk &ndash; and must be appropriately matched.</p>
<p>It can be determined if a cabinet has further parts to load by examining the <a class="el" href="structmscabd__cabinet.html#a6c5b8d1773e14b12c70d64d5b8867b01" title="Header flags. ">mscabd_cabinet::flags</a> field:</p>
<ul>
<li>if <code>(flags &amp; MSCAB_HDR_PREVCAB)</code> is non-zero, there is a predecessor cabinet to <a class="el" href="structmscab__decompressor.html#a37076a6eb7f46c66c3b180825b118d49" title="Opens a cabinet file and reads its contents. ">open()</a> and <a class="el" href="structmscab__decompressor.html#a3e93022538b4c27ebafb7ad969786a67" title="Prepends one mscabd_cabinet to another, forming or extending a cabinet set. ">prepend()</a>. Its MS-DOS case-insensitive filename is <a class="el" href="structmscabd__cabinet.html#a1f595a7655daa62ba709ecf40a0cb13c" title="The filename of the previous cabinet in a cabinet set, or NULL. ">mscabd_cabinet::prevname</a></li>
<li>if <code>(flags &amp; MSCAB_HDR_NEXTCAB)</code> is non-zero, there is a successor cabinet to <a class="el" href="structmscab__decompressor.html#a37076a6eb7f46c66c3b180825b118d49" title="Opens a cabinet file and reads its contents. ">open()</a> and <a class="el" href="structmscab__decompressor.html#a3efd89b8cc66689ba56b87dbce36eb63" title="Appends one mscabd_cabinet to another, forming or extending a cabinet set. ">append()</a>. Its MS-DOS case-insensitive filename is <a class="el" href="structmscabd__cabinet.html#abe1b8a6ccc9eeeebf2a454bfbe2d4a1a" title="The filename of the next cabinet in a cabinet set, or NULL. ">mscabd_cabinet::nextname</a></li>
</ul>
<p>If the cabinets do not match, an error code will be returned. Neither cabinet has been altered, and both should be closed seperately.</p>
<p>Files and folders in a cabinet set are a single entity. All cabinets in a set use the same file list, which is updated as cabinets in the set are added. All pointers to <a class="el" href="structmscabd__folder.html" title="A structure which represents a single folder in a cabinet or cabinet set. ">mscabd_folder</a> and <a class="el" href="structmscabd__file.html" title="A structure which represents a single file in a cabinet or cabinet set. ">mscabd_file</a> structures in either cabinet must be discarded and re-obtained after merging.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>a self-referential pointer to the <a class="el" href="structmscab__decompressor.html" title="A decompressor for .CAB (Microsoft Cabinet) files. ">mscab_decompressor</a> instance being called </td></tr>
    <tr><td class="paramname">cab</td><td>the cabinet which will be appended to, predecessor of nextcab </td></tr>
    <tr><td class="paramname">nextcab</td><td>the cabinet which will be appended, successor of cab </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an error code, or MSPACK_ERR_OK if successful </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structmscab__decompressor.html#a3e93022538b4c27ebafb7ad969786a67" title="Prepends one mscabd_cabinet to another, forming or extending a cabinet set. ">prepend()</a>, <a class="el" href="structmscab__decompressor.html#a37076a6eb7f46c66c3b180825b118d49" title="Opens a cabinet file and reads its contents. ">open()</a>, <a class="el" href="structmscab__decompressor.html#a50a79860e92ef580afe654fbe16f6758" title="Closes a previously opened cabinet or cabinet set. ">close()</a> </dd></dl>

</div>
</div>
<a id="a50a79860e92ef580afe654fbe16f6758"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a50a79860e92ef580afe654fbe16f6758">&#9670;&nbsp;</a></span>close</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* mscab_decompressor::close) (struct <a class="el" href="structmscab__decompressor.html">mscab_decompressor</a> *self, struct <a class="el" href="structmscabd__cabinet.html">mscabd_cabinet</a> *cab)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Closes a previously opened cabinet or cabinet set. </p>
<p>This closes a cabinet, all cabinets associated with it via the <a class="el" href="structmscabd__cabinet.html#a94d02cd4adb598945f544d77362d1658" title="The next cabinet in a chained list, if this cabinet was opened with mscab_decompressor::search(). ">mscabd_cabinet::next</a>, <a class="el" href="structmscabd__cabinet.html#ad915066d3781892754b6cfd87b08d378" title="The previous cabinet in a cabinet set, or NULL. ">mscabd_cabinet::prevcab</a> and <a class="el" href="structmscabd__cabinet.html#ae3ab25aa910ea50dca515659848ab5dc" title="The next cabinet in a cabinet set, or NULL. ">mscabd_cabinet::nextcab</a> pointers, and all folders and files. All memory used by these entities is freed.</p>
<p>The cabinet pointer is now invalid and cannot be used again. All <a class="el" href="structmscabd__folder.html" title="A structure which represents a single folder in a cabinet or cabinet set. ">mscabd_folder</a> and <a class="el" href="structmscabd__file.html" title="A structure which represents a single file in a cabinet or cabinet set. ">mscabd_file</a> pointers from that cabinet or cabinet set are also now invalid, and cannot be used again.</p>
<p>If the cabinet pointer given was created using <a class="el" href="structmscab__decompressor.html#a6eb77aa755605284b72c6ee89045ad74" title="Searches a regular file for embedded cabinets. ">search()</a>, it MUST be the cabinet pointer returned by <a class="el" href="structmscab__decompressor.html#a6eb77aa755605284b72c6ee89045ad74" title="Searches a regular file for embedded cabinets. ">search()</a> and not one of the later cabinet pointers further along the <a class="el" href="structmscabd__cabinet.html#a94d02cd4adb598945f544d77362d1658" title="The next cabinet in a chained list, if this cabinet was opened with mscab_decompressor::search(). ">mscabd_cabinet::next</a> chain.</p>
<p>If extra cabinets have been added using <a class="el" href="structmscab__decompressor.html#a3efd89b8cc66689ba56b87dbce36eb63" title="Appends one mscabd_cabinet to another, forming or extending a cabinet set. ">append()</a> or <a class="el" href="structmscab__decompressor.html#a3e93022538b4c27ebafb7ad969786a67" title="Prepends one mscabd_cabinet to another, forming or extending a cabinet set. ">prepend()</a>, these will all be freed, even if the cabinet pointer given is not the first cabinet in the set. Do NOT <a class="el" href="structmscab__decompressor.html#a50a79860e92ef580afe654fbe16f6758" title="Closes a previously opened cabinet or cabinet set. ">close()</a> more than one cabinet in the set.</p>
<p>The <a class="el" href="structmscabd__cabinet.html#a8e37f9e7834660a3b752e7c0f9a0da06" title="The filename of the cabinet. ">mscabd_cabinet::filename</a> is not freed by the library, as it is not allocated by the library. The caller should free this itself if necessary, before it is lost forever.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>a self-referential pointer to the <a class="el" href="structmscab__decompressor.html" title="A decompressor for .CAB (Microsoft Cabinet) files. ">mscab_decompressor</a> instance being called </td></tr>
    <tr><td class="paramname">cab</td><td>the cabinet to close </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structmscab__decompressor.html#a37076a6eb7f46c66c3b180825b118d49" title="Opens a cabinet file and reads its contents. ">open()</a>, <a class="el" href="structmscab__decompressor.html#a6eb77aa755605284b72c6ee89045ad74" title="Searches a regular file for embedded cabinets. ">search()</a>, <a class="el" href="structmscab__decompressor.html#a3efd89b8cc66689ba56b87dbce36eb63" title="Appends one mscabd_cabinet to another, forming or extending a cabinet set. ">append()</a>, <a class="el" href="structmscab__decompressor.html#a3e93022538b4c27ebafb7ad969786a67" title="Prepends one mscabd_cabinet to another, forming or extending a cabinet set. ">prepend()</a> </dd></dl>

</div>
</div>
<a id="a0bb7f921f3972c7e679c693fafd4ac11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0bb7f921f3972c7e679c693fafd4ac11">&#9670;&nbsp;</a></span>extract</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* mscab_decompressor::extract) (struct <a class="el" href="structmscab__decompressor.html">mscab_decompressor</a> *self, struct <a class="el" href="structmscabd__file.html">mscabd_file</a> *file, const char *filename)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Extracts a file from a cabinet or cabinet set. </p>
<p>This extracts a compressed file in a cabinet and writes it to the given filename.</p>
<p>The MS-DOS filename of the file, <a class="el" href="structmscabd__file.html#a181b45655523f55ed114b51249d305f8" title="The filename of the file. ">mscabd_file::filename</a>, is NOT USED by <a class="el" href="structmscab__decompressor.html#a0bb7f921f3972c7e679c693fafd4ac11" title="Extracts a file from a cabinet or cabinet set. ">extract()</a>. The caller must examine this MS-DOS filename, copy and change it as necessary, create directories as necessary, and provide the correct filename as a parameter, which will be passed unchanged to the decompressor's <a class="el" href="structmspack__system.html#a908dd0c7eecc8fe0d61584f69896df0c" title="Opens a file for reading, writing, appending or updating. ">mspack_system::open()</a></p>
<p>If the file belongs to a split folder in a multi-part cabinet set, and not enough parts of the cabinet set have been loaded and appended or prepended, an error will be returned immediately.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>a self-referential pointer to the <a class="el" href="structmscab__decompressor.html" title="A decompressor for .CAB (Microsoft Cabinet) files. ">mscab_decompressor</a> instance being called </td></tr>
    <tr><td class="paramname">file</td><td>the file to be decompressed </td></tr>
    <tr><td class="paramname">filename</td><td>the filename of the file being written to </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an error code, or MSPACK_ERR_OK if successful </dd></dl>

</div>
</div>
<a id="a52ce4ec6de535a4cee0432ce897124ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52ce4ec6de535a4cee0432ce897124ca">&#9670;&nbsp;</a></span>last_error</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* mscab_decompressor::last_error) (struct <a class="el" href="structmscab__decompressor.html">mscab_decompressor</a> *self)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the error code set by the most recently called method. </p>
<p>This is useful for <a class="el" href="structmscab__decompressor.html#a37076a6eb7f46c66c3b180825b118d49" title="Opens a cabinet file and reads its contents. ">open()</a> and <a class="el" href="structmscab__decompressor.html#a6eb77aa755605284b72c6ee89045ad74" title="Searches a regular file for embedded cabinets. ">search()</a>, which do not return an error code directly.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>a self-referential pointer to the <a class="el" href="structmscab__decompressor.html" title="A decompressor for .CAB (Microsoft Cabinet) files. ">mscab_decompressor</a> instance being called </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the most recent error code </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structmscab__decompressor.html#a37076a6eb7f46c66c3b180825b118d49" title="Opens a cabinet file and reads its contents. ">open()</a>, <a class="el" href="structmscab__decompressor.html#a6eb77aa755605284b72c6ee89045ad74" title="Searches a regular file for embedded cabinets. ">search()</a> </dd></dl>

</div>
</div>
<a id="a37076a6eb7f46c66c3b180825b118d49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a37076a6eb7f46c66c3b180825b118d49">&#9670;&nbsp;</a></span>open</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structmscabd__cabinet.html">mscabd_cabinet</a>*(* mscab_decompressor::open) (struct <a class="el" href="structmscab__decompressor.html">mscab_decompressor</a> *self, const char *filename)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Opens a cabinet file and reads its contents. </p>
<p>If the file opened is a valid cabinet file, all headers will be read and a <a class="el" href="structmscabd__cabinet.html" title="A structure which represents a single cabinet file. ">mscabd_cabinet</a> structure will be returned, with a full list of folders and files.</p>
<p>In the case of an error occuring, NULL is returned and the error code is available from <a class="el" href="structmscab__decompressor.html#a52ce4ec6de535a4cee0432ce897124ca" title="Returns the error code set by the most recently called method. ">last_error()</a>.</p>
<p>The filename pointer should be considered "in use" until <a class="el" href="structmscab__decompressor.html#a50a79860e92ef580afe654fbe16f6758" title="Closes a previously opened cabinet or cabinet set. ">close()</a> is called on the cabinet.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>a self-referential pointer to the <a class="el" href="structmscab__decompressor.html" title="A decompressor for .CAB (Microsoft Cabinet) files. ">mscab_decompressor</a> instance being called </td></tr>
    <tr><td class="paramname">filename</td><td>the filename of the cabinet file. This is passed directly to <a class="el" href="structmspack__system.html#a908dd0c7eecc8fe0d61584f69896df0c" title="Opens a file for reading, writing, appending or updating. ">mspack_system::open()</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to a <a class="el" href="structmscabd__cabinet.html" title="A structure which represents a single cabinet file. ">mscabd_cabinet</a> structure, or NULL on failure </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structmscab__decompressor.html#a50a79860e92ef580afe654fbe16f6758" title="Closes a previously opened cabinet or cabinet set. ">close()</a>, <a class="el" href="structmscab__decompressor.html#a6eb77aa755605284b72c6ee89045ad74" title="Searches a regular file for embedded cabinets. ">search()</a>, <a class="el" href="structmscab__decompressor.html#a52ce4ec6de535a4cee0432ce897124ca" title="Returns the error code set by the most recently called method. ">last_error()</a> </dd></dl>

</div>
</div>
<a id="a3e93022538b4c27ebafb7ad969786a67"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e93022538b4c27ebafb7ad969786a67">&#9670;&nbsp;</a></span>prepend</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* mscab_decompressor::prepend) (struct <a class="el" href="structmscab__decompressor.html">mscab_decompressor</a> *self, struct <a class="el" href="structmscabd__cabinet.html">mscabd_cabinet</a> *cab, struct <a class="el" href="structmscabd__cabinet.html">mscabd_cabinet</a> *prevcab)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Prepends one <a class="el" href="structmscabd__cabinet.html" title="A structure which represents a single cabinet file. ">mscabd_cabinet</a> to another, forming or extending a cabinet set. </p>
<p>This will attempt to prepend one cabinet to another, such that <code>(cab-&gt;prevcab == prevcab) &amp;&amp; (prevcab-&gt;nextcab == cab)</code>. In all other respects, it is identical to <a class="el" href="structmscab__decompressor.html#a3efd89b8cc66689ba56b87dbce36eb63" title="Appends one mscabd_cabinet to another, forming or extending a cabinet set. ">append()</a>. See <a class="el" href="structmscab__decompressor.html#a3efd89b8cc66689ba56b87dbce36eb63" title="Appends one mscabd_cabinet to another, forming or extending a cabinet set. ">append()</a> for the full documentation.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>a self-referential pointer to the <a class="el" href="structmscab__decompressor.html" title="A decompressor for .CAB (Microsoft Cabinet) files. ">mscab_decompressor</a> instance being called </td></tr>
    <tr><td class="paramname">cab</td><td>the cabinet which will be prepended to, successor of prevcab </td></tr>
    <tr><td class="paramname">prevcab</td><td>the cabinet which will be prepended, predecessor of cab </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an error code, or MSPACK_ERR_OK if successful </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structmscab__decompressor.html#a3efd89b8cc66689ba56b87dbce36eb63" title="Appends one mscabd_cabinet to another, forming or extending a cabinet set. ">append()</a>, <a class="el" href="structmscab__decompressor.html#a37076a6eb7f46c66c3b180825b118d49" title="Opens a cabinet file and reads its contents. ">open()</a>, <a class="el" href="structmscab__decompressor.html#a50a79860e92ef580afe654fbe16f6758" title="Closes a previously opened cabinet or cabinet set. ">close()</a> </dd></dl>

</div>
</div>
<a id="a6eb77aa755605284b72c6ee89045ad74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6eb77aa755605284b72c6ee89045ad74">&#9670;&nbsp;</a></span>search</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structmscabd__cabinet.html">mscabd_cabinet</a>*(* mscab_decompressor::search) (struct <a class="el" href="structmscab__decompressor.html">mscab_decompressor</a> *self, const char *filename)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Searches a regular file for embedded cabinets. </p>
<p>This opens a normal file with the given filename and will search the entire file for embedded cabinet files</p>
<p>If any cabinets are found, the equivalent of <a class="el" href="structmscab__decompressor.html#a37076a6eb7f46c66c3b180825b118d49" title="Opens a cabinet file and reads its contents. ">open()</a> is called on each potential cabinet file at the offset it was found. All successfully <a class="el" href="structmscab__decompressor.html#a37076a6eb7f46c66c3b180825b118d49" title="Opens a cabinet file and reads its contents. ">open()</a>ed cabinets are kept in a list.</p>
<p>The first cabinet found will be returned directly as the result of this method. Any further cabinets found will be chained in a list using the <a class="el" href="structmscabd__cabinet.html#a94d02cd4adb598945f544d77362d1658" title="The next cabinet in a chained list, if this cabinet was opened with mscab_decompressor::search(). ">mscabd_cabinet::next</a> field.</p>
<p>In the case of an error occuring anywhere other than the simulated <a class="el" href="structmscab__decompressor.html#a37076a6eb7f46c66c3b180825b118d49" title="Opens a cabinet file and reads its contents. ">open()</a>, NULL is returned and the error code is available from <a class="el" href="structmscab__decompressor.html#a52ce4ec6de535a4cee0432ce897124ca" title="Returns the error code set by the most recently called method. ">last_error()</a>.</p>
<p>If no error occurs, but no cabinets can be found in the file, NULL is returned and <a class="el" href="structmscab__decompressor.html#a52ce4ec6de535a4cee0432ce897124ca" title="Returns the error code set by the most recently called method. ">last_error()</a> returns MSPACK_ERR_OK.</p>
<p>The filename pointer should be considered in use until <a class="el" href="structmscab__decompressor.html#a50a79860e92ef580afe654fbe16f6758" title="Closes a previously opened cabinet or cabinet set. ">close()</a> is called on the cabinet.</p>
<p><a class="el" href="structmscab__decompressor.html#a50a79860e92ef580afe654fbe16f6758" title="Closes a previously opened cabinet or cabinet set. ">close()</a> should only be called on the result of <a class="el" href="structmscab__decompressor.html#a6eb77aa755605284b72c6ee89045ad74" title="Searches a regular file for embedded cabinets. ">search()</a>, not on any subsequent cabinets in the <a class="el" href="structmscabd__cabinet.html#a94d02cd4adb598945f544d77362d1658" title="The next cabinet in a chained list, if this cabinet was opened with mscab_decompressor::search(). ">mscabd_cabinet::next</a> chain.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>a self-referential pointer to the <a class="el" href="structmscab__decompressor.html" title="A decompressor for .CAB (Microsoft Cabinet) files. ">mscab_decompressor</a> instance being called </td></tr>
    <tr><td class="paramname">filename</td><td>the filename of the file to search for cabinets. This is passed directly to <a class="el" href="structmspack__system.html#a908dd0c7eecc8fe0d61584f69896df0c" title="Opens a file for reading, writing, appending or updating. ">mspack_system::open()</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to a <a class="el" href="structmscabd__cabinet.html" title="A structure which represents a single cabinet file. ">mscabd_cabinet</a> structure, or NULL </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structmscab__decompressor.html#a50a79860e92ef580afe654fbe16f6758" title="Closes a previously opened cabinet or cabinet set. ">close()</a>, <a class="el" href="structmscab__decompressor.html#a37076a6eb7f46c66c3b180825b118d49" title="Opens a cabinet file and reads its contents. ">open()</a>, <a class="el" href="structmscab__decompressor.html#a52ce4ec6de535a4cee0432ce897124ca" title="Returns the error code set by the most recently called method. ">last_error()</a> </dd></dl>

</div>
</div>
<a id="a4a3d1afa0318084a7d1b90b9a61674fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a3d1afa0318084a7d1b90b9a61674fd">&#9670;&nbsp;</a></span>set_param</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* mscab_decompressor::set_param) (struct <a class="el" href="structmscab__decompressor.html">mscab_decompressor</a> *self, int param, int value)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets a CAB decompression engine parameter. </p>
<p>The following parameters are defined:</p><ul>
<li><a class="el" href="mspack_8h.html#a3888f5036eae320e691f5de290293a9f" title="mscab_decompressor::set_param() parameter: search buffer size. ">MSCABD_PARAM_SEARCHBUF</a>: How many bytes should be allocated as a buffer when using <a class="el" href="structmscab__decompressor.html#a6eb77aa755605284b72c6ee89045ad74" title="Searches a regular file for embedded cabinets. ">search()</a>? The minimum value is 4. The default value is 32768.</li>
<li><a class="el" href="mspack_8h.html#a852a791d880d602989063128d4ce33d1" title="mscab_decompressor::set_param() parameter: repair MS-ZIP streams? ">MSCABD_PARAM_FIXMSZIP</a>: If non-zero, <a class="el" href="structmscab__decompressor.html#a0bb7f921f3972c7e679c693fafd4ac11" title="Extracts a file from a cabinet or cabinet set. ">extract()</a> will ignore bad checksums and recover from decompression errors in MS-ZIP compressed folders. The default value is 0 (don't recover).</li>
<li><a class="el" href="mspack_8h.html#a197cc07b45645f807bd400ed576b2968" title="mscab_decompressor::set_param() parameter: size of decompression buffer ">MSCABD_PARAM_DECOMPBUF</a>: How many bytes should be used as an input bit buffer by decompressors? The minimum value is 4. The default value is 4096.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>a self-referential pointer to the <a class="el" href="structmscab__decompressor.html" title="A decompressor for .CAB (Microsoft Cabinet) files. ">mscab_decompressor</a> instance being called </td></tr>
    <tr><td class="paramname">param</td><td>the parameter to set </td></tr>
    <tr><td class="paramname">value</td><td>the value to set the parameter to </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>MSPACK_ERR_OK if all is OK, or MSPACK_ERR_ARGS if there is a problem with either parameter or value. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structmscab__decompressor.html#a6eb77aa755605284b72c6ee89045ad74" title="Searches a regular file for embedded cabinets. ">search()</a>, <a class="el" href="structmscab__decompressor.html#a0bb7f921f3972c7e679c693fafd4ac11" title="Extracts a file from a cabinet or cabinet set. ">extract()</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="mspack_8h_source.html">mspack.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>