imagingandcamerafws/imagingfws/ImageDisplay/src/Resolver/ImageDisplayResolvrUtils.inl
branchRCL_3
changeset 50 948c7f65f6d4
parent 0 40261b775718
equal deleted inserted replaced
49:735348f59235 50:948c7f65f6d4
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent 
       
    19 */
       
    20 
       
    21 inline TInt COpaqueDataParse::ExtnsCount() const
       
    22 	{
       
    23 	ASSERT(iState >= EExtnsProcessed);
       
    24 	return iExtnCount;
       
    25 	}
       
    26 
       
    27 inline TInt COpaqueDataParse::MIMETypesCount() const
       
    28 	{
       
    29 	ASSERT(iState >= EMIMETypesProcessed);
       
    30 	return iArray.Count() - ExtnsCount();
       
    31 	}
       
    32 
       
    33 inline const TDesC8& COpaqueDataParse::Extn(TInt aIndex) const
       
    34 	{
       
    35 	ASSERT(aIndex < ExtnsCount());
       
    36 	return iArray[aIndex];
       
    37 	}
       
    38 
       
    39 inline const TDesC8& COpaqueDataParse::MIMEType(TInt aIndex) const
       
    40 	{
       
    41 	ASSERT(aIndex < MIMETypesCount());
       
    42 	return iArray[aIndex+ExtnsCount()];
       
    43 	}
       
    44 
       
    45 inline TInt COpaqueDataParse::Version() const
       
    46 	{
       
    47 	return iVersion;
       
    48 	}
       
    49 
       
    50 inline TInt COpaqueDataParse::Flags() const
       
    51 	{
       
    52 	return iFlags;
       
    53 	}
       
    54 
       
    55 inline TUid COpaqueDataParse::ImageTypeUid() const
       
    56 	{
       
    57 	return iImageTypeUid;
       
    58 	}
       
    59 
       
    60 inline TUid COpaqueDataParse::ImageSubTypeUid() const
       
    61 	{
       
    62 	return iImageSubTypeUid;
       
    63 	}
       
    64 
       
    65 inline TBool COpaqueDataParse::CompareUids(TUid aType, TUid aSubType) const
       
    66 	{
       
    67 	return ImageTypeUid()==aType && ImageSubTypeUid()==aSubType;
       
    68 	}
       
    69 
       
    70 inline TBool COpaqueDataParse::CompareUids(COpaqueDataParse* aParse) const
       
    71 	{
       
    72 	return CompareUids(aParse->ImageTypeUid(), aParse->ImageSubTypeUid());
       
    73 	}
       
    74 
       
    75 // true if only uids are available - ie neither extns nor mime types are provided
       
    76 inline TBool COpaqueDataParse::OnlyUidsAvail() const
       
    77 	{
       
    78 	return iOpaqueData.Length()<=iStartOfNumberOfExtns;
       
    79 	}
       
    80 
       
    81 // true if the plugin allows opening based on file extension
       
    82 inline TBool COpaqueDataParse::IsOpenAgainstSuffix() const
       
    83 	{
       
    84 	return ((iFlags & EOpenAgainstSuffix)!=EFalse);
       
    85 	}
       
    86 
       
    87 // true if the plugin supports SetSourceRect()
       
    88 inline TBool COpaqueDataParse::IsSetSourceRectSupported() const
       
    89 	{
       
    90 	return ((iFlags & ESetSourceRectSupported)!=EFalse);
       
    91 	}
       
    92 
       
    93