idlehomescreen/hscontentcontrol/src/hscontentcontrolui.cpp
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2  * Copyright (c) 2008 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 "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:  
       
    15  *
       
    16  */
       
    17 
       
    18 // System include files
       
    19 #include <ecom/ecom.h>
       
    20 #include <ecom/implementationinformation.h>
       
    21 
       
    22 // User include files
       
    23 #include "hscontentcontrolui.h"
       
    24 
       
    25 // Local constants
       
    26 
       
    27 // ======== MEMBER FUNCTIONS ========
       
    28 
       
    29 // -----------------------------------------------------------------------
       
    30 // CHsContentControlUi::NewL()
       
    31 // -----------------------------------------------------------------------
       
    32 //
       
    33 EXPORT_C CHsContentControlUi* CHsContentControlUi::NewL(
       
    34     TUid aImplUid )
       
    35     {
       
    36     TAny* ptr = REComSession::CreateImplementationL( aImplUid,
       
    37         _FOFF( CHsContentControlUi, iDestructKey ) );
       
    38 
       
    39     CHsContentControlUi* ccUi = 
       
    40         reinterpret_cast< CHsContentControlUi* > ( ptr );
       
    41     
       
    42     if ( ccUi )
       
    43         {
       
    44         ccUi->iImplUid = aImplUid;        
       
    45         }
       
    46     
       
    47     return ccUi;
       
    48     }
       
    49 
       
    50 // -----------------------------------------------------------------------
       
    51 // CHsContentControlUi::ImplUid()
       
    52 // -----------------------------------------------------------------------
       
    53 //
       
    54 TUid CHsContentControlUi::ImplUid() const
       
    55     {
       
    56     return iImplUid;
       
    57     }
       
    58 
       
    59 // -----------------------------------------------------------------------
       
    60 // CHsContentControlUi::SetContentControlTypeL()
       
    61 // -----------------------------------------------------------------------
       
    62 //
       
    63 void CHsContentControlUi::SetContentControlTypeL(
       
    64     const TDesC8& aContentControlType )
       
    65     {
       
    66     delete iContentControlType;
       
    67     iContentControlType = NULL;
       
    68 
       
    69     iContentControlType = aContentControlType.AllocL();
       
    70     }
       
    71 
       
    72 // -----------------------------------------------------------------------
       
    73 // CHsContentControlUi::ContentControlType()
       
    74 // -----------------------------------------------------------------------
       
    75 //
       
    76 const TDesC8& CHsContentControlUi::ContentControlType() const
       
    77     {
       
    78     return iContentControlType ? *iContentControlType : KNullDesC8();
       
    79     }
       
    80 
       
    81 // End of file