Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 85dff41758625c26d7c6097135c8f737 > files > 29

cone-doc-0.78-3.fc12.x86_64.rpm

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  
  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"/>

  <title>mail::ACCOUNT::openFolder</title>
  <link rel="stylesheet" href="manpage.css" type="text/css"/>
  
  <link rel="start" href="index.html" title="Cone: COnsole Newsreader And Emailer"/>
  <link rel="up" href="synchronous.html" title="mail::ACCOUNT Synchronous API reference"/>
  <link rel="prev" href="account-movemessagesto.html" title="mail::ACCOUNT::moveMessagesTo"/>
  <link rel="next" href="account-readfolderinfo.html" title="mail::ACCOUNT::readFolderInfo"/>
  <link xmlns="" rel="icon" href="icon.gif" type="image/gif"/>
  <meta xmlns="" name="MSSmartTagsPreventParsing" content="TRUE"/>
  <!--

Copyright 2002 - 2007 Double Precision, Inc.  See COPYING for distribution
information.

-->
</head>

<body>
  <div class="navheader">
    <table width="100%" summary="Navigation header">
      <tr>
        <th colspan="3" align="center" rowspan="1">
        mail::ACCOUNT::openFolder</th>
      </tr>

      <tr>
        <td width="20%" align="left" rowspan="1" colspan="1">
        <a accesskey="p" href="account-movemessagesto.html" shape="rect">Prev</a>&#160;</td>

        <th width="60%" align="center" rowspan="1" colspan="1">
        <span class="structname">mail::ACCOUNT</span> Synchronous
        API reference</th>

        <td width="20%" align="right" rowspan="1" colspan="1">
        &#160;<a accesskey="n" href="account-readfolderinfo.html" shape="rect">Next</a></td>
      </tr>
    </table>
    <hr/>
  </div>

  <div class="refentry" lang="en" xml:lang="en">
    <a id="account-openfolder" shape="rect" name="account-openfolder"> </a>

    <div class="titlepage"/>

    <div class="refnamediv">
      <h2>Name</h2>

      <p>mail::ACCOUNT::openFolder &#8212; Open a folder</p>
    </div>

    <div class="refsynopsisdiv">
      <h2>Synopsis</h2>

      <div class="literallayout">
        <p><br clear="none"/>
        <br clear="none"/>
        <br clear="none"/>
        <br clear="none"/>
        #include&#160;&lt;libmail/sync.H&gt;<br clear="none"/>
        <br clear="none"/>
        mail::ACCOUNT&#160;*mail;<br clear="none"/></p>
      </div>

      <div class="funcsynopsis">
        <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
          <tr>
            <td rowspan="1" colspan="1"><code class="funcdef">bool
            ok=mail-&gt;<b class="fsfunc">openFolder</b>(</code></td>

            <td rowspan="1" colspan="1">const mail::folder
            *&#160;</td>

            <td rowspan="1" colspan="1"><var class="pdparam">folder</var><code>)</code>;</td>
          </tr>
        </table>
      </div>

      <div class="literallayout">
        <p><br clear="none"/>
        std::string&#160;errmsg=mail-&gt;getErrmsg();<br clear="none"/></p>
      </div>
    </div>

    <div class="refsect1" lang="en" xml:lang="en">
      <a id="id570396" shape="rect" name="id570396"> </a>

      <h2>USAGE</h2>

      <p>A mail folder must be formally "opened" before the
      messages in the folder may be accessed. Each mail account can
      have only one mail folder at any time Opening another folder
      automatically "closes" the previous folder.</p>

      <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
        <h3 class="title">Note</h3>

        <p>Different <span class="structname">mail::account</span>
        or <span class="structname">mail::ACCOUNT</span> objects
        may each have a folder opened, at the same time. It is
        possible to create multiple <span class="structname">mail::account</span> or <span class="structname">mail::ACCOUNT</span> objects that refer to the
        same actual mail account. Whether it is possible to access
        the same account multiple times, using different objects,
        and whether each object may have the same folder opened
        depends on the account type and/or the remote server.</p>

        <div class="itemizedlist">
          <ul type="disc">
            <li>
              <p>Whether it's possible to open the same remote IMAP
              or POP3 account more than once depends on the remote
              IMAP/POP3 server.</p>
            </li>

            <li>
              <p>Whether it's possible to open the same folder on a
              remote IMAP server account more than once depends on
              the remote IMAP/POP3 server. Most IMAP servers allow
              the same account to be opened more than once, as long
              as the different login sessions do not try to open
              the same folder. Some IMAP servers allow the same
              folder to be opened simultaneously by multiple
              sessions.</p>
            </li>

            <li>
              <p>It is generally possible to open the same local
              mail folder simultaneously, via multiple <span class="structname">mail::account</span> objects, as long as
              only one pending request is issued at a time.
              Concurrent access to local maildirs generally works
              well, however simultaneous access to the same mbox
              folder may be rather slow, due to the overhead of
              locking and rescanning of the folder by each
              <span class="structname">mail::account</span>
              object.</p>
            </li>
          </ul>
        </div>
      </div>

      <p>Any previously-opened folder is closed before the an
      attempt to open this folder is made. If the new folder cannot
      be opened, the previous folder is still considered
      closed.</p>
    </div>

    <div class="refsect1" lang="en" xml:lang="en">
      <a id="id570744" shape="rect" name="id570744"> </a>

      <h2>RETURN CODES AND CALLBACKS</h2>

      <p>This method returns <code class="literal">true</code> if
      it succeeds, or <code class="literal">false</code> if it
      fails. If the method fails, use <em class="structfield"><code>mail::ACCOUNT::getErrmsg()</code></em> to
      read a brief description of the error.</p>
    </div>

    <div class="refsect1" lang="en" xml:lang="en">
      <a id="id570486" shape="rect" name="id570486"> </a>

      <h2>SEE ALSO</h2>

      <p><a class="link" href="account-gettoplevelfolders.html" title="mail::ACCOUNT::getTopLevelFolders" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::ACCOUNT::getTopLevelFolders</span>(3x)</span></a>,
      <a class="link" href="account-readfolderinfo.html" title="mail::ACCOUNT::readFolderInfo" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::ACCOUNT::readFolderInfo</span>(3x)</span></a>.</p>
    </div>
  </div>

  <div class="navfooter">
    <hr/>

    <table width="100%" summary="Navigation footer">
      <tr>
        <td width="40%" align="left" rowspan="1" colspan="1">
        <a accesskey="p" href="account-movemessagesto.html" shape="rect">Prev</a>&#160;</td>

        <td width="20%" align="center" rowspan="1" colspan="1">
        <a accesskey="u" href="synchronous.html" shape="rect">Up</a></td>

        <td width="40%" align="right" rowspan="1" colspan="1">
        &#160;<a accesskey="n" href="account-readfolderinfo.html" shape="rect">Next</a></td>
      </tr>

      <tr>
        <td width="40%" align="left" valign="top" rowspan="1" colspan="1">mail::ACCOUNT::moveMessagesTo&#160;</td>

        <td width="20%" align="center" rowspan="1" colspan="1">
        <a accesskey="h" href="index.html" shape="rect">Home</a>&#160;|&#160;<a accesskey="t" href="bk01-toc.html" shape="rect">ToC</a></td>

        <td width="40%" align="right" valign="top" rowspan="1" colspan="1">&#160;mail::ACCOUNT::readFolderInfo</td>
      </tr>
    </table>
  </div>
</body>
</html>