javacommons/connectionmanager/src.s60/connectionmanager.cpp
changeset 79 2f468c1958d0
parent 61 bf7ee68962da
equal deleted inserted replaced
76:4ad59aaee882 79:2f468c1958d0
    63 // ---------------------------------------------------------------------------
    63 // ---------------------------------------------------------------------------
    64 //
    64 //
    65 
    65 
    66 EXPORT_C bool ConnectionManager::isIapDefault(TUint32 aMatchIapId, TUint32 aDestId, bool aDefault)
    66 EXPORT_C bool ConnectionManager::isIapDefault(TUint32 aMatchIapId, TUint32 aDestId, bool aDefault)
    67 {
    67 {
    68 	  LOG(ESOCKET,EInfo,"+ConnectionManager::isIapDefault");
    68     LOG(ESOCKET,EInfo,"+ConnectionManager::isIapDefault");
    69 	  bool retVal = false;
    69     bool retVal = false;
    70     TRAPD(err,retVal = checkIapDefaultL(aMatchIapId,aDestId,aDefault));
    70     TRAPD(err,retVal = checkIapDefaultL(aMatchIapId,aDestId,aDefault));
    71     if(err!=KErrNone)
    71     if(err!=KErrNone)
    72     {
    72     {
    73         // error occured
    73         // error occured
    74         return false;
    74         return false;
    76     return retVal;
    76     return retVal;
    77 }
    77 }
    78 
    78 
    79 bool ConnectionManager::checkIapDefaultL(TUint32 aMatchIapId, TUint32 aDestId, bool aDefault)
    79 bool ConnectionManager::checkIapDefaultL(TUint32 aMatchIapId, TUint32 aDestId, bool aDefault)
    80 {
    80 {
    81 	
    81 
    82     LOG(ESOCKET,EInfo,"+ConnectionManager::checkIapDefaultL");
    82     LOG(ESOCKET,EInfo,"+ConnectionManager::checkIapDefaultL");
    83     TUint32 id = aDestId;
    83     TUint32 id = aDestId;
    84     TUint32 tmpapId;
    84     TUint32 tmpapId;
    85     TCmDefConnType type;
    85     TCmDefConnType type;
    86 
    86 
   116         if (tmpapId == aMatchIapId)
   116         if (tmpapId == aMatchIapId)
   117         {
   117         {
   118             return true;
   118             return true;
   119         }
   119         }
   120     }
   120     }
   121     return false;	
   121     return false;
   122 	
   122 
   123 	
   123 
   124 }
   124 }
   125 
   125 
   126 // ---------------------------------------------------------------------------
   126 // ---------------------------------------------------------------------------
   127 // JavaNetworkAccessRepository::GetDeviceDefaultAccessPointL
   127 // JavaNetworkAccessRepository::GetDeviceDefaultAccessPointL
   128 // ---------------------------------------------------------------------------
   128 // ---------------------------------------------------------------------------
   302     // Get value of the attribute from read attributes.
   302     // Get value of the attribute from read attributes.
   303     while (!entries.empty())
   303     while (!entries.empty())
   304     {
   304     {
   305         JavaStorageApplicationEntry_t::const_iterator findIterator = entries.find(attribute);
   305         JavaStorageApplicationEntry_t::const_iterator findIterator = entries.find(attribute);
   306 
   306 
   307         if (findIterator != entries.end())
   307         if (findIterator != entries.end() && findIterator->entryValue().length()>0 )
   308         {
   308         {
   309             JavaStorageEntry sourceEntry = (*findIterator);
   309             JavaStorageEntry sourceEntry = (*findIterator);
   310             temp.append(sourceEntry.entryValue().c_str());
   310             temp.append(sourceEntry.entryValue().c_str());
   311             HBufC * value = S60CommonUtils::wstringToDes(temp.c_str());
   311             HBufC * value = S60CommonUtils::wstringToDes(temp.c_str());
   312             HBufC8 * temp1 = HBufC8::NewL(value->Des().Length());
   312             HBufC8 * temp1 = HBufC8::NewL(value->Des().Length());