sipvoipprovider/inc/svpmtsession.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 2006-2008 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:  Representation of SVP MT session
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef SVPMTSESSION_H
       
    20 #define SVPMTSESSION_H
       
    21 
       
    22 #include <mccpcall.h>
       
    23 #include "svpsessionbase.h"
       
    24 #include "svputdefs.h"
       
    25 
       
    26 /**
       
    27  *  Class which acts as SVP MT session.
       
    28  *  Contains all the SVP MT session specific methods.
       
    29  *
       
    30  *  @lib svp.dll
       
    31  *  @since S60 3.2
       
    32  */
       
    33 class CSVPMtSession : public CSVPSessionBase              
       
    34     {
       
    35 
       
    36 public:
       
    37     
       
    38     /**
       
    39     * Two-phased constructor.
       
    40     */
       
    41     static CSVPMtSession* NewL( CMceInSession* aMtSession,
       
    42                                 TMceTransactionDataContainer& aContainer,
       
    43                                 TUint32 aServiceId,
       
    44                                 TUint32 aVoIPProfileId,
       
    45                                 MSVPSessionObserver& aObserver,
       
    46                                 CSVPUtility& aSVPUtility,
       
    47                                 CSVPRtpObserver& aRtpObserver,
       
    48                                 TInt aKeepAliveValue,
       
    49                                 TBool aPreconditions );
       
    50     
       
    51     /**
       
    52     * Destructor.
       
    53     */
       
    54     virtual ~CSVPMtSession();
       
    55     
       
    56 
       
    57 public: // from base classes: MCCPCall
       
    58 
       
    59     /**
       
    60     * Answers to an incoming session.
       
    61     * @since Series60 3.2
       
    62     * @return KErrNone if successful or system wide error code
       
    63     */
       
    64     TInt Answer();
       
    65         
       
    66     /**
       
    67     * Rejects an incoming call.
       
    68     * @since Series 60 3.2
       
    69     * @return KErrNone if successful or system wide error code
       
    70     */
       
    71     TInt Reject();
       
    72 
       
    73     /**
       
    74     * Reguests to queue the call. 
       
    75     * @since S60 3.2
       
    76     * @return KErrNone if successful or system wide error code
       
    77     */
       
    78     TInt Queue();
       
    79 
       
    80     /**
       
    81     * Send 180 Ringing
       
    82     * @since S60 3.2
       
    83     * @return KErrNone if successful or system wide error code
       
    84     */
       
    85     TInt Ringing();
       
    86 
       
    87     /**
       
    88     * From MCCPMtSession. Return boolean value, is incoming session forwarded or not.
       
    89     * @since Series60 3.2
       
    90     * @return ETrue if session is forwarded, else EFalse
       
    91     */
       
    92     TBool IsCallForwarded() const;
       
    93      
       
    94     /**
       
    95     * Returns boolean value, is the session mobile originated.
       
    96     * @since Series60 3.2
       
    97     * @return TBool ETrue if session is mobile originated, otherwise EFalse
       
    98     */
       
    99     TBool IsMobileOriginated() const;
       
   100     
       
   101     /** 
       
   102     * Calls sessions destructor
       
   103     * @since Series60 3.2
       
   104     * @return KErrNone if successful or system wide error code
       
   105     */
       
   106     TInt Release();
       
   107 
       
   108     /**
       
   109     * Puts the specified session on hold.
       
   110     * @since Series60 3.2
       
   111     * @return KErrNone if successful or system wide error code
       
   112     */
       
   113     TInt Hold();
       
   114 
       
   115     /**
       
   116     * Resumes the session.
       
   117     * @since Series60 3.2
       
   118     * @return KErrNone if successful or system wide error code
       
   119     */
       
   120     TInt Resume();
       
   121      
       
   122     /**
       
   123     * Handles remote action after session is established.
       
   124     * @since Series60 3.2
       
   125     * @param None
       
   126     * @return
       
   127     */
       
   128     TInt IncomingRequest( CMceInSession* aUpdatedSession );
       
   129     
       
   130 private: // new methods
       
   131 
       
   132     /**
       
   133     * Handles sink/source enabling for Mt streams
       
   134     * @since Series 60 3.2
       
   135     * @param aStreams array of streams in Mt session
       
   136     */
       
   137     void HandleMtStreamsL( const RPointerArray< CMceMediaStream >& aStreams );
       
   138     
       
   139     /**
       
   140      * Worker functio to answer an incoming session.
       
   141      * @since Series60 3.2
       
   142      * @return void
       
   143      */
       
   144     void DoAnswerL();
       
   145     
       
   146 // From CSVPSessionBase
       
   147 
       
   148     /**
       
   149      * Sets RTP keep-alive timer value and payload
       
   150      * @since Series 60 3.2
       
   151      * @param aSession MCE session
       
   152      * @param aSessionUpdateOngoing Flag determines whether session udpate is needed
       
   153      * @return void
       
   154      */
       
   155     void SetRtpKeepAliveL( CMceSession* aSession, 
       
   156                            TBool aSessionUpdateOngoing );
       
   157     
       
   158 private:
       
   159 
       
   160     /**
       
   161     * C++ default constructor.
       
   162     */
       
   163     CSVPMtSession( CMceInSession* aMtSession,
       
   164                    TMceTransactionDataContainer& aContainer,
       
   165                    TUint32 aVoIPProfileId,
       
   166                    MSVPSessionObserver& aObserver,
       
   167                    CSVPUtility& aSVPUtility,
       
   168                    CSVPRtpObserver& aRtpObserver,
       
   169                    TInt aKeepAliveValue,
       
   170                    TBool aPreconditions );
       
   171     
       
   172     /**
       
   173      * Symbian 2nd phase construction
       
   174      */
       
   175     void ConstructL( TUint32 aServiceId );
       
   176 
       
   177 private:
       
   178 
       
   179     // For testing
       
   180     SVP_UT_DEFS
       
   181     
       
   182     };
       
   183 
       
   184 #endif // SVPMTSESSION_H