Download Manual

Transcript
API Reference Manual
result = UPnP_RegisterRootDevice (
&deviceRuntime,
"device.xml",
xmlDevice,
1,
// auto address resolution
testDeviceCallback,
0,
// userData for callback
&rootDevice,
1
// advertise
);
if (result < 0)
{
return (-1);
}
UPnP_DeviceAdvertise(rootDevice, ANNOUNCE_FREQUENCY_SEC,
REMOTE_CACHE_TIMEOUT_SEC);
// start the UPnP daemon thread
UPnP_StartDaemon(&rt);
// for polled mode, use this
//while (1)
//{
//UPnP_ProcessState (&rt,1000);
//printf(".");
//}
}
72