86const std::string
errStr(
const int error) {
88 std::string error_msg =
"UPNPLIB_E_UNKNOWN";
96 return error_msg +
"(" + std::to_string(error) +
")";
103const std::string
errStrEx(
const int error,
const int success) {
105 std::string error_msg =
"UPNPLIB_E_UNKNOWN";
106 std::string success_msg =
"UPNPLIB_E_UNKNOWN";
120 return " # Should be " + success_msg +
"(" + std::to_string(success) +
121 "), but not " + error_msg +
"(" + std::to_string(error) +
").";
Definition of the UPNP_E_* error messages.
#define UPNP_E_SOCKET_CONNECT
The SDK had a problem connecting to a remote host.
#define UPNP_E_OUTOF_HANDLE
The SDK does not have any more space for additional handles.
#define UPNP_E_ALREADY_REGISTERED
A client or a device is already registered.
#define UPNP_E_NOT_FOUND
The response to a SOAP request did not contain the required XML constructs.
#define UPNP_E_SOCKET_ERROR
Generic socket error code for conditions not covered by other error codes.
#define UPNP_E_LISTEN
The SDK had a problem setting the socket to listen for incoming connections.
#define UPNP_E_NETWORK_ERROR
A network error occurred.
#define UPNP_E_SOCKET_BIND
The SDK had a problem binding a socket to a network interface.
#define UPNP_E_INVALID_ARGUMENT
One or more of the parameters passed to a function is invalid.
#define UPNP_E_INVALID_HANDLE
The handle passed to a function is not a recognized as a valid handle.
#define UPNP_E_TIMEDOUT
Too much time elapsed before the required number of bytes were sent or received over a socket.
#define UPNP_E_FILE_READ_ERROR
An error happened while reading a file.
#define UPNP_E_INVALID_INTERFACE
The interface provided to UpnpInit2 is unknown or does not have a valid IPv4 or IPv6 address configur...
#define UPNP_E_BAD_HTTPMSG
The HTTP message contains invalid message headers.
#define UPNP_E_FILE_NOT_FOUND
The filename passed to one of the device registration functions was not found or was not accessible.
#define UPNP_E_SUCCESS
The operation completed successfully.
#define UPNP_E_SUBSCRIBE_UNACCEPTED
A subscription request was rejected from the remote side.
#define UPNP_E_OUTOF_SOCKET
The SDK cannot create any more sockets.
#define UPNP_E_OUTOF_MEMORY
Not enough resources are currently available to complete the operation.
#define UPNP_E_SOCKET_ACCEPT
The SDK had a problem accepting a network connection.
#define UPNP_E_INVALID_URL
An URL passed into the function is invalid.
#define UPNP_E_INVALID_ACTION
The SOAP action message is invalid.
#define UPNP_E_SOCKET_WRITE
An error happened while writing to a socket.
#define UPNP_E_FINISH
UpnpInit2 has not been called, or UpnpFinish has already been called.
#define UPNP_E_INIT_FAILED
UpnpInit2 cannot complete.
#define UPNP_E_UNSUBSCRIBE_UNACCEPTED
An unsubscribe request was rejected from the remote side.
#define UPNP_E_NOTIFY_UNACCEPTED
The remote host did not accept the notify sent from the local device.
#define UPNP_E_CANCELED
The operation was canceled.
#define UPNP_E_SOCKET_READ
An error happened while reading from a socket.
#define UPNP_E_INVALID_SERVICE
The device ID/service ID pair does not refer to a valid service.
#define UPNP_E_INVALID_DESC
The description document passed to UpnpRegisterRootDevice, UpnpRegisterRootDevice2 UpnpRegisterRootDe...
#define UPNP_E_INVALID_PARAM
One or more of the parameters passed to the function is not valid.
#define UPNP_E_URL_TOO_BIG
The URL passed into a function is too long.
#define UPNP_E_INTERNAL_ERROR
Generic error code for internal conditions not covered by other error codes.
#define UPNP_E_BAD_RESPONSE
The response received from the remote side of a connection is not correct for the protocol.
#define UPNP_E_INIT
The SDK has already been initialized.
#define UPNP_E_EXT_NOT_XML
The file name of the description document passed to UpnpRegisterRootDevice2 does not end in "....
Reengineered Object Oriented UPnP+ program code.
UPnPsdk_VIS const std::string errStr(int error)
Get error name string.
UPnPsdk_VIS const std::string errStrEx(const int error, const int success)
Get extended error name string.