diff options
Diffstat (limited to 'src/srtp.h')
-rw-r--r-- | src/srtp.h | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -30,25 +30,36 @@ #include <string> +#include "lrtp.h" #include "rtp.h" +#include "compat.h" #define MAX_KEY_LEN 64 #define MASTER_KEY_LEN 30 class SRTP { public: - SRTP(std::string key, unsigned int ssrc); + SRTP(std::string key, unsigned int ssrc) _throw(enum lrtp_status_t); ~SRTP(); - int encrypt(char *packet, size_t size); - int decrypt(char *packet, size_t size); + int encrypt(char *packet, size_t size) _throw(enum lrtp_status_t); + int decrypt(char *packet, size_t size) _throw(enum lrtp_status_t); private: + class SRTPInstance { + public: + SRTPInstance() _throw(enum lrtp_status_t); + ~SRTPInstance() _throw(enum lrtp_status_t); + }; + + SRTPInstance instance; + struct prv; struct prv *prv; - void setupKey(const std::string &key); - void setupPolicy(bool confidentiality, bool authentication); + void setupKey(const std::string &key) _throw(enum lrtp_status_t); + void setupPolicy(bool confidentiality, bool authentication) + _throw(enum lrtp_status_t); }; #endif/*__LRTP_SRTP_H__*/ |