applayerpluginsandutils/uripermissionservices/server/src/tldproperties.cpp
changeset 0 b16258d2340f
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 // Copyright (c) 2008-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 
       
    15 #include "tldproperties.h"
       
    16 
       
    17 CTldProperties* CTldProperties::NewL ( InetUriList::TListType aListType )
       
    18 	{
       
    19 	CTldProperties* self = new ( ELeave ) CTldProperties ( aListType );
       
    20 	return self;
       
    21 	}
       
    22 
       
    23 CTldProperties::CTldProperties ( InetUriList::TListType aListType )
       
    24 : iListType ( aListType )
       
    25 	{
       
    26 		
       
    27 	}
       
    28 
       
    29 
       
    30 CTldProperties::~CTldProperties ()
       
    31 	{
       
    32 	Clear();
       
    33 	}
       
    34 
       
    35 /**
       
    36 Returns the listtype of the URI
       
    37 */
       
    38 InetUriList::TListType CTldProperties::ListType () const
       
    39 	{
       
    40 	return iListType;
       
    41 	}
       
    42 
       
    43 /**
       
    44 Returns the Tldname. Returns KNullDesC8 
       
    45 if no Tldname is set.
       
    46 */
       
    47 const TDesC8& CTldProperties::TldName () const
       
    48 	{
       
    49 	return iTldName;
       
    50 	}
       
    51 
       
    52 /**
       
    53 Returns the CharacterSet. Returns KNullDesC8 
       
    54 if no CharacterSet is set.
       
    55 */
       
    56 const TDesC8& CTldProperties::CharacterSet () const
       
    57 	{
       
    58 	return iCharacterSet;
       
    59 	}
       
    60 
       
    61 /**
       
    62 Set the listtype for the URI
       
    63 */
       
    64 void CTldProperties::SetListType ( InetUriList::TListType aListType )
       
    65 	{
       
    66 	iListType = aListType;
       
    67 	}
       
    68 
       
    69 
       
    70 /**
       
    71 Sets the TLDName
       
    72 */
       
    73 void CTldProperties::SetTldNameL ( const TDesC8& aTldName )
       
    74 	{
       
    75 	iTldName.Close();
       
    76 	iTldName.CreateL(aTldName);
       
    77 	}
       
    78 	
       
    79 /**
       
    80 Sets the allowed/ un-allowed character set
       
    81 */
       
    82 void CTldProperties::SetCharacterSetL ( const TDesC8& aCharacterSet )
       
    83 	{
       
    84 	iCharacterSet.Close();
       
    85 	iCharacterSet.CreateL(aCharacterSet);
       
    86 	}
       
    87 
       
    88 /**
       
    89 Clear the properties value and sets the default
       
    90 
       
    91 */
       
    92 void CTldProperties::Clear ()
       
    93 	{
       
    94 	iTldName.Close();
       
    95 	iCharacterSet.Close();
       
    96 	}
       
    97 
       
    98