serviceproviders/sapi_mediamanagement/mediamanagementservice/src/mgmresolution.cpp
changeset 5 989d2f495d90
child 10 fc9cf246af83
equal deleted inserted replaced
1:a36b1e19a461 5:989d2f495d90
       
     1 /*
       
     2 * Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  This Class is interface for media resolution class
       
    15 *				
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #include"mgmresolution.h"
       
    21 #include"mgimageresolution.h"
       
    22 #include"mgvideoresolution.h"
       
    23 _LIT(KImage,"image");
       
    24 _LIT(KVideo,"video");
       
    25 
       
    26 // -----------------------------------------------------------------------------
       
    27 // MResolution::~MResolution
       
    28 // Destructor
       
    29 // -----------------------------------------------------------------------------
       
    30 MResolution::~MResolution(){
       
    31 
       
    32 }
       
    33 
       
    34 // -----------------------------------------------------------------------------
       
    35 // MediaResolutionFactory::CreateMediaResolutionobjL
       
    36 // Factory method which gives instance of Resolution 
       
    37 // -----------------------------------------------------------------------------
       
    38 
       
    39 
       
    40 MResolution* MediaResolutionFactory::CreateMediaResolutionobjL(TDesC& aMedia, TDesC& aUrl)
       
    41     {
       
    42    MResolution* object = NULL;
       
    43    
       
    44    if(aMedia.Compare(KImage)== 0)
       
    45        {
       
    46        object = CImageResolution::NewL(aUrl);
       
    47        }
       
    48    else if(aMedia.Compare(KVideo)== 0)
       
    49        {
       
    50        object = CVideoResolution::NewL(aUrl);
       
    51        }
       
    52     
       
    53     
       
    54    return object ; 
       
    55     
       
    56     }