bluetoothappprofiles/avrcp/remconbeareravrcp/src/playerbitmasks.cpp
changeset 27 6c10323ce807
parent 0 f63038272f30
equal deleted inserted replaced
26:b78e66e88238 27:6c10323ce807
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    31 TPlayerFeatureBitmask::TPlayerFeatureBitmask(const TPlayerFeatureBitmask& aFeatureBitmask)
    31 TPlayerFeatureBitmask::TPlayerFeatureBitmask(const TPlayerFeatureBitmask& aFeatureBitmask)
    32 	{
    32 	{
    33 	iFeatureBitmask.Copy(aFeatureBitmask.FeatureBitmask());
    33 	iFeatureBitmask.Copy(aFeatureBitmask.FeatureBitmask());
    34 	}
    34 	}
    35 
    35 
    36 void TPlayerFeatureBitmask::SetCoreApiFeatures(RArray<TUint> aOperation)
    36 void TPlayerFeatureBitmask::SetCoreApiFeatures(const RArray<TUint>& aOperation)
    37 	{
    37 	{
    38 	if(aOperation.Count() > 0)
    38 	if(aOperation.Count() > 0)
    39 		{
    39 		{
    40 		for(TInt j = 0; j< aOperation.Count() ; j++)
    40 		for(TInt j = 0; j< aOperation.Count() ; j++)
    41 			{
    41 			{
   280 	iFeatureBitmask[EF3ByteOffset]|= (1<<EF3BitOffset);
   280 	iFeatureBitmask[EF3ByteOffset]|= (1<<EF3BitOffset);
   281 	iFeatureBitmask[EF4ByteOffset]|= (1<<EF4BitOffset);
   281 	iFeatureBitmask[EF4ByteOffset]|= (1<<EF4BitOffset);
   282 	iFeatureBitmask[EF5ByteOffset]|= (1<<EF5BitOffset);
   282 	iFeatureBitmask[EF5ByteOffset]|= (1<<EF5BitOffset);
   283 	}
   283 	}
   284 
   284 
   285 void TPlayerFeatureBitmask::SetAbsoluteVolumeApiFeatures(RArray<TUint> aOperation)
   285 void TPlayerFeatureBitmask::SetAbsoluteVolumeApiFeatures(const RArray<TUint>& aOperation)
   286 	{
   286 	{
   287 	if(aOperation.Count())
   287 	if(aOperation.Count())
   288 		{
   288 		{
   289 		iFeatureBitmask[EAdvancedControlPlayerByteOffset] |= (1<<EAdvancedControlPlayerBitOffset);
   289 		iFeatureBitmask[EAdvancedControlPlayerByteOffset] |= (1<<EAdvancedControlPlayerBitOffset);
   290 		}
   290 		}
   291 	}
   291 	}
   292 
   292 
   293 void TPlayerFeatureBitmask::SetGroupNavigationApiFeatures(RArray<TUint> aOperation)
   293 void TPlayerFeatureBitmask::SetGroupNavigationApiFeatures(const RArray<TUint>& aOperation)
   294 	{
   294 	{
   295 	if(aOperation.Count())
   295 	if(aOperation.Count())
   296 		{
   296 		{
   297 		iFeatureBitmask[EVendorUniqueByteOffset] |= (1<<EVendorUniqueBitOffset);
   297 		iFeatureBitmask[EVendorUniqueByteOffset] |= (1<<EVendorUniqueBitOffset);
   298 		iFeatureBitmask[EGroupNavigationByteOffset] |=  (1<<EGroupNavigationBitOffset);
   298 		iFeatureBitmask[EGroupNavigationByteOffset] |=  (1<<EGroupNavigationBitOffset);
   299 		}
   299 		}
   300 	}
   300 	}
   301 
   301 
   302 void TPlayerFeatureBitmask::SetNowPlayingApiFeatures(RArray<TUint> aOperation)
   302 void TPlayerFeatureBitmask::SetNowPlayingApiFeatures(const RArray<TUint>& aOperation)
   303 	{
   303 	{
   304 	if(aOperation.Count())
   304 	if(aOperation.Count())
   305 		{
   305 		{
   306 		iFeatureBitmask[EAdvancedControlPlayerByteOffset] |= (1<<EAdvancedControlPlayerBitOffset);
   306 		iFeatureBitmask[EAdvancedControlPlayerByteOffset] |= (1<<EAdvancedControlPlayerBitOffset);
   307 		iFeatureBitmask[ENowPlayingByteOffset] |= (1<<ENowPlayingBitOffset);
   307 		iFeatureBitmask[ENowPlayingByteOffset] |= (1<<ENowPlayingBitOffset);
   311 			iFeatureBitmask[EAddToNowPlayingByteOffset] |= (1<<EAddToNowPlayingBitOffset);
   311 			iFeatureBitmask[EAddToNowPlayingByteOffset] |= (1<<EAddToNowPlayingBitOffset);
   312 			}
   312 			}
   313 		}
   313 		}
   314 	}
   314 	}
   315 
   315 
   316 void TPlayerFeatureBitmask::SetMediaBrowseApiFeatures(RArray<TUint> aOperation)
   316 void TPlayerFeatureBitmask::SetMediaBrowseApiFeatures(const RArray<TUint>& aOperation)
   317 	{
   317 	{
   318 	if(aOperation.Count())
   318 	if(aOperation.Count())
   319 		{
   319 		{
   320 		iFeatureBitmask[EAdvancedControlPlayerByteOffset] |= (1<<EAdvancedControlPlayerBitOffset);
   320 		iFeatureBitmask[EAdvancedControlPlayerByteOffset] |= (1<<EAdvancedControlPlayerBitOffset);
   321 		iFeatureBitmask[ENowPlayingByteOffset] |= (1<<ENowPlayingBitOffset);
   321 		iFeatureBitmask[ENowPlayingByteOffset] |= (1<<ENowPlayingBitOffset);