locationtriggering/ltcontainer/inc/lbtlisttriggerao.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     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 "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:  location triggering server client interface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef LBTLISTTRIGGERAO_H
       
    21 #define LBTLISTTRIGGERAO_H
       
    22 
       
    23 #include <lbt.h>
       
    24 #include "lbtcontainertriggerentry.h"
       
    25 #include "lbttriggerstoreinterface.h"
       
    26 #include "lbtcontainerlistoptions.h"
       
    27 
       
    28 class MLbtListTriggerObserver;
       
    29 NONSHARABLE_CLASS( CLbtListTriggerAO ) : public CActive
       
    30     {
       
    31     public: //constructor
       
    32         /**
       
    33         * Construct a trigger change event notifier object. 
       
    34         *
       
    35         * When the object is constructed. The trigger change 
       
    36         * notification request is not issued to the
       
    37         * Location Triggering Server. Client shall call 
       
    38         * CLbtTriggerChangeEventNotifier::Start() to start
       
    39         * notification.
       
    40         *
       
    41         * @param[in] aLbt A reference to RLbt object. The subsession 
       
    42         * must be opened. Otherwise a panic is raised.
       
    43         * @param[in] aObserver A reference to the 
       
    44         * observer object to receive trigger change event.
       
    45         * @param[in] aPriority An integer specifying the 
       
    46         * priority of this active object. CActive::TPriority 
       
    47         * defines a standard set of priorities. 
       
    48         *
       
    49         * @panic LocTriggering ELbtServerBadHandle If the 
       
    50         * subsession of aLbt is not opened.
       
    51         */
       
    52       
       
    53 		static CLbtListTriggerAO* NewL(MLbtListTriggerObserver& aObserver);
       
    54         /**
       
    55         * Destructor. 
       
    56         *
       
    57         * If the notification is started, the 
       
    58         * destructor will cancel the notification.
       
    59         */
       
    60         ~CLbtListTriggerAO();
       
    61 
       
    62         /**
       
    63         * Start trigger change event notification. 
       
    64         *
       
    65         * After this function is called, when any 
       
    66         * trigger is changed in Location Trigger Server, the
       
    67         * client will be notified from the observer interface.
       
    68         * 
       
    69         * Client shall call Cancel() function to stop the
       
    70         * trigger change event notification.
       
    71         */
       
    72         void Start();
       
    73         
       
    74         
       
    75         void ListTriggers(CLbtContainerListOptions* aFilter,
       
    76         RPointerArray < CLbtContainerTriggerEntry >& aTriggers,
       
    77         RPointerArray<MLbtTriggerStore>& aTriggerStores);
       
    78     
       
    79     private:
       
    80         //Derived from CActive
       
    81         void RunL();
       
    82         TInt RunError( TInt aError );
       
    83         void DoCancel();
       
    84 
       
    85     private:
       
    86         //C++ default constructor
       
    87       
       
    88         CLbtListTriggerAO(MLbtListTriggerObserver& aObserver);
       
    89     
       
    90 
       
    91         //Second phase constructor
       
    92         void ConstructL();
       
    93 
       
    94     private:
       
    95      TRequestStatus* iClientStatus;
       
    96     // CBufFlat* iClientBuf;  
       
    97     RPointerArray < CBufFlat > iClientBuf;
       
    98     MLbtListTriggerObserver& iObserver;
       
    99         
       
   100     };
       
   101 
       
   102 #endif // LBTTRIGGERCHANGEEVENTNOTIFIER_H
       
   103