omadm/omadmappui/inc/NSmlDMSyncDialog.h
changeset 0 3ce708148e4d
equal deleted inserted replaced
-1:000000000000 0:3ce708148e4d
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  Sync Log handler class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NSMLDMSYNCDIALOG_H
       
    20 #define NSMLDMSYNCDIALOG_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <badesca.h>
       
    25 
       
    26 #include "NSmlDMdef.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class RSyncMLSession;
       
    30 class RSyncMLHistoryLog;
       
    31 class CSyncMLHistoryJob;
       
    32 class CNSmlDMSyncProfile;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 *  CNSmlDMSyncDialog
       
    38 *  
       
    39 */
       
    40 NONSHARABLE_CLASS (CNSmlDMSyncDialog) : public CBase
       
    41     {
       
    42     
       
    43 	// this must match with resource r_sml_log_items
       
    44 	enum TLogItem
       
    45 		{
       
    46 	    EHeadingProfile = 0,
       
    47 	    EHeadingServer = 1,
       
    48 	    EHeadingDate = 2,
       
    49 		EHeadingTime = 3,
       
    50 		EHeadingStatus = 4
       
    51 		};
       
    52 
       
    53 	public:
       
    54 	    /**
       
    55         * Launches log dialog.
       
    56 		* @param aProfileId Profile id
       
    57 		* @param aSyncSession Server session
       
    58         * @return Completion code.
       
    59         */
       
    60 		static TBool ShowDialogL( TInt aProfileId,
       
    61 		                          RSyncMLSession* aSyncSession );
       
    62 
       
    63     
       
    64 	public:// Constructors and destructor
       
    65 
       
    66         /**
       
    67         * Two-phased constructor.
       
    68         */
       
    69         static CNSmlDMSyncDialog* NewL( TInt aProfileId,
       
    70                                         RSyncMLSession* aSyncSession );
       
    71         
       
    72         /**
       
    73         * Destructor.
       
    74         */
       
    75         virtual ~CNSmlDMSyncDialog();
       
    76     
       
    77     private:
       
    78 
       
    79         /**
       
    80         * C++ default constructor.
       
    81         */
       
    82         CNSmlDMSyncDialog( TInt aProfileId, RSyncMLSession* aSyncSession );
       
    83 	
       
    84         /**
       
    85         * By default Symbian OS constructor is private.
       
    86         */
       
    87         void ConstructL();
       
    88 
       
    89 	private:
       
    90 	    /**
       
    91         * Shows popup-style log view.
       
    92 		* @param None.
       
    93         * @return None.
       
    94         */
       
    95 		void PopupLogViewL();
       
    96 
       
    97 		/**
       
    98         * Adds general log data into listbox array.
       
    99 		* @param aArray Listbox array.
       
   100         * @return None.
       
   101         */
       
   102 		void FormatLogViewListL( CDesCArray* aArray );
       
   103       
       
   104 		/**
       
   105         * Gets latest history (sync) job.
       
   106 		* @param aHistoryLog.
       
   107         * @return History job.
       
   108         */
       
   109         CSyncMLHistoryJob* LatestHistoryJob( RSyncMLHistoryLog& aHistoryLog );
       
   110 		
       
   111 		/**
       
   112         * Reads resource text with the given resource id.
       
   113 		* @param aText Associated resource text.
       
   114 		* @param aResourceId Given resource id.
       
   115         * @return None.
       
   116         */
       
   117         void ReadL( TDes& aText, TInt aResourceId );
       
   118 
       
   119 	private:
       
   120         // profile id
       
   121 		TInt                        iProfileId;
       
   122 		
       
   123 		// sync profile
       
   124 		CNSmlDMSyncProfile*         iProfile;
       
   125 
       
   126 		// session with sync server
       
   127 		RSyncMLSession*             iSyncSession;
       
   128 		
       
   129 		// history job (contains sync information)
       
   130 		const CSyncMLHistoryJob*    iHistoryJob;
       
   131 
       
   132 		// log item headers (from resource file)
       
   133 		CDesCArrayFlat*             iLogItems;
       
   134 	};
       
   135 
       
   136 #endif      // NSMLDMSYNCDIALOG_H
       
   137             
       
   138 // End of File