sipvoipprovider/inc/svpforwardprovider.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     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:  Forward functionality provider
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef C_SVPFORWARDPROVIDER_H
       
    22 #define C_SVPFORWARDPROVIDER_H
       
    23 
       
    24 
       
    25 #include <mccpforwardprovider.h>
       
    26 #include "svputdefs.h"
       
    27 
       
    28 class CSVPMoSession;
       
    29 
       
    30 /**
       
    31  *  Forward functionality provider
       
    32  *
       
    33  *  ?more_complete_description
       
    34  *
       
    35  *  @lib svp.lib
       
    36  *  @since S60 v3.2
       
    37  */
       
    38 class CSVPForwardProvider : public CBase,
       
    39                             public MCCPForwardProvider
       
    40     {
       
    41 
       
    42 public:
       
    43 
       
    44     static CSVPForwardProvider* NewL( CSVPMoSession& aSession );
       
    45 
       
    46     virtual ~CSVPForwardProvider();
       
    47 
       
    48 
       
    49 // from base class MCCPForwardProvider
       
    50 
       
    51     /**
       
    52     * From MCCPForwardProvider.
       
    53 	* Returns pointer to array containing addresses to forward the call to.
       
    54 	* Index zero contains the first address. If there are no addresses available
       
    55 	* returns an empty array.
       
    56 	* @since Series 60 3.2
       
    57 	* @param none
       
    58 	* @return Reference to array containing addresses
       
    59     * @leave KErrNotReady call is not in forwarding state
       
    60     * @leave KErrNotAllowed if call is not mobile originated
       
    61     * @leave system error code 
       
    62     * @pre Call state is MCCPCallObserver::ECCPStateForwarding and call type is MO
       
    63     * @pre Call MCCPForwardObserver::ECCPMultipleChoices event is received
       
    64 	*/
       
    65 	const CDesC8Array& GetForwardAddressChoicesL();
       
    66 
       
    67 	/**
       
    68 	* From MCCPForwardProvider.
       
    69 	* Forward call to address at given index.
       
    70 	* @since Series 60 3.2
       
    71 	* @param aIndex Index of address where the call is to be forwarded. Address is 
       
    72 	* found in the array received from GetForwardAddressChoicesL. Index starts from zero.
       
    73 	* @return none
       
    74 	* @leave KErrArgument Index is not in array
       
    75     * @leave KErrNotReady Call is not in forwarding state
       
    76     * @leave KErrNotAllowed If call is not mobile originated
       
    77     * @pre Call state is MCCPCallObserver::ECCPStateForwarding and call type is MO
       
    78     * @pre Call MCCPForwardObserver::ECCPMultipleChoices event is received
       
    79 	*/
       
    80 	void ForwardToAddressL( const TInt aIndex );
       
    81 	
       
    82     /**
       
    83     * From MCCPForwardProvider.
       
    84     * Add an observer for forward related events.
       
    85     * Currently CCE will set only one observer.
       
    86     * @since S60 v3.2
       
    87     * @param aObserver Observer
       
    88     * @return none
       
    89     * @leave system error if observer adding fails
       
    90     */
       
    91     void AddObserverL( const MCCPForwardObserver& aObserver );
       
    92 
       
    93     /**
       
    94     * From MCCPForwardProvider.
       
    95     * Remove an observer.
       
    96     * @since S60 v3.2
       
    97     * @param none
       
    98     * @param aObserver Observer
       
    99     * @return KErrNone if removed succesfully. 
       
   100     * @return KErrNotFound if observer was not found.
       
   101     */
       
   102     TInt RemoveObserver( const MCCPForwardObserver& aObserver );
       
   103 
       
   104 
       
   105 
       
   106 private:
       
   107 
       
   108     CSVPForwardProvider();
       
   109 
       
   110     void ConstructL( CSVPMoSession& aSession );
       
   111 
       
   112 private: // data
       
   113 
       
   114 
       
   115     /**
       
   116      * MO Session
       
   117      * Not own.
       
   118      */
       
   119     CSVPMoSession* iMoSession;
       
   120 
       
   121 
       
   122 private:
       
   123 
       
   124     // For testing
       
   125     SVP_UT_DEFS
       
   126     
       
   127     };
       
   128 
       
   129 
       
   130 #endif // C_SVPFORWARDPROVIDER_H