18#ifndef _LIBUPNP_H_X_INCLUDED_
19#define _LIBUPNP_H_X_INCLUDED_
24#include "upnppexports.hxx"
27#define LIBUPNPP_VERSION_MAJOR 1
28#define LIBUPNPP_VERSION_MINOR 0
29#define LIBUPNPP_VERSION_REVISION 3
31#define LIBUPNPP_AT_LEAST(A,B,C) \
32 (LIBUPNPP_VERSION_MAJOR > (A) || \
33 (LIBUPNPP_VERSION_MAJOR == (A) && \
34 (LIBUPNPP_VERSION_MINOR > (B) || \
35 (LIBUPNPP_VERSION_MINOR == (B) && LIBUPNPP_VERSION_REVISION >= (C)))))
39#define UPNP_E_SUCCESS 0
46#define LIBUPNPP_HAS_UPNPAVCONMAN 1
65 UPNPPINIT_FLAG_NONE = 0,
67 UPNPPINIT_FLAG_NOIPV6 = 0x1,
69 UPNPPINIT_FLAG_SERVERONLY = 0x2,
77 UPNPPINIT_FLAG_RESANITIZE_URLS = 0x4,
84 UPNPPINIT_OPTION_END = 0,
124 static bool init(
unsigned int flags, ...);
148 static LibUPnP* getLibUPnP(
bool serveronly =
false, std::string* hwaddr = 0,
149 const std::string ifname = std::string(),
150 const std::string ip = std::string(),
151 unsigned short port = 0);
158 std::string hwaddr();
166 bool setWebServerDocumentRoot(
const std::string& rootpath);
175 void setMaxContentLength(
int bytes);
181 static std::string versionString();
185 enum LogLevel {LogLevelNone, LogLevelError, LogLevelInfo, LogLevelDebug, LogLevelAll};
194 static bool setLogFileName(
const std::string& fn, LogLevel level = LogLevelError);
200 static bool setLogLevel(LogLevel level);
203 static int getInitError();
211 static std::string makeDevUUID(
const std::string& name,
const std::string& hw);
214 static std::string errAsString(
const std::string& who,
int code);
216 class UPNPP_LOCAL Internal;
Our link to libupnp.
Definition upnpplib.hxx:56
InitOption
Options for the initialisation call.
Definition upnpplib.hxx:82
@ UPNPPINIT_OPTION_IPV4
Use single IPV4 address.
Definition upnpplib.hxx:93
@ UPNPPINIT_OPTION_SUBSOPS_TIMEOUTMS
Control: HTTP timeout for subscription/unsubscriptions connections to the device.
Definition upnpplib.hxx:107
@ UPNPPINIT_OPTION_CLIENT_PRODUCT
Control: product name to set in user-agent strings.
Definition upnpplib.hxx:100
@ UPNPPINIT_OPTION_SUBSCRIPTION_TIMEOUT
Control: subscription timeout in seconds.
Definition upnpplib.hxx:97
@ UPNPPINIT_OPTION_IFNAMES
Names of the interfaces to use.
Definition upnpplib.hxx:89
@ UPNPPINIT_OPTION_PORT
IP Port to use.
Definition upnpplib.hxx:95
@ UPNPPINIT_OPTION_CLIENT_VERSION
Control: product version to set in user-agent strings.
Definition upnpplib.hxx:103
@ UPNPPINIT_OPTION_RESANITIZED_CHARS
Control: characters that we should further url-escape when found in URLs out of a content directory.
Definition upnpplib.hxx:111
@ UPNPPINIT_OPTION_BOOTID
Device: UPnP 1.1 BOOTINIT.UPNP.ORG value.
Definition upnpplib.hxx:114
LogLevel
libnpupnp (pupnp) logging: this is distinct from libupnpp logging
Definition upnpplib.hxx:185
InitFlags
Configuration flags for the initialisation call.
Definition upnpplib.hxx:64
Deal with data for the SOAP action protocol.
Definition base64.cxx:26