equal
deleted
inserted
replaced
333 LbtGlobal::RequestComplete(aMessage, retValue); |
333 LbtGlobal::RequestComplete(aMessage, retValue); |
334 break; |
334 break; |
335 } |
335 } |
336 |
336 |
337 // The request can only be through the LT management API. |
337 // The request can only be through the LT management API. |
338 // ToDo : Check for capabilities. |
338 if ( TLbtManagementLibrary != aType ) |
339 if ( TLbtManagementLibrary != aType ) |
|
340 { |
339 { |
341 // This is not a management library. Hence return access denied. |
340 // This is not a management library. Hence return access denied. |
342 aMessage.Complete( KErrAccessDenied ); |
341 aMessage.Complete( KErrAccessDenied ); |
343 } |
342 } |
344 else |
343 else |
980 TInt CLbtServerLogic::ValidateCreateTriggerMessage(const RMessage2& aMessage) |
979 TInt CLbtServerLogic::ValidateCreateTriggerMessage(const RMessage2& aMessage) |
981 { |
980 { |
982 FUNC_ENTER("CLbtServerLogic::ValidateCreateTriggerMessage"); |
981 FUNC_ENTER("CLbtServerLogic::ValidateCreateTriggerMessage"); |
983 // The server should check for the following parameters |
982 // The server should check for the following parameters |
984 // 1. capability checks for security. |
983 // 1. capability checks for security. |
985 // 2. checks for the Trigger area, ie. radius. (ToDo) |
984 if( !aMessage.HasCapability(ECapabilityLocation) || |
986 |
|
987 // Check if the requesting process has location and write user data capability |
|
988 // ToDo : check the required set of capabilities from req spec. |
|
989 if( !aMessage.HasCapability(ECapabilityLocation) || |
|
990 !aMessage.HasCapability(ECapabilityWriteUserData) ) |
985 !aMessage.HasCapability(ECapabilityWriteUserData) ) |
991 { |
986 { |
992 return KErrPermissionDenied; |
987 return KErrPermissionDenied; |
993 } |
988 } |
994 |
989 |
1131 return; |
1126 return; |
1132 } |
1127 } |
1133 |
1128 |
1134 // Populate the change event structure to send the information to the client based |
1129 // Populate the change event structure to send the information to the client based |
1135 // on the message for which the notification needs to be made |
1130 // on the message for which the notification needs to be made |
|
1131 // coverity[var_decl : FALSE] |
1136 TLbtTriggerChangeEvent event; |
1132 TLbtTriggerChangeEvent event; |
1137 |
1133 |
1138 switch(aOperation->GetFunction()) |
1134 switch(aOperation->GetFunction()) |
1139 { |
1135 { |
1140 case ELbtCreateTrigger: |
1136 case ELbtCreateTrigger: |
1205 RPointerArray<CLbtContainerTriggerEntry>& list = |
1201 RPointerArray<CLbtContainerTriggerEntry>& list = |
1206 operation->GetUpdatedTriggerList(); |
1202 operation->GetUpdatedTriggerList(); |
1207 |
1203 |
1208 RArray<RMessage2> array; |
1204 RArray<RMessage2> array; |
1209 RMessage2 message; |
1205 RMessage2 message; |
|
1206 // coverity[var_decl : FALSE] |
1210 TLbtTriggerChangeEvent event; |
1207 TLbtTriggerChangeEvent event; |
1211 |
1208 |
1212 // sort by SID the retrieved list of triggers that were modified. |
1209 // sort by SID the retrieved list of triggers that were modified. |
1213 TLinearOrder<CLbtContainerTriggerEntry> TriggerSidOrderPredicate(OrderTriggerEntryBySid); |
1210 TLinearOrder<CLbtContainerTriggerEntry> TriggerSidOrderPredicate(OrderTriggerEntryBySid); |
1214 list.Sort(TriggerSidOrderPredicate); |
1211 list.Sort(TriggerSidOrderPredicate); |
1609 TLbtTriggerEventMask aEventMask ) |
1606 TLbtTriggerEventMask aEventMask ) |
1610 { |
1607 { |
1611 FUNC_ENTER("CLbtServerLogic::HandleContainerTriggerChange"); |
1608 FUNC_ENTER("CLbtServerLogic::HandleContainerTriggerChange"); |
1612 RMessage2 message; |
1609 RMessage2 message; |
1613 |
1610 |
|
1611 // coverity[var_decl : FALSE] |
1614 TLbtTriggerChangeEvent event; |
1612 TLbtTriggerChangeEvent event; |
1615 // If there is change in the single trigger, set the trigger id else |
1613 // If there is change in the single trigger, set the trigger id else |
1616 // update KLbtNullTriggerId for trigger id |
1614 // update KLbtNullTriggerId for trigger id |
1617 if( aTriggerIds.Count() == 1) |
1615 if( aTriggerIds.Count() == 1) |
1618 { |
1616 { |