services/terminalmodeservice/src/upnpappfilterinfo.cpp
changeset 26 b6b8e90f9863
parent 24 e9457ebcc4df
equal deleted inserted replaced
24:e9457ebcc4df 26:b6b8e90f9863
   109 // CUpnpAppFilterInfo::SetFilterInfoL
   109 // CUpnpAppFilterInfo::SetFilterInfoL
   110 // It compares the key with the individual elements and if it matches with none then it
   110 // It compares the key with the individual elements and if it matches with none then it
   111 // returns invalid argument as an error.
   111 // returns invalid argument as an error.
   112 // @param aKey Key name
   112 // @param aKey Key name
   113 // @param aValue Value of the key
   113 // @param aValue Value of the key
       
   114 // @param aDisplayInfoFlag True if info type is displayInfo, false otherwise.
       
   115 //         Default is false. It is used to distinguish "trustLevel" element 
       
   116 //         of appInfo and displayInfo.
   114 // @param aErr Terminal Mode error code
   117 // @param aErr Terminal Mode error code
   115 // ---------------------------------------------------------------------------------
   118 // ---------------------------------------------------------------------------------
   116 //
   119 //
   117 void CUpnpAppFilterInfo::SetFilterInfoL( const TDesC8& aKey, const TDesC8& aValue,
   120 void CUpnpAppFilterInfo::SetFilterInfoL( const TDesC8& aKey, const TDesC8& aValue,
   118                                         TTerminalModeErrorCode& aErr, TBool aDisplayInfoFlag )
   121                                         TTerminalModeErrorCode& aErr, TBool aDisplayInfoFlag )
   194         delete iAppCategory;
   197         delete iAppCategory;
   195         iAppCategory = NULL;
   198         iAppCategory = NULL;
   196         iAppCategory = aValue.AllocL();
   199         iAppCategory = aValue.AllocL();
   197         aErr = ETerminalModeSuccess;  
   200         aErr = ETerminalModeSuccess;  
   198         }
   201         }
   199     else if ( aKey.Compare(KTrustLevel) == KErrNone )                                         
   202     else if (( aKey.Compare(KTrustLevel) == KErrNone ) && ( !aDisplayInfoFlag ))                                        
   200         {
   203         {
   201         delete iAppTrustLevel;
   204         delete iAppTrustLevel;
   202         iAppTrustLevel = NULL;
   205         iAppTrustLevel = NULL;
   203         iAppTrustLevel = aValue.AllocL();
   206         iAppTrustLevel = aValue.AllocL();
   204         aErr = ETerminalModeSuccess;  
   207         aErr = ETerminalModeSuccess;  
   215         delete iContentRules;
   218         delete iContentRules;
   216         iContentRules = NULL;
   219         iContentRules = NULL;
   217         iContentRules = aValue.AllocL();
   220         iContentRules = aValue.AllocL();
   218         aErr = ETerminalModeSuccess;   
   221         aErr = ETerminalModeSuccess;   
   219         }
   222         }
   220     else if ( ( aDisplayInfoFlag ) && ( aKey.Compare(KTrustLevel) == KErrNone ) )
   223     else if (( aKey.Compare(KTrustLevel) == KErrNone ) && ( aDisplayInfoFlag ))
   221         {
   224         {
   222         delete iContTrustLevel;
   225         delete iContTrustLevel;
   223         iContTrustLevel = NULL;
   226         iContTrustLevel = NULL;
   224         iContTrustLevel = aValue.AllocL();
   227         iContTrustLevel = aValue.AllocL();
   225         aErr = ETerminalModeSuccess;   
   228         aErr = ETerminalModeSuccess;