DirectPrint/DirectPrintServer/src/directprintprotocolinfo.cpp
changeset 19 2275db202402
parent 11 613a5ff70823
equal deleted inserted replaced
2:acc370d7f2f6 19:2275db202402
       
     1 /*
       
     2 * Copyright (c) 2010 Kanrikogaku Kenkyusho, Ltd.
       
     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 * Kanrikogaku Kenkyusho, Ltd. - Initial contribution
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #include "directprintprotocolinfo.h"
       
    19 
       
    20 CDirectPrintProtocolInfo::CDirectPrintProtocolInfo()
       
    21 	{
       
    22 	}
       
    23 
       
    24 CDirectPrintProtocolInfo::~CDirectPrintProtocolInfo()
       
    25 	{
       
    26 	delete iDisplayName;
       
    27 	}
       
    28 
       
    29 CDirectPrintProtocolInfo* CDirectPrintProtocolInfo::NewLC(const CImplementationInformation& aImplInfo)
       
    30 	{
       
    31 	CDirectPrintProtocolInfo* self = new (ELeave) CDirectPrintProtocolInfo();
       
    32 	CleanupStack::PushL(self);
       
    33 
       
    34 	self->iImplementationUid = aImplInfo.ImplementationUid();
       
    35 
       
    36 	if(aImplInfo.DisplayName().Length() != 0)
       
    37 		{
       
    38 		self->iDisplayName = aImplInfo.DisplayName().AllocL();
       
    39 		}
       
    40 
       
    41 	return self;
       
    42 	}
       
    43 
       
    44 TUid CDirectPrintProtocolInfo::ImplementationUid() const
       
    45 	{
       
    46 	return iImplementationUid;
       
    47 	}
       
    48 
       
    49 const TDesC& CDirectPrintProtocolInfo::DisplayName() const
       
    50 	{
       
    51 	if(iDisplayName == NULL)
       
    52 		return KNullDesC();
       
    53 	else
       
    54 		return *iDisplayName;
       
    55 	}
       
    56