|
a/libupnpp/upnpplib.hxx |
|
b/libupnpp/upnpplib.hxx |
|
... |
|
... |
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
16 |
*/
|
16 |
*/
|
17 |
#ifndef _LIBUPNP_H_X_INCLUDED_
|
17 |
#ifndef _LIBUPNP_H_X_INCLUDED_
|
18 |
#define _LIBUPNP_H_X_INCLUDED_
|
18 |
#define _LIBUPNP_H_X_INCLUDED_
|
19 |
|
19 |
|
20 |
#include <string>
|
20 |
#include <upnp/upnp.h> // for Upnp_EventType, Upnp_FunPtr, etc
|
21 |
#include <map>
|
|
|
22 |
|
21 |
|
23 |
#include <upnp/upnp.h>
|
22 |
#include <map> // for map
|
24 |
#include <upnp/upnptools.h>
|
23 |
#include <string> // for string
|
25 |
|
24 |
|
26 |
#include "ptmutex.hxx"
|
25 |
#include "ptmutex.hxx" // for PTMutexInit
|
27 |
|
26 |
|
28 |
namespace UPnPP {
|
27 |
namespace UPnPP {
|
29 |
|
28 |
|
30 |
/** Our link to libupnp. Initialize and keep the handle around */
|
29 |
/** Our link to libupnp. Initialize and keep the handle around */
|
31 |
class LibUPnP {
|
30 |
class LibUPnP {
|
|
... |
|
... |
47 |
* @param ip if not empty, IP address to use. Only used if ifname is empty.
|
46 |
* @param ip if not empty, IP address to use. Only used if ifname is empty.
|
48 |
* @param port port parameter to UpnpInit() (0 for default).
|
47 |
* @param port port parameter to UpnpInit() (0 for default).
|
49 |
* @return 0 for failure.
|
48 |
* @return 0 for failure.
|
50 |
*/
|
49 |
*/
|
51 |
static LibUPnP* getLibUPnP(bool serveronly = false, std::string* hwaddr = 0,
|
50 |
static LibUPnP* getLibUPnP(bool serveronly = false, std::string* hwaddr = 0,
|
52 |
const std::string ifname = string(),
|
51 |
const std::string ifname = std::string(),
|
53 |
const std::string ip = string(),
|
52 |
const std::string ip = std::string(),
|
54 |
unsigned short port = 0);
|
53 |
unsigned short port = 0);
|
55 |
|
54 |
|
56 |
/** Set libupnp log file name and activate logging.
|
55 |
/** Set libupnp log file name and activate logging.
|
57 |
*
|
56 |
*
|
58 |
* @param fn file name to use. Use empty string to turn logging off
|
57 |
* @param fn file name to use. Use empty string to turn logging off
|