installationservices/swi/source/sishelper/sishelperclient.cpp
branchRCL_3
changeset 25 7333d7932ef7
parent 17 741e5bba2bd1
child 26 8b7f4e561641
equal deleted inserted replaced
24:5cc91383ab1e 25:7333d7932ef7
     1 /*
     1 /*
     2 * Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2004-2009 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 	
       
   110 	// calculate the likely size of the data transfer buffer
   107 	// calculate the likely size of the data transfer buffer
   111 	const TInt KMaxBufSize=
   108 	const TInt KMaxBufSize=
   112 		sizeof(TInt)+                 // number of entries
   109 		sizeof(TInt)+                 // number of entries
   113 		KMaxDrives*sizeof(TUint)+  // drive letters stored as TUints
   110 		KMaxDrives*sizeof(TUint)+  // drive letters stored as TUints
   114 		KMaxDrives*sizeof(TInt64); // drive free spaces
   111 		KMaxDrives*sizeof(TInt64); // drive free spaces
   144 		aDriveSpaces.AppendL(space);
   141 		aDriveSpaces.AppendL(space);
   145 		}
   142 		}
   146 	
   143 	
   147 	// cleanup
   144 	// cleanup
   148 	CleanupStack::PopAndDestroy(2, buf); // ins, buf
   145 	CleanupStack::PopAndDestroy(2, buf); // ins, buf
   149 	CleanupStack::Pop(2, &aDriveLetters);
       
   150 	}
   146 	}
   151 
   147 
   152 EXPORT_C void RSisHelper::OpenDrmContentL(ContentAccess::TIntent aIntent)
   148 EXPORT_C void RSisHelper::OpenDrmContentL(ContentAccess::TIntent aIntent)
   153 	{
   149 	{
   154 	TInt intent = static_cast<TInt>(aIntent);
   150 	TInt intent = static_cast<TInt>(aIntent);
   266 	return isContentProtected();
   262 	return isContentProtected();
   267 	}
   263 	}
   268 #endif
   264 #endif
   269 void RSisHelper::GetEquivalentLanguageListL(TLanguage aLangId,RArray<TLanguage>& aEquivLangs)
   265 void RSisHelper::GetEquivalentLanguageListL(TLanguage aLangId,RArray<TLanguage>& aEquivLangs)
   270 	{
   266 	{
   271 	CleanupClosePushL(aEquivLangs);
       
   272 	// calculate the likely size of the data transfer buffer
   267 	// calculate the likely size of the data transfer buffer
   273 	const TInt KMaxBufSize=
   268 	const TInt KMaxBufSize=
   274 		sizeof(TInt)+                 // number of entries
   269 		sizeof(TInt)+                 // number of entries
   275 		(KMaxDowngradeLanguages+1)*sizeof(TLanguage);  // Languages IDs stored as TLanguage
   270 		(KMaxDowngradeLanguages+1)*sizeof(TLanguage);  // Languages IDs stored as TLanguage
   276 	
   271 	
   294 		TLanguage langId=(TLanguage)ins.ReadInt32L();
   289 		TLanguage langId=(TLanguage)ins.ReadInt32L();
   295 		aEquivLangs.AppendL(langId);
   290 		aEquivLangs.AppendL(langId);
   296 		}
   291 		}
   297 	// cleanup
   292 	// cleanup
   298 	CleanupStack::PopAndDestroy(2, buf); // buf
   293 	CleanupStack::PopAndDestroy(2, buf); // buf
   299 	CleanupStack::Pop(&aEquivLangs);
   294 	}
   300 	}