Files
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

33 lines
653 B
C++

#ifndef MS_DEP_LIBSRTP_HPP
#define MS_DEP_LIBSRTP_HPP
#include <srtp.h>
#include <vector>
class DepLibSRTP
{
public:
static void ClassInit();
static void ClassDestroy();
static bool IsError(srtp_err_status_t code);
static const char* GetErrorString(srtp_err_status_t code);
private:
static std::vector<const char*> errors;
};
/* Inline static methods. */
inline bool DepLibSRTP::IsError(srtp_err_status_t code)
{
return (code != srtp_err_status_ok);
}
inline const char* DepLibSRTP::GetErrorString(srtp_err_status_t code)
{
// This throws out_of_range if the given index is not in the vector.
return DepLibSRTP::errors.at(code);
}
#endif