locationtriggering/ltcontainer/inc/lbtlisttriggerao.h
author hgs
Wed, 03 Nov 2010 23:28:39 +0530
changeset 56 4e949f03ecc5
permissions -rw-r--r--
201044
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
56
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description:  location triggering server client interface
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
hgs
parents:
diff changeset
    19
hgs
parents:
diff changeset
    20
#ifndef LBTLISTTRIGGERAO_H
hgs
parents:
diff changeset
    21
#define LBTLISTTRIGGERAO_H
hgs
parents:
diff changeset
    22
hgs
parents:
diff changeset
    23
#include <lbt.h>
hgs
parents:
diff changeset
    24
#include "lbtcontainertriggerentry.h"
hgs
parents:
diff changeset
    25
#include "lbttriggerstoreinterface.h"
hgs
parents:
diff changeset
    26
#include "lbtcontainerlistoptions.h"
hgs
parents:
diff changeset
    27
hgs
parents:
diff changeset
    28
class MLbtListTriggerObserver;
hgs
parents:
diff changeset
    29
NONSHARABLE_CLASS( CLbtListTriggerAO ) : public CActive
hgs
parents:
diff changeset
    30
    {
hgs
parents:
diff changeset
    31
    public: //constructor
hgs
parents:
diff changeset
    32
        /**
hgs
parents:
diff changeset
    33
        * Construct a trigger change event notifier object. 
hgs
parents:
diff changeset
    34
        *
hgs
parents:
diff changeset
    35
        * When the object is constructed. The trigger change 
hgs
parents:
diff changeset
    36
        * notification request is not issued to the
hgs
parents:
diff changeset
    37
        * Location Triggering Server. Client shall call 
hgs
parents:
diff changeset
    38
        * CLbtTriggerChangeEventNotifier::Start() to start
hgs
parents:
diff changeset
    39
        * notification.
hgs
parents:
diff changeset
    40
        *
hgs
parents:
diff changeset
    41
        * @param[in] aLbt A reference to RLbt object. The subsession 
hgs
parents:
diff changeset
    42
        * must be opened. Otherwise a panic is raised.
hgs
parents:
diff changeset
    43
        * @param[in] aObserver A reference to the 
hgs
parents:
diff changeset
    44
        * observer object to receive trigger change event.
hgs
parents:
diff changeset
    45
        * @param[in] aPriority An integer specifying the 
hgs
parents:
diff changeset
    46
        * priority of this active object. CActive::TPriority 
hgs
parents:
diff changeset
    47
        * defines a standard set of priorities. 
hgs
parents:
diff changeset
    48
        *
hgs
parents:
diff changeset
    49
        * @panic LocTriggering ELbtServerBadHandle If the 
hgs
parents:
diff changeset
    50
        * subsession of aLbt is not opened.
hgs
parents:
diff changeset
    51
        */
hgs
parents:
diff changeset
    52
      
hgs
parents:
diff changeset
    53
		static CLbtListTriggerAO* NewL(MLbtListTriggerObserver& aObserver);
hgs
parents:
diff changeset
    54
        /**
hgs
parents:
diff changeset
    55
        * Destructor. 
hgs
parents:
diff changeset
    56
        *
hgs
parents:
diff changeset
    57
        * If the notification is started, the 
hgs
parents:
diff changeset
    58
        * destructor will cancel the notification.
hgs
parents:
diff changeset
    59
        */
hgs
parents:
diff changeset
    60
        ~CLbtListTriggerAO();
hgs
parents:
diff changeset
    61
hgs
parents:
diff changeset
    62
        /**
hgs
parents:
diff changeset
    63
        * Start trigger change event notification. 
hgs
parents:
diff changeset
    64
        *
hgs
parents:
diff changeset
    65
        * After this function is called, when any 
hgs
parents:
diff changeset
    66
        * trigger is changed in Location Trigger Server, the
hgs
parents:
diff changeset
    67
        * client will be notified from the observer interface.
hgs
parents:
diff changeset
    68
        * 
hgs
parents:
diff changeset
    69
        * Client shall call Cancel() function to stop the
hgs
parents:
diff changeset
    70
        * trigger change event notification.
hgs
parents:
diff changeset
    71
        */
hgs
parents:
diff changeset
    72
        void Start();
hgs
parents:
diff changeset
    73
        
hgs
parents:
diff changeset
    74
        
hgs
parents:
diff changeset
    75
        void ListTriggers(CLbtContainerListOptions* aFilter,
hgs
parents:
diff changeset
    76
        RPointerArray < CLbtContainerTriggerEntry >& aTriggers,
hgs
parents:
diff changeset
    77
        RPointerArray<MLbtTriggerStore>& aTriggerStores);
hgs
parents:
diff changeset
    78
    
hgs
parents:
diff changeset
    79
    private:
hgs
parents:
diff changeset
    80
        //Derived from CActive
hgs
parents:
diff changeset
    81
        void RunL();
hgs
parents:
diff changeset
    82
        TInt RunError( TInt aError );
hgs
parents:
diff changeset
    83
        void DoCancel();
hgs
parents:
diff changeset
    84
hgs
parents:
diff changeset
    85
    private:
hgs
parents:
diff changeset
    86
        //C++ default constructor
hgs
parents:
diff changeset
    87
      
hgs
parents:
diff changeset
    88
        CLbtListTriggerAO(MLbtListTriggerObserver& aObserver);
hgs
parents:
diff changeset
    89
    
hgs
parents:
diff changeset
    90
hgs
parents:
diff changeset
    91
        //Second phase constructor
hgs
parents:
diff changeset
    92
        void ConstructL();
hgs
parents:
diff changeset
    93
hgs
parents:
diff changeset
    94
    private:
hgs
parents:
diff changeset
    95
     TRequestStatus* iClientStatus;
hgs
parents:
diff changeset
    96
    // CBufFlat* iClientBuf;  
hgs
parents:
diff changeset
    97
    RPointerArray < CBufFlat > iClientBuf;
hgs
parents:
diff changeset
    98
    MLbtListTriggerObserver& iObserver;
hgs
parents:
diff changeset
    99
        
hgs
parents:
diff changeset
   100
    };
hgs
parents:
diff changeset
   101
hgs
parents:
diff changeset
   102
#endif // LBTTRIGGERCHANGEEVENTNOTIFIER_H
hgs
parents:
diff changeset
   103