ipappsrv_plat/multimedia_comms_api/inc/mcesecuresession.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2007 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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CMCESECURESESSION_H
       
    22 #define CMCESECURESESSION_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32base.h> 
       
    26 #include <e32std.h>  
       
    27 #include <badesca.h>  
       
    28 #include <mcedefs.h>
       
    29 #include <mcemanager.h>
       
    30 #include <mcesession.h>
       
    31 
       
    32 // CONSTANTS
       
    33 const TMceSessionType KMceSessionSecure = 2;
       
    34 
       
    35 enum TMceCryptoContext
       
    36     {
       
    37     // Counter Mode cipher HMAC-SHA1 message authentication, 32-bit authentication tag
       
    38     EAES_CM_128_HMAC_SHA1_32,
       
    39     // Counter Mode cipher HMAC-SHA1 message authentication, 80-bit authentication tag
       
    40     EAES_CM_128_HMAC_SHA1_80,  
       
    41     };
       
    42 
       
    43 // CLASS DECLARATION
       
    44 
       
    45 /**
       
    46 * Base class for secure MCE sessions, inherited by both CMceSecureInSession
       
    47 * and CMceSecureOutSession.
       
    48 *
       
    49 * @lib mceclient.lib
       
    50 */
       
    51 class MMceSecureSession
       
    52 	{
       
    53 public: // Crypto contexts
       
    54 
       
    55 
       
    56 public: // Functions
       
    57 		             
       
    58     /*
       
    59     * Get the supported crypto contexts of the terminal.
       
    60     * @return supported crypto contexts.
       
    61     */	    
       
    62 	virtual const RArray<TMceCryptoContext>& SupportedCryptoContextsL() const = 0;
       
    63 		             
       
    64     /*
       
    65     * Get the used crypto contexts in the session.
       
    66     * @return used crypto contexts.
       
    67     */	    
       
    68 	virtual const RArray<TMceCryptoContext>& CryptoContexts() const = 0;
       
    69 
       
    70     /*
       
    71     * Set the used crypto contexts in the session.
       
    72 	* @pre State() == CMceSession::EIdle ||
       
    73 	*      State() == CMceSession::EIncoming ||
       
    74 	*      State() == CMceSession::EEstablished
       
    75     * @param aArray Array of crypto contexts to be used in session.
       
    76     */	    
       
    77 	virtual void SetCryptoContextsL( const RArray<TMceCryptoContext>& aArray ) = 0;
       
    78 	};
       
    79 
       
    80 #endif