os/kernelhwsrv/kernel/eka/euser/us_hand.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 1994-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 the License "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 // e32\euser\us_hand.cpp
    15 // 
    16 //
    17 
    18 #include "us_std.h"
    19 
    20 
    21 _LIT(KLiteralMatchAny, "*");
    22 
    23 EXPORT_C TFindHandleBase::TFindHandleBase()
    24 	: iMatch(KLiteralMatchAny)
    25 /**
    26 Default constructor.
    27 
    28 The default constructed TFindHandleBase object has the default match pattern, i.e. 
    29 the single character "*".
    30 */
    31 	{
    32 	}
    33 
    34 
    35 
    36 
    37 EXPORT_C TFindHandleBase::TFindHandleBase(const TDesC& aMatch)
    38 	: iMatch(aMatch)
    39 /**
    40 Constructor with match pattern.
    41 
    42 This constructor creates a TFindHandleBase object with the specified match 
    43 pattern.
    44 
    45 @param aMatch A reference to the descriptor containing the match pattern.
    46 */
    47 	{
    48 	}
    49 
    50 
    51 
    52 
    53 EXPORT_C void TFindHandleBase::Find(const TDesC& aMatch)
    54 /**
    55 Sets a new match pattern.
    56 
    57 On return from this function, this TFindHandleBase object contains a copy 
    58 of the supplied match pattern; the source descriptor can, therefore, be safely 
    59 discarded.
    60 
    61 @param aMatch A reference to the descriptor containing the new match pattern.
    62 */
    63 	{
    64 
    65 	Reset();
    66 	iMatch=aMatch;
    67 	}
    68 
    69 /**
    70 	Implementation for TFindXxxxxxx::Next(TFullName &aResult) methods
    71 	@internalComponent
    72 */
    73 TInt TFindHandleBase::NextObject(TFullName& aResult, TInt aObjectType)
    74 	{
    75 	TBuf8<KMaxFullName> match8;
    76 	match8.Copy(iMatch);
    77 	TInt r = Exec::ObjectNext((TObjectType)aObjectType, match8, *this);
    78 	if (r==KErrNone)
    79 		{
    80 		aResult.Copy(match8);
    81 		}
    82 	return r;
    83 	}
    84 
    85 EXPORT_C void RHandleBase::SetHandleNC(TInt aHandle)
    86 /**
    87 Sets the handle-number of this handle to the specified 
    88 value, and marks it as not closable.
    89 
    90 @param aHandle The handle-number to be set.
    91 */
    92 	{
    93 	SetHandle(aHandle|CObjectIx::ENoClose);
    94 	}