Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 34ae14235711d1471f043ac894a061f9 > files > 406

libicu-doc-3.6-5.16.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ICU 3.6: udata.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </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>Globals</span></a></li>
  </ul></div>
<h1>udata.h File Reference</h1>C API: Data loading interface. <a href="#_details">More...</a>
<p>
<code>#include &quot;<a class="el" href="utypes_8h-source.html">unicode/utypes.h</a>&quot;</code><br>

<p>
<a href="udata_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structUDataInfo.html">UDataInfo</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="structUDataInfo.html">UDataInfo</a> contains the properties about the requested data.  <a href="structUDataInfo.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="udata_8h.html#709cb174c62d016380f8f323868b7b9c">U_TREE_SEPARATOR</a>&nbsp;&nbsp;&nbsp;'-'</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Character used to separate package names from tree names.  <a href="#709cb174c62d016380f8f323868b7b9c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="udata_8h.html#eba25bf2afe62c8c4f9b6c1d12d4489b">U_TREE_SEPARATOR_STRING</a>&nbsp;&nbsp;&nbsp;&quot;-&quot;</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">String used to separate package names from tree names.  <a href="#eba25bf2afe62c8c4f9b6c1d12d4489b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="udata_8h.html#2e46adee7c034a9e7d2ccd8b51dc9993">U_TREE_ENTRY_SEP_CHAR</a>&nbsp;&nbsp;&nbsp;'/'</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Character used to separate parts of entry names.  <a href="#2e46adee7c034a9e7d2ccd8b51dc9993"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="udata_8h.html#33d72a64ef62df62beba1f2c7ae5d7c5">U_TREE_ENTRY_SEP_STRING</a>&nbsp;&nbsp;&nbsp;&quot;/&quot;</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">String used to separate parts of entry names.  <a href="#33d72a64ef62df62beba1f2c7ae5d7c5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="udata_8h.html#38792289236f8b404d0b861619a9fd8d">U_ICUDATA_ALIAS</a>&nbsp;&nbsp;&nbsp;&quot;ICUDATA&quot;</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Alias for standard ICU data.  <a href="#38792289236f8b404d0b861619a9fd8d"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="udata_8h.html#571aad1e028756dd4181f7066c389027">UDataMemory</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="udata_8h.html#571aad1e028756dd4181f7066c389027">UDataMemory</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Forward declaration of the data memory type.  <a href="#571aad1e028756dd4181f7066c389027"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="udata_8h.html#0425ff5a3b38abdda71f34f5526837da">UDataMemoryIsAcceptable</a> (void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, const char *type, const char *name, const <a class="el" href="structUDataInfo.html">UDataInfo</a> *pInfo)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback function for <a class="el" href="udata_8h.html#573131b90cfd0fe8522242298c85505e">udata_openChoice()</a>.  <a href="#0425ff5a3b38abdda71f34f5526837da"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="udata_8h.html#2de18864c069cf39f42c1beb960996a4">UDataFileAccess</a> { <br>
&nbsp;&nbsp;<a class="el" href="udata_8h.html#2de18864c069cf39f42c1beb960996a47b2baf5af14983e1313ec01d281458bf">UDATA_NO_FILES</a>, 
<a class="el" href="udata_8h.html#2de18864c069cf39f42c1beb960996a461beaa4aab31a571e72c1e1be1d1b7d2">UDATA_ONLY_PACKAGES</a>, 
<a class="el" href="udata_8h.html#2de18864c069cf39f42c1beb960996a481de2a0582d9fa5ab84443241b0f139e">UDATA_PACKAGES_FIRST</a>, 
<a class="el" href="udata_8h.html#2de18864c069cf39f42c1beb960996a47be5fbe88bddc1b7b5975a61202418f9">UDATA_FILES_FIRST</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="udata_8h.html#2de18864c069cf39f42c1beb960996a45f3a5f858be7a305bcdbb84e016b3227">UDATA_DEFAULT_ACCESS</a> =  UDATA_FILES_FIRST, 
<b>UDATA_FILE_ACCESS_COUNT</b>
<br>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Possible settings for <a class="el" href="udata_8h.html#a1c5af884d58a1d4802856d903ef8eb6">udata_setFileAccess()</a>.  <a href="udata_8h.html#2de18864c069cf39f42c1beb960996a4">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="udata_8h.html#571aad1e028756dd4181f7066c389027">UDataMemory</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="udata_8h.html#88631c2351f3c5d2bf3b5b083e2ef4d9">udata_open</a> (const char *path, const char *type, const char *name, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function.  <a href="#88631c2351f3c5d2bf3b5b083e2ef4d9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="udata_8h.html#571aad1e028756dd4181f7066c389027">UDataMemory</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="udata_8h.html#573131b90cfd0fe8522242298c85505e">udata_openChoice</a> (const char *path, const char *type, const char *name, <a class="el" href="udata_8h.html#0425ff5a3b38abdda71f34f5526837da">UDataMemoryIsAcceptable</a> *isAcceptable, void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Data loading function.  <a href="#573131b90cfd0fe8522242298c85505e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="udata_8h.html#7363c7861412a78128272e2bf002aa27">udata_close</a> (<a class="el" href="udata_8h.html#571aad1e028756dd4181f7066c389027">UDataMemory</a> *pData)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close the data memory.  <a href="#7363c7861412a78128272e2bf002aa27"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="udata_8h.html#00f7d6c234a8ef64eb6eb5848874a658">udata_getMemory</a> (<a class="el" href="udata_8h.html#571aad1e028756dd4181f7066c389027">UDataMemory</a> *pData)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the pointer to the actual data inside the data memory.  <a href="#00f7d6c234a8ef64eb6eb5848874a658"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="udata_8h.html#ca99f69b66e4986d838ee3c735957faf">udata_getInfo</a> (<a class="el" href="udata_8h.html#571aad1e028756dd4181f7066c389027">UDataMemory</a> *pData, <a class="el" href="structUDataInfo.html">UDataInfo</a> *pInfo)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the information from the data memory header.  <a href="#ca99f69b66e4986d838ee3c735957faf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="udata_8h.html#f016e7ff8ee4d37835a2fbdbdbe3822c">udata_setCommonData</a> (const void *data, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *err)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function bypasses the normal ICU data loading process and allows you to force ICU's system data to come out of a user-specified area in memory.  <a href="#f016e7ff8ee4d37835a2fbdbdbe3822c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="udata_8h.html#82e8e372e5a63e406885662d26ec2e15">udata_setAppData</a> (const char *packageName, const void *data, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *err)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function bypasses the normal ICU data loading process for application-specific data and allows you to force the it to come out of a user-specified pointer.  <a href="#82e8e372e5a63e406885662d26ec2e15"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="udata_8h.html#a1c5af884d58a1d4802856d903ef8eb6">udata_setFileAccess</a> (<a class="el" href="udata_8h.html#2de18864c069cf39f42c1beb960996a4">UDataFileAccess</a> access, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function may be called to control how ICU loads data.  <a href="#a1c5af884d58a1d4802856d903ef8eb6"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
C API: Data loading interface. 
<p>
<h2>Information about data loading interface</h2>
<p>
This API is used to find and efficiently load data for ICU and applications using ICU. It provides an abstract interface that specifies a data type and name to find and load the data. Normally this API is used by other ICU APIs to load required data out of the ICU data library, but it can be used to load data out of other places.<p>
See the User Guide Data Management chapter. 
<p>
Definition in file <a class="el" href="udata_8h-source.html">udata.h</a>.<hr><h2>Define Documentation</h2>
<a class="anchor" name="38792289236f8b404d0b861619a9fd8d"></a><!-- doxytag: member="udata.h::U_ICUDATA_ALIAS" ref="38792289236f8b404d0b861619a9fd8d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_ICUDATA_ALIAS&nbsp;&nbsp;&nbsp;&quot;ICUDATA&quot;          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Alias for standard ICU data. 
<p>
<dl compact><dt><b><a class="el" href="internal.html#_internal000041">Internal:</a></b></dt><dd>Do not use. This API is for interal use only. ICU 3.0 </dd></dl>

<p>
Definition at line <a class="el" href="udata_8h-source.html#l00068">68</a> of file <a class="el" href="udata_8h-source.html">udata.h</a>.
</div>
</div><p>
<a class="anchor" name="2e46adee7c034a9e7d2ccd8b51dc9993"></a><!-- doxytag: member="udata.h::U_TREE_ENTRY_SEP_CHAR" ref="2e46adee7c034a9e7d2ccd8b51dc9993" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_TREE_ENTRY_SEP_CHAR&nbsp;&nbsp;&nbsp;'/'          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Character used to separate parts of entry names. 
<p>
<dl compact><dt><b><a class="el" href="internal.html#_internal000039">Internal:</a></b></dt><dd>Do not use. This API is for interal use only. ICU 3.0 </dd></dl>

<p>
Definition at line <a class="el" href="udata_8h-source.html#l00056">56</a> of file <a class="el" href="udata_8h-source.html">udata.h</a>.
</div>
</div><p>
<a class="anchor" name="33d72a64ef62df62beba1f2c7ae5d7c5"></a><!-- doxytag: member="udata.h::U_TREE_ENTRY_SEP_STRING" ref="33d72a64ef62df62beba1f2c7ae5d7c5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_TREE_ENTRY_SEP_STRING&nbsp;&nbsp;&nbsp;&quot;/&quot;          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
String used to separate parts of entry names. 
<p>
<dl compact><dt><b><a class="el" href="internal.html#_internal000040">Internal:</a></b></dt><dd>Do not use. This API is for interal use only. ICU 3.0 </dd></dl>

<p>
Definition at line <a class="el" href="udata_8h-source.html#l00062">62</a> of file <a class="el" href="udata_8h-source.html">udata.h</a>.
</div>
</div><p>
<a class="anchor" name="709cb174c62d016380f8f323868b7b9c"></a><!-- doxytag: member="udata.h::U_TREE_SEPARATOR" ref="709cb174c62d016380f8f323868b7b9c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_TREE_SEPARATOR&nbsp;&nbsp;&nbsp;'-'          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Character used to separate package names from tree names. 
<p>
<dl compact><dt><b><a class="el" href="internal.html#_internal000037">Internal:</a></b></dt><dd>Do not use. This API is for interal use only. ICU 3.0 </dd></dl>

<p>
Definition at line <a class="el" href="udata_8h-source.html#l00044">44</a> of file <a class="el" href="udata_8h-source.html">udata.h</a>.
</div>
</div><p>
<a class="anchor" name="eba25bf2afe62c8c4f9b6c1d12d4489b"></a><!-- doxytag: member="udata.h::U_TREE_SEPARATOR_STRING" ref="eba25bf2afe62c8c4f9b6c1d12d4489b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_TREE_SEPARATOR_STRING&nbsp;&nbsp;&nbsp;&quot;-&quot;          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
String used to separate package names from tree names. 
<p>
<dl compact><dt><b><a class="el" href="internal.html#_internal000038">Internal:</a></b></dt><dd>Do not use. This API is for interal use only. ICU 3.0 </dd></dl>

<p>
Definition at line <a class="el" href="udata_8h-source.html#l00050">50</a> of file <a class="el" href="udata_8h-source.html">udata.h</a>.
</div>
</div><p>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="571aad1e028756dd4181f7066c389027"></a><!-- doxytag: member="udata.h::UDataMemory" ref="571aad1e028756dd4181f7066c389027" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="udata_8h.html#571aad1e028756dd4181f7066c389027">UDataMemory</a> <a class="el" href="udata_8h.html#571aad1e028756dd4181f7066c389027">UDataMemory</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Forward declaration of the data memory type. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable000973">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="udata_8h-source.html#l00150">150</a> of file <a class="el" href="udata_8h-source.html">udata.h</a>.
</div>
</div><p>
<a class="anchor" name="0425ff5a3b38abdda71f34f5526837da"></a><!-- doxytag: member="udata.h::UDataMemoryIsAcceptable" ref="0425ff5a3b38abdda71f34f5526837da" args="(void *context, const char *type, const char *name, const UDataInfo *pInfo)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a> U_CALLCONV <a class="el" href="udata_8h.html#0425ff5a3b38abdda71f34f5526837da">UDataMemoryIsAcceptable</a>(void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, const char *type, const char *name, const <a class="el" href="structUDataInfo.html">UDataInfo</a> *pInfo)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Callback function for <a class="el" href="udata_8h.html#573131b90cfd0fe8522242298c85505e">udata_openChoice()</a>. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>parameter passed into <code><a class="el" href="udata_8h.html#573131b90cfd0fe8522242298c85505e">udata_openChoice()</a></code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>The type of the data as passed into <code><a class="el" href="udata_8h.html#573131b90cfd0fe8522242298c85505e">udata_openChoice()</a></code>. It may be <code>NULL</code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>The name of the data as passed into <code><a class="el" href="udata_8h.html#573131b90cfd0fe8522242298c85505e">udata_openChoice()</a></code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pInfo</em>&nbsp;</td><td>A pointer to the <code><a class="el" href="structUDataInfo.html">UDataInfo</a></code> structure of data that has been loaded and will be returned by <code><a class="el" href="udata_8h.html#573131b90cfd0fe8522242298c85505e">udata_openChoice()</a></code> if this function returns <code>TRUE</code>. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>TRUE if the current data memory is acceptable </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000974">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="udata_8h-source.html#l00166">166</a> of file <a class="el" href="udata_8h-source.html">udata.h</a>.
</div>
</div><p>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="2de18864c069cf39f42c1beb960996a4"></a><!-- doxytag: member="udata.h::UDataFileAccess" ref="2de18864c069cf39f42c1beb960996a4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="udata_8h.html#2de18864c069cf39f42c1beb960996a4">UDataFileAccess</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Possible settings for <a class="el" href="udata_8h.html#a1c5af884d58a1d4802856d903ef8eb6">udata_setFileAccess()</a>. 
<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="udata_8h.html#a1c5af884d58a1d4802856d903ef8eb6">udata_setFileAccess</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000090">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.4 </dd></dl>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="2de18864c069cf39f42c1beb960996a47b2baf5af14983e1313ec01d281458bf"></a><!-- doxytag: member="UDATA_NO_FILES" ref="2de18864c069cf39f42c1beb960996a47b2baf5af14983e1313ec01d281458bf" args="" -->UDATA_NO_FILES</em>&nbsp;</td><td>
ICU does not access the file system for data loading. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="2de18864c069cf39f42c1beb960996a461beaa4aab31a571e72c1e1be1d1b7d2"></a><!-- doxytag: member="UDATA_ONLY_PACKAGES" ref="2de18864c069cf39f42c1beb960996a461beaa4aab31a571e72c1e1be1d1b7d2" args="" -->UDATA_ONLY_PACKAGES</em>&nbsp;</td><td>
ICU only loads data from packages, not from single files. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="2de18864c069cf39f42c1beb960996a481de2a0582d9fa5ab84443241b0f139e"></a><!-- doxytag: member="UDATA_PACKAGES_FIRST" ref="2de18864c069cf39f42c1beb960996a481de2a0582d9fa5ab84443241b0f139e" args="" -->UDATA_PACKAGES_FIRST</em>&nbsp;</td><td>
ICU loads data from packages first, and only from single files if the data cannot be found in a package. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="2de18864c069cf39f42c1beb960996a47be5fbe88bddc1b7b5975a61202418f9"></a><!-- doxytag: member="UDATA_FILES_FIRST" ref="2de18864c069cf39f42c1beb960996a47be5fbe88bddc1b7b5975a61202418f9" args="" -->UDATA_FILES_FIRST</em>&nbsp;</td><td>
ICU looks for data in single files first, then in packages. 
<p>
(default) </td></tr>
<tr><td valign="top"><em><a class="anchor" name="2de18864c069cf39f42c1beb960996a45f3a5f858be7a305bcdbb84e016b3227"></a><!-- doxytag: member="UDATA_DEFAULT_ACCESS" ref="2de18864c069cf39f42c1beb960996a45f3a5f858be7a305bcdbb84e016b3227" args="" -->UDATA_DEFAULT_ACCESS</em>&nbsp;</td><td>
An alias for the default access mode. </td></tr>
</table>
</dl>

<p>
Definition at line <a class="el" href="udata_8h-source.html#l00359">359</a> of file <a class="el" href="udata_8h-source.html">udata.h</a>.
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="7363c7861412a78128272e2bf002aa27"></a><!-- doxytag: member="udata.h::udata_close" ref="7363c7861412a78128272e2bf002aa27" args="(UDataMemory *pData)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void udata_close           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="udata_8h.html#571aad1e028756dd4181f7066c389027">UDataMemory</a> *&nbsp;</td>
          <td class="paramname"> <em>pData</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Close the data memory. 
<p>
This function must be called to allow the system to release resources associated with this data memory. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pData</em>&nbsp;</td><td>The pointer to data memory object </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000977">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="ca99f69b66e4986d838ee3c735957faf"></a><!-- doxytag: member="udata.h::udata_getInfo" ref="ca99f69b66e4986d838ee3c735957faf" args="(UDataMemory *pData, UDataInfo *pInfo)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void udata_getInfo           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="udata_8h.html#571aad1e028756dd4181f7066c389027">UDataMemory</a> *&nbsp;</td>
          <td class="paramname"> <em>pData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUDataInfo.html">UDataInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>pInfo</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the information from the data memory header. 
<p>
This allows to get access to the header containing platform data properties etc. which is not part of the data itself and can therefore not be accessed via the pointer that <code><a class="el" href="udata_8h.html#00f7d6c234a8ef64eb6eb5848874a658">udata_getMemory()</a></code> returns.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pData</em>&nbsp;</td><td>pointer to the data memory object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pInfo</em>&nbsp;</td><td>pointer to a <a class="el" href="structUDataInfo.html">UDataInfo</a> object; its <code>size</code> field must be set correctly, typically to <code>sizeof(UDataInfo)</code>.</td></tr>
  </table>
</dl>
<code>*pInfo</code> will be filled with the <a class="el" href="structUDataInfo.html">UDataInfo</a> structure in the data memory object. If this structure is smaller than <code>pInfo-&gt;size</code>, then the <code>size</code> will be adjusted and only part of the structure will be filled. <dl compact><dt><b><a class="el" href="stable.html#_stable000979">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="00f7d6c234a8ef64eb6eb5848874a658"></a><!-- doxytag: member="udata.h::udata_getMemory" ref="00f7d6c234a8ef64eb6eb5848874a658" args="(UDataMemory *pData)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const void* udata_getMemory           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="udata_8h.html#571aad1e028756dd4181f7066c389027">UDataMemory</a> *&nbsp;</td>
          <td class="paramname"> <em>pData</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the pointer to the actual data inside the data memory. 
<p>
The data is read-only. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pData</em>&nbsp;</td><td>The pointer to data memory object </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000978">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="88631c2351f3c5d2bf3b5b083e2ef4d9"></a><!-- doxytag: member="udata.h::udata_open" ref="88631c2351f3c5d2bf3b5b083e2ef4d9" args="(const char *path, const char *type, const char *name, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="udata_8h.html#571aad1e028756dd4181f7066c389027">UDataMemory</a>* udata_open           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Convenience function. 
<p>
This function works the same as <code>udata_openChoice</code> except that any data that matches the type and name is assumed to be acceptable. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>path</em>&nbsp;</td><td>Specifies an absolute path and/or a basename for the finding of the data in the file system. <code>NULL</code> for ICU data. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>A string that specifies the type of data to be loaded. For example, resource bundles are loaded with type "res", conversion tables with type "cnv". This may be <code>NULL</code> or empty. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>A string that specifies the name of the data. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>An ICU UErrorCode parameter. It must not be <code>NULL</code>. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>A pointer (handle) to a data memory object, or <code>NULL</code> if an error occurs. Call <code><a class="el" href="udata_8h.html#00f7d6c234a8ef64eb6eb5848874a658">udata_getMemory()</a></code> to get a pointer to the actual data.</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="udata_8h.html#573131b90cfd0fe8522242298c85505e">udata_openChoice</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000975">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="573131b90cfd0fe8522242298c85505e"></a><!-- doxytag: member="udata.h::udata_openChoice" ref="573131b90cfd0fe8522242298c85505e" args="(const char *path, const char *type, const char *name, UDataMemoryIsAcceptable *isAcceptable, void *context, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="udata_8h.html#571aad1e028756dd4181f7066c389027">UDataMemory</a>* udata_openChoice           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="udata_8h.html#0425ff5a3b38abdda71f34f5526837da">UDataMemoryIsAcceptable</a> *&nbsp;</td>
          <td class="paramname"> <em>isAcceptable</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Data loading function. 
<p>
This function is used to find and load efficiently data for ICU and applications using ICU. It provides an abstract interface that allows to specify a data type and name to find and load the data.<p>
The implementation depends on platform properties and user preferences and may involve loading shared libraries (DLLs), mapping files into memory, or fopen()/fread() files. It may also involve using static memory or database queries etc. Several or all data items may be combined into one entity (DLL, memory-mappable file).<p>
The data is always preceded by a header that includes a <code><a class="el" href="structUDataInfo.html">UDataInfo</a></code> structure. The caller's <code>isAcceptable()</code> function is called to make sure that the data is useful. It may be called several times if it rejects the data and there is more than one location with data matching the type and name.<p>
If <code>path==NULL</code>, then ICU data is loaded. Otherwise, it is separated into a basename and a basename-less directory string. The basename is used as the data package name, and the directory is logically prepended to the ICU data directory string.<p>
For details about ICU data loading see the User Guide Data Management chapter. (<a href="http://icu.sourceforge.net/userguide/icudata.html">http://icu.sourceforge.net/userguide/icudata.html</a>)<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>path</em>&nbsp;</td><td>Specifies an absolute path and/or a basename for the finding of the data in the file system. <code>NULL</code> for ICU data. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>A string that specifies the type of data to be loaded. For example, resource bundles are loaded with type "res", conversion tables with type "cnv". This may be <code>NULL</code> or empty. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>A string that specifies the name of the data. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>isAcceptable</em>&nbsp;</td><td>This function is called to verify that loaded data is useful for the client code. If it returns FALSE for all data items, then <code><a class="el" href="udata_8h.html#573131b90cfd0fe8522242298c85505e">udata_openChoice()</a></code> will return with an error. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>Arbitrary parameter to be passed into isAcceptable. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>An ICU UErrorCode parameter. It must not be <code>NULL</code>. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>A pointer (handle) to a data memory object, or <code>NULL</code> if an error occurs. Call <code><a class="el" href="udata_8h.html#00f7d6c234a8ef64eb6eb5848874a658">udata_getMemory()</a></code> to get a pointer to the actual data. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000976">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="82e8e372e5a63e406885662d26ec2e15"></a><!-- doxytag: member="udata.h::udata_setAppData" ref="82e8e372e5a63e406885662d26ec2e15" args="(const char *packageName, const void *data, UErrorCode *err)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void udata_setAppData           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>packageName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>err</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function bypasses the normal ICU data loading process for application-specific data and allows you to force the it to come out of a user-specified pointer. 
<p>
The format of this data is that of the icu common data file, like 'icudt26l.dat' or the corresponding shared library (DLL) file. The application must read in or otherwise construct an image of the data and then pass the address of it to this function.<p>
Warning: setAppData will set a U_USING_DEFAULT_WARNING code if data with the specifed path that has already been opened, or if setAppData with the same path has already been called. Any such calls to setAppData will have no effect.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>packageName</em>&nbsp;</td><td>the package name by which the application will refer to (open) this data </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>pointer to the data </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>err</em>&nbsp;</td><td>outgoing error status <code>U_USING_DEFAULT_WARNING, U_UNSUPPORTED_ERROR</code> </td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="udata_8h.html#f016e7ff8ee4d37835a2fbdbdbe3822c">udata_setCommonData</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000981">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="f016e7ff8ee4d37835a2fbdbdbe3822c"></a><!-- doxytag: member="udata.h::udata_setCommonData" ref="f016e7ff8ee4d37835a2fbdbdbe3822c" args="(const void *data, UErrorCode *err)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void udata_setCommonData           </td>
          <td>(</td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>err</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function bypasses the normal ICU data loading process and allows you to force ICU's system data to come out of a user-specified area in memory. 
<p>
The format of this data is that of the icu common data file, as is generated by the pkgdata tool with mode=common or mode=dll. You can read in a whole common mode file and pass the address to the start of the data, or (with the appropriate link options) pass in the pointer to the data that has been loaded from a dll by the operating system, as shown in this code:<p>
extern const char U_IMPORT U_ICUDATA_ENTRY_POINT []; // U_ICUDATA_ENTRY_POINT is same as entry point specified to pkgdata tool UErrorCode status = U_ZERO_ERROR;<p>
udata_setCommonData(&amp;U_ICUDATA_ENTRY_POINT, &amp;status);<p>
Warning: ICU must NOT have even attempted to access its data yet when this call is made, or U_USING_DEFAULT_WARNING code will be returned. Be careful of UnicodeStrings in static initialization which may attempt to load a converter (use the <a class="el" href="unistr_8h.html#208008b9efa397bdb219dba614a7555e">UNICODE_STRING(x)</a> macro instead).<p>
Also note that it is important that the declaration be as above. The entry point must not be declared as an extern void*.<p>
This function has no effect on application (non ICU) data. See <a class="el" href="udata_8h.html#82e8e372e5a63e406885662d26ec2e15">udata_setAppData()</a> for similar functionality for application data.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>pointer to ICU common data </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>err</em>&nbsp;</td><td>outgoing error status <code>U_USING_DEFAULT_WARNING, U_UNSUPPORTED_ERROR</code> </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000980">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="a1c5af884d58a1d4802856d903ef8eb6"></a><!-- doxytag: member="udata.h::udata_setFileAccess" ref="a1c5af884d58a1d4802856d903ef8eb6" args="(UDataFileAccess access, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void udata_setFileAccess           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="udata_8h.html#2de18864c069cf39f42c1beb960996a4">UDataFileAccess</a>&nbsp;</td>
          <td class="paramname"> <em>access</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function may be called to control how ICU loads data. 
<p>
It must be called before any ICU data is loaded, including application data loaded with ures/ResourceBundle or udata APIs. It should be called before u_init. This function is not multithread safe. The results of calling it while other threads are loading data are undefined. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>access</em>&nbsp;</td><td>The type of file access to be used </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Error code. </td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="udata_8h.html#2de18864c069cf39f42c1beb960996a4">UDataFileAccess</a> </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000091">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.4 </dd></dl>

</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Tue Dec 13 17:29:52 2011 for ICU 3.6 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>