| 1 | /* $Id: upnperrors.h,v 1.8 2025/02/08 23:15:17 nanard Exp $ */ |
| 2 | /* (c) 2007-2025 Thomas Bernard |
| 3 | * All rights reserved. |
| 4 | * MiniUPnP Project. |
| 5 | * http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/ |
| 6 | * This software is subjet to the conditions detailed in the |
| 7 | * provided LICENCE file. */ |
| 8 | #ifndef UPNPERRORS_H_INCLUDED |
| 9 | #define UPNPERRORS_H_INCLUDED |
| 10 | |
| 11 | /*! \file upnperrors.h |
| 12 | * \brief code to string API for errors |
| 13 | */ |
| 14 | #include "miniupnpc_declspec.h" |
| 15 | |
| 16 | #ifdef __cplusplus |
| 17 | extern "C" { |
| 18 | #endif |
| 19 | |
| 20 | /*! |
| 21 | * \brief convert error code to string |
| 22 | * |
| 23 | * Work for both MiniUPnPc specific errors and UPnP standard defined |
| 24 | * errors. |
| 25 | * |
| 26 | * \param[in] err numerical error code |
| 27 | * \return a string description of the error code |
| 28 | * or NULL for undefinded errors |
| 29 | */ |
| 30 | MINIUPNP_LIBSPEC const char * strupnperror(int err); |
| 31 | |
| 32 | #ifdef __cplusplus |
| 33 | } |
| 34 | #endif |
| 35 | |
| 36 | #endif |
| 37 | |