rtp/srtpstack/inc/msrtpcryptohandlercontextrtp.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MSRTPCRYPTOHANDLERCONTEXTRTP_H
       
    21 #define MSRTPCRYPTOHANDLERCONTEXTRTP_H
       
    22 
       
    23 #include <e32std.h>
       
    24 #include "msrtpcryptohandlercontext.h"
       
    25 
       
    26 // CLASS DECLARATION
       
    27 /*
       
    28 * A context for stream classes for using RTP-specific crypto handling operations.
       
    29 *
       
    30 *  @lib n/a
       
    31 */
       
    32 class MSRTPCryptoHandlerContextRTP: public MSRTPCryptoHandlerContext
       
    33 	{	
       
    34     public: // New functions  
       
    35         /*
       
    36         * Determines the index i
       
    37         * of an SRTP packet with given sequence number SEQ on sender's side.         
       
    38         * @return void        
       
    39         */
       
    40 	    virtual void CountSenderPacketIndexL() = 0;	    
       
    41 
       
    42         /*
       
    43         * Implements pseudocode on RFC 3711 Appendix A
       
    44         * for determining the index i of an SRTP packet with given sequence number SEQ
       
    45         * and current s_l value in receiver side
       
    46         * @leave KErrNone if success, system-wide error code otherwise
       
    47         * @return void                
       
    48         */
       
    49         virtual void CountReceiverPacketIndexL() = 0;
       
    50         
       
    51         /*
       
    52         * Conditionally update ROC in sender's side:
       
    53         * Each time SEQ wraps MOD 2^16, the sender side must 
       
    54         * increment ROC by one MOD 2^32.
       
    55         * @return void                
       
    56         */
       
    57         virtual void UpdateROC() = 0;
       
    58                 
       
    59         /*
       
    60         * Conditionally update s_l and ROC based on v value. 
       
    61         * See RFC 3711 section 3.3.1 for more information
       
    62         * @leave KErrNone if success, system-wide error code otherwise
       
    63         * @return void                
       
    64         */
       
    65         virtual void Update_s_l_and_RocL() = 0;
       
    66 
       
    67         /*
       
    68         * Assign receiver counter s_l to the value of first sequence number. 
       
    69         * @return void                
       
    70         */
       
    71         virtual void SetReceiver_s_l() = 0;
       
    72         
       
    73 	};
       
    74 #endif  //MSRTPCryptoHandlerContextRTP_H