86 * @param aString string to be encoded to stream |
88 * @param aString string to be encoded to stream |
87 * @param aWriteStream stream to which string is encoded |
89 * @param aWriteStream stream to which string is encoded |
88 **/ |
90 **/ |
89 static void EncodeL( const TDesC8& aString, RWriteStream& aWriteStream ); |
91 static void EncodeL( const TDesC8& aString, RWriteStream& aWriteStream ); |
90 |
92 |
|
93 |
|
94 /** |
|
95 * Encodes descriptor to stream |
|
96 * @param aString string to be encoded to stream |
|
97 * @param aWriteStream stream to which string is encoded |
|
98 **/ |
|
99 static void EncodeL( const TDesC16& aString, RWriteStream& aWriteStream ); |
|
100 |
|
101 |
91 /** |
102 /** |
92 * Encodes string buffer to stream. If buffer is NULL empty string is encoded |
103 * Encodes string buffer to stream. If buffer is NULL empty string is encoded |
93 * @param aString string buffer to be encoded to stream |
104 * @param aString string buffer to be encoded to stream |
94 * @param aWriteStream stream to which string is encoded |
105 * @param aWriteStream stream to which string is encoded |
95 **/ |
106 **/ |
96 static void EncodeL( HBufC8* aString, RWriteStream& aWriteStream ); |
107 static void EncodeL( HBufC8* aString, RWriteStream& aWriteStream ); |
97 |
108 |
98 /** |
109 /** |
|
110 * Encodes string buffer to stream. If buffer is NULL empty string is encoded |
|
111 * @param aString string buffer to be encoded to stream |
|
112 * @param aWriteStream stream to which string is encoded |
|
113 **/ |
|
114 static void EncodeL( HBufC16* aString, RWriteStream& aWriteStream ); |
|
115 |
|
116 /** |
99 * Decodes string buffer from stream |
117 * Decodes string buffer from stream |
100 * @param aBuffer placeholder for data to be read from stream |
118 * @param aBuffer placeholder for data to be read from stream |
101 * @param aReadStream stream from which data is decoded |
119 * @param aReadStream stream from which data is decoded |
102 **/ |
120 **/ |
103 static void DecodeL( HBufC8*& aBuffer, RReadStream& aReadStream ); |
121 static void DecodeL( HBufC8*& aBuffer, RReadStream& aReadStream ); |
|
122 |
|
123 |
|
124 /** |
|
125 * Decodes string buffer from stream |
|
126 * @param aBuffer placeholder for data to be read from stream |
|
127 * @param aReadStream stream from which data is decoded |
|
128 **/ |
|
129 static void DecodeL( HBufC16*& aBuffer, RReadStream& aReadStream ); |
|
130 |
104 |
131 |
105 /** |
132 /** |
106 * Decodes descriptor array from stream |
133 * Decodes descriptor array from stream |
107 * @param aArray placeholder for data to be read from stream |
134 * @param aArray placeholder for data to be read from stream |
108 * @param aReadStream stream from which data is decoded |
135 * @param aReadStream stream from which data is decoded |
129 * @param aWriteStream stream to which media id is encoded |
156 * @param aWriteStream stream to which media id is encoded |
130 **/ |
157 **/ |
131 static void EncodeL( TMceMediaId aId, RWriteStream& aWriteStream ); |
158 static void EncodeL( TMceMediaId aId, RWriteStream& aWriteStream ); |
132 |
159 |
133 static void EncodeL( RArray<TMceCryptoContext>& aArray, RWriteStream& aWriteStream ); |
160 static void EncodeL( RArray<TMceCryptoContext>& aArray, RWriteStream& aWriteStream ); |
|
161 static void EncodeL(TInetAddr& aAddr, RWriteStream& aWriteStream); |
134 |
162 |
135 static void DecodeL( RArray<TMceCryptoContext>& aArray, RReadStream& aReadStream ); |
163 static void DecodeL( RArray<TMceCryptoContext>& aArray, RReadStream& aReadStream ); |
|
164 |
|
165 static void EncodeL( RPointerArray<TUriC8>& aArray, RWriteStream& aWriteStream ); |
|
166 |
|
167 static void DecodeL( RPointerArray<TUriC8>& aArray, RReadStream& aReadStream ); |
|
168 static void DecodeL(TInetAddr& aAddr, RReadStream& aReadStream); |
136 }; |
169 }; |
137 |
170 |
138 |
171 |
139 |
172 |
140 /** |
173 /** |
1049 |
1082 |
1050 }; |
1083 }; |
1051 |
1084 |
1052 |
1085 |
1053 |
1086 |
|
1087 |
|
1088 /** |
|
1089 * message stream serializer for Server and Client side stream |
|
1090 * |
|
1091 * @lib |
|
1092 */ |
|
1093 template <class T> |
|
1094 class TMceMessageStreamSerializer |
|
1095 { |
|
1096 |
|
1097 public: |
|
1098 |
|
1099 /** |
|
1100 * Constructor for internalization for server side |
|
1101 * @param aStream the stream |
|
1102 */ |
|
1103 inline TMceMessageStreamSerializer( T& aStream ); |
|
1104 |
|
1105 /** |
|
1106 * Internalizes |
|
1107 * @param aSerCtx context for serialization |
|
1108 */ |
|
1109 inline void InternalizeL( MMceComSerializationContext& aSerCtx ); |
|
1110 |
|
1111 /** |
|
1112 * Externalizes |
|
1113 * @param aSerCtx context for serialization |
|
1114 */ |
|
1115 inline void ExternalizeL( MMceComSerializationContext& aSerCtx ); |
|
1116 |
|
1117 |
|
1118 private: |
|
1119 |
|
1120 |
|
1121 /** |
|
1122 * Server / client side stream |
|
1123 */ |
|
1124 T& iMessageStream; |
|
1125 |
|
1126 }; |
1054 |
1127 |
1055 #include "mceserial.inl" |
1128 #include "mceserial.inl" |
1056 |
1129 |
1057 |
1130 |
1058 #endif |
1131 #endif |