phoneapp/silenceactionplugin/inc/silenceactionplugin.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:  An action plug-in for silencing the ringing tones.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_SILENCEACTIONPLUGIN_H
       
    21 #define C_SILENCEACTIONPLUGIN_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <cfactionplugin.h> 
       
    25 #include <e32base.h>
       
    26 
       
    27 #include "msilenceactionobserver.h"
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CCFActionIndication;
       
    31 class CSilenceAction;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 * Class CActionPlugIn.
       
    37 *
       
    38 * Provides control for silencing the ringing tones.
       
    39 * Triggered when the conditions from the rule file are valid.
       
    40 */
       
    41 class CSilenceActionPlugIn : 
       
    42     public CCFActionPlugIn,
       
    43     public MSilenceActionObserver
       
    44     {
       
    45     public: // Constructors and destructor
       
    46 
       
    47         static CSilenceActionPlugIn* NewL();
       
    48         static CSilenceActionPlugIn* NewLC();
       
    49 
       
    50         ~CSilenceActionPlugIn();
       
    51 
       
    52     public: // From CCFActionPlugIn
       
    53 
       
    54         // @see CCFActionPlugIn
       
    55         void InitializeL();
       
    56 
       
    57         // @see CCFActionPlugIn
       
    58         TExecutionTime ExecuteL(
       
    59             CCFActionIndication* aActionIndication );
       
    60                     
       
    61         // @see CCFActionPlugIn
       
    62         void GetActionsL( CDesCArray& aActionList ) const;
       
    63         
       
    64         // @see CCFActionPlugIn
       
    65         const TSecurityPolicy& SecurityPolicy() const;
       
    66         
       
    67     private: // From MSilenceActionObserver
       
    68         
       
    69         // @see MSilenceActionObserver
       
    70         void MuteActionCompleted();
       
    71         
       
    72     protected:
       
    73 
       
    74         // C++ constrcutor
       
    75         CSilenceActionPlugIn();
       
    76         
       
    77     private: // New functions
       
    78         
       
    79         void DoCancel();
       
    80         
       
    81         void RunL();
       
    82                     
       
    83     private: // Data
       
    84         
       
    85         // Silence action.
       
    86         CSilenceAction* iSilence;
       
    87     };
       
    88 
       
    89 #endif // C_SILENCEACTIONPLUGIN_H