locationtriggering/ltcontainer/inc/lbtupdateasyncoperation.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:  Abstract base class for location triggering entries
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_LBT_UPDATE_ASYNCOPERATION_H
       
    20 #define C_LBT_UPDATE_ASYNCOPERATION_H
       
    21 
       
    22 
       
    23 #include <lbtcommon.h>
       
    24 #include <lbttriggerdynamicinfo.h>
       
    25 
       
    26 #include "lbtcontainerupdatefilter.h"
       
    27 #include "lbtcontainerAOOperation.h"
       
    28 #include "lbttriggerstoreinterface.h"   
       
    29 #include "lbtsecuritypolicy.h"
       
    30 
       
    31        	
       
    32 /* This is the  class used hold the data sent by the client in case of 
       
    33  * asynchronous operations */
       
    34        	
       
    35 NONSHARABLE_CLASS( CLbtUpdateAsyncOperation ) : public CLbtContainerAOOperation
       
    36     {
       
    37 public:
       
    38         
       
    39      /**
       
    40      * Constructs a new instance of container trigger entry object.
       
    41      *
       
    42      * @return The new instance of the container trigger entry object.
       
    43      */
       
    44      static CLbtUpdateAsyncOperation* NewL( CLbtContainerTriggerEntry& aEntry,
       
    45      										TLbtTriggerDataMask aDataMask,
       
    46      										TLbtTriggerAttributeFieldsMask aAttrMask,
       
    47      										TRequestStatus& aClientStatus,
       
    48      										TLbtSecurityPolicy aSecurityPolicy,
       
    49      										TContainerAOOperation aUpdateOpType);
       
    50     
       
    51      static CLbtUpdateAsyncOperation* NewL( CLbtTriggerEntry::TLbtTriggerState aState,
       
    52      										CLbtContainerUpdateFilter* aFilter,
       
    53      										TLbtFireOnUpdate aFireOnUpdate,
       
    54      										TRequestStatus& aClientStatus,     										
       
    55      										TLbtSecurityPolicy aSecurityPolicy,
       
    56      										TContainerAOOperation aUpdateOpType);
       
    57     
       
    58      static CLbtUpdateAsyncOperation* NewL( TLbtTriggerDynamicInfo::TLbtTriggerValidity aValidity,
       
    59      										RArray<TLbtTriggerId> &aTriggerIds,
       
    60      										TRequestStatus& aClientStatus,
       
    61      										TLbtSecurityPolicy aSecurityPolicy,
       
    62      										TContainerAOOperation aUpdateOpType);
       
    63      
       
    64      static CLbtUpdateAsyncOperation* NewL( RArray<TLbtTriggerId>& aTriggerIds,
       
    65 								            TRequestStatus& aClientStatus,
       
    66 								            TBool aFireBool,
       
    67 								            TLbtSecurityPolicy aSecurityPolicy,
       
    68 								            TContainerAOOperation aUpdateOpType );
       
    69     
       
    70         
       
    71    	 virtual void StartAOOperationL(MLbtTriggerStore *aStore, TRequestStatus &aStatus) ;
       
    72     
       
    73      virtual TRequestStatus* GetStatus();
       
    74     
       
    75     /**
       
    76      * Destructor
       
    77      */
       
    78      virtual ~CLbtUpdateAsyncOperation();
       
    79 
       
    80   
       
    81    
       
    82          
       
    83 	
       
    84 private:
       
    85     /**
       
    86      * Constructor.
       
    87      */
       
    88  	  CLbtUpdateAsyncOperation(TLbtSecurityPolicy aSecurityPolicy);
       
    89                     
       
    90       void ConstructL(); 
       
    91       
       
    92       void ConstructL( CLbtContainerTriggerEntry& aEntry,
       
    93 					   TLbtTriggerDataMask aDataMask,
       
    94 					   TLbtTriggerAttributeFieldsMask aAttrMask,
       
    95 					   TRequestStatus& aClientStatus,
       
    96 					   TContainerAOOperation aUpdateOpType);
       
    97      
       
    98      void ConstructL( CLbtTriggerEntry::TLbtTriggerState aState,
       
    99 				      CLbtContainerUpdateFilter* aFilter,
       
   100 				      TLbtFireOnUpdate aFireOnUpdate,
       
   101 				      TRequestStatus& aClientStatus,
       
   102 				      TContainerAOOperation aUpdateOpType);
       
   103      
       
   104      void ConstructL( TLbtTriggerDynamicInfo::TLbtTriggerValidity aValidity,
       
   105 				      RArray<TLbtTriggerId>& aTriggerIds,
       
   106 				      TRequestStatus& aClientStatus,
       
   107 				      TContainerAOOperation aUpdateOpType);  
       
   108 
       
   109 	 void ConstructL( RArray<TLbtTriggerId>& aTriggerIds,
       
   110 		              TRequestStatus& aClientStatus,
       
   111 		              TBool aFireBool,
       
   112 		              TContainerAOOperation aUpdateOpType );
       
   113 
       
   114 	 TContainerAOOperation GetAOOperationType();
       
   115        
       
   116 private:
       
   117     
       
   118     /**
       
   119      * Pointer to trigger entry which needs to be updated.
       
   120      * This pointer is not owner by container and hence should
       
   121      * not be deleted
       
   122      */
       
   123     CLbtContainerTriggerEntry* iEntry;
       
   124     
       
   125     TLbtTriggerDataMask iDataMask;
       
   126     
       
   127     TLbtTriggerAttributeFieldsMask iAttrMask;
       
   128    
       
   129     CLbtTriggerEntry::TLbtTriggerState iState;
       
   130     
       
   131     CLbtContainerUpdateFilter* iFilter;
       
   132             
       
   133     TLbtTriggerDynamicInfo::TLbtTriggerValidity iValidity;
       
   134     
       
   135     RArray<TLbtTriggerId> iTriggerIds;
       
   136             
       
   137     TRequestStatus* iClientStatus;
       
   138      
       
   139     TContainerAOOperation iUpdateOpType;
       
   140     
       
   141     TBool iFireBool;
       
   142     
       
   143     TLbtFireOnUpdate iFireOnUpdate;
       
   144     
       
   145     // Security policy
       
   146     TLbtSecurityPolicy iSecurityPolicy;
       
   147     };
       
   148 
       
   149 
       
   150 #endif // C_LBT_CONTAINER_AOOPERATION_H