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