phonesrv_plat/converged_call_provider_api/inc/mccpdtmfprovider.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 DTMF provider class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MCCPDTMFPROVIDER_H
       
    20 #define MCCPDTMFPROVIDER_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 class MCCPDTMFObserver;
       
    26 
       
    27 /**
       
    28 * DTMF provider.
       
    29 * Used to receive errors, notifications, statuses etc
       
    30 *
       
    31 *  @since S60 3.2
       
    32 */
       
    33 class MCCPDTMFProvider
       
    34 	{
       
    35 protected:
       
    36     /** 
       
    37     * Protected destructor. Object cannot be deleted from plug-in client (CCE).
       
    38     * @since S60 3.2
       
    39     */
       
    40     virtual inline ~MCCPDTMFProvider() {};
       
    41 	
       
    42 public:
       
    43 	/**
       
    44 	* Cancels asynchronous DTMF string sending.
       
    45     * @param none
       
    46 	* @return KErrNone request was started successfully
       
    47 	* @return KErrNotFound nothing found to cancel.
       
    48 	* @since Series 60 3.2
       
    49 	*/
       
    50 	virtual TInt CancelDtmfStringSending() = 0;
       
    51 
       
    52 	/**
       
    53 	* Starts the transmission of a single DTMF tone across a connected and active call.
       
    54 	* @since S60 3.2
       
    55 	* @param aTone tone to be played.
       
    56 	* @return KErrNone request was started successfully
       
    57 	* @return KErrArgument if the specified tone contains illegal dtmf character
       
    58 	* @return in case of an error system wide error code
       
    59 	*/
       
    60 	virtual TInt StartDtmfTone( const TChar aTone ) = 0;
       
    61 
       
    62 	/**
       
    63 	* Stops playing current DTMF tone.
       
    64 	* @since S60 3.2
       
    65     * @param none
       
    66 	* @return KErrNone request was started successfully
       
    67     * @return KErrNotReady not ready to perform the requested action.
       
    68 	*/
       
    69 	virtual TInt StopDtmfTone() = 0;
       
    70 
       
    71 	/**
       
    72 	* Plays DTMF string.
       
    73 	* @since S60 3.2
       
    74 	* @param aString String to be played.
       
    75 	* @return KErrNone request was started successfully
       
    76 	* @return KErrArgument if the specified string contains illegal dtmf characters
       
    77 	*/
       
    78 	virtual TInt SendDtmfToneString( const TDesC& aString ) = 0;
       
    79 
       
    80 	/**
       
    81 	* Continue or cancel sending DTMF string which was stopped with 'w'-character
       
    82 	* in string.
       
    83 	* @since S60 3.2
       
    84 	* @param aContinue ETrue if sending of the DTMF string should continue,
       
    85 	* EFalse if the rest of the DTMF string is to be discarded.
       
    86 	* @return KErrNone request was started successfully
       
    87 	* @return KErrNotFound no send existed which to continue
       
    88 	*/
       
    89 	virtual TInt ContinueDtmfStringSending( const TBool aContinue ) = 0;
       
    90 	
       
    91     /**
       
    92     * Add an observer for DTMF related events.
       
    93     * Currently CCE will set only one observer.
       
    94     * @since S60 v3.2
       
    95     * @param aObserver Observer to add.
       
    96     * @return none
       
    97     * @leave system error if observer adding fails
       
    98     */
       
    99     virtual void AddObserverL( const MCCPDTMFObserver& aObserver ) = 0;
       
   100 
       
   101     /**
       
   102     * Remove an observer.
       
   103     * @since S60 v3.2
       
   104     * @param aObserver Observer to remove.
       
   105     * @return KErrNone if removed succesfully. 
       
   106     * @return KErrNotFound if observer was not found.
       
   107     */
       
   108     virtual TInt RemoveObserver( const MCCPDTMFObserver& aObserver ) = 0;
       
   109 
       
   110 	};
       
   111 
       
   112 
       
   113 #endif // MCCPDTMFPROVIDER_H
       
   114