locationdataharvester/mylocationsengine/inc/calendarsubscriber.h
branchRCL_3
changeset 18 870918037e16
parent 17 1fc85118c3ae
equal deleted inserted replaced
17:1fc85118c3ae 18:870918037e16
     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: Subscribe notification .
       
    15  *
       
    16  */
       
    17 #ifndef CALENDARSUBSCRIBER_H
       
    18 #define CALENDARSUBSCRIBER_H
       
    19 
       
    20 // INCLUDES
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <e32property.h>
       
    24 #include "notification.h" 
       
    25 class CCalendarSubscriber : public CActive
       
    26 {
       
    27 public:
       
    28     /** 
       
    29      * CCalendarSubscriber::NewL()
       
    30      */
       
    31     static CCalendarSubscriber* NewL(MNotifyChange* aNotifyChange);
       
    32 
       
    33     /** 
       
    34      * CCalendarSubscriber::NewL()
       
    35      */
       
    36     static CCalendarSubscriber* NewLC(MNotifyChange* aNotifyChange);
       
    37     /**
       
    38      * ~CCalendarSubscriber.
       
    39      * Virtual Destructor.
       
    40      */
       
    41     virtual ~ CCalendarSubscriber();
       
    42 
       
    43 private:
       
    44     /**
       
    45      * ConstructL.
       
    46      * 2nd phase constructor.
       
    47      */
       
    48     void ConstructL();
       
    49     /**
       
    50      * CMyLocationsEngine.
       
    51      * C++ default constructor. 
       
    52      */
       
    53     CCalendarSubscriber(MNotifyChange* aNotifyChange);
       
    54     
       
    55 #ifdef MYLOCATIONENGINE_UNIT_TEST
       
    56 public:
       
    57 #else
       
    58 private:
       
    59 #endif
       
    60     
       
    61     /**
       
    62      * start subscribe for calendar entry
       
    63      */
       
    64     void SubscribeChangeNotiFication();
       
    65 
       
    66     /**
       
    67      *  Handles active object's request completion event. 
       
    68      */
       
    69     void RunL();
       
    70     /** 
       
    71      * Implements cancellation of an outstanding request. 
       
    72      */
       
    73     void DoCancel();
       
    74 private:   
       
    75     //observer to provide notification on completion of event
       
    76     MNotifyChange& iNotifyChange;
       
    77     RProperty iProperty;
       
    78 };
       
    79 #endif // CALENDARSUBSCRIBER_H