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.
sl@0
     1
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// CAF wrapper classes for Multimedia.
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#include <mm/mmcaf.h>
sl@0
    19
sl@0
    20
EXPORT_C TMMSource::TMMSource(TUid aSourceType, const TDesC& aUniqueID, ContentAccess::TIntent aIntent)
sl@0
    21
	: iSourceType(aSourceType),
sl@0
    22
	  iUniqueId(aUniqueID),
sl@0
    23
	  iIntent(aIntent),
sl@0
    24
	  iEnableUI(EFalse)
sl@0
    25
	{
sl@0
    26
	}
sl@0
    27
sl@0
    28
EXPORT_C TMMSource::TMMSource(TUid aSourceType, const TDesC& aUniqueID, ContentAccess::TIntent aIntent, TBool aEnableUI)
sl@0
    29
	: iSourceType(aSourceType),
sl@0
    30
	  iUniqueId(aUniqueID),
sl@0
    31
	  iIntent(aIntent),
sl@0
    32
	  iEnableUI(aEnableUI)
sl@0
    33
	{
sl@0
    34
	}
sl@0
    35
sl@0
    36
EXPORT_C const TDesC& TMMSource::UniqueId() const
sl@0
    37
	{
sl@0
    38
	return iUniqueId;
sl@0
    39
	}
sl@0
    40
sl@0
    41
EXPORT_C ContentAccess::TIntent TMMSource::Intent() const
sl@0
    42
	{
sl@0
    43
	return iIntent;
sl@0
    44
	}
sl@0
    45
	
sl@0
    46
EXPORT_C TUid TMMSource::SourceType() const
sl@0
    47
	{
sl@0
    48
	return iSourceType;
sl@0
    49
	}
sl@0
    50
sl@0
    51
EXPORT_C TBool TMMSource::IsUIEnabled() const
sl@0
    52
	{
sl@0
    53
	return iEnableUI;
sl@0
    54
	}
sl@0
    55
	
sl@0
    56
EXPORT_C TMMFileSource::TMMFileSource(const TDesC& aName)
sl@0
    57
	: TMMSource(KUidMMFileSource, ContentAccess::KDefaultContentObject, ContentAccess::EUnknown),
sl@0
    58
	  iName(aName)
sl@0
    59
	{
sl@0
    60
	}
sl@0
    61
sl@0
    62
EXPORT_C TMMFileSource::TMMFileSource(const TDesC& aName, const TDesC& aUniqueId)
sl@0
    63
	: TMMSource(KUidMMFileSource, aUniqueId, ContentAccess::EUnknown),
sl@0
    64
	  iName(aName)
sl@0
    65
	{
sl@0
    66
	}
sl@0
    67
sl@0
    68
EXPORT_C TMMFileSource::TMMFileSource(const TDesC& aName, const TDesC& aUniqueId, ContentAccess::TIntent aIntent)
sl@0
    69
	: TMMSource(KUidMMFileSource, aUniqueId, aIntent),
sl@0
    70
	  iName(aName)
sl@0
    71
	{
sl@0
    72
	}
sl@0
    73
	
sl@0
    74
EXPORT_C TMMFileSource::TMMFileSource(const TDesC& aName, const TDesC& aUniqueId, ContentAccess::TIntent aIntent, TBool aEnableUI)
sl@0
    75
	: TMMSource(KUidMMFileSource, aUniqueId, aIntent, aEnableUI),
sl@0
    76
	  iName(aName)
sl@0
    77
	{
sl@0
    78
	}	
sl@0
    79
sl@0
    80
EXPORT_C TMMFileHandleSource::TMMFileHandleSource(RFile& aFile)
sl@0
    81
	: TMMSource(KUidMMFileHandleSource, ContentAccess::KDefaultContentObject, ContentAccess::EUnknown),
sl@0
    82
	  iFile(aFile)
sl@0
    83
	{
sl@0
    84
	}
sl@0
    85
sl@0
    86
EXPORT_C TMMFileHandleSource::TMMFileHandleSource(RFile& aFile, const TDesC& aUniqueId)
sl@0
    87
	: TMMSource(KUidMMFileHandleSource, aUniqueId, ContentAccess::EUnknown),
sl@0
    88
	  iFile(aFile)
sl@0
    89
	{
sl@0
    90
	}
sl@0
    91
sl@0
    92
EXPORT_C TMMFileHandleSource::TMMFileHandleSource(RFile& aFile, const TDesC& aUniqueId, ContentAccess::TIntent aIntent)
sl@0
    93
	: TMMSource(KUidMMFileHandleSource, aUniqueId, aIntent),
sl@0
    94
	  iFile(aFile)
sl@0
    95
	{
sl@0
    96
	}
sl@0
    97
sl@0
    98
EXPORT_C TMMFileHandleSource::TMMFileHandleSource(RFile& aFile, const TDesC& aUniqueId, ContentAccess::TIntent aIntent, TBool aEnableUI)
sl@0
    99
	: TMMSource(KUidMMFileHandleSource, aUniqueId, aIntent, aEnableUI),
sl@0
   100
	  iFile(aFile)
sl@0
   101
	{
sl@0
   102
	}
sl@0
   103
sl@0
   104
EXPORT_C const TDesC& TMMFileSource::Name() const
sl@0
   105
	{
sl@0
   106
	return iName;
sl@0
   107
	}
sl@0
   108
sl@0
   109
EXPORT_C RFile& TMMFileHandleSource::Handle() const
sl@0
   110
	{
sl@0
   111
	return iFile;
sl@0
   112
	}