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>NWC24SetDlInterval</TITLE>
7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
8<LINK rel="stylesheet" type="text/css" href="../nwc24.css">
9</HEAD>
10<BODY>
11<H1>NWC24SetDlInterval</H1>
12
13<H2>C Specification</H2>
14<DL>
15  <DD><PRE><CODE>
16#define NWC24_DL_INTERVAL_MAX                   (60*24*7)
17#define NWC24_DL_INTERVAL_MIN                   (60*6)
18#define NWC24_DL_INTERVAL_MIN_2ND               (60*24)
19#define NWC24_DL_INTERVAL_DEFAULT               (60*24*2)
20
21#include &lt;revolution/nwc24.h&gt;</CODE></PRE>
22<DD><PRE><CODE><A HREF="../Types/NWC24Err.html">NWC24Err</A> NWC24SetDlInterval( <A HREF="../Types/NWC24DlTask.html">NWC24DlTask</A>* <VAR>taskPublic</VAR>, u16 <VAR>min</VAR> );</CODE></PRE>
23</DL>
24
25<H2>Description</H2>
26<P>
27Sets the update check interval for the download task.
28</P>
29<P>
30In general, the application can set a value in the range of <CODE>NWC24_DL_INTERVAL_MIN</CODE> to <CODE>NWC24_DL_INTERVAL_MAX</CODE>, but there are restrictions based on the number of registered tasks and the priority. For details, see <A href="NWC24SetDlPriority.html"><CODE>NWC24SetDlPriority</CODE></A> and the WiiConnect24 Programming Guidelines.
31</P>
32<P>
33If a value is set that is different from the value that had already been set, the next scheduled download time will also be reset.
34</P>
35<P>
36Note that the check for updates only takes place during this interval.
37</P>
38<P>
39NB: The interval can be made extremely short to confirm operations during development, but do not make the value less than [the number of registered download tasks] times two minutes. No tasks will be run evenly unless you maintain the two-minute minimum required for a single download task. For details, see the <a href="../Scheduler/intro.html">Schedule Description</a>.
40</P>
41
42<H2>Arguments</H2>
43<TABLE border="1" cellpadding="3" cellspacing="0.1" class="argument">
44  <TR>
45<TD class="name"><code><VAR>taskPublic</VAR></code></TD>
46    <TD class="description">
47Pointer to the download task.
48    </TD>
49  </TR>
50  <TR>
51<TD class="name"><code><VAR>min</VAR></code></TD>
52    <TD class="description">
53The startup interval for the download task (in minutes)<BR>Must be set to a value between <CODE>NWC24_DL_INTERVAL_MIN</CODE> and <CODE>NWC24_DL_INTERVAL_MAX</CODE>. If making use of two download tasks, set the interval for the second task to a value of at least <CODE>NWC24_DL_INTERVAL_MIN_2ND</CODE>.
54    </TD>
55  </TR>
56</TABLE>
57
58<h2>Return Values</h2>
59<P>
60<code>NWC24_OK</code>: Ended normally.<BR> <code>NWC24_ERR_LIB_NOT_OPENED</code>: The library has not been opened.<BR> <code>NWC24_ERR_PROTECTED</code>: The download task is write protected.<BR> <code>NWC24_ERR_INVALID_VALUE</code>: The value of <code><VAR>taskPublic</VAR></code> is NULL, the download task is invalid, or the value of <code><VAR>min</VAR></code> exceeds the range that can be set.<BR>
61</P>
62
63<H2>See Also</H2>
64<P>
65<A href="NWC24GetDlInterval.html"><CODE>NWC24GetDlInterval</CODE></A> <A href="NWC24SetDlPriority.html"><CODE>NWC24SetDlPriority</CODE></A>
66</P>
67
68<H2>Revision History</H2>
69<P>
702007/11/26 Noted conditions for shortening the download interval.
71<BR> 2007/10/03 Added an explanation for the definition and range of values for <CODE>NWC24_DL_INTERVAL_MIN_2ND</CODE>. <BR> 2006/12/05 Initial version.</P>
72
73<hr><p>CONFIDENTIAL</p></body>
74</HTML>