|
1 /* |
|
2 * Copyright (c) 2002-2009 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: common item object for MdE |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __MDCDEF_H__ |
|
19 #define __MDCDEF_H__ |
|
20 |
|
21 #include "mdscommoninternal.h" |
|
22 #include "mdcserializationtype.h" |
|
23 |
|
24 |
|
25 NONSHARABLE_CLASS(TMdCDef) : protected TMdCSerializationType |
|
26 { |
|
27 protected: |
|
28 TMdCDef(TMdCStructTypes aType) : TMdCSerializationType( aType ) |
|
29 { |
|
30 } |
|
31 |
|
32 public: |
|
33 TDefId iDefId; |
|
34 TMdCValueUnion iName; |
|
35 }; |
|
36 |
|
37 |
|
38 NONSHARABLE_CLASS(TMdCObjectDef) : public TMdCDef |
|
39 { |
|
40 public: |
|
41 IMPORT_C TMdCObjectDef(); |
|
42 |
|
43 IMPORT_C static const TMdCObjectDef& GetFromBufferL( CMdCSerializationBuffer& aBuffer ); |
|
44 IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer); |
|
45 IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer); |
|
46 |
|
47 public: |
|
48 TDefId iParentId; |
|
49 TMdCValueUnion iPropertyDefs; |
|
50 }; |
|
51 |
|
52 NONSHARABLE_CLASS(TMdCRelationDef) : public TMdCDef |
|
53 { |
|
54 public: |
|
55 IMPORT_C TMdCRelationDef(); |
|
56 |
|
57 IMPORT_C static const TMdCRelationDef& GetFromBufferL( CMdCSerializationBuffer& aBuffer ); |
|
58 IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer); |
|
59 IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer); |
|
60 |
|
61 public: |
|
62 }; |
|
63 |
|
64 NONSHARABLE_CLASS(TMdCEventDef) : public TMdCDef |
|
65 { |
|
66 public: |
|
67 IMPORT_C TMdCEventDef(); |
|
68 |
|
69 IMPORT_C static const TMdCEventDef& GetFromBufferL( CMdCSerializationBuffer& aBuffer ); |
|
70 IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer); |
|
71 IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer); |
|
72 |
|
73 public: |
|
74 }; |
|
75 |
|
76 NONSHARABLE_CLASS(TMdCPropertyDef) : public TMdCDef |
|
77 { |
|
78 public: |
|
79 IMPORT_C TMdCPropertyDef(); |
|
80 |
|
81 IMPORT_C static const TMdCPropertyDef& GetFromBufferL( CMdCSerializationBuffer& aBuffer ); |
|
82 IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer); |
|
83 IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer); |
|
84 |
|
85 public: |
|
86 TUint16 iFlags; |
|
87 TUint16 iValueType; |
|
88 TMdCValueUnion iMinValue; |
|
89 TMdCValueUnion iMaxValue; |
|
90 }; |
|
91 |
|
92 NONSHARABLE_CLASS(TMdCNamespaceDef) : public TMdCDef |
|
93 { |
|
94 public: |
|
95 IMPORT_C TMdCNamespaceDef(); |
|
96 |
|
97 IMPORT_C static const TMdCNamespaceDef& GetFromBufferL( CMdCSerializationBuffer& aBuffer ); |
|
98 IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer); |
|
99 IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer); |
|
100 |
|
101 public: |
|
102 TBool iReadOnly; |
|
103 TMdCValueUnion iObjectDefs; |
|
104 TMdCValueUnion iRelationDefs; |
|
105 TMdCValueUnion iEventDefs; |
|
106 }; |
|
107 |
|
108 NONSHARABLE_CLASS(TMdCSchema) : protected TMdCSerializationType |
|
109 { |
|
110 public: |
|
111 IMPORT_C TMdCSchema(); |
|
112 |
|
113 IMPORT_C static const TMdCSchema& GetFromBufferL( CMdCSerializationBuffer& aBuffer ); |
|
114 IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer); |
|
115 IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer); |
|
116 |
|
117 public: |
|
118 TMdCValueUnion iNamespaceDefs; |
|
119 }; |
|
120 |
|
121 #endif /*__MDCDEF_H__*/ |