mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpperflog.h
changeset 25 d881023c13eb
parent 0 a2952bb97e68
equal deleted inserted replaced
21:a05c44bc3c61 25:d881023c13eb
    36 // forward declaration
    36 // forward declaration
    37 class CMmMtpDpPerfLog;
    37 class CMmMtpDpPerfLog;
    38 
    38 
    39 class TMmMtpDpOverflowHandler : public TDesOverflow
    39 class TMmMtpDpOverflowHandler : public TDesOverflow
    40     {
    40     {
    41     public:
    41 public:
    42         
    42     inline void SetOwner( CMmMtpDpPerfLog* aOwner );
    43         inline void SetOwner( CMmMtpDpPerfLog* aOwner );
    43     inline void Overflow( TDes& aDes );
    44         inline void Overflow( TDes& aDes );
    44 
    45          
    45 private:
    46     private:
    46     CMmMtpDpPerfLog* iOwner;
    47     
    47 
    48         CMmMtpDpPerfLog* iOwner;
       
    49     };
    48     };
    50 
    49 
    51 class CMmMtpDpPerfLog : public CBase
    50 class CMmMtpDpPerfLog : public CBase
    52     {
    51     {
    53     public:
    52 public:
    54         
       
    55         inline static CMmMtpDpPerfLog* NewL( const TDesC& aTitle );
       
    56         inline ~CMmMtpDpPerfLog();
       
    57         
       
    58         inline void Write( const TDesC& aText);
       
    59         inline void WriteFormat( TRefByValue<const TDesC> aFmt, ... );
       
    60 
    53 
    61         inline void Start( const TDesC& aDescription );
    54     inline static CMmMtpDpPerfLog* NewL( const TDesC& aTitle );
    62         inline void Stop( const TDesC& aDescription );
    55     inline ~CMmMtpDpPerfLog();
    63         
       
    64     private:
       
    65         
       
    66         inline CMmMtpDpPerfLog();
       
    67         inline void ConstructL( const TDesC& aTitle );
       
    68 
    56 
    69     private:
    57     inline void Write( const TDesC& aText );
    70         
    58     inline void WriteFormat( TRefByValue<const TDesC> aFmt, ... );
    71         TMmMtpDpOverflowHandler iOverflowHandler;
       
    72 
    59 
    73         HBufC16* iTitle;
    60     inline void Start( const TDesC& aDescription );
    74         CDesC16ArrayFlat iDescription;
    61     inline void Stop( const TDesC& aDescription );
    75         CArrayFixFlat<TUint32> iStartTick;
    62 
    76         CArrayFixFlat<TUint64> iTotalTime;
    63 private:
    77         CArrayFixFlat<TUint32> iTotalUsage;
    64 
    78         
    65     inline CMmMtpDpPerfLog();
    79         TInt iNTickPeriod;
    66     inline void ConstructL( const TDesC& aTitle );
    80         TInt iLastIndex;
    67 
    81         
    68 private:
       
    69 
       
    70     TMmMtpDpOverflowHandler iOverflowHandler;
       
    71 
       
    72     HBufC16* iTitle;
       
    73     CDesC16ArrayFlat iDescription;
       
    74     CArrayFixFlat<TUint32> iStartTick;
       
    75     CArrayFixFlat<TUint64> iTotalTime;
       
    76     CArrayFixFlat<TUint32> iTotalUsage;
       
    77 
       
    78     TInt iNTickPeriod;
       
    79     TInt iLastIndex;
       
    80 
    82     };
    81     };
    83 
    82 
    84 #include "cmmmtpdpperflog.inl"
    83 #include "cmmmtpdpperflog.inl"
    85 
    84 
    86 #endif // defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
    85 #endif // defined(_DEBUG) || defined(MMMTPDP_PERFLOG)