omads/omadsappui/AspPreSyncPlugin/inc/AspPreSyncDefaultPlugin.h
branchRCL_3
changeset 25 4f0867e42d62
parent 0 dab8a81a92de
equal deleted inserted replaced
24:8e7494275d3a 25:4f0867e42d62
       
     1 /*
       
     2 * Copyright (c) 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 is the default plugin which will be called before starting
       
    15 *                the snchronization.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef ASPPRESYNCDEFAULTPLUGIN_H
       
    21 #define ASPPRESYNCDEFAULTPLUGIN_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32cmn.h>
       
    25 #include <s32mem.h>
       
    26 #include <e32hashtab.h>
       
    27 #include <e32property.h>
       
    28 #include <centralrepository.h>
       
    29 #include <ConeResLoader.h> 
       
    30 #include <bautils.h>
       
    31 #include <eikenv.h>
       
    32 #include "CPreSyncPlugin.h"
       
    33 #include <AknQueryDialog.h>
       
    34 
       
    35 //  INCLUDES
       
    36 #include <e32base.h>
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 class CAknGlobalMsgQuery;
       
    41 
       
    42 class CRoamingCheck : public CBase
       
    43 	{
       
    44 	public:
       
    45     /*!
       
    46     @function NewL
       
    47     */
       
    48     static CRoamingCheck* NewL();
       
    49     
       
    50       /*!
       
    51       @function NewLC
       
    52       */
       
    53     static CRoamingCheck* NewLC();
       
    54     
       
    55       /*!
       
    56       @function ConstructL
       
    57       
       
    58       @discussion Perform the second phase construction of a CRoamingCheck object
       
    59       this needs to be public 
       
    60       */
       
    61      void ConstructL();
       
    62 
       
    63       /*!
       
    64       @function CRoamingCheck
       
    65       
       
    66       @discussion Perform the first phase of two phase construction.
       
    67       This needs to be public 
       
    68       */
       
    69      CRoamingCheck(CEikonEnv* aEikEnv);
       
    70      /*!
       
    71       @function ~CRoamingCheck
       
    72       @discussion Destroy the object and release all memory objects
       
    73       */
       
    74     ~CRoamingCheck();
       
    75     void ShowGlobalNoteL(TInt aSoftKeyId, 
       
    76               const HBufC* aMessage, TInt& status);
       
    77 	private:
       
    78     CAknGlobalMsgQuery* iGlobalNote;
       
    79     CEikonEnv* iEnv;
       
    80     RConeResourceLoader iResLoader;
       
    81     };
       
    82 
       
    83 
       
    84 // FORWARD DECLARATION
       
    85 
       
    86 // CLASS DECLARATION
       
    87 class CPreSyncDefaultPlugin : public CPreSyncPlugin
       
    88 {
       
    89 	public: 
       
    90 	
       
    91 		/**
       
    92 		* Two phase construction
       
    93 		*/
       
    94 		static CPreSyncDefaultPlugin* NewL();
       
    95 
       
    96 		/**
       
    97 		* Destructor
       
    98 		*/
       
    99 		virtual ~CPreSyncDefaultPlugin();
       
   100 
       
   101 
       
   102      public:
       
   103 
       
   104          /**
       
   105           * Function:    IsSupported
       
   106           *
       
   107           */
       
   108          virtual TBool IsSupported();
       
   109          
       
   110          /**
       
   111           * Function:    CanSync
       
   112           *
       
   113           */
       
   114          virtual TBool CanSyncL();
       
   115          
       
   116          /**
       
   117           * Function:    SetProfile  
       
   118           *
       
   119           */
       
   120          virtual TBool SetProfile(const TSmlProfileId& aProfileId);
       
   121          
       
   122          /**
       
   123           * Function:    SyncNow  
       
   124           *
       
   125           */   
       
   126          virtual TInt SyncNow(MSyncExtObserver* aObserver);
       
   127 
       
   128 		
       
   129 	private:
       
   130 	    void  ReadRepositoryL(TInt aKey, TInt& aValue);
       
   131 	    
       
   132 	    
       
   133 		/**
       
   134 		* Constructor
       
   135 		*/
       
   136 		CPreSyncDefaultPlugin();
       
   137 
       
   138 		/**
       
   139 		* 2nd phase construtor
       
   140 		*/
       
   141 		void ConstructL();
       
   142 		
       
   143 	private:
       
   144 	    TSmlProfileId iSyncProfileId;
       
   145 };
       
   146 	
       
   147 
       
   148 #endif // ASPPRESYNCDEFAULTPLUGIN_H