contextframework/cfw/inc/cfserver/cfcontextsourcecmd.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2008 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:  CCFContextSourceCmd class declaration.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CFCONTEXTSOURCECMD_H
       
    20 #define C_CFCONTEXTSOURCECMD_H
       
    21 
       
    22 
       
    23 // SYSTEM INCLUDE FILES
       
    24 #include <e32base.h>
       
    25 #include <cfcontextsourcecommand.h>
       
    26 
       
    27 // USER INCLUDE FILES
       
    28 #include "cfcmd.h"
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class MCFContextSourceCommand;
       
    32 
       
    33 // DATA TYPES
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38  * Context source command.
       
    39  *
       
    40  * @lib CFServer
       
    41  * @since S60 5.0
       
    42  */
       
    43 NONSHARABLE_CLASS( CCFContextSourceCmd ) : public CCFCmd
       
    44 {
       
    45 public:
       
    46 
       
    47     /**
       
    48      * Symbian two phased constructors.
       
    49      *
       
    50      * @since S60 5.0
       
    51      * @param aSourceCommandHandler is the context source command handler to
       
    52      *   process the command.
       
    53      * @param aCommand is the context source command action.
       
    54      * @return CCFContextSourceCmd
       
    55      */
       
    56     static CCFContextSourceCmd* NewL(
       
    57             MCFContextSourceCommand& aSourceCommandHandler,
       
    58             const CCFContextSourceCommand& aCommand );
       
    59     static CCFContextSourceCmd* NewLC(
       
    60             MCFContextSourceCommand& aSourceCommandHandler,
       
    61             const CCFContextSourceCommand& aCommand );
       
    62 
       
    63     /**
       
    64      * C++ destructor.
       
    65      */
       
    66     virtual ~CCFContextSourceCmd();
       
    67 
       
    68 public: // From CCFCmd
       
    69 
       
    70     /**
       
    71      * Executes the context source command.
       
    72      *
       
    73      * @since S60 5.0
       
    74      * @param None.
       
    75      * @return None.
       
    76      */
       
    77     virtual void ExecuteL();
       
    78 
       
    79     /**
       
    80      * Logs the error using error trace macros.
       
    81      *
       
    82      * @since S60 5.0
       
    83      * @param aError is the leave code from a call to ExecuteL.
       
    84      * @return None.
       
    85      */
       
    86     virtual void LogError( TInt aError );
       
    87 
       
    88 private:
       
    89 
       
    90     CCFContextSourceCmd( MCFContextSourceCommand& aSourceCommandHandler );
       
    91     void ConstructL( const CCFContextSourceCommand& aCommand );
       
    92 
       
    93 private: // Data
       
    94 
       
    95     // Reference to the context source command handler.
       
    96     MCFContextSourceCommand& iContextSourceCommandHandler;
       
    97 
       
    98     // Context source command; owned.
       
    99     CCFContextSourceCommand* iCommand;
       
   100     };
       
   101 
       
   102 #endif // C_CFCONTEXTSOURCECMD_H