phoneapp/silenceactionplugin/inc/silenceaction.h
changeset 37 ba76fc04e6c2
child 51 f39ed5e045e0
equal deleted inserted replaced
36:2eacb6118286 37:ba76fc04e6c2
       
     1 /*
       
     2 * Copyright (c) 2006-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:  A plug-in for silencing the rigning tones.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_SILENCEPLUGIN_H
       
    21 #define C_SILENCEPLUGIN_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <rphcltserver.h>
       
    25 #include <cphcltcommandhandler.h>
       
    26 
       
    27 #include "msilenceactionobserver.h"
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CPhCltCommandHandler;
       
    31 
       
    32 /**
       
    33 * Mutes ringing tone by commanding phoneclient.
       
    34 * 
       
    35 * @lib silenceactionplugin.lib
       
    36 * @since S60 3.2
       
    37 */
       
    38 NONSHARABLE_CLASS( CSilenceAction ): public CActive
       
    39     {
       
    40     public:
       
    41     
       
    42         // Two phased constructors
       
    43         static CSilenceAction* NewL( MSilenceActionObserver& aObserver );
       
    44         static CSilenceAction* NewLC( MSilenceActionObserver& aObserver );
       
    45             
       
    46         // Destructor
       
    47         ~CSilenceAction();
       
    48         
       
    49     public: // New methods
       
    50     
       
    51         void ActionMuteRingingTone();
       
    52 
       
    53     private: // From base classes
       
    54     
       
    55         // @see CActive
       
    56         void RunL();
       
    57     
       
    58         // @see CActive
       
    59         void DoCancel();
       
    60     
       
    61         // @see CActive
       
    62         TInt RunError( TInt aError );
       
    63         
       
    64     private:
       
    65     
       
    66         // C++ constrcutor
       
    67         CSilenceAction( MSilenceActionObserver& aObserver );
       
    68         
       
    69         // Second phase constructor.
       
    70         void ConstructL();  
       
    71         
       
    72     private:
       
    73     
       
    74         // Silence observer.
       
    75         MSilenceActionObserver& iObserver;
       
    76         
       
    77         // phone client handles phone call operations.
       
    78         CPhCltCommandHandler* iPhoneClient;
       
    79 
       
    80     };
       
    81     
       
    82 #endif // C_SILENCEPLUGIN_H