javacommons/connectionmanager/src.s60/connectionmanager.cpp
branchRCL_3
changeset 83 26b2b12093af
parent 60 6c158198356e
equal deleted inserted replaced
77:7cee158cb8cd 83:26b2b12093af
    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::getDefualtId");
    69 	  bool retVal = false;
       
    70     TRAPD(err,retVal = checkIapDefaultL(aMatchIapId,aDestId,aDefault));
       
    71     if(err!=KErrNone)
       
    72     {
       
    73         // error occured
       
    74         return false;
       
    75     }
       
    76     return retVal;
       
    77 }
       
    78 
       
    79 bool ConnectionManager::checkIapDefaultL(TUint32 aMatchIapId, TUint32 aDestId, bool aDefault)
       
    80 {
       
    81 	
       
    82     LOG(ESOCKET,EInfo,"+ConnectionManager::checkIapDefaultL");
       
    83     TUint32 id = aDestId;
    69     TUint32 id = aDestId;
    84     TUint32 tmpapId;
    70     TUint32 tmpapId;
    85     TCmDefConnType type;
    71     TCmDefConnType type;
    86 
    72 
    87     RCmManager * mgr = new(ELeave) RCmManager();
    73     RCmManager * mgr = new(ELeave) RCmManager();
   116         if (tmpapId == aMatchIapId)
   102         if (tmpapId == aMatchIapId)
   117         {
   103         {
   118             return true;
   104             return true;
   119         }
   105         }
   120     }
   106     }
   121     return false;	
   107     return false;
   122 	
   108 
   123 	
       
   124 }
   109 }
   125 
   110 
   126 // ---------------------------------------------------------------------------
   111 // ---------------------------------------------------------------------------
   127 // JavaNetworkAccessRepository::GetDeviceDefaultAccessPointL
   112 // JavaNetworkAccessRepository::GetDeviceDefaultAccessPointL
   128 // ---------------------------------------------------------------------------
   113 // ---------------------------------------------------------------------------
   302     // Get value of the attribute from read attributes.
   287     // Get value of the attribute from read attributes.
   303     while (!entries.empty())
   288     while (!entries.empty())
   304     {
   289     {
   305         JavaStorageApplicationEntry_t::const_iterator findIterator = entries.find(attribute);
   290         JavaStorageApplicationEntry_t::const_iterator findIterator = entries.find(attribute);
   306 
   291 
   307         if (findIterator != entries.end())
   292         if (findIterator != entries.end() && findIterator->entryValue().length()>0 )
   308         {
   293         {
   309             JavaStorageEntry sourceEntry = (*findIterator);
   294             JavaStorageEntry sourceEntry = (*findIterator);
   310             temp.append(sourceEntry.entryValue().c_str());
   295             temp.append(sourceEntry.entryValue().c_str());
   311             HBufC * value = S60CommonUtils::wstringToDes(temp.c_str());
   296             HBufC * value = S60CommonUtils::wstringToDes(temp.c_str());
   312             HBufC8 * temp1 = HBufC8::NewL(value->Des().Length());
   297             HBufC8 * temp1 = HBufC8::NewL(value->Des().Length());