phonesrv_plat/converged_call_provider_api/inc/mccpdtmfprovider.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:15:03 +0100
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
*
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
*
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
* Contributors:
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
*
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
* Description:  CCP DTMF provider class
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
*
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
*/
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
#ifndef MCCPDTMFPROVIDER_H
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
#define MCCPDTMFPROVIDER_H
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    21
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    22
//  INCLUDES
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
#include <e32base.h>
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
class MCCPDTMFObserver;
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
/**
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
* DTMF provider.
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
* Used to receive errors, notifications, statuses etc
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
*
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    31
*  @since S60 3.2
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
*/
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    33
class MCCPDTMFProvider
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    34
	{
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    35
protected:
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
    /** 
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    37
    * Protected destructor. Object cannot be deleted from plug-in client (CCE).
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    38
    * @since S60 3.2
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    39
    */
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    40
    virtual inline ~MCCPDTMFProvider() {};
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    41
	
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    42
public:
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    43
	/**
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    44
	* Cancels asynchronous DTMF string sending.
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    45
    * @param none
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    46
	* @return KErrNone request was started successfully
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    47
	* @return KErrNotFound nothing found to cancel.
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    48
	* @since Series 60 3.2
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    49
	*/
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    50
	virtual TInt CancelDtmfStringSending() = 0;
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    51
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    52
	/**
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    53
	* Starts the transmission of a single DTMF tone across a connected and active call.
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    54
	* @since S60 3.2
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    55
	* @param aTone tone to be played.
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    56
	* @return KErrNone request was started successfully
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    57
	* @return KErrArgument if the specified tone contains illegal dtmf character
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    58
	* @return in case of an error system wide error code
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    59
	*/
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    60
	virtual TInt StartDtmfTone( const TChar aTone ) = 0;
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    61
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    62
	/**
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    63
	* Stops playing current DTMF tone.
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    64
	* @since S60 3.2
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    65
    * @param none
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    66
	* @return KErrNone request was started successfully
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    67
    * @return KErrNotReady not ready to perform the requested action.
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    68
	*/
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    69
	virtual TInt StopDtmfTone() = 0;
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    70
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    71
	/**
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    72
	* Plays DTMF string.
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    73
	* @since S60 3.2
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    74
	* @param aString String to be played.
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    75
	* @return KErrNone request was started successfully
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    76
	* @return KErrArgument if the specified string contains illegal dtmf characters
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    77
	*/
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    78
	virtual TInt SendDtmfToneString( const TDesC& aString ) = 0;
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    79
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    80
	/**
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    81
	* Continue or cancel sending DTMF string which was stopped with 'w'-character
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    82
	* in string.
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    83
	* @since S60 3.2
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    84
	* @param aContinue ETrue if sending of the DTMF string should continue,
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    85
	* EFalse if the rest of the DTMF string is to be discarded.
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    86
	* @return KErrNone request was started successfully
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    87
	* @return KErrNotFound no send existed which to continue
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    88
	*/
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    89
	virtual TInt ContinueDtmfStringSending( const TBool aContinue ) = 0;
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
    90
	
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    91
    /**
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    92
    * Add an observer for DTMF related events.
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    93
    * Currently CCE will set only one observer.
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    94
    * @since S60 v3.2
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    95
    * @param aObserver Observer to add.
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    96
    * @return none
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    97
    * @leave system error if observer adding fails
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    98
    */
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    99
    virtual void AddObserverL( const MCCPDTMFObserver& aObserver ) = 0;
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   100
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   101
    /**
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   102
    * Remove an observer.
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   103
    * @since S60 v3.2
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   104
    * @param aObserver Observer to remove.
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   105
    * @return KErrNone if removed succesfully. 
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   106
    * @return KErrNotFound if observer was not found.
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   107
    */
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   108
    virtual TInt RemoveObserver( const MCCPDTMFObserver& aObserver ) = 0;
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   109
20
987c9837762f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   110
	};
0
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   111
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   112
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   113
#endif // MCCPDTMFPROVIDER_H
ff3b6d0fd310 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   114