equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2007-2007 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: Encapsulates uid and name. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef INTNAMEPAIR_H |
|
20 #define INTNAMEPAIR_H |
|
21 |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 /** |
|
26 * Encapsulates int name pair definition. |
|
27 * |
|
28 * @lib |
|
29 * @since S60 v4.0 |
|
30 */ |
|
31 class CIntNamePair : public CBase |
|
32 { |
|
33 public: |
|
34 |
|
35 /** |
|
36 * Two phased constructor. |
|
37 * |
|
38 * @since S60 4.0 |
|
39 * @param aUid Uid. |
|
40 * @param aName Name. |
|
41 * @return CIntNamePair* |
|
42 */ |
|
43 static CIntNamePair* NewL( |
|
44 const TInt& aUid, |
|
45 const TDesC& aName ); |
|
46 static CIntNamePair* NewLC( |
|
47 const TInt& aUid, |
|
48 const TDesC& aName ); |
|
49 |
|
50 virtual ~CIntNamePair(); |
|
51 |
|
52 public: |
|
53 |
|
54 /** |
|
55 * Returns uid. |
|
56 * |
|
57 * @since S60 4.0 |
|
58 * @param None |
|
59 * @return const TInt& |
|
60 */ |
|
61 const TInt& Int() const; |
|
62 |
|
63 /** |
|
64 * Returns name. |
|
65 * |
|
66 * @since S60 4.0 |
|
67 * @param None |
|
68 * @return const TDesC& |
|
69 */ |
|
70 const TDesC& Name() const; |
|
71 |
|
72 private: |
|
73 |
|
74 CIntNamePair( const TInt& aInt ); |
|
75 |
|
76 void ConstructL( const TDesC& aName ); |
|
77 |
|
78 private: // Data |
|
79 |
|
80 // Uid. |
|
81 TInt iInt; |
|
82 |
|
83 // Name. |
|
84 HBufC* iName; |
|
85 }; |
|
86 |
|
87 typedef RPointerArray< CIntNamePair > RIntNamePointerArray; |
|
88 |
|
89 #endif // INTNAMEPAIR_H |