phonesrv_plat/converged_call_provider_api/inc/mccpforwardprovider.h
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
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:  CCP call forward provider
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MCCPFORWARDPROVIDER_H
       
    20 #define MCCPFORWARDPROVIDER_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <badesca.h> // CDesC8Array
       
    25 
       
    26 class MCCPForwardObserver;
       
    27 
       
    28 /**
       
    29 * Call forward methods. In case plug-in support call forwarding these methods can be fetched from 
       
    30 * MCCPCall::ForwardProviderL.
       
    31 * MCCPForwardObserver is used for forwarding specific events. 
       
    32 * MCCPCallObserver is used for general call related status, event, error etc notifications.
       
    33 *
       
    34 *  @since S60 3.2
       
    35 */
       
    36 class MCCPForwardProvider
       
    37 	{
       
    38 protected:
       
    39     /** 
       
    40     * Protected destructor. Object cannot be deleted from plug-in client (CCE).
       
    41     * @since S60 3.2
       
    42     */
       
    43     virtual inline ~MCCPForwardProvider() {};
       
    44 	
       
    45 public:
       
    46     /**
       
    47 	* Returns pointer to array containing addresses to forward the call to.
       
    48 	* Index zero contains the first address. If there are no addresses available
       
    49 	* returns an empty array.
       
    50 	* @since Series 60 3.2
       
    51 	* @param none
       
    52 	* @return Reference to array containing addresses
       
    53     * @leave KErrNotReady call is not in forwarding state
       
    54     * @leave KErrNotSupported if call is not mobile originated
       
    55     * @leave system error code 
       
    56     * @pre Call state is MCCPCallObserver::ECCPStateForwarding and call type is MO
       
    57     * @pre Call MCCPForwardObserver::ECCPMultipleChoices event is received
       
    58 	*/
       
    59 	virtual const CDesC8Array& GetForwardAddressChoicesL() = 0;
       
    60 
       
    61 	/**
       
    62 	* Forward call to address at given index.
       
    63 	* @since Series 60 3.2
       
    64 	* @param aIndex Index of address where the call is to be forwarded. Address is 
       
    65 	* found in the array received from GetForwardAddressChoicesL. Index starts from zero.
       
    66 	* @return none
       
    67 	* @leave KErrArgument Index is not in array
       
    68     * @leave KErrNotReady Call is not in forwarding state
       
    69     * @leave KErrNotSupported If call is not mobile originated
       
    70     * @pre Call state is MCCPCallObserver::ECCPStateForwarding and call type is MO
       
    71     * @pre Call MCCPForwardObserver::ECCPMultipleChoices event is received
       
    72 	*/
       
    73 	virtual void ForwardToAddressL( const TInt aIndex ) = 0;
       
    74 	
       
    75     /**
       
    76     * Add an observer for forward related events.
       
    77     * Currently CCE will set only one observer.
       
    78     * @since S60 v3.2
       
    79     * @param aObserver Observer to add.
       
    80     * @return none
       
    81     * @leave system error if observer adding fails
       
    82     */
       
    83     virtual void AddObserverL( const MCCPForwardObserver& aObserver ) = 0;
       
    84 
       
    85     /**
       
    86     * Remove an observer.
       
    87     * @since S60 v3.2
       
    88     * @param aObserver Observer to remove.
       
    89     * @return KErrNone if removed succesfully. 
       
    90     * @return KErrNotFound if observer was not found.
       
    91     */
       
    92     virtual TInt RemoveObserver( const MCCPForwardObserver& aObserver ) = 0;
       
    93 	};
       
    94 
       
    95 
       
    96 #endif // MCCPFORWARDPROVIDER_H