18 #ifndef _LIBUPNP_H_X_INCLUDED_ 19 #define _LIBUPNP_H_X_INCLUDED_ 24 #include "upnppexports.hxx" 27 #define LIBUPNPP_VERSION_MAJOR 0 28 #define LIBUPNPP_VERSION_MINOR 21 29 #define LIBUPNPP_VERSION_REVISION 0 30 #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))))) 38 #ifndef UPNP_E_SUCCESS 39 #define UPNP_E_SUCCESS 0 46 #define LIBUPNPP_HAS_UPNPAVCONMAN 1 82 static LibUPnP* getLibUPnP(
bool serveronly =
false, std::string* hwaddr = 0,
83 const std::string ifname = std::string(),
84 const std::string ip = std::string(),
85 unsigned short port = 0);
89 UPNPPINIT_FLAG_NONE = 0,
91 UPNPPINIT_FLAG_NOIPV6 = 1,
93 UPNPPINIT_FLAG_SERVERONLY = 2,
100 UPNPPINIT_OPTION_END = 0,
129 static bool init(
unsigned int flags, ...);
134 std::string hwaddr();
136 static std::string versionString();
140 enum LogLevel {LogLevelNone, LogLevelError, LogLevelInfo, LogLevelDebug,
150 static bool setLogFileName(
151 const std::string& fn,
LogLevel level = LogLevelError);
157 static bool setLogLevel(
LogLevel level);
167 void setMaxContentLength(
int bytes);
173 static int getInitError();
181 static std::string makeDevUUID(
const std::string& name,
182 const std::string& hw);
185 static std::string errAsString(
const std::string& who,
int code);
187 class UPNPP_LOCAL Internal;
Use single IPV4 address.
Definition: upnpplib.hxx:108
Control: product name to set in user-agent strings.
Definition: upnpplib.hxx:116
Control: product version to set in user-agent strings.
Definition: upnpplib.hxx:119
InitOption
Options for the initialisation call.
Definition: upnpplib.hxx:98
LogLevel
libnpupnp (pupnp) logging: this is distinct from libupnpp logging
Definition: upnpplib.hxx:140
Control: subscription timeout in seconds.
Definition: upnpplib.hxx:113
Definition: base64.cxx:26
IP Port to use.
Definition: upnpplib.hxx:111
Our link to libupnp.
Definition: upnpplib.hxx:56
Names of the interfaces to use.
Definition: upnpplib.hxx:105
InitFlags
Configuration flags for the initialisation call.
Definition: upnpplib.hxx:88