|
1 // Copyright (c) 2005-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 // Class representing a single custom property. |
|
15 // @internalComponent |
|
16 // |
|
17 // |
|
18 |
|
19 #ifndef __CUSTOMPROPERTY_H__ |
|
20 #define __CUSTOMPROPERTY_H__ |
|
21 |
|
22 #include <centralrepository.h> |
|
23 #include "repository.h" |
|
24 |
|
25 /** |
|
26 This class represents registry entry for a custom property. Custom properties are registered centrally |
|
27 in the database. A registered custom property consists of a UID for identification and a data type. |
|
28 */ |
|
29 class CCustomProperty: public CRepositoryAccessor |
|
30 { |
|
31 private: |
|
32 class TProperty |
|
33 { |
|
34 public: |
|
35 TUid iId; |
|
36 Bookmark::TPropertyType iDataType; |
|
37 }; |
|
38 |
|
39 public: |
|
40 static CCustomProperty* NewL(CRepository& aRepository); |
|
41 ~CCustomProperty(); |
|
42 |
|
43 TUid Uid(); |
|
44 void SetUid(TUid aId); |
|
45 |
|
46 Bookmark::TPropertyType Type(); |
|
47 void SetType(Bookmark::TPropertyType aType); |
|
48 |
|
49 // From CRepositoryAccessor |
|
50 TUint32 IndexBase(); |
|
51 void SetIdFromIndexBase(TUint32 aIndexBase); |
|
52 void TransSaveL(); |
|
53 void TransNewL(); |
|
54 void TransLoadL(); |
|
55 void TransRemoveL(); |
|
56 |
|
57 private: |
|
58 CCustomProperty(CRepository& aRepository); |
|
59 |
|
60 private: |
|
61 TUint32 iEntryId; |
|
62 TUint32 iIndexBase; |
|
63 TProperty iProperty; |
|
64 }; |
|
65 |
|
66 typedef RArray<CCustomProperty*> TPropertyList; |
|
67 |
|
68 #endif //__CUSTOMPROPERTY_H__ |