~ubuntu-branches/ubuntu/oneiric/libupnp4/oneiric-updates

« back to all changes in this revision

Viewing changes to upnp/inc/upnp.h

  • Committer: Bazaar Package Importer
  • Author(s): Nick Leverton
  • Date: 2010-05-14 15:34:11 UTC
  • mfrom: (2.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100514153411-9i238idmkyg7j00y
Tags: 1.8.0~svn20100507-1
* New pull from upstream subversion
* Fixes to BSD build issues (Closes: #573321, FTBFS on Gnu/kFreeBSD)
* More debug tidying (07-neaten-debug.patch):
  - send UPNP_CRITICAL msgs to the info log as well as to the error log.
  - don't print HTTP headers to stdout as they're already in logfile.
* Always compile in logging code but don't log unless requested
  (12-debian-always-debug.patch) to help porting other apps.
* Remove patches 03, 04, 06, 08 and 10, now in upstream (note naming
  difference in upstream's string object accessors).
* Add $PTHREAD_CFLAGS to libupnp.pc as assumed by {acx,ax}_pthread.m4
  (patch 16, Closes: #581608).

Show diffs side-by-side

added added

removed removed

Lines of Context:
685
685
 
686
686
 
687
687
/*!
688
 
 * \brief Initializes the Linux SDK for UPnP Devices.
 
688
 * \brief Initializes the Linux SDK for UPnP Devices (IPv4 only).
689
689
 *
690
690
 * \deprecated Kept for backwards compatibility. Use UpnpInit2 for new
691
 
 * implementations.
 
691
 * implementations or where IPv6 is required.
692
692
 *
693
693
 * This function must be called before any other API function can be called.
694
694
 * It should be called only once. Subsequent calls to this API return a
695
695
 * \c UPNP_E_INIT error code.
696
696
 *
697
 
 * Optionally, the application can specify a host IP address (in the
 
697
 * Optionally, the application can specify a host IPv4 address (in the
698
698
 * case of a multi-homed configuration) and a port number to use for
699
699
 * all UPnP operations.  Since a port number can be used only by one
700
700
 * process, multiple processes using the SDK must specify
701
701
 * different port numbers.
702
702
 *
703
 
 * If unspecified, the SDK will use the first adapter's IP address 
 
703
 * If unspecified, the SDK will use the first IPv4-capable adapter's IP address
704
704
 * and an arbitrary port.
705
705
 *
706
706
 * This call is synchronous.
718
718
 *     \li \c UPNP_E_INTERNAL_ERROR: An internal error ocurred.
719
719
 */
720
720
EXPORT_SPEC int UpnpInit(
721
 
        /*! The host local IP address to use, in string format, for example
722
 
         * "192.168.0.1", or \c NULL to use the first adapter's IP address. */
 
721
        /*! The host local IPv4 address to use, in string format, for example
 
722
         * "192.168.0.1", or \c NULL to use the first IPv4 adapter's IP address. */
723
723
        const char *HostIP,
724
724
        /*! Local Port to listen for incoming connections
725
725
         * \c NULL will pick an arbitrary free port. */
727
727
 
728
728
 
729
729
/*!
730
 
 * \brief Initializes the Linux SDK for UPnP Devices.
 
730
 * \brief Initializes the Linux SDK for UPnP Devices (IPv4 or IPv6).
731
731
 *
732
732
 * This function must be called before any other API function can be called.
733
733
 * It should be called only once. Subsequent calls to this API return a
787
787
 *      \li \c UPNP_E_FINISH: The SDK is already terminated or 
788
788
 *                                 it is not initialized. 
789
789
 */
790
 
EXPORT_SPEC int UpnpFinish();
 
790
EXPORT_SPEC int UpnpFinish(void);
791
791
 
792
792
 
793
793
/*!
801
801
 *              related requests.
802
802
 *      \li On error: 0 is returned if \b UpnpInit has not succeeded.
803
803
 */
804
 
EXPORT_SPEC unsigned short UpnpGetServerPort();
 
804
EXPORT_SPEC unsigned short UpnpGetServerPort(void);
805
805
 
806
806
 
807
807
/*!
815
815
 *              related requests.
816
816
 *      \li On error: 0 is returned if \b UpnpInit has not succeeded.
817
817
 */
818
 
EXPORT_SPEC unsigned short UpnpGetServerPort6();
 
818
EXPORT_SPEC unsigned short UpnpGetServerPort6(void);
819
819
 
820
820
/*!
821
821
 * \brief Returns the local IPv4 listening ip address.
828
828
 *              listening for UPnP related requests.
829
829
 *      \li On error: \c NULL is returned if \b UpnpInit has not succeeded.
830
830
 */
831
 
EXPORT_SPEC char *UpnpGetServerIpAddress();
 
831
EXPORT_SPEC char *UpnpGetServerIpAddress(void);
832
832
 
833
833
 
834
834
/*!
842
842
 *              listening for UPnP related requests.
843
843
 *      \li On error: \c NULL is returned if \b UpnpInit has not succeeded.
844
844
 */
845
 
EXPORT_SPEC char *UpnpGetServerIp6Address();
 
845
EXPORT_SPEC char *UpnpGetServerIp6Address(void);
846
846
 
847
847
 
848
848
/*!
2225
2225
 */  
2226
2226
EXPORT_SPEC int UpnpCancelHttpGet(
2227
2227
        /*! [in] The handle of the connection created by the call to
2228
 
         * \b UpnpOpenHttpPost. */
 
2228
         * \b UpnpOpenHttpGet. */
2229
2229
        void *handle);
2230
2230
 
2231
2231
/*!
2238
2238
 */  
2239
2239
EXPORT_SPEC int UpnpCloseHttpGet(
2240
2240
        /*! [in] The handle of the connection created by the call to
2241
 
         * \b UpnpOpenHttpPost. */
 
2241
         * \b UpnpOpenHttpGet. */
2242
2242
        void *handle);
2243
2243
 
2244
2244
 
2418
2418
                /*! [out] Pointer to a structure to store the information on the file. */
2419
2419
                UpnpFileInfo *info);
2420
2420
 
 
2421
 
2421
2422
/*!
2422
2423
 * \brief Sets the get_info callback function to be used to access a virtual
2423
2424
 * directory.
2563
2564
 *       \li \c TRUE: The webserver is enabled.
2564
2565
 *       \li \c FALSE: The webserver is not enabled
2565
2566
 */
2566
 
EXPORT_SPEC int UpnpIsWebserverEnabled();
 
2567
EXPORT_SPEC int UpnpIsWebserverEnabled(void);
2567
2568
 
2568
2569
 
2569
2570
/*!
2600
2601
/*!
2601
2602
 * \brief Removes all virtual directory mappings.
2602
2603
 */
2603
 
EXPORT_SPEC void UpnpRemoveAllVirtualDirs();
 
2604
EXPORT_SPEC void UpnpRemoveAllVirtualDirs(void);
2604
2605
 
2605
2606
 
2606
2607
/* @} Web Server API */