sl@0
|
1 |
// Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// e32\euser\us_hand.cpp
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
#include "us_std.h"
|
sl@0
|
19 |
|
sl@0
|
20 |
|
sl@0
|
21 |
_LIT(KLiteralMatchAny, "*");
|
sl@0
|
22 |
|
sl@0
|
23 |
EXPORT_C TFindHandleBase::TFindHandleBase()
|
sl@0
|
24 |
: iMatch(KLiteralMatchAny)
|
sl@0
|
25 |
/**
|
sl@0
|
26 |
Default constructor.
|
sl@0
|
27 |
|
sl@0
|
28 |
The default constructed TFindHandleBase object has the default match pattern, i.e.
|
sl@0
|
29 |
the single character "*".
|
sl@0
|
30 |
*/
|
sl@0
|
31 |
{
|
sl@0
|
32 |
}
|
sl@0
|
33 |
|
sl@0
|
34 |
|
sl@0
|
35 |
|
sl@0
|
36 |
|
sl@0
|
37 |
EXPORT_C TFindHandleBase::TFindHandleBase(const TDesC& aMatch)
|
sl@0
|
38 |
: iMatch(aMatch)
|
sl@0
|
39 |
/**
|
sl@0
|
40 |
Constructor with match pattern.
|
sl@0
|
41 |
|
sl@0
|
42 |
This constructor creates a TFindHandleBase object with the specified match
|
sl@0
|
43 |
pattern.
|
sl@0
|
44 |
|
sl@0
|
45 |
@param aMatch A reference to the descriptor containing the match pattern.
|
sl@0
|
46 |
*/
|
sl@0
|
47 |
{
|
sl@0
|
48 |
}
|
sl@0
|
49 |
|
sl@0
|
50 |
|
sl@0
|
51 |
|
sl@0
|
52 |
|
sl@0
|
53 |
EXPORT_C void TFindHandleBase::Find(const TDesC& aMatch)
|
sl@0
|
54 |
/**
|
sl@0
|
55 |
Sets a new match pattern.
|
sl@0
|
56 |
|
sl@0
|
57 |
On return from this function, this TFindHandleBase object contains a copy
|
sl@0
|
58 |
of the supplied match pattern; the source descriptor can, therefore, be safely
|
sl@0
|
59 |
discarded.
|
sl@0
|
60 |
|
sl@0
|
61 |
@param aMatch A reference to the descriptor containing the new match pattern.
|
sl@0
|
62 |
*/
|
sl@0
|
63 |
{
|
sl@0
|
64 |
|
sl@0
|
65 |
Reset();
|
sl@0
|
66 |
iMatch=aMatch;
|
sl@0
|
67 |
}
|
sl@0
|
68 |
|
sl@0
|
69 |
/**
|
sl@0
|
70 |
Implementation for TFindXxxxxxx::Next(TFullName &aResult) methods
|
sl@0
|
71 |
@internalComponent
|
sl@0
|
72 |
*/
|
sl@0
|
73 |
TInt TFindHandleBase::NextObject(TFullName& aResult, TInt aObjectType)
|
sl@0
|
74 |
{
|
sl@0
|
75 |
TBuf8<KMaxFullName> match8;
|
sl@0
|
76 |
match8.Copy(iMatch);
|
sl@0
|
77 |
TInt r = Exec::ObjectNext((TObjectType)aObjectType, match8, *this);
|
sl@0
|
78 |
if (r==KErrNone)
|
sl@0
|
79 |
{
|
sl@0
|
80 |
aResult.Copy(match8);
|
sl@0
|
81 |
}
|
sl@0
|
82 |
return r;
|
sl@0
|
83 |
}
|
sl@0
|
84 |
|
sl@0
|
85 |
EXPORT_C void RHandleBase::SetHandleNC(TInt aHandle)
|
sl@0
|
86 |
/**
|
sl@0
|
87 |
Sets the handle-number of this handle to the specified
|
sl@0
|
88 |
value, and marks it as not closable.
|
sl@0
|
89 |
|
sl@0
|
90 |
@param aHandle The handle-number to be set.
|
sl@0
|
91 |
*/
|
sl@0
|
92 |
{
|
sl@0
|
93 |
SetHandle(aHandle|CObjectIx::ENoClose);
|
sl@0
|
94 |
}
|