creator/inc/creator_log.h
branchRCL_3
changeset 21 b3cee849fa46
parent 20 48060abbbeaf
child 22 fad26422216a
equal deleted inserted replaced
20:48060abbbeaf 21:b3cee849fa46
     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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __CREATORLOGS_H__
       
    22 #define __CREATORLOGS_H__
       
    23 
       
    24 #include "creator_model.h"
       
    25 #include "creator_modulebase.h"
       
    26 
       
    27 
       
    28 #include <e32base.h>
       
    29 #include <logwrap.h>
       
    30 #include <logcli.h>
       
    31 #include <logeng.h>
       
    32 
       
    33 
       
    34 
       
    35 class CCreatorEngine;
       
    36 class CLogsParameters;
       
    37 
       
    38 // Creator log ids:
       
    39 typedef TInt32  TLogIdCreator;
       
    40 typedef TInt8   TLogDurationTypeCreator;
       
    41 typedef TUint32 TLogDurationCreator;
       
    42 typedef TUint32 TLogLinkCreator;
       
    43 
       
    44 const TLogIdCreator KLogNullIdCreator = -1;
       
    45 const TLogLinkCreator KLogNullLinkCreator = 0;
       
    46 const TLogDurationTypeCreator KLogNullDurationTypeCreator = -1;
       
    47 const TLogDurationCreator KLogNullDurationCreator = 0;
       
    48 const TLogDurationTypeCreator KLogDurationNoneCreator = 0;
       
    49 const TLogDurationTypeCreator KLogDurationValidCreator = 1;
       
    50 const TLogDurationTypeCreator KLogDurationDataCreator = 2;
       
    51 
       
    52 
       
    53 
       
    54 
       
    55 class CCreatorLogs : public CActive, public MCreatorModuleBase
       
    56     {
       
    57 public: 
       
    58     static CCreatorLogs* NewL(CCreatorEngine* aEngine);
       
    59     static CCreatorLogs* NewLC(CCreatorEngine* aEngine);
       
    60     ~CCreatorLogs();
       
    61 
       
    62 private:
       
    63     CCreatorLogs();
       
    64     void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
       
    65 
       
    66     void RunL();  // from CActive
       
    67 	void DoCancel();  // from CActive
       
    68 
       
    69 public:
       
    70     TBool AskDataFromUserL(TInt aCommand, TInt& aNumberOfEntries); // from MCreatorModuleBase
       
    71 
       
    72     TInt CreateMissedCallEntryL(CLogsParameters *aParameters);    
       
    73     TInt CreateReceivedCallEntryL(CLogsParameters *aParameters);
       
    74     TInt CreateDialledNumberEntryL(CLogsParameters *aParameters);
       
    75     void DeleteAllL();
       
    76     void DeleteAllCreatedByCreatorL();
       
    77 
       
    78 private:
       
    79     CLogClient* iLogClient;
       
    80     CLogEvent* iLogEvent;
       
    81     CActiveSchedulerWait iLogWriteWait;
       
    82 
       
    83     CLogsParameters* iParameters;
       
    84     RArray<TInt> iEntryIds; // TLogId ( == TInt32) CLogEvent::Id()
       
    85 
       
    86 public:
       
    87     };
       
    88 
       
    89 
       
    90 class CLogsParameters : public CCreatorModuleBaseParameters
       
    91     {
       
    92 public: 
       
    93     /*HBufC*              iMissedCallPhoneNumber;
       
    94     TTime               iMissedCallEventTime;
       
    95 	
       
    96     HBufC*              iReceivedCallPhoneNumber;
       
    97     TTime               iReceivedCallEventTime;
       
    98     TLogDuration        iReceivedCallDuration;
       
    99 
       
   100     HBufC*              iDialledNumberPhoneNumber;
       
   101     TTime               iDialledNumberEventTime;
       
   102     TLogDuration        iDialledNumberDuration;*/
       
   103     HBufC*              iPhoneNumber;
       
   104     TTime               iEventTime;
       
   105     TLogDuration        iDuration;
       
   106 
       
   107 public:
       
   108     CLogsParameters();
       
   109     ~CLogsParameters();
       
   110     };
       
   111 
       
   112 
       
   113 
       
   114 #endif // __CREATORLOGS_H__