mtptransports/mtpcontroller/inc/cmtpoperator.h
branchRCL_3
changeset 6 ef55b168cedb
parent 0 d0791faffa3f
equal deleted inserted replaced
5:3673b591050c 6:ef55b168cedb
    22 
    22 
    23 #ifndef CMTPOPERATOR_H_
    23 #ifndef CMTPOPERATOR_H_
    24 #define CMTPOPERATOR_H_
    24 #define CMTPOPERATOR_H_
    25 
    25 
    26 #include <e32base.h>
    26 #include <e32base.h>
    27 #include <mtp/rmtpclient.h>
    27 #include <e32property.h>
       
    28 
    28 #include "mmtpoperatornotifier.h"
    29 #include "mmtpoperatornotifier.h"
       
    30 #include "cmtpcontrollertimer.h"
    29 #include "mtpdebug.h"
    31 #include "mtpdebug.h"
       
    32 
       
    33 
    30 
    34 
    31 NONSHARABLE_CLASS( CMTPOperator ) : public CActive
    35 NONSHARABLE_CLASS( CMTPOperator ) : public CActive
    32     {
    36     {
    33 private:
    37 private:
    34     enum TOperationType
    38     enum TOperationType
    50     
    54     
    51 public:
    55 public:
    52     void StartTransport( TUid aTransport );
    56     void StartTransport( TUid aTransport );
    53     void StopTransport( TUid aTransport );
    57     void StopTransport( TUid aTransport );
    54     
    58     
       
    59     void StartTimer (TInt aSecond);
       
    60     void SubscribeConnState();
       
    61     
    55 private:// From CActive
    62 private:// From CActive
    56     void DoCancel();
    63     void DoCancel();
    57     void RunL();
    64     void RunL();
    58     
    65     
    59 private:
    66 private:
    60     CMTPOperator( MMTPOperatorNotifier& aNotifier );
    67     CMTPOperator( MMTPOperatorNotifier& aNotifier );
    61     void ConstructL();
    68     void ConstructL();
    62     TInt AppendOperation( TOperationType aType, TUid aTransport );
    69     TInt AppendOperation( TOperationType aType, TUid aTransport );
    63     void Schedule( TInt aError );
    70     void Schedule( TInt aError );
    64     void HandleOperationL( const TOperation& aOperation );
    71     void HandleOperationL( const TOperation& aOperation );
       
    72     
    65 private:
    73 private:
    66     /**
    74     /**
    67      * FLOGGER debug trace member variable.
    75      * FLOGGER debug trace member variable.
    68      */
    76      */
    69     __FLOG_DECLARATION_MEMBER_MUTABLE;
    77     __FLOG_DECLARATION_MEMBER_MUTABLE;
    71     MMTPOperatorNotifier& iNotifier;
    79     MMTPOperatorNotifier& iNotifier;
    72     
    80     
    73     RArray< TOperation > iPendingOperations;
    81     RArray< TOperation > iPendingOperations;
    74     
    82     
    75     RMTPClient iMTPClient;
    83     RMTPClient iMTPClient;
       
    84     
       
    85     RProperty       iProperty;
       
    86     
       
    87     TBool           iConSubscribed;
       
    88     
       
    89     TInt            iConnState;
       
    90     
       
    91     CMTPControllerTimer*  iTimer;
       
    92 
    76     };
    93     };
    77 
    94 
       
    95 
       
    96 const TInt KInitialValue = -1;
       
    97 const TInt KStopMTPSeconds = 30;
       
    98 
    78 #endif /* CMTPOPERATOR_H_ */
    99 #endif /* CMTPOPERATOR_H_ */