installationservices/swi/source/sishelper/sishelperclient.cpp
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
     1 /*
     1 /*
     2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   102 	}
   102 	}
   103 
   103 
   104 EXPORT_C void RSisHelper::FillDrivesAndSpacesL(RArray<TChar>& aDriveLetters, 
   104 EXPORT_C void RSisHelper::FillDrivesAndSpacesL(RArray<TChar>& aDriveLetters, 
   105 	RArray<TInt64>& aDriveSpaces)
   105 	RArray<TInt64>& aDriveSpaces)
   106 	{
   106 	{
       
   107 	CleanupClosePushL(aDriveLetters);
       
   108 	CleanupClosePushL(aDriveSpaces);
       
   109 	
   107 	// calculate the likely size of the data transfer buffer
   110 	// calculate the likely size of the data transfer buffer
   108 	const TInt KMaxBufSize=
   111 	const TInt KMaxBufSize=
   109 		sizeof(TInt)+                 // number of entries
   112 		sizeof(TInt)+                 // number of entries
   110 		KMaxDrives*sizeof(TUint)+  // drive letters stored as TUints
   113 		KMaxDrives*sizeof(TUint)+  // drive letters stored as TUints
   111 		KMaxDrives*sizeof(TInt64); // drive free spaces
   114 		KMaxDrives*sizeof(TInt64); // drive free spaces
   141 		aDriveSpaces.AppendL(space);
   144 		aDriveSpaces.AppendL(space);
   142 		}
   145 		}
   143 	
   146 	
   144 	// cleanup
   147 	// cleanup
   145 	CleanupStack::PopAndDestroy(2, buf); // ins, buf
   148 	CleanupStack::PopAndDestroy(2, buf); // ins, buf
       
   149 	CleanupStack::Pop(2, &aDriveLetters);
   146 	}
   150 	}
   147 
   151 
   148 EXPORT_C void RSisHelper::OpenDrmContentL(ContentAccess::TIntent aIntent)
   152 EXPORT_C void RSisHelper::OpenDrmContentL(ContentAccess::TIntent aIntent)
   149 	{
   153 	{
   150 	TInt intent = static_cast<TInt>(aIntent);
   154 	TInt intent = static_cast<TInt>(aIntent);
   262 	return isContentProtected();
   266 	return isContentProtected();
   263 	}
   267 	}
   264 #endif
   268 #endif
   265 void RSisHelper::GetEquivalentLanguageListL(TLanguage aLangId,RArray<TLanguage>& aEquivLangs)
   269 void RSisHelper::GetEquivalentLanguageListL(TLanguage aLangId,RArray<TLanguage>& aEquivLangs)
   266 	{
   270 	{
       
   271 	CleanupClosePushL(aEquivLangs);
   267 	// calculate the likely size of the data transfer buffer
   272 	// calculate the likely size of the data transfer buffer
   268 	const TInt KMaxBufSize=
   273 	const TInt KMaxBufSize=
   269 		sizeof(TInt)+                 // number of entries
   274 		sizeof(TInt)+                 // number of entries
   270 		(KMaxDowngradeLanguages+1)*sizeof(TLanguage);  // Languages IDs stored as TLanguage
   275 		(KMaxDowngradeLanguages+1)*sizeof(TLanguage);  // Languages IDs stored as TLanguage
   271 	
   276 	
   289 		TLanguage langId=(TLanguage)ins.ReadInt32L();
   294 		TLanguage langId=(TLanguage)ins.ReadInt32L();
   290 		aEquivLangs.AppendL(langId);
   295 		aEquivLangs.AppendL(langId);
   291 		}
   296 		}
   292 	// cleanup
   297 	// cleanup
   293 	CleanupStack::PopAndDestroy(2, buf); // buf
   298 	CleanupStack::PopAndDestroy(2, buf); // buf
   294 	}
   299 	CleanupStack::Pop(&aEquivLangs);
       
   300 	}