javaextensions/bluetooth/bluetoothcommons/src.s60/bturlparams.cpp
changeset 79 2f468c1958d0
parent 21 2a9601315dfc
equal deleted inserted replaced
76:4ad59aaee882 79:2f468c1958d0
   268             LOG2(EJavaBluetooth, EInfo,
   268             LOG2(EJavaBluetooth, EInfo,
   269                  "+ BtUrlParams::setUrlParamsValue URL_PARAM_RECEIVE_MTU:%S Val:%S",
   269                  "+ BtUrlParams::setUrlParamsValue URL_PARAM_RECEIVE_MTU:%S Val:%S",
   270                  aParam.c_str(), aVal.c_str());
   270                  aParam.c_str(), aVal.c_str());
   271             mReceiveMtu = JavaCommonUtils::wstringToInt(aVal);
   271             mReceiveMtu = JavaCommonUtils::wstringToInt(aVal);
   272         }
   272         }
   273         catch (ExceptionBase ex)
   273         catch (ExceptionBase &ex)
   274         {
   274         {
   275             ELOG1(EJavaBluetooth,
   275             ELOG1(EJavaBluetooth,
   276                   "- ServiceRecord::setUrlParamsValue URL_PARAM_RECEIVE_MTU exception Caught: %S",
   276                   "- ServiceRecord::setUrlParamsValue URL_PARAM_RECEIVE_MTU exception Caught: %S",
   277                   ex.toString().c_str());
   277                   ex.toString().c_str());
   278         }
   278         }
   284             LOG2(EJavaBluetooth, EInfo,
   284             LOG2(EJavaBluetooth, EInfo,
   285                  "+ BtUrlParams::setUrlParamsValue URL_PARAM_TRANSMIT_MTU:%S Val:%S",
   285                  "+ BtUrlParams::setUrlParamsValue URL_PARAM_TRANSMIT_MTU:%S Val:%S",
   286                  aParam.c_str(), aVal.c_str());
   286                  aParam.c_str(), aVal.c_str());
   287             mTransmitMtu = JavaCommonUtils::wstringToInt(aVal);
   287             mTransmitMtu = JavaCommonUtils::wstringToInt(aVal);
   288         }
   288         }
   289         catch (ExceptionBase ex)
   289         catch (ExceptionBase &ex)
   290         {
   290         {
   291             ELOG1(EJavaBluetooth,
   291             ELOG1(EJavaBluetooth,
   292                   "- ServiceRecord::setUrlParamsValue URL_PARAM_TRANSMIT_MTU exception Caught: %S",
   292                   "- ServiceRecord::setUrlParamsValue URL_PARAM_TRANSMIT_MTU exception Caught: %S",
   293                   ex.toString().c_str());
   293                   ex.toString().c_str());
   294         }
   294         }
   402             HBufC *blackPattern = S60CommonUtils::wstringToDes(
   402             HBufC *blackPattern = S60CommonUtils::wstringToDes(
   403                                       pattern.c_str());
   403                                       pattern.c_str());
   404             mBlockedSenders.push_back(blackPattern);
   404             mBlockedSenders.push_back(blackPattern);
   405             index = aBlackList.find(SEMICOLON);
   405             index = aBlackList.find(SEMICOLON);
   406         }
   406         }
   407         catch (ExceptionBase ex)
   407         catch (ExceptionBase &ex)
   408         {
   408         {
   409             // Nothing to handle here.
   409             // Nothing to handle here.
   410         }
   410         }
   411     }
   411     }
   412 
   412 
   420         {
   420         {
   421             HBufC *blackPattern = S60CommonUtils::wstringToDes(
   421             HBufC *blackPattern = S60CommonUtils::wstringToDes(
   422                                       aBlackList.c_str());
   422                                       aBlackList.c_str());
   423             mBlockedSenders.push_back(blackPattern);
   423             mBlockedSenders.push_back(blackPattern);
   424         }
   424         }
   425         catch (ExceptionBase ex)
   425         catch (ExceptionBase &ex)
   426         {
   426         {
   427             // Nothing to handle here.
   427             // Nothing to handle here.
   428         }
   428         }
   429     }
   429     }
   430 }
   430 }
   469     HBufC *pattern;
   469     HBufC *pattern;
   470     try
   470     try
   471     {
   471     {
   472         pattern = S60CommonUtils::wstringToDes(aPattern.c_str());
   472         pattern = S60CommonUtils::wstringToDes(aPattern.c_str());
   473     }
   473     }
   474     catch (ExceptionBase ex)
   474     catch (ExceptionBase &ex)
   475     {
   475     {
   476         return true;
   476         return true;
   477     }
   477     }
   478 
   478 
   479     bool ret = matchHB(aDevAddr, *pattern);
   479     bool ret = matchHB(aDevAddr, *pattern);