andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef WEBRTC_VOICE_ENGINE_VOE_ENCRYPTION_IMPL_H |
| 12 | #define WEBRTC_VOICE_ENGINE_VOE_ENCRYPTION_IMPL_H |
| 13 | |
| 14 | #include "voe_encryption.h" |
| 15 | |
| 16 | #include "shared_data.h" |
| 17 | |
| 18 | namespace webrtc { |
| 19 | |
| 20 | class VoEEncryptionImpl : public VoEEncryption |
| 21 | { |
| 22 | public: |
| 23 | // SRTP |
| 24 | virtual int EnableSRTPSend( |
| 25 | int channel, |
| 26 | CipherTypes cipherType, |
| 27 | int cipherKeyLength, |
| 28 | AuthenticationTypes authType, |
| 29 | int authKeyLength, |
| 30 | int authTagLength, |
| 31 | SecurityLevels level, |
| 32 | const unsigned char key[kVoiceEngineMaxSrtpKeyLength], |
| 33 | bool useForRTCP = false); |
| 34 | |
| 35 | virtual int DisableSRTPSend(int channel); |
| 36 | |
| 37 | virtual int EnableSRTPReceive( |
| 38 | int channel, |
| 39 | CipherTypes cipherType, |
| 40 | int cipherKeyLength, |
| 41 | AuthenticationTypes authType, |
| 42 | int authKeyLength, |
| 43 | int authTagLength, |
| 44 | SecurityLevels level, |
| 45 | const unsigned char key[kVoiceEngineMaxSrtpKeyLength], |
| 46 | bool useForRTCP = false); |
| 47 | |
| 48 | virtual int DisableSRTPReceive(int channel); |
| 49 | |
| 50 | // External encryption |
| 51 | virtual int RegisterExternalEncryption( |
| 52 | int channel, |
| 53 | Encryption& encryption); |
| 54 | |
| 55 | virtual int DeRegisterExternalEncryption(int channel); |
| 56 | |
| 57 | protected: |
| 58 | VoEEncryptionImpl(voe::SharedData* shared); |
| 59 | virtual ~VoEEncryptionImpl(); |
| 60 | |
| 61 | private: |
| 62 | voe::SharedData* _shared; |
| 63 | }; |
| 64 | |
| 65 | } // namespace webrtc |
| 66 | |
| 67 | #endif // #ifndef WEBRTC_VOICE_ENGINE_VOE_ENCRYPTION_IMPL_H |