2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: location triggering server client interface
20 #ifndef LBTTRIGGERFIRINGEVENTNOTIFIER_H
21 #define LBTTRIGGERFIRINGEVENTNOTIFIER_H
24 #include <lbttriggerfiringeventobserver.h>
27 * Helper class to receive trigger firing event
28 * through observer interface.
30 * @see RLbt::NotifyTriggerFired
37 class CLbtTriggerFiringEventNotifier : public CActive
41 * Construct a trigger firing event notifier object.
43 * When the object is constructed. The trigger firing event
44 * notification request is not issued to the
45 * Location Triggering Server. Client shall call
46 * CLbtTriggerFiringEventNotifier::Start() to start
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 trigger firing event.
53 * @param[in] aPriority An integer specifying the
54 * priority of this active object. CActive::TPriority
55 * defines a standard set of priorities.
57 * @panic LocTriggering ELbtServerBadHandle If the
58 * subsession of aLbt is not opened.
60 IMPORT_C static CLbtTriggerFiringEventNotifier* NewL(
62 MLbtTriggerFiringEventObserver& aObserver,
63 TInt aPriority = CActive::EPriorityStandard);
68 * If the notification is started, the
69 * destructor will cancel the notification.
71 IMPORT_C ~CLbtTriggerFiringEventNotifier();
74 * Start trigger firing event notification.
76 * After this function is called, when a
77 * trigger is fired, the
78 * client will be notified from the observer interface.
80 * Client shall call Cancel() function to stop the
81 * trigger firing event notification.
83 IMPORT_C void Start();
86 //Derived from CActive
88 TInt RunError( TInt aError );
95 CLbtTriggerFiringEventNotifier(
97 MLbtTriggerFiringEventObserver& aObserver,
98 TInt aPriority = CActive::EPriorityStandard );
101 * Second phase constructor
109 TLbtTriggerFireInfo iFiringEvent;
112 * Reference to Lbt subsession.
117 * Reference to trigger fire event observer
119 MLbtTriggerFiringEventObserver& iObserver;
122 #endif //LBTTRIGGERFIRINGEVENTNOTIFIER_H