multimediacommsengine/mmcesrv/mmceserver/inc/mcenatactions.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     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:   
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CMCENATACTIONS_H
       
    21 #define CMCENATACTIONS_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include "mcedefs.h"
       
    25 
       
    26 class TMceNatStateTransitionEvent;
       
    27 class CMceComSession;
       
    28 class CSdpDocument;
       
    29 
       
    30 const TInt KMceNatNonFatalErrorLimit = -11000;
       
    31 
       
    32 typedef TUint TMceNatOfferedSdp;
       
    33 const TMceNatOfferedSdp KMceNatOfferSdp = 0;
       
    34 const TMceNatOfferedSdp KMceNatPrevOfferSdp = 1;
       
    35 
       
    36 /**
       
    37 *  MCE NAT SIP actions given to a single state.
       
    38 *
       
    39 *  @lib 
       
    40 *  @since
       
    41 */
       
    42 class MMceNatActions
       
    43 	{
       
    44 public: // New functions
       
    45     
       
    46 	/**
       
    47 	* Creates offer.
       
    48 	*/
       
    49     virtual TInt CreateOfferL() = 0;
       
    50     
       
    51 	/**
       
    52 	* Creates answer, and afterwards decodes offer.
       
    53 	*/
       
    54     virtual TInt ResolveL() = 0;
       
    55     
       
    56 	/**
       
    57 	* Decodes answer.
       
    58 	*/
       
    59     virtual TInt DecodeAnswerL() = 0;
       
    60     
       
    61 	/**
       
    62 	* Updates MT/(MO) INVITE to NAT plugin, takes sdp doc from Offer()
       
    63 	*/
       
    64     virtual void UpdateL() = 0;
       
    65     
       
    66     /**
       
    67     * Any existing mcc streams have probably wrong transport addres,
       
    68     * this method is used to update correct address to mcc streams.
       
    69     */
       
    70     virtual void UpdateRemoteAddressL() = 0;
       
    71     
       
    72     /**
       
    73     * Sets flag state which indicates which Sdp document is valid for sending
       
    74     * out to NET. Usually NOT loopback/local address Sdp's !!
       
    75     */
       
    76     virtual void SetOffered( TMceNatOfferedSdp aOffered ) = 0;
       
    77     
       
    78     /**
       
    79     * Replaces current SdpSession pointer with the current Offer.
       
    80     */
       
    81     virtual void SdpCleanup( CSdpDocument* aPrev, CSdpDocument* aRep ) = 0;
       
    82     
       
    83     /**
       
    84     * Called by state machine after NAT processing is completed.
       
    85     */
       
    86     virtual void Continue() = 0;
       
    87     
       
    88 	/**
       
    89 	* State of the state machine is changed via this method.
       
    90 	*/
       
    91     virtual void StateChangedL( TMceNatStateTransitionEvent& aEvent,
       
    92                                 TUint aNewState ) = 0;
       
    93 
       
    94 	/**
       
    95 	* Set Need to receive forces MCE to send provisional response reliably.
       
    96 	* used if resource reservation is needed.
       
    97 	*/
       
    98 	                                
       
    99 	virtual void SetNeedtoReceive() = 0; 
       
   100 	
       
   101 	/**
       
   102 	* Get the Resource Reservation Status, returns the resource reservation status
       
   103 	*/
       
   104 	virtual TInt GetResourceReservationStatus() = 0; 
       
   105 	
       
   106 	
       
   107 	virtual TMceReturnStatus GetReservationStatus() = 0;
       
   108 	
       
   109 	virtual void SetReservationStatus(TMceReturnStatus aStatus) = 0;
       
   110 
       
   111 	/**
       
   112 	* Continue processing NAT updated event, that was delayed because NAT plugin
       
   113 	* had not yet been initialized.
       
   114 	*/
       
   115 	virtual void ResumeNatUpdated() = 0;
       
   116 	};
       
   117 
       
   118 #endif // CMCENATACTIONS_H
       
   119 
       
   120 // End of File