locationdataharvester/mylocationsengine/inc/calendernotification.h
changeset 17 0f22fb80ebba
child 20 cd10d5b85554
equal deleted inserted replaced
15:13ae750350c9 17:0f22fb80ebba
       
     1 /*
       
     2  * Copyright (c) 2010 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: calender db create notification .
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef CALENDERNOTIFICATION_H_
       
    19 #define CALENDERNOTIFICATION_H_
       
    20 
       
    21 // INCLUDES
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <f32file.h>
       
    25 
       
    26 /**  
       
    27  * The observer class gives notification to derive class .
       
    28  * When calender db creates in specific path.
       
    29  */
       
    30 class MNotifyChange
       
    31 {
       
    32 public:
       
    33     virtual void NotifyChangeL(TInt &aStatus)=0;
       
    34 };
       
    35 
       
    36 class CCalenderNotification : public CActive
       
    37 {
       
    38 public:
       
    39     /** 
       
    40      * CCalenderNotification::NewL()
       
    41      */
       
    42     static CCalenderNotification* NewL(MNotifyChange* aNotifyChange);
       
    43 
       
    44     /** 
       
    45      * CCalenderNotification::NewL()
       
    46      */
       
    47     static CCalenderNotification* NewLC(MNotifyChange* aNotifyChange);
       
    48     /**
       
    49      * ~CCalenderNotification.
       
    50      * Virtual Destructor.
       
    51      */
       
    52     virtual ~ CCalenderNotification();
       
    53 
       
    54 private:
       
    55     /**
       
    56      * ConstructL.
       
    57      * 2nd phase constructor.
       
    58      */
       
    59     void ConstructL(MNotifyChange* aNotifyChange);
       
    60     /**
       
    61      * CMyLocationsEngine.
       
    62      * C++ default constructor. 
       
    63      */
       
    64     CCalenderNotification(MNotifyChange* aNotifyChange);
       
    65     
       
    66 public:
       
    67     
       
    68     /**
       
    69      * CheckCalenderDbFileStructure.
       
    70      * Observes the calendar db file structure changes. 
       
    71      */
       
    72     void CheckCalenderDbFileStructure( TChar aDrive );
       
    73 
       
    74     /**
       
    75      *  Handles active object's request completion event. 
       
    76      */
       
    77     void RunL();
       
    78     /** 
       
    79      * Implements cancellation of an outstanding request. 
       
    80      */
       
    81     void DoCancel();
       
    82 private:
       
    83     //data member
       
    84     //file server 
       
    85     RFs iFsession;
       
    86     //observer to provide notification on completion of event
       
    87     MNotifyChange& iNotifyChange;
       
    88 };
       
    89 #endif /* CALENDERNOTIFICATION_H_ */