phoneengine/loghandling/inc/cpelogevent.h
changeset 0 5f000ab63145
child 3 8871b09be73b
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2003-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 file contains the header file of the CPELogEvent class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef    CPELOGEVENT_H
       
    22 #define    CPELOGEVENT_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include "pevirtualengine.h"
       
    26 #include "cpeloghandling.h"
       
    27 #include <logwrap.h>
       
    28 
       
    29 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    30 #include <logwraplimits.h>
       
    31 #include <logengdurations.h>
       
    32 #endif
       
    33 
       
    34 // CONSTANTS
       
    35 const TInt KPEESDWFormattedTimeLength( 50 ); // Formatted time length
       
    36 _LIT( KPEESDWTimeFormat, "%F%D/%M/%Y %H:%T:%S" ); //Time format
       
    37 
       
    38 //Defined in \s60\app\contacts\logsui\EngineIncLogsApiConsts.h
       
    39 const TInt KTUintCharLength( 10 );
       
    40 
       
    41 // MACROS
       
    42 //None.
       
    43 
       
    44 // DATA TYPES
       
    45 //None.
       
    46 
       
    47 // FUNCTION PROTOTYPES
       
    48 //None.
       
    49 
       
    50 // FORWARD DECLARATIONS
       
    51 
       
    52 // CLASS DECLARATION
       
    53 
       
    54 /**
       
    55 * CPELogEvent is the class that interfaced with Symbian Log Engine over the
       
    56 * log client interface.
       
    57 *
       
    58 *  @lib loghandling.lib
       
    59 *  @since Series60_2.7
       
    60 */
       
    61 class CPELogEvent : public CBase
       
    62     {
       
    63     public:  // Constructors and destructor
       
    64         /**
       
    65         * Two-phased constructor.
       
    66         */
       
    67         static CPELogEvent* NewL( CPELogHandling& aOwner,
       
    68                                   CPELogHandlingCommand& aLogHandlingCommand );
       
    69      
       
    70         /**
       
    71         * Destructor.
       
    72         */
       
    73         /*****************************************************
       
    74         *    Series 60 Customer / LOGENG
       
    75         *    Series 60  LOGENG API
       
    76         *****************************************************/                
       
    77         virtual ~CPELogEvent(); 
       
    78          
       
    79     protected:
       
    80         
       
    81         /**
       
    82         * C++ default constructor.
       
    83         */
       
    84         CPELogEvent( CPELogHandling& aOwner, CPELogHandlingCommand& aLogHandlingCommand );
       
    85 
       
    86         /**
       
    87         * By default EPOC constructor is private.
       
    88         */
       
    89         /*****************************************************
       
    90         *    Series 60 Customer / LOGENG
       
    91         *    Series 60  LOGENG API
       
    92         *****************************************************/                
       
    93         virtual void ConstructL();
       
    94 
       
    95 
       
    96     public: // New functions
       
    97         /**
       
    98         * Add call entry to database.
       
    99         * @param None
       
   100         * @return None.
       
   101         */
       
   102         void SaveL( );
       
   103 
       
   104         /**
       
   105         * Update log info for the log event
       
   106         * @param TPELogInfo& alogInfo, log information
       
   107         * @return None.
       
   108         */
       
   109         void UpdateLogInfoL( const CPELogInfo& aLogInfo );
       
   110         
       
   111         /**
       
   112         * Reset log info 
       
   113         */
       
   114         void ResetLogInfo();
       
   115 
       
   116         /**
       
   117         * Reset event.
       
   118         * @since N/A
       
   119         * @param None.
       
   120         * @return None.
       
   121         */
       
   122         /*****************************************************
       
   123         *    Series 60 Customer / LOGENG
       
   124         *    Series 60  LOGENG API
       
   125         *****************************************************/                
       
   126         void ResetEvent();      
       
   127        
       
   128         /* Get call id of the event
       
   129         * @param: None
       
   130         * @return TInt aCallId, call idendification.
       
   131         */  
       
   132         TInt CallId( );
       
   133 
       
   134         /* Check is the event has been completed; no new updates expected
       
   135         * @param: None.
       
   136         * @return TBool ETrue or False.
       
   137         */  
       
   138         TBool IsCompleted();
       
   139 
       
   140         /* Check is the event has been completed; no new updates expected
       
   141         * @param: None.
       
   142         * @return None.
       
   143         */  
       
   144         void SetAdded();
       
   145         
       
   146         /* Get call id of the event
       
   147         * @param: None
       
   148         * @return TBool save leave flag. ETrue if SaveL leaves.
       
   149         */  
       
   150         TBool SaveLeave( );        
       
   151 
       
   152     private:
       
   153         /**
       
   154         * Set phonenumber type to event subject from phonenumber id.
       
   155         * @since N/A
       
   156         * @param None.
       
   157         * @return None.
       
   158         */
       
   159         /*****************************************************
       
   160         *    Series 60 Customer / LOGENG
       
   161         *    Series 60  LOGENG API
       
   162         *****************************************************/                
       
   163         void SetPhoneNumberId();
       
   164     
       
   165         /**
       
   166         * Set Event type
       
   167         * @since N/A
       
   168         * @param None.
       
   169         * @return None.
       
   170         */
       
   171         /*****************************************************
       
   172         *    Series 60 Customer / LOGENG
       
   173         *    Series 60  LOGENG API
       
   174         *****************************************************/                
       
   175         void SetEventTypeL();
       
   176 
       
   177         /**
       
   178         * Set log event information.
       
   179         * @since N/A
       
   180         * @param None.
       
   181         * @return None.
       
   182         */
       
   183         /*****************************************************
       
   184         *    Series 60 Customer / LOGENG
       
   185         *    Series 60  LOGENG API
       
   186         *****************************************************/                
       
   187         void SetLogEvent();
       
   188 
       
   189         /**
       
   190         * Set log event duration.
       
   191         * @since N/A
       
   192         * @param None.
       
   193         * @return None.
       
   194         */
       
   195         /*****************************************************
       
   196         *    Series 60 Customer / LOGENG
       
   197         *    Series 60  LOGENG API
       
   198         *****************************************************/                        
       
   199         void SetDuration();
       
   200 
       
   201         /**
       
   202         * Sets callers service id to log event.
       
   203         * @since N/A
       
   204         * @param None.
       
   205         * @return None.
       
   206         */
       
   207         void SetServiceIdL();
       
   208         
       
   209         /**
       
   210         * Sets callers contact link to log event.
       
   211         * 
       
   212         * @since v5.0
       
   213         */
       
   214         void SetContactLinkL();
       
   215 
       
   216         /**
       
   217         * Sets a data field like VoIP address or my address.
       
   218         * @since    S60 v5.1
       
   219         * @param    aTag        Log tag identifying a field.
       
   220         * @param    aFieldData  Field data.
       
   221         */
       
   222         void SetDataFieldL( const TDesC8& aTag, const TDesC& aFieldData );
       
   223 
       
   224         /**
       
   225          * Sets remote party to the given log event.
       
   226          * @since    S60 v5.1
       
   227          * @param    aEvent        Log event.
       
   228          * @param    aLogInfo      Log info containing remote party.
       
   229          */
       
   230         void SetRemoteParty( CLogEvent& aEvent, const CPELogInfo& aLogInfo );
       
   231         
       
   232         /**
       
   233          * Sets remote contact to the given log event.
       
   234          * @since    S60 v5.1
       
   235          * @param    aEvent        Log event.
       
   236          * @param    aLogInfo      Log info containing remote contact.
       
   237          */
       
   238         void SetRemoteContact( CLogEvent& aEvent, const CPELogInfo& aLogInfo );
       
   239         
       
   240     private:    // Data
       
   241         // Owner of the object.
       
   242         CPELogHandling& iOwner;
       
   243         // Reference to log handling command object
       
   244         CPELogHandlingCommand& iLogHandlingCommand; 
       
   245         // Log database event.
       
   246         /*****************************************************
       
   247         *    Series 60 Customer / LOGENG
       
   248         *    Series 60  LOGENG API
       
   249         *****************************************************/                
       
   250         CLogEvent* iEvent;       
       
   251         // Call information.
       
   252         CPELogInfo* iLogInfo;
       
   253         // Completed indicator
       
   254         TBool iCompleted;
       
   255         // Added indicator.
       
   256         TBool iAdded;
       
   257         // Save Leave indicator
       
   258         TBool iSaveLeave;
       
   259     };
       
   260 
       
   261 #endif      // CPELOGSENTRY_H  
       
   262             
       
   263 // End of File