os/mm/mmlibs/mmutilitylib/src/mmcommon.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2005-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 // CAF wrapper classes for Multimedia.
    15 // 
    16 //
    17 
    18 #include <mm/mmcaf.h>
    19 
    20 EXPORT_C TMMSource::TMMSource(TUid aSourceType, const TDesC& aUniqueID, ContentAccess::TIntent aIntent)
    21 	: iSourceType(aSourceType),
    22 	  iUniqueId(aUniqueID),
    23 	  iIntent(aIntent),
    24 	  iEnableUI(EFalse)
    25 	{
    26 	}
    27 
    28 EXPORT_C TMMSource::TMMSource(TUid aSourceType, const TDesC& aUniqueID, ContentAccess::TIntent aIntent, TBool aEnableUI)
    29 	: iSourceType(aSourceType),
    30 	  iUniqueId(aUniqueID),
    31 	  iIntent(aIntent),
    32 	  iEnableUI(aEnableUI)
    33 	{
    34 	}
    35 
    36 EXPORT_C const TDesC& TMMSource::UniqueId() const
    37 	{
    38 	return iUniqueId;
    39 	}
    40 
    41 EXPORT_C ContentAccess::TIntent TMMSource::Intent() const
    42 	{
    43 	return iIntent;
    44 	}
    45 	
    46 EXPORT_C TUid TMMSource::SourceType() const
    47 	{
    48 	return iSourceType;
    49 	}
    50 
    51 EXPORT_C TBool TMMSource::IsUIEnabled() const
    52 	{
    53 	return iEnableUI;
    54 	}
    55 	
    56 EXPORT_C TMMFileSource::TMMFileSource(const TDesC& aName)
    57 	: TMMSource(KUidMMFileSource, ContentAccess::KDefaultContentObject, ContentAccess::EUnknown),
    58 	  iName(aName)
    59 	{
    60 	}
    61 
    62 EXPORT_C TMMFileSource::TMMFileSource(const TDesC& aName, const TDesC& aUniqueId)
    63 	: TMMSource(KUidMMFileSource, aUniqueId, ContentAccess::EUnknown),
    64 	  iName(aName)
    65 	{
    66 	}
    67 
    68 EXPORT_C TMMFileSource::TMMFileSource(const TDesC& aName, const TDesC& aUniqueId, ContentAccess::TIntent aIntent)
    69 	: TMMSource(KUidMMFileSource, aUniqueId, aIntent),
    70 	  iName(aName)
    71 	{
    72 	}
    73 	
    74 EXPORT_C TMMFileSource::TMMFileSource(const TDesC& aName, const TDesC& aUniqueId, ContentAccess::TIntent aIntent, TBool aEnableUI)
    75 	: TMMSource(KUidMMFileSource, aUniqueId, aIntent, aEnableUI),
    76 	  iName(aName)
    77 	{
    78 	}	
    79 
    80 EXPORT_C TMMFileHandleSource::TMMFileHandleSource(RFile& aFile)
    81 	: TMMSource(KUidMMFileHandleSource, ContentAccess::KDefaultContentObject, ContentAccess::EUnknown),
    82 	  iFile(aFile)
    83 	{
    84 	}
    85 
    86 EXPORT_C TMMFileHandleSource::TMMFileHandleSource(RFile& aFile, const TDesC& aUniqueId)
    87 	: TMMSource(KUidMMFileHandleSource, aUniqueId, ContentAccess::EUnknown),
    88 	  iFile(aFile)
    89 	{
    90 	}
    91 
    92 EXPORT_C TMMFileHandleSource::TMMFileHandleSource(RFile& aFile, const TDesC& aUniqueId, ContentAccess::TIntent aIntent)
    93 	: TMMSource(KUidMMFileHandleSource, aUniqueId, aIntent),
    94 	  iFile(aFile)
    95 	{
    96 	}
    97 
    98 EXPORT_C TMMFileHandleSource::TMMFileHandleSource(RFile& aFile, const TDesC& aUniqueId, ContentAccess::TIntent aIntent, TBool aEnableUI)
    99 	: TMMSource(KUidMMFileHandleSource, aUniqueId, aIntent, aEnableUI),
   100 	  iFile(aFile)
   101 	{
   102 	}
   103 
   104 EXPORT_C const TDesC& TMMFileSource::Name() const
   105 	{
   106 	return iName;
   107 	}
   108 
   109 EXPORT_C RFile& TMMFileHandleSource::Handle() const
   110 	{
   111 	return iFile;
   112 	}