epoc32/include/mw/lbttriggeringsystemsettingschangeeventnotifier.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 /*
     2 * Copyright (c) 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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  location triggering server client interface
    15 *
    16 */
    17 
    18 
    19 
    20 #ifndef LBTTRIGGERINGSYSTEMSETTINGSCHANGEEVENTNOTIFIER_H
    21 #define LBTTRIGGERINGSYSTEMSETTINGSCHANGEEVENTNOTIFIER_H
    22 
    23 #include <lbt.h>
    24 #include <lbttriggeringsystemsettingschangeeventobserver.h>
    25 
    26 /**
    27  * Helper class to receive triggering system settings change event 
    28  * through observer interface. 
    29  *
    30  * @see RLbt::NotifyTriggeringSystemSettingChange
    31  *
    32  * @lib lbt.lib
    33  *
    34  * @since S60 5.1
    35  */
    36 class CLbtTriggeringSystemSettingsChangeEventNotifier : public CActive
    37     {
    38 public:
    39     /**
    40      * Construct a triggering system settings change event notifier object. 
    41      *
    42      * When the object is constructed. The triggering
    43      * system settings change  notification request is not 
    44      * issued to the Location Triggering Server. Client 
    45      * shall call 
    46      * CLbtTriggeringSystemSettingsChangeEventNotifier::Start() 
    47      * to start notification.
    48      *
    49      * @param[in] aLbt A referece to RLbt object. The subsession 
    50      * must be opened. Otherwise a panic is raised.
    51      * @param[in] aObserver A referece to the 
    52      * observer object to receive triggering system setting 
    53      * change event.
    54      * @param[in] aPriority An integer specifying the 
    55      * priority of this active object. CActive::TPriority 
    56      * defines a standard set of priorities. 
    57      *
    58      * @panic LocTriggering ELbtServerBadHandle If the 
    59      * subsession of aLbt is not opened.
    60      */
    61      IMPORT_C static CLbtTriggeringSystemSettingsChangeEventNotifier* NewL(
    62         RLbt& aLbt,
    63         MLbtTriggeringSystemSettingsChangeEventObserver& aObserver,
    64         TInt aPriority = CActive::EPriorityStandard);
    65 
    66     /**
    67      * Destructor. 
    68      *
    69      * If the notification is started, the 
    70      * destructor will cancel the notification.
    71      */
    72     IMPORT_C ~CLbtTriggeringSystemSettingsChangeEventNotifier();
    73 
    74     /**
    75      * Start triggering system settings change event notification. 
    76      *
    77      * After this function is called, when triggering 
    78      * system settings are changed, the
    79      * client will be notified from the observer interface.
    80      * 
    81      * Client shall call Cancel() function to stop the
    82      * triggering system settings change event notification.
    83      */
    84     IMPORT_C void Start();
    85 
    86 private:
    87     //Derived from CActive
    88     void RunL();
    89     TInt RunError( TInt aError );
    90     void DoCancel();
    91 
    92 private:
    93     /**
    94      * Default constructor
    95      */
    96     CLbtTriggeringSystemSettingsChangeEventNotifier(
    97         RLbt& aLbt,
    98         MLbtTriggeringSystemSettingsChangeEventObserver& aObserver,
    99         TInt aPriority = CActive::EPriorityStandard );
   100 
   101     /**
   102      * Symbian 2nd phase constructor
   103      */
   104     void ConstructL();
   105 
   106 private:
   107     /**
   108      * Triggering system setting.
   109      */
   110     TLbtTriggeringSystemSettings iSettings;
   111     
   112     /**
   113      * Reference to Lbt subsession.
   114      */
   115     RLbt& iLbt;
   116     
   117     /**
   118      * Reference to triggering system settings change observer,
   119      */
   120     MLbtTriggeringSystemSettingsChangeEventObserver& iObserver; 
   121     };
   122 
   123 #endif //LBTTRIGGERINGSYSTEMSETTINGSCHANGEEVENTNOTIFIER_H