browserutilities/browsertelservice/inc/BrowserTelServiceEtelWatcher.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2002 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 the License "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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #ifndef __BROWSERTELSERVICEETELWATCHER_H
       
    21 #define __BROWSERTELSERVICEETELWATCHER_H
       
    22 
       
    23 #include <etel.h>
       
    24 
       
    25 // CLASS DECLARATION
       
    26 
       
    27 /**
       
    28 * Observer for CBrowserTelService
       
    29 */
       
    30 class MBrowserTelServiceEtelWatcherObserver
       
    31 	{
       
    32 	public:
       
    33         /**
       
    34         * Notification of a status change.
       
    35         * @param aStatus The status.
       
    36         */
       
    37 		virtual void BrowserTelServiceEtelWatcherEvent(
       
    38 			RCall::TStatus& aStatus ) = 0;
       
    39 	};
       
    40 
       
    41 /**
       
    42 * Watcher for possible etel status changes.
       
    43 */
       
    44 class CBrowserTelServiceEtelWatcher : public CActive
       
    45 	{
       
    46 	public:		// Constructors and destructor
       
    47 		/**
       
    48         * Destructor.
       
    49         */
       
    50 		~CBrowserTelServiceEtelWatcher();
       
    51 
       
    52         /**
       
    53         * Two-phased constructor. Leaves on failure.
       
    54         * @param aObserver The observer for CBrowserTelService.
       
    55         * @return The constructed CBrowserTelService object.
       
    56         */
       
    57 		static CBrowserTelServiceEtelWatcher* NewL(
       
    58 			MBrowserTelServiceEtelWatcherObserver* aObserver );
       
    59 		static CBrowserTelServiceEtelWatcher* NewLC(
       
    60 			MBrowserTelServiceEtelWatcherObserver* aObserver );
       
    61 
       
    62 	public:		// New functions
       
    63 		/**
       
    64         * Request a notification on etel status change.
       
    65         */
       
    66 		void NotifyOnEtelStatusChangeL();
       
    67 
       
    68 		/**
       
    69         * Cancel the request set with NotifyOnEtelStatusChangeL().
       
    70         */
       
    71 		void NotifyOnEtelStatusChangeCancel();
       
    72 
       
    73 	private:
       
    74 	    /**
       
    75         * C++ default constructor.
       
    76         */
       
    77 		CBrowserTelServiceEtelWatcher();
       
    78 
       
    79 		/**
       
    80         * Second phase constructor. Leaves on failure.
       
    81         * @param aObserver The observer for CBrowserTelService. 
       
    82         */
       
    83 		void ConstructL( MBrowserTelServiceEtelWatcherObserver* aObserver );
       
    84 
       
    85 	private:	// Functions from base classes
       
    86 		/**
       
    87 		* From CActive
       
    88 		*/
       
    89 		void DoCancel();
       
    90 		void RunL();
       
    91 
       
    92 	private:	// Data
       
    93 		MBrowserTelServiceEtelWatcherObserver* iObserver;
       
    94 		RTelServer iRTelServer;
       
    95 		RPhone iRPhone;
       
    96 		RLine iRLine;
       
    97 		RCall::TStatus iCallStatus;
       
    98 	};
       
    99 
       
   100 #endif	// __ETELWATCHER_H
       
   101