UPnP Design by Example: A Software Developer's Guide to Universal Plug and Play

Part VI: The Appendixes

Appendix List

Appendix A: UPnP API Quick Reference
Appendix B: References

The following table summarizes the most used functions introduced in this book, including a short description of the function and the most commonly encountered error codes. This table is also included as a PDF file on the CD-ROM for easy printing for posting on the wall or other convenient location while you code.

Function

Description

Error Codes

Chapter 12: Adding Device Discovery

int UpnpInit ( IN const char *HostIP, IN unsigned short DestPort)

Initializes and binds the UPnP stack to the specified HostIP and Port. Must be called before any other functions.

UPNP_E_SUCCESS UPNP_ E_INIT

int UpnpSetWebServer
RootDir
( IN const char *WebDir);

Initializes web server to serve files from the specified location

UPNP_E_SUCCESS UPNP_E_ INVALID_ARGUMENT

int UpnpRegisterRootDevice( IN const char *DescUrl, IN Upnp_FunPtr Callback, IN const void *Cookie, OUT UpnpDevice_Handle *Hnd);

Given an XML device description document, a callback function pointer, and a user provided cookie, registers the specified root device with the UPnP stack, returning a device handle.

UPNP_E_SUCCESS UPNP_E_ INVALID_DESC

int UpnpSendAdvertisement( IN UpnpDevice_Handle Hnd, IN int Exp);

Sends advertisements for the specified device, with a periodic interval of seconds specified by Exp.

UPNP_E_SUCCESS UPNP_E_ INVALID_HANDLE

int UpnpUnRegisterRoot
Device (IN UpnpDevice_Handle Hnd);

Unregisters and cleans up resources used by the specified device, sending bye-bye announcements for the device.

UPNP_E_SUCCESS UPNP_E_ INVALID_HANDLE

int UpnpFinish( );

Performs the reverse of UpnpInit, and cleans up any library-allocated resources and...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Piezoelectric Actuators
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.