locationtriggering/ltcontainer/src/lbtcontainerao.cpp
branchRCL_3
changeset 44 2b4ea9893b66
parent 0 667063e416a2
child 45 6b6920c56e2f
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
   453 		{
   453 		{
   454 		CLbtCreateAsyncOperation* createop = static_cast <CLbtCreateAsyncOperation*> (asyncObjPtr);
   454 		CLbtCreateAsyncOperation* createop = static_cast <CLbtCreateAsyncOperation*> (asyncObjPtr);
   455 		
   455 		
   456 		RArray<TLbtTriggerId> triggerIds;
   456 		RArray<TLbtTriggerId> triggerIds;
   457 		CLbtContainerTriggerEntry* entry = const_cast<CLbtContainerTriggerEntry*>(createop->ContainerTriggerEntry());
   457 		CLbtContainerTriggerEntry* entry = const_cast<CLbtContainerTriggerEntry*>(createop->ContainerTriggerEntry());
   458    		triggerIds.Append(entry->TriggerEntry()->Id());
   458    		TInt error = triggerIds.Append(entry->TriggerEntry()->Id());
   459    		
   459    		if( error != KErrNone )
       
   460    		    {
       
   461             LOG1("Failed to append trigger ids to array:%d",error); 
       
   462    		    }
   460    		
   463    		
   461    		TLbtTriggerEventMask eventMask;
   464    		TLbtTriggerEventMask eventMask;
   462    		
   465    		
   463    		// Append the manager uids and owner uids into the array
   466    		// Append the manager uids and owner uids into the array
   464    		RArray<TUid> managerui;
   467    		RArray<TUid> managerui;
   465    		managerui.Append( entry->TriggerEntry()->ManagerUi() );
   468    		error = managerui.Append( entry->TriggerEntry()->ManagerUi() );
   466 		
   469         if( error != KErrNone )
       
   470             {
       
   471             LOG1("Failed to append trigger ids to array:%d",error); 
       
   472             }
       
   473    		
   467    		TUid ownerUid;
   474    		TUid ownerUid;
   468    		ownerUid.iUid = (TInt)( entry->ExtendedTriggerInfo()->OwnerSid().iId);
   475    		ownerUid.iUid = (TInt)( entry->ExtendedTriggerInfo()->OwnerSid().iId);
   469    		managerui.Append( ownerUid );
   476    		managerui.Append( ownerUid );
   470    		
   477    		
   471    		if( entry->TriggerEntry()->Type() == CLbtTriggerEntry::ETypeStartup )
   478    		if( entry->TriggerEntry()->Type() == CLbtTriggerEntry::ETypeStartup )
   657 
   664 
   658 	RArray<TLbtTriggerId> triggersModified;
   665 	RArray<TLbtTriggerId> triggersModified;
   659 	RArray<TUid> managerUis;
   666 	RArray<TUid> managerUis;
   660 	for(TInt i=0;i<triggerInfoArray.Count();++i)
   667 	for(TInt i=0;i<triggerInfoArray.Count();++i)
   661 		{
   668 		{
   662 		triggersModified.Append(triggerInfoArray[i].iTriggerId);
   669 		TInt error = triggersModified.Append(triggerInfoArray[i].iTriggerId);
       
   670 		if( error != KErrNone)
       
   671 		    {
       
   672             LOG1("Failed to append modified triggers:%d",error);
       
   673 		    }
   663 		
   674 		
   664 		if( managerUis.Find(triggerInfoArray[i].iManagerUi) == KErrNotFound )
   675 		if( managerUis.Find(triggerInfoArray[i].iManagerUi) == KErrNotFound )
   665 			{
   676 			{
   666 			// Appen both manager ui and owner into manager uis
   677 			// Appen both manager ui and owner into manager uis
   667 			managerUis.Append(triggerInfoArray[i].iManagerUi);			
   678 			managerUis.Append(triggerInfoArray[i].iManagerUi);