mtpdataproviders/mtppictbridgedp/pictbridgeengine/inc/dpsscriptsender.h
branchRCL_3
changeset 19 0aa8cc770c8a
equal deleted inserted replaced
18:453dfc402455 19:0aa8cc770c8a
       
     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:  This class defines the dps script sending function. 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef DPSSCRIPTSENDER_H
       
    20 #define DPSSCRIPTSENDER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class CDpsEngine;
       
    25 class CDpsStateMachine;
       
    26 
       
    27 /**
       
    28 *   This class is an active object. It sends the script to ptp server and 
       
    29 *   listens on the ptp server for notification of sending result.
       
    30 */
       
    31 NONSHARABLE_CLASS(CDpsScriptSender) : public CActive
       
    32     {
       
    33     public:
       
    34         /**
       
    35         *   Two phase constructor
       
    36         *   
       
    37         *   @param aOperator the pointer to the dps state machine
       
    38         *   @return a CDpsScriptSender instance
       
    39         */
       
    40         static CDpsScriptSender* NewL(CDpsStateMachine* aOperator);
       
    41 		
       
    42         /**
       
    43         *   Destructor
       
    44         */
       
    45         ~CDpsScriptSender();
       
    46 		
       
    47         /**
       
    48         *   Issues sending request
       
    49         *   @param aReply ETrue is the script is the reply, EFalse if the 
       
    50         *   script is the request.
       
    51         */
       
    52         TInt SendScript(TBool aReply);
       
    53 	
       
    54     private: // Functions derived from CActive.
       
    55         /**
       
    56         *   @see CActive
       
    57         */
       
    58     	void RunL();
       
    59     	
       
    60         /**
       
    61         *   @see CActive
       
    62         */
       
    63         void DoCancel();
       
    64 	    
       
    65         /**
       
    66         *   @see CActive
       
    67         */
       
    68         TInt RunError(TInt aError);
       
    69 	    
       
    70     private:
       
    71         /**
       
    72         *   Default constructor
       
    73         *   
       
    74         *   @param aOperator the pointer to the dps state machine
       
    75         */
       
    76         CDpsScriptSender(CDpsStateMachine* aOperator);    
       
    77 	
       
    78     private:
       
    79         
       
    80         // not owned by this class
       
    81         CDpsStateMachine* iOperator;
       
    82 	   
       
    83         // telling if the current sending session is a reply or a request
       
    84         TBool iReply;
       
    85     };
       
    86 				
       
    87 #endif