|
1 /* |
|
2 * Copyright (c) 2006-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: A contact bookmark implementation for Contacts Model contact |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CCONTACTBOOKMARK_H |
|
20 #define C_CCONTACTBOOKMARK_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <cntdef.h> |
|
24 #include <MVPbkContactBookmark.h> |
|
25 |
|
26 namespace VPbkCntModel { |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CContactStore; |
|
30 |
|
31 /** |
|
32 * A contact bookmark implementation for Contacts Model contact |
|
33 * |
|
34 */ |
|
35 NONSHARABLE_CLASS( CContactBookmark ): public CBase, |
|
36 public MVPbkContactBookmark |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * @param aId the unique Contacts Model contact id |
|
42 * @param aStore the store in which the contact resides |
|
43 * @return a new instance of this class |
|
44 */ |
|
45 static CContactBookmark* NewL( TContactItemId aId, |
|
46 CContactStore& aStore ); |
|
47 |
|
48 /** |
|
49 * @param aId the unique Contacts Model contact id |
|
50 * @param aStore the store in which the contact resides |
|
51 * @return a new instance of this class |
|
52 */ |
|
53 static CContactBookmark* NewLC( TContactItemId aId, |
|
54 CContactStore& aStore ); |
|
55 |
|
56 virtual ~CContactBookmark(); |
|
57 |
|
58 /** |
|
59 * Returns the unique contact id |
|
60 * |
|
61 * @return the unique contact id |
|
62 */ |
|
63 inline TContactItemId ContactId() const; |
|
64 |
|
65 /** |
|
66 * Returns the contact store of the contact |
|
67 * |
|
68 * @return the contact store of the contact |
|
69 */ |
|
70 inline CContactStore& ContactStore() const; |
|
71 |
|
72 private: |
|
73 CContactBookmark( TContactItemId aId, CContactStore& aStore ); |
|
74 |
|
75 private: // data |
|
76 |
|
77 /** |
|
78 * Own: the unique contact id |
|
79 */ |
|
80 TContactItemId iId; |
|
81 |
|
82 /** |
|
83 * Ref: the contact store of the contact. |
|
84 */ |
|
85 CContactStore& iStore; |
|
86 }; |
|
87 |
|
88 inline TContactItemId CContactBookmark::ContactId() const |
|
89 { |
|
90 return iId; |
|
91 } |
|
92 |
|
93 inline CContactStore& CContactBookmark::ContactStore() const |
|
94 { |
|
95 return iStore; |
|
96 } |
|
97 } // namespace VPbkCntModel |
|
98 |
|
99 #endif // C_CCONTACTBOOKMARK_H |