phonesrv_plat/converged_call_engine_api/inc/ccce.h
changeset 0 ff3b6d0fd310
child 18 594d59766373
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Main interface class 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CCCE_H
       
    20 #define CCCE_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 #include "mccecall.h"
       
    25 #include "ccpdefs.h"
       
    26 
       
    27 class MCCEObserver;
       
    28 class MCCESsObserver;
       
    29 
       
    30 class MCCECallObserver;
       
    31 
       
    32 class MCCEConferenceCall;
       
    33 class MCCEConferenceCallObserver;
       
    34 
       
    35 class MCCEDtmfInterface;
       
    36 class MCCEDtmfObserver;
       
    37 
       
    38 class MCCEExtensionInterface;
       
    39 class MCCEExtensionObserver;
       
    40 
       
    41 class CCCEEmergencyCall;
       
    42 class CCCEPluginManager;
       
    43 class CCCECallContainer;
       
    44 class CCCETransferController;
       
    45 
       
    46 class CCCEObserverAsynchroniser;
       
    47 
       
    48 /** Hold fail errorcode */
       
    49 const TInt KCCEErrHoldFail = -37123;
       
    50 
       
    51 /** Max number of call objects */
       
    52 const TInt KCCECallObjects = 8;
       
    53 
       
    54 // Max number of active calls
       
    55 const TInt KCCEMaxNumberOfCalls = 3;   // = 1 active, 1 onhold, 1 waiting
       
    56 
       
    57 // defined in RMmCustomAPI.h, check if already defined 
       
    58 #ifndef RMMCUSTOMAPI_H 
       
    59 /** defenition for OG, most likely will be deprecated later on */
       
    60 ///_LIT(KTerminateAllCalls,"ALL_CALLS");
       
    61 #include <RMmCustomAPI.h> // Add reference there, cs classes need that too
       
    62 #endif
       
    63 
       
    64 /**
       
    65  *  Converged Call Engine
       
    66  *
       
    67  *  The purpose of the Converged Call Engine (CCE) subsystem 
       
    68  *  is to map the call management requests between the Phone 
       
    69  *  Engine and Call Provider plug-ins, which can implement 
       
    70  *  the requests using some specific signaling protocol, such
       
    71  *  as SIP.
       
    72  *
       
    73  *  @lib cce.dll
       
    74  *  @since S60 v3.2
       
    75  */
       
    76 class CCCE :  public CBase
       
    77     {
       
    78 public:
       
    79     /**
       
    80     * Creates an instance of the CCCE component.
       
    81     * @param none     
       
    82     * @return new CCCE object pointer 
       
    83     * @leave If creating fails system error code
       
    84     * @since S60 3.2
       
    85     */
       
    86     IMPORT_C static CCCE* NewL();
       
    87 
       
    88     /**
       
    89     * Creates an instance of the CCCE component.
       
    90     * @param none     
       
    91     * @return new CCCE object pointer 
       
    92     * @leave If creating fails system error code
       
    93     * @since S60 3.2
       
    94     */
       
    95     IMPORT_C static CCCE* NewLC();
       
    96 
       
    97     /**
       
    98     * Creates an instance of the CCCE component.
       
    99     * @param aObserver Reference to CCCE observer
       
   100     * @return new CCCE object pointer 
       
   101     * @leave If creating fails system error code
       
   102     * @since S60 3.2
       
   103     */
       
   104     IMPORT_C static CCCE* NewL( MCCEObserver& aObserver );
       
   105 
       
   106     /**
       
   107     * Creates an instance of the CCCE component.
       
   108     * @param aObserver Reference to CCCE observer
       
   109     * @return new CCCE object pointer 
       
   110     * @leave If creating fails system error code
       
   111     * @since S60 3.2
       
   112     */
       
   113     IMPORT_C static CCCE* NewLC( MCCEObserver& aObserver );
       
   114 
       
   115 
       
   116     /**
       
   117     * Destructor
       
   118     *
       
   119     * @since S60 3.2
       
   120     */
       
   121     virtual ~CCCE();
       
   122 
       
   123 public:
       
   124     /**
       
   125     * Sets observer for CCCE. Repleaces any existing observer set.
       
   126     * Called right after creating CCCE object.
       
   127     * @since S60 3.2
       
   128     * @param aObserver Reference to CCCE observer
       
   129     * @param aSsObserver Reference to supplementary services observer.
       
   130     * @return none
       
   131     */
       
   132     IMPORT_C void SetObserver( MCCEObserver& aObserver,
       
   133     						   MCCESsObserver& aSsObserver );
       
   134 
       
   135     /**
       
   136     * Opens new call. 
       
   137     *
       
   138     * @since S60 3.2
       
   139     * @param aAddress Address / number to call
       
   140     * @param aCallParameters Call parameter struct containing call information 
       
   141     * such as Service-Id, call typeand  line type.
       
   142     * @param aCallObserver Observer for the created call.
       
   143     * @return On return contains the reference to the MCCECall
       
   144     * @pre Initialize has been called and observer has been set
       
   145     * @leave KErrAlreadyExists - call already exists 
       
   146     * @leave KErrNotReady - temporarily not able to create the requested call.
       
   147     * @leave KErrNoMemory - memory error
       
   148     * @leave KErrNotSupported - call not supported
       
   149     * @leave KErrArgument - illegal recipient address or service id
       
   150     * @leave Other general system error
       
   151     */
       
   152     IMPORT_C MCCECall& OpenNewCallL( const TDesC& aAddress,
       
   153                                      const CCCECallParameters& aCallParameters,
       
   154                                      const MCCECallObserver& aCallObserver );
       
   155 
       
   156     /**
       
   157     * Opens and initializes the emergency call session. Emergency call instance is created  
       
   158     * when creating CCCE instance.
       
   159     *
       
   160     * @since S60 3.2
       
   161     * @param aCallObserver Observer handle.
       
   162     * @return On return contains the reference to the MCCECall interface
       
   163     * @pre Initialize has been called and observer has been set
       
   164     */
       
   165     IMPORT_C MCCECall& InitializeEmergencyCall( const MCCECallObserver& aCallObserver );
       
   166 
       
   167     /**
       
   168     * Retrieves the current airtime duration of the calls
       
   169     *
       
   170     * @since S60 3.2
       
   171     * @param aCSDuration Airtime duration of all CS calls.
       
   172     * @param aPSDuration Airtime duration of the PS calls.
       
   173     * @return none
       
   174     */
       
   175     IMPORT_C void GetAirTimeDuration( TTimeIntervalSeconds& aCSDuration, 
       
   176                                       TTimeIntervalSeconds& aPSDuration  );
       
   177 
       
   178     /**
       
   179     * Terminates all the existing calls on the phone. 
       
   180     * Results are returned via each call observer.
       
   181     *
       
   182     * @since S60 3.2
       
   183     * @return none
       
   184     */
       
   185     IMPORT_C void TerminateAllCalls();
       
   186     
       
   187     /**
       
   188     * Terminates all the existing but calls in Ringing or Queued state.
       
   189     * Results are returned via each call observer.
       
   190     * @since S60 3.2
       
   191     * @return none
       
   192     */
       
   193     IMPORT_C void TerminateAllButRingingAndQueuedCalls();
       
   194     
       
   195     /**
       
   196     * Terminates a call synchronously. For OG PE.
       
   197     * To be deprecated later on.
       
   198     * NOT SUPPORTED at the moment
       
   199     * @since S60 3.2
       
   200     * @param aCallName call name
       
   201     * @return Error value
       
   202     */
       
   203     IMPORT_C TInt TerminateCall( TName& aCallName );
       
   204 
       
   205     /** Terminates a call synchronously. For OG PE.
       
   206     * To be deprecated later on.
       
   207     * NOT SUPPORTED at the moment, changed to TInt -> TRequestStatus is removed
       
   208     * @since S60 3.2
       
   209     * @param aState Request State
       
   210     * @param aCallName call name
       
   211     * @return none
       
   212     */
       
   213     IMPORT_C void TerminateCall( TInt& aState,
       
   214                                  TName& aCallName );
       
   215 
       
   216     /**
       
   217     * Gets conference call interface.
       
   218     *
       
   219     * @since S60 3.2
       
   220     * @param aObserver  Reference to observer interface implementation
       
   221     * @leave KErrNotReady temporarily cannot create the call.  
       
   222     * @leave System wide error code if unsuccesful
       
   223     */
       
   224     IMPORT_C MCCEConferenceCall& ConferenceCallL( const MCCEConferenceCallObserver& aObserver );
       
   225 
       
   226     /**
       
   227     * Gets interface for Dtmf handling
       
   228     *
       
   229     * @since S60 3.2
       
   230     * @param aObserver Reference to observer interface
       
   231     * @return On return contains reference to conference call
       
   232     * @leave KErrNotReady temporarily cannot return the interface. 
       
   233     * @leave System wide error code if unsuccesful
       
   234     */
       
   235     IMPORT_C MCCEDtmfInterface& DtmfInterfaceL( const MCCEDtmfObserver& aObserver );
       
   236 
       
   237 
       
   238     /**
       
   239     * Gets extension interface
       
   240     *
       
   241     * @since S60 3.2
       
   242     * @param aObserver Reference to observer interface
       
   243     * @return On return contains reference to extension interface
       
   244     * @leave KErrNotReady temporarily cannot return the interface.  
       
   245     * @leave System wide error code if unsuccesful
       
   246     */
       
   247    IMPORT_C MCCEExtensionInterface& ExtensionInterfaceL( const MCCEExtensionObserver& aObserver );
       
   248 
       
   249 	/**
       
   250 	* This method gets the lifetime of the MS. The lifetime information 
       
   251 	* includes the manufacturing date of the MS and the total amount of airtime use, 
       
   252 	* from the manufacturing date until the call to this method. Calling this method 
       
   253 	* does not reset any data.
       
   254 	* Forwarded to CS plugin.
       
   255 	* @since S60 3.2
       
   256 	* @param aLifeTimeInfo Life time information
       
   257 	* @return Get succeeded or not.
       
   258 	*/
       
   259    IMPORT_C TBool GetLifeTime( TDes8& aLifeTimeInfo );
       
   260 
       
   261 	/**
       
   262 	* This method gets cs specific information from cs-plugin. This is used only CS, 
       
   263 	* @since S60 3.2
       
   264 	* @param aCSInfo CS specific information from cs-plugin.
       
   265 	* @return Get succeeded or not.
       
   266 	*/
       
   267    IMPORT_C TBool GetCSInfo( CSInfo& aCSInfo );
       
   268 
       
   269 private:
       
   270 
       
   271     /**
       
   272     * constructor
       
   273     */
       
   274     CCCE();
       
   275 
       
   276     /**
       
   277     * 
       
   278     */
       
   279     void ConstructL( MCCEObserver* aObserver);
       
   280 
       
   281 private:
       
   282 
       
   283     /**
       
   284     * Call container
       
   285     */
       
   286     CCCECallContainer* iCallContainer;
       
   287 
       
   288     /**
       
   289     * observer pointer
       
   290     */
       
   291     CCCEObserverAsynchroniser* iObserver;
       
   292     
       
   293     };
       
   294 
       
   295 
       
   296 #endif // CCCE_H