1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META http-equiv="Content-Style-Type" content="text/css">
6<TITLE>NWC24CheckMsgBoxSpace</TITLE>
7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
8</HEAD>
9<BODY>
10<H1>NWC24CheckMsgBoxSpace</H1>
11
12<H2>Syntax</H2>
13<DL>
14  <DD><PRE><CODE>#include &lt;revolution/nwc24.h&gt;</CODE></PRE>
15  <DD><PRE><CODE><A HREF="../Types/NWC24Err.html">NWC24Err</A> NWC24CheckMsgBoxSpace( <A HREF="../Types/NWC24MsgBoxId.html">NWC24MsgBoxId</A> <EM>mboxId</EM>, u32 <EM>numMsgs</EM>, u32 <EM>size</EM> );</CODE></PRE>
16</DL>
17
18<H2>Description</H2>
19<P>
20Determines in advance whether there is space enough to store the message in the specified message box when creating a message.
21</P>
22<P>
23When attempting to store <code><em><strong>numMsgs</strong></em></code> messages with a total size of <code><em><strong>size</strong></em></code> to the specified message box, the function returns <CODE>NWC24_OK</CODE> if there is enough room to store the messages or <CODE>NWC24_ERR_FULL</CODE> if the messages cannot be stored, either because there are too many messages or their volume is too great.
24</P>
25<P>
26This function can be used to check the available space in the outbox as well as the inbox. (There is no risk of not being able to store messages in the inbox, because older items are deleted to make room.)
27</P>
28<P>
29<STRONG>Note: </STRONG> Whether the main text or attached binary is being measured, the size is calculated in Base64 encoding. In addition, <CODE><A HREF="NWC24CommitMsg.html">NWC24CommitMsg</A></CODE> may succeed even when <CODE>NWC24_ERR_FULL</CODE> is returned because the estimate is slightly larger than the size once it is actually stored in the message box file.
30</P>
31
32<H2>Arguments</H2>
33<TABLE border="1" cellpadding="3" cellspacing="0.1">
34  <TR>
35<TD width="120" bgcolor="#ffffe8"><code><em><strong>mboxId</strong></em></code></TD>
36    <TD width="520">
37Message box type (<CODE>NWC24_SEND_BOX/NWC24_RECV_BOX</CODE>)
38    </TD>
39  </TR>
40  <TR>
41<TD width="120" bgcolor="#ffffe8"><code><em><strong>numMsgs</strong></em></code></TD>
42    <TD width="520">
43Number of messages to be stored.<BR>
44    </TD>
45  </TR>
46  <TR>
47<TD width="120" bgcolor="#ffffe8"><code><em><strong>size</strong></em></code></TD>
48    <TD width="520">
49Total size for the message text and attached binary to be stored.<BR>
50    </TD>
51  </TR>
52</TABLE>
53
54<h2>Return Values</h2>
55<P>
56<code>NWC24_OK</code>: Sufficient free space. <BR><code>NWC24_ERR_FULL</code>: Insufficient free space. <BR><code>NWC24_ERR_LIB_NOT_OPENED</code>: The library has not been opened. <BR><code>NWC24_ERR_INVALID_VALUE</code>: A value other than <CODE>NWC24_SEND_BOX</CODE> or <CODE>NWC24_RECV_BOX</CODE> has been specified in <code><em><strong>mboxId</strong></em></code>. <BR><code>NWC24_ERR_FILE_*</code>: Internal file operation error. <BR><code>NWC24_ERR_INTERNAL_VF</code>: VF error caused by an internal function call. <BR><code>NWC24_ERR_VER_MISMATCH</code>: Message box version error.<BR>
57</P>
58
59<H2>See Also</H2>
60<P>
61    <A HREF="NWC24CommitMsg.html"><code>NWC24CommitMsg</code></A>
62</P>
63
64<H2>Revision History</H2>
65<P>
662008/01/17 Added return values that had been omitted. <BR>2007/11/16 Initial version.<BR>
67</P>
68
69<hr><p>CONFIDENTIAL</p></body>
70</HTML>