os/security/securityanddataprivacytools/securitytools/certapp/store--/s32strm.inl
Update contrib.
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
20 inline void DoExternalizeL(const T& anObject,RWriteStream& aStream,Externalize::Member)
21 {anObject.ExternalizeL(aStream);}
23 inline void DoInternalizeL(T& anObject,RReadStream& aStream,Internalize::Member)
24 {anObject.InternalizeL(aStream);}
27 inline void DoExternalizeL(const T& anObject,RWriteStream& aStream,Externalize::Function)
28 {ExternalizeL(anObject,aStream);}
30 inline void DoInternalizeL(T& anObject,RReadStream& aStream,Internalize::Function)
31 {InternalizeL(anObject,aStream);}
33 // Externalization and internalization selectors
34 inline Externalize::Member Externalization(const TAny*)
35 {return Externalize::Member();}
36 inline Internalize::Member Internalization(TAny*)
37 {return Internalize::Member();}
39 inline Externalize::Function Externalization(const TDesC8*)
40 {return Externalize::Function();}
41 inline Externalize::Function Externalization(const TDesC16*)
42 {return Externalize::Function();}
43 inline Internalize::Function Internalization(TDes8*)
44 {return Internalize::Function();}
45 inline Internalize::Function Internalization(TDes16*)
46 {return Internalize::Function();}
49 inline Externalize::Function Externalization(const CBufBase*)
50 {return Externalize::Function();}
51 inline Externalize::Function Externalization(const CArrayFixBase*)
52 {return Externalize::Function();}
53 inline Internalize::Function Internalization(CBufBase*)
54 {return Internalize::Function();}
55 inline Internalize::Function Internalization(CArrayFixBase*)
56 {return Internalize::Function();}
60 inline Externalize::Function Externalization(T*const*)
61 {return Externalize::Function();}
63 // Externalization and internalization functions
64 IMPORT_C void ExternalizeL(TInt64 anInt64,RWriteStream& aStream);
65 IMPORT_C void InternalizeL(TInt64& anInt64,RReadStream& aStream);
67 IMPORT_C void ExternalizeL(const TDesC8& aDes8,RWriteStream& aStream);
68 IMPORT_C void ExternalizeL(const TDesC16& aDes16,RWriteStream& aStream);
69 IMPORT_C void InternalizeL(TDes8& aDes8,RReadStream& aStream);
70 IMPORT_C void InternalizeL(TDes16& aDes16,RReadStream& aStream);
72 IMPORT_C void ExternalizeL(const TCheckedUid& aUid,RWriteStream& aStream);
73 IMPORT_C void InternalizeL(TCheckedUid& aUid,RReadStream& aStream);
75 //IMPORT_C void ExternalizeL(TPoint aPoint,RWriteStream& aStream);
76 IMPORT_C void ExternalizeL(TSize aSize,RWriteStream& aStream);
77 //IMPORT_C void ExternalizeL(const TRect& aRect,RWriteStream& aStream);
78 //IMPORT_C void InternalizeL(TPoint& aPoint,RReadStream& aStream);
79 IMPORT_C void InternalizeL(TSize& aSize,RReadStream& aStream);
80 //IMPORT_C void InternalizeL(TRect& aRect,RReadStream& aStream);
82 //IMPORT_C void ExternalizeL(const CBufBase& aBuf,RWriteStream& aStream);
83 //IMPORT_C void InternalizeL(CBufBase& aBuf,RReadStream& aStream);
85 IMPORT_C void ArrayExternalizeCountL(TInt aCount,RWriteStream& aStream);
86 //IMPORT_C void DoExternalizeAllL(const CArrayFixBase& anArray,RWriteStream& aStream,TExternalizer<TAny> anExter);
87 IMPORT_C TInt ArrayInternalizeCountL(RReadStream& aStream);
88 //IMPORT_C void DoInternalizeAllL(CArrayFixBase& anArray,RReadStream& aStream,TInternalizer<TAny> anInter);
90 // Input and output operators
92 inline RWriteStream& operator<<(RWriteStream& aStream,const T& anObject)
93 {DoExternalizeL(anObject,aStream,Externalization(&anObject));return aStream;}
95 inline RReadStream& operator>>(RReadStream& aStream,T& anObject)
96 {DoInternalizeL(anObject,aStream,Internalization(&anObject));return aStream;}
98 inline RWriteStream& operator<<(RWriteStream& aStream,const TInt8& anInt8)
99 {aStream.WriteInt8L(anInt8);return aStream;}
100 inline RWriteStream& operator<<(RWriteStream& aStream,const TInt16& anInt16)
101 {aStream.WriteInt16L(anInt16);return aStream;}
102 inline RWriteStream& operator<<(RWriteStream& aStream,const TInt32& anInt32)
103 {aStream.WriteInt32L(anInt32);return aStream;}
104 inline RWriteStream& operator<<(RWriteStream& aStream,const TUint8& aUint8)
105 {aStream.WriteUint8L(aUint8);return aStream;}
106 inline RWriteStream& operator<<(RWriteStream& aStream,const TUint16& aUint16)
107 {aStream.WriteUint16L(aUint16);return aStream;}
108 inline RWriteStream& operator<<(RWriteStream& aStream,const TUint32& aUint32)
109 {aStream.WriteUint32L(aUint32);return aStream;}
110 //inline RWriteStream& operator<<(RWriteStream& aStream,const TReal32& aReal32)
111 // {aStream.WriteReal32L(aReal32);return aStream;}
112 //inline RWriteStream& operator<<(RWriteStream& aStream,const TReal64& aReal64)
113 // {aStream.WriteReal64L(aReal64);return aStream;}
115 inline RReadStream& operator>>(RReadStream& aStream,TInt8& anInt8)
116 {anInt8=aStream.ReadInt8L();return aStream;}
117 inline RReadStream& operator>>(RReadStream& aStream,TInt16& anInt16)
118 {anInt16=aStream.ReadInt16L();return aStream;}
119 inline RReadStream& operator>>(RReadStream& aStream,TInt32& anInt32)
120 {anInt32=aStream.ReadInt32L();return aStream;}
121 inline RReadStream& operator>>(RReadStream& aStream,TUint8& aUint8)
122 {aUint8=aStream.ReadUint8L();return aStream;}
123 inline RReadStream& operator>>(RReadStream& aStream,TUint16& aUint16)
124 {aUint16=aStream.ReadUint16L();return aStream;}
125 inline RReadStream& operator>>(RReadStream& aStream,TUint32& aUint32)
126 {aUint32=aStream.ReadUint32L();return aStream;}
127 //inline RReadStream& operator>>(RReadStream& aStream,TReal32& aReal32)
128 // {aReal32=aStream.ReadReal32L();return aStream;}
129 //inline RReadStream& operator>>(RReadStream& aStream,TReal64& aReal64)
130 // {aReal64=aStream.ReadReal64L();return aStream;}
133 //inline RWriteStream& operator<<(RWriteStream& aStream,const TInt64& anInt64)
134 // {ExternalizeL(anInt64,aStream);return aStream;}
135 //inline RReadStream& operator>>(RReadStream& aStream,TInt64& anInt64)
136 // {InternalizeL(anInt64,aStream);return aStream;}
138 inline RWriteStream& operator<<(RWriteStream& aStream,const TUid& aUid)
139 {return aStream<<aUid.iUid;}
140 inline RWriteStream& operator<<(RWriteStream& aStream,const TCheckedUid& aUid)
141 {ExternalizeL(aUid,aStream);return aStream;}
142 inline RReadStream& operator>>(RReadStream& aStream,TUid& aUid)
143 {return aStream>>aUid.iUid;}
144 inline RReadStream& operator>>(RReadStream& aStream,TCheckedUid& aUid)
145 {InternalizeL(aUid,aStream);return aStream;}
147 //inline RWriteStream& operator<<(RWriteStream& aStream,const TPoint& aPoint)
148 // {ExternalizeL(aPoint,aStream);return aStream;}
149 //inline RWriteStream& operator<<(RWriteStream& aStream,const TSize& aSize)
150 // {ExternalizeL(aSize,aStream);return aStream;}
151 //inline RWriteStream& operator<<(RWriteStream& aStream,const TRect& aRect)
152 // {ExternalizeL(aRect,aStream);return aStream;}
153 //inline RReadStream& operator>>(RReadStream& aStream,TPoint& aPoint)
154 // {InternalizeL(aPoint,aStream);return aStream;}
155 //inline RReadStream& operator>>(RReadStream& aStream,TSize& aSize)
156 // {InternalizeL(aSize,aStream);return aStream;}
157 //inline RReadStream& operator>>(RReadStream& aStream,TRect& aRect)
158 // {InternalizeL(aRect,aStream);return aStream;}
160 //inline RWriteStream& operator<<(RWriteStream& aStream,const TStreamRef& aRef)
161 // {aRef.ExternalizeL(aStream);return aStream;}
163 // Class TCardinality
164 inline TCardinality::TCardinality(TInt aCount)
166 /** Constructs the object with the specified value.
168 @param aCount The value for this object. */
171 __DbgChkRange(aCount);
174 inline TCardinality::operator TInt() const
177 __DbgChkRange(iCount);
181 // Class TDesInternalizer
182 inline const TDesHeader& TDesInternalizer::Header() const
184 inline TDesHeader& TDesInternalizer::Header()