telephonyutils/telephonywatchers/inc/signalstrengthwatcher.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __SIGNALSTRENGTHWATCHER_H__
       
    17 #define __SIGNALSTRENGTHWATCHER_H__
       
    18 
       
    19 // System includes
       
    20 #include <e32base.h>
       
    21 #include <etelext.h>
       
    22 #include <etelmm.h>
       
    23 #include <etel.h>
       
    24 
       
    25 // Base include
       
    26 #include "watcherbase.h"
       
    27 
       
    28 // Classes referenced
       
    29 class RFs;
       
    30 
       
    31 
       
    32 //
       
    33 // ------> CSignalStrengthWatcher (header)
       
    34 //
       
    35 class CSignalStrengthWatcher : public CPhoneWatcher
       
    36 /**
       
    37 @internalComponent
       
    38 */
       
    39 	{
       
    40 //
       
    41 public: // STATIC CONSTRUCT / DESTRUCT
       
    42 //
       
    43 	static CSignalStrengthWatcher* NewL(TAny* aWatcherParams);
       
    44 	~CSignalStrengthWatcher();
       
    45 
       
    46 //
       
    47 private: // CONSTRUCT
       
    48 //
       
    49 	CSignalStrengthWatcher();
       
    50 	void ConstructL();
       
    51 
       
    52 //
       
    53 private: // FROM CPhoneWatcher
       
    54 //
       
    55 	void HandlePhoneStateEventL(TInt aCompletionCode);
       
    56 	void HandleCancel();
       
    57 	void ReleasePhoneResources();
       
    58 
       
    59 //
       
    60 private: // INTERNAL
       
    61 //
       
    62 	enum TSignalStrengthState
       
    63 		{
       
    64 		ESignalStrengthNotYetInitialised = 0,
       
    65 		ESignalStrengthStateRequestInitialSignalStrength,
       
    66 		ESignalStrengthWaitingForInitialSignalStrength,
       
    67 		ESignalStrengthStateIssuingSignalChangeNotificationRequest
       
    68 		};
       
    69 	inline TSignalStrengthState& SignalStrengthState() { return iState; }
       
    70 	void HandleSignalStrengthUpdateL(TInt aCompletionCode);
       
    71 	void SignalPanic(TWatcherPanic aPanicNumber);
       
    72 
       
    73 //
       
    74 private: // MEMBER DATA
       
    75 //
       
    76 	TInt32 iSignalStrength;
       
    77 	TInt8 iSignalBars;
       
    78 	TSignalStrengthState iState;
       
    79 	RProperty iNetworkStrengthProperty;	
       
    80 	};
       
    81 
       
    82 
       
    83 #endif