uiservicetab/vimpstcmdprocess/inc/mvimpstcmd.h
branchRCL_3
changeset 22 3104fc151679
parent 21 2b7283837edb
child 23 9a48e301e94b
equal deleted inserted replaced
21:2b7283837edb 22:3104fc151679
     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:  IM command object interface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _MVIMPSTCMD_H_
       
    20 #define _MVIMPSTCMD_H_
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include "vimpstcmd.hrh"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MVIMPSTCmdObserver;
       
    28 
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33  * IM command object interface. 
       
    34  *
       
    35  * Every Instant Messaging command must implement this interface.
       
    36  * Application command handler can then create these command objects
       
    37  * and execute them. Commands can report about their execution via
       
    38  * MImCommandObserver interface. 
       
    39  * @lib vimpstcmdprocess.dll
       
    40  * @since 5.0
       
    41  */
       
    42 class MVIMPSTCmd
       
    43     {
       
    44     public: // Interface
       
    45 
       
    46         /**
       
    47          * Destructor.
       
    48          */
       
    49         virtual ~MVIMPSTCmd()
       
    50                 {}
       
    51 
       
    52         /**
       
    53          * Executes the command and destroys this command object when done.
       
    54          * The command is also destroyed if this function leaves.
       
    55          */
       
    56         virtual void ExecuteLD() = 0;
       
    57         
       
    58         /**
       
    59          * Adds a command observer for this command.
       
    60          * @param aObserver     Command observer to add.
       
    61          */
       
    62         virtual void AddObserver(
       
    63                 MVIMPSTCmdObserver& aObserver ) = 0;
       
    64         
       
    65 		
       
    66 		/**
       
    67          * Returns the command id.
       
    68          * @return TImCommandId     Command ID.
       
    69          */                
       
    70 		virtual TInt CommandId() const = 0 ;		
       
    71 		
       
    72 		
       
    73 		/**
       
    74          * Returns the result data/error code.
       
    75          * The return value will have a valid data, only if this function
       
    76          * is called in CommandFinished() observer notification[MImCommandObserver]
       
    77          * @return TAny     pointer to the result data. 
       
    78          *     Ownership is not transferred to the caller
       
    79          */                
       
    80 		virtual TInt Result() const = 0 ;             
       
    81 
       
    82     };
       
    83 
       
    84 #endif // _MVIMPSTCMd_H_
       
    85 
       
    86 // End of File