smf/smfcredentialmgr/smfcredmgrcommon/src/smfcredmgrclientdatastruct.cpp
changeset 18 013a02bf2bb0
parent 14 a469c0e6e7fb
equal deleted inserted replaced
17:106a4bfcb866 18:013a02bf2bb0
     8  *
     8  *
     9  * Initial Contributors:
     9  * Initial Contributors:
    10  * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
    10  * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
    11  *
    11  *
    12  * Description:
    12  * Description:
    13  *	This source file gives different data classes to be used
    13  * This source file gives different data classes to be used by Smf 
    14  * by Credential Manager Client and Server for data transfer.	
    14  * Credential Manager Client and Server for data transfer.	
    15  *
    15  *
    16  */
    16  */
       
    17 
       
    18 #include <f32file.h>
    17 
    19 
    18 #include "smfcredmgrclientdatastruct.h"
    20 #include "smfcredmgrclientdatastruct.h"
    19 #include "smfutils.h"
    21 #include "smfutils.h"
    20 #include <f32file.h>
    22 
    21 
    23 /**
       
    24  * Method to externalize the member variables
       
    25  * @param aStream The Write Stream to be filled.
       
    26  */
    22 void TSmfAuthToken::ExternalizeL(RWriteStream& aStream)
    27 void TSmfAuthToken::ExternalizeL(RWriteStream& aStream)
    23 	{
    28 	{
    24 
    29 
    25 	TPtr firstArgPtr(iKey->Des());
    30 	TPtr firstArgPtr(iKey->Des());
    26 	SmfUtils::ExternalizeDesL(firstArgPtr, aStream);
    31 	SmfUtils::ExternalizeDesL(firstArgPtr, aStream);
    27 
    32 
    28 	TPtr secondArgPtr(iSecret->Des());
    33 	TPtr secondArgPtr(iSecret->Des());
    29 	SmfUtils::ExternalizeDesL(secondArgPtr, aStream);
    34 	SmfUtils::ExternalizeDesL(secondArgPtr, aStream);
    30 	}
    35 	}
    31 
    36 
       
    37 /**
       
    38  * Method to internalize the member variables
       
    39  * @param aStream The source stream to read from
       
    40  */
    32 void TSmfAuthToken::InternalizeL(RReadStream& aStream)
    41 void TSmfAuthToken::InternalizeL(RReadStream& aStream)
    33 	{
    42 	{
    34 
       
    35 	// Delete the current values
    43 	// Delete the current values
    36 	delete iKey;
    44 	delete iKey;
    37 	iKey = SmfUtils::InternalizeDesL(aStream);
    45 	iKey = SmfUtils::InternalizeDesL(aStream);
    38 
    46 
    39 	delete iSecret;
    47 	delete iSecret;
    40 	iSecret = SmfUtils::InternalizeDesL(aStream);
    48 	iSecret = SmfUtils::InternalizeDesL(aStream);
    41 	}
    49 	}
    42 
    50 
       
    51 /**
       
    52  * Method to externalize the member variables
       
    53  * @param aStream The Write Stream to be filled.
       
    54  */
    43 void CSmfFetchAuthTokenSet::ExternalizeL(RWriteStream& aStream)
    55 void CSmfFetchAuthTokenSet::ExternalizeL(RWriteStream& aStream)
    44 	{
    56 	{
    45 	aStream.WriteUint32L(iValidity);
    57 	aStream.WriteUint32L(iValidity);
    46 
    58 
    47 	TPtr tokenPtr(iRegistrationToken->Des());
    59 	TPtr tokenPtr(iRegistrationToken->Des());
    52 
    64 
    53 	for (int i = 0; i < countTokenSet; i++)
    65 	for (int i = 0; i < countTokenSet; i++)
    54 		{
    66 		{
    55 		iAuthTokenArray[i].ExternalizeL(aStream);
    67 		iAuthTokenArray[i].ExternalizeL(aStream);
    56 		}
    68 		}
    57 
    69 	}
    58 	}
    70 
    59 
    71 /**
       
    72  * Method to internalize the member variables
       
    73  * @param aSource The Source Stream to read from
       
    74  */
    60 void CSmfFetchAuthTokenSet::InternalizeL(const RBuf8& aSource)
    75 void CSmfFetchAuthTokenSet::InternalizeL(const RBuf8& aSource)
    61 	{
    76 	{
    62 	// Create stream to read from the given buffer
    77 	// Create stream to read from the given buffer
    63 	RDesReadStream stream(aSource);
    78 	RDesReadStream stream(aSource);
    64 	CleanupClosePushL(stream);
    79 	CleanupClosePushL(stream);
    78 		iAuthTokenArray.Insert(set, i);
    93 		iAuthTokenArray.Insert(set, i);
    79 		}
    94 		}
    80 	CleanupStack::PopAndDestroy(&stream);
    95 	CleanupStack::PopAndDestroy(&stream);
    81 	}
    96 	}
    82 
    97 
       
    98 /**
       
    99  * Method to externalize the member variables
       
   100  * @param aStream The Write Stream to be filled.
       
   101  */
    83 void CSmfURLListParams::ExternalizeL(RWriteStream& aStream)
   102 void CSmfURLListParams::ExternalizeL(RWriteStream& aStream)
    84 	{
   103 	{
    85 	TInt32 countPlugin = iURLList.Count();
   104 	TInt32 countPlugin = iURLList.Count();
    86 	aStream.WriteInt32L(countPlugin);
   105 	aStream.WriteInt32L(countPlugin);
    87 	for (int i = 0; i < countPlugin; i++)
   106 	for (int i = 0; i < countPlugin; i++)
    92 
   111 
    93 	TPtr tokenPtr(iPluginID->Des());
   112 	TPtr tokenPtr(iPluginID->Des());
    94 	SmfUtils::ExternalizeDesL(tokenPtr, aStream);
   113 	SmfUtils::ExternalizeDesL(tokenPtr, aStream);
    95 	}
   114 	}
    96 
   115 
       
   116 /**
       
   117  * Method to internalize the member variables
       
   118  * @param aSource The source stream to read from
       
   119  */
    97 void CSmfURLListParams::InternalizeL(const TDesC8& aSource)
   120 void CSmfURLListParams::InternalizeL(const TDesC8& aSource)
    98 	{
   121 	{
    99 	// Create stream to read from the given buffer
   122 	// Create stream to read from the given buffer
   100 	RDesReadStream stream(aSource);
   123 	RDesReadStream stream(aSource);
   101 	CleanupClosePushL(stream);
   124 	CleanupClosePushL(stream);
   111 	iPluginID = SmfUtils::InternalizeDesL(stream);
   134 	iPluginID = SmfUtils::InternalizeDesL(stream);
   112 
   135 
   113 	CleanupStack::PopAndDestroy(&stream);
   136 	CleanupStack::PopAndDestroy(&stream);
   114 	}
   137 	}
   115 
   138 
       
   139 /**
       
   140  * Method to externalize the member variables
       
   141  * @param aStream The Write Stream to be filled.
       
   142  */
   116 void CSmfPluginIDListParams::ExternalizeL(RWriteStream& aStream)
   143 void CSmfPluginIDListParams::ExternalizeL(RWriteStream& aStream)
   117 	{
   144 	{
   118 	TPtr tokenPtr(iRegistrationToken->Des());
   145 	TPtr tokenPtr(iRegistrationToken->Des());
   119 	SmfUtils::ExternalizeDesL(tokenPtr, aStream);
   146 	SmfUtils::ExternalizeDesL(tokenPtr, aStream);
   120 
   147 
   125 		TPtr pluginBufPtr(iPluginList[i]->Des());
   152 		TPtr pluginBufPtr(iPluginList[i]->Des());
   126 		SmfUtils::ExternalizeDesL(pluginBufPtr, aStream);
   153 		SmfUtils::ExternalizeDesL(pluginBufPtr, aStream);
   127 		}
   154 		}
   128 	}
   155 	}
   129 
   156 
       
   157 /**
       
   158  * Method to internalize the member variables
       
   159  * @param aSource The source stream to read from
       
   160  */
   130 void CSmfPluginIDListParams::InternalizeL(const RBuf8& aSource)
   161 void CSmfPluginIDListParams::InternalizeL(const RBuf8& aSource)
   131 	{
   162 	{
   132 	// Create stream to use given buffer.
   163 	// Create stream to use given buffer.
   133 	RDesReadStream stream(aSource);
   164 	RDesReadStream stream(aSource);
   134 	CleanupClosePushL(stream);
   165 	CleanupClosePushL(stream);
   146 		iPluginList.Insert(bufPlugin, i);
   177 		iPluginList.Insert(bufPlugin, i);
   147 		}
   178 		}
   148 	CleanupStack::PopAndDestroy(&stream);
   179 	CleanupStack::PopAndDestroy(&stream);
   149 	}
   180 	}
   150 
   181 
       
   182 /**
       
   183  * Method to externalize the member variables
       
   184  * @param aStream The Write Stream to be filled.
       
   185  */
   151 void CSmfStoreAuthParams::ExternalizeL(RWriteStream& aStream)
   186 void CSmfStoreAuthParams::ExternalizeL(RWriteStream& aStream)
   152 	{
   187 	{
   153 	aStream.WriteInt32L(pluginIDEnabled);
   188 	aStream.WriteInt32L(pluginIDEnabled);
   154 
   189 
   155 	aStream.WriteUint32L(iValidity);
   190 	aStream.WriteUint32L(iValidity);
   167 		{
   202 		{
   168 		iAuthTokenArray[i].ExternalizeL(aStream);
   203 		iAuthTokenArray[i].ExternalizeL(aStream);
   169 		}
   204 		}
   170 
   205 
   171 	TInt32 countPlugin = iPluginIDList.Count();
   206 	TInt32 countPlugin = iPluginIDList.Count();
   172 
       
   173 	aStream.WriteInt32L(countPlugin);
   207 	aStream.WriteInt32L(countPlugin);
   174 
   208 
   175 	for (int i = 0; i < countPlugin; i++)
   209 	for (int i = 0; i < countPlugin; i++)
   176 		{
   210 		{
   177 
       
   178 		TPtr pluginBufPtr(iPluginIDList[i]->Des());
   211 		TPtr pluginBufPtr(iPluginIDList[i]->Des());
   179 		SmfUtils::ExternalizeDesL(pluginBufPtr, aStream);
   212 		SmfUtils::ExternalizeDesL(pluginBufPtr, aStream);
   180 		}
   213 		}
   181 
   214 
   182 	TInt32 countUrl = iURLList.Count();
   215 	TInt32 countUrl = iURLList.Count();
   187 		TPtr urlBufPtr(iURLList[i]->Des());
   220 		TPtr urlBufPtr(iURLList[i]->Des());
   188 		SmfUtils::ExternalizeDesL(urlBufPtr, aStream);
   221 		SmfUtils::ExternalizeDesL(urlBufPtr, aStream);
   189 		}
   222 		}
   190 	}
   223 	}
   191 
   224 
       
   225 /**
       
   226  * Method to internalize the member variables
       
   227  * @param aSource The source stream to read from
       
   228  */
   192 void CSmfStoreAuthParams::InternalizeL(const RBuf8& aSource)
   229 void CSmfStoreAuthParams::InternalizeL(const RBuf8& aSource)
   193 	{
   230 	{
   194 	// Create stream to read from the given buffer
   231 	// Create stream to read from the given buffer
   195 	RDesReadStream stream(aSource);
   232 	RDesReadStream stream(aSource);
   196 	CleanupClosePushL(stream);
   233 	CleanupClosePushL(stream);
   233 		iURLList.Insert(bufURL, i);
   270 		iURLList.Insert(bufURL, i);
   234 		}
   271 		}
   235 	CleanupStack::PopAndDestroy(&stream);
   272 	CleanupStack::PopAndDestroy(&stream);
   236 	}
   273 	}
   237 
   274 
       
   275 /**
       
   276  * Method to externalize the member variables
       
   277  * @param aStream The Write Stream to be filled.
       
   278  */
   238 void CSmfPluginIDUpdate::ExternalizeL(RWriteStream& aStream)
   279 void CSmfPluginIDUpdate::ExternalizeL(RWriteStream& aStream)
   239 	{
   280 	{
   240 	aStream.WriteInt32L(pluginIDEnabled);
   281 	aStream.WriteInt32L(pluginIDEnabled);
   241 
   282 
   242 	TPtr newPtr(iNewPluginID->Des());
   283 	TPtr newPtr(iNewPluginID->Des());
   244 
   285 
   245 	TPtr oldPtr(iOldPluginID->Des());
   286 	TPtr oldPtr(iOldPluginID->Des());
   246 	SmfUtils::ExternalizeDesL(oldPtr, aStream);
   287 	SmfUtils::ExternalizeDesL(oldPtr, aStream);
   247 	}
   288 	}
   248 
   289 
       
   290 /**
       
   291  * Method to internalize the member variables
       
   292  * @param aSource The source stream to read from
       
   293  */
   249 void CSmfPluginIDUpdate::InternalizeL(const RBuf8& aSource)
   294 void CSmfPluginIDUpdate::InternalizeL(const RBuf8& aSource)
   250 	{
   295 	{
   251 	// Create stream to read from the given buffer
   296 	// Create stream to read from the given buffer
   252 	RDesReadStream stream(aSource);
   297 	RDesReadStream stream(aSource);
   253 	CleanupClosePushL(stream);
   298 	CleanupClosePushL(stream);
   262 	iOldPluginID = SmfUtils::InternalizeDesL(stream);
   307 	iOldPluginID = SmfUtils::InternalizeDesL(stream);
   263 
   308 
   264 	CleanupStack::PopAndDestroy(&stream);
   309 	CleanupStack::PopAndDestroy(&stream);
   265 	}
   310 	}
   266 
   311 
       
   312 
       
   313 /**
       
   314  * NewL method
       
   315  * @param aMessage The message to be signed
       
   316  * @param aKey The key
       
   317  * @return The constructed CSmfSignParameters instance
       
   318  */
   267 CSmfSignParameters* CSmfSignParameters::NewL(
   319 CSmfSignParameters* CSmfSignParameters::NewL(
   268 	const TDesC8& aMessage, const TDesC8& aKey ) 
   320 	const TDesC8& aMessage, const TDesC8& aKey ) 
   269 	{
   321 	{
   270 	CSmfSignParameters* self = new( ELeave ) CSmfSignParameters();
   322 	CSmfSignParameters* self = new( ELeave ) CSmfSignParameters();
   271 	CleanupStack::PushL( self );
   323 	CleanupStack::PushL( self );
   272 	self->ConstructL( aMessage, aKey );
   324 	self->ConstructL( aMessage, aKey );
   273 	CleanupStack::Pop( self );
   325 	CleanupStack::Pop( self );
   274 	return self;
   326 	return self;
   275 	}
   327 	}
   276 
   328 
       
   329 /**
       
   330  * Overloaded NewL method
       
   331  * @param aMessage The message to be signed
       
   332  * @return The constructed CSmfSignParameters instance
       
   333  */
   277 CSmfSignParameters* CSmfSignParameters::NewL( const TDesC8& aData ) 
   334 CSmfSignParameters* CSmfSignParameters::NewL( const TDesC8& aData ) 
   278 	{
   335 	{
   279 	CSmfSignParameters* self = new( ELeave ) CSmfSignParameters();
   336 	CSmfSignParameters* self = new( ELeave ) CSmfSignParameters();
   280 	CleanupStack::PushL( self );
   337 	CleanupStack::PushL( self );
   281 	self->ConstructL( aData );
   338 	self->ConstructL( aData );
   282 	CleanupStack::Pop( self );
   339 	CleanupStack::Pop( self );
   283 	return self;
   340 	return self;
   284 	}
   341 	}
   285 
   342 
       
   343 /**
       
   344  * Destructor 
       
   345  */
   286 CSmfSignParameters::~CSmfSignParameters() 
   346 CSmfSignParameters::~CSmfSignParameters() 
   287 	{
   347 	{
   288 	iMessage.Close();
   348 	iMessage.Close();
   289 	iKey.Close();
   349 	iKey.Close();
   290 	}
   350 	}
   291 
   351 
       
   352 /**
       
   353  * Method to externalize the member variables
       
   354  * @param aStream The Write Stream to be filled.
       
   355  */
   292 void CSmfSignParameters::ExternalizeL( RWriteStream& aStream ) const
   356 void CSmfSignParameters::ExternalizeL( RWriteStream& aStream ) const
   293 	{
   357 	{
   294 	SmfUtils::ExternalizeDesL( iMessage, aStream );
   358 	SmfUtils::ExternalizeDesL( iMessage, aStream );
   295 	SmfUtils::ExternalizeDesL( iKey, aStream );
   359 	SmfUtils::ExternalizeDesL( iKey, aStream );
   296 	}
   360 	}
   297 
   361 
       
   362 /**
       
   363  * Method to get the Key for the signature
       
   364  * @return The Key for the signature
       
   365  */
   298 const TDesC8& CSmfSignParameters::Key() const 
   366 const TDesC8& CSmfSignParameters::Key() const 
   299 	{
   367 	{
   300 	return iKey;
   368 	return iKey;
   301 	}
   369 	}
   302 
   370 
       
   371 /**
       
   372  * Method to get the message
       
   373  * @return The message 
       
   374  */
   303 const TDesC8& CSmfSignParameters::Message() const 
   375 const TDesC8& CSmfSignParameters::Message() const 
   304 	{
   376 	{
   305 	return iMessage;
   377 	return iMessage;
   306 	}
   378 	}
   307 
   379 
       
   380 /**
       
   381  * Constructor 
       
   382  */
   308 CSmfSignParameters::CSmfSignParameters() 
   383 CSmfSignParameters::CSmfSignParameters() 
   309 	{
   384 	{
   310 	}
   385 	}
   311 
   386 
       
   387 /**
       
   388  * Two Phase constructor
       
   389  * @param aKey The Key for the signature
       
   390  * @return The constructed CSmfSignParameters instance
       
   391  */
   312 void CSmfSignParameters::ConstructL( const TDesC8& aMessage, const TDesC8& aKey )
   392 void CSmfSignParameters::ConstructL( const TDesC8& aMessage, const TDesC8& aKey )
   313 	{
   393 	{
   314 	iMessage.CreateL( aMessage );
   394 	iMessage.CreateL( aMessage );
   315 	iKey.CreateL( aKey );
   395 	iKey.CreateL( aKey );
   316 	}
   396 	}
   317 
   397 
       
   398 /**
       
   399  * Two Phase constructor
       
   400  * @return The constructed CSmfSignParameters instance
       
   401  */
   318 void CSmfSignParameters::ConstructL( const TDesC8& aData ) 
   402 void CSmfSignParameters::ConstructL( const TDesC8& aData ) 
   319 	{
   403 	{
   320 	RDesReadStream stream( aData );
   404 	RDesReadStream stream( aData );
   321 	CleanupClosePushL( stream );
   405 	CleanupClosePushL( stream );
   322 	SmfUtils::InternalizeDesL( iMessage, stream );
   406 	SmfUtils::InternalizeDesL( iMessage, stream );
   323 	SmfUtils::InternalizeDesL( iKey, stream );
   407 	SmfUtils::InternalizeDesL( iKey, stream );
   324 	CleanupStack::PopAndDestroy( &stream );
   408 	CleanupStack::PopAndDestroy( &stream );
   325 	}
   409 	}
   326 
   410 
       
   411 
       
   412 /**
       
   413  * NewL method
       
   414  * @param aKeyName
       
   415  * @param startDate
       
   416  * @param endDate
       
   417  * @param aKeydata
       
   418  * @return The constructed CSmfRsaKeyParameters instance
       
   419  */
   327 CSmfRsaKeyParameters* CSmfRsaKeyParameters::NewL(
   420 CSmfRsaKeyParameters* CSmfRsaKeyParameters::NewL(
   328 		const TDesC& aKeyName, const TTime& startDate,
   421 		const TDesC& aKeyName, 
   329 		const TTime& endDate, const TDesC8& aKeyData )
   422 		const TTime& startDate,
       
   423 		const TTime& endDate, 
       
   424 		const TDesC8& aKeyData )
   330 	{
   425 	{
   331 	CSmfRsaKeyParameters* self = new( ELeave ) CSmfRsaKeyParameters;
   426 	CSmfRsaKeyParameters* self = new( ELeave ) CSmfRsaKeyParameters;
   332 	CleanupStack::PushL( self );
   427 	CleanupStack::PushL( self );
   333 	self->ConstructL( aKeyName, startDate, endDate, aKeyData );
   428 	self->ConstructL( aKeyName, startDate, endDate, aKeyData );
   334 	CleanupStack::Pop( self );
   429 	CleanupStack::Pop( self );
   335 	return self;
   430 	return self;
   336 	}
   431 	}
   337 
   432 
       
   433 /**
       
   434  * Overloaded NewL method
       
   435  * @param aData
       
   436  * @return The constructed CSmfRsaKeyParameters instance
       
   437  */
   338 CSmfRsaKeyParameters* CSmfRsaKeyParameters::NewL( const TDesC8& aData )
   438 CSmfRsaKeyParameters* CSmfRsaKeyParameters::NewL( const TDesC8& aData )
   339 	{
   439 	{
   340 	CSmfRsaKeyParameters* self = new( ELeave ) CSmfRsaKeyParameters;
   440 	CSmfRsaKeyParameters* self = new( ELeave ) CSmfRsaKeyParameters;
   341 	CleanupStack::PushL( self );
   441 	CleanupStack::PushL( self );
   342 	self->ConstructL( aData );
   442 	self->ConstructL( aData );
   343 	CleanupStack::Pop( self );
   443 	CleanupStack::Pop( self );
   344 	return self;
   444 	return self;
   345 	}
   445 	}
   346 
   446 
       
   447 /**
       
   448  * Destructor 
       
   449  */
   347 CSmfRsaKeyParameters::~CSmfRsaKeyParameters() 
   450 CSmfRsaKeyParameters::~CSmfRsaKeyParameters() 
   348 	{
   451 	{
   349 	iKeyName.Close();
   452 	iKeyName.Close();
   350 	iKeyData.Close();
   453 	iKeyData.Close();
   351 	}
   454 	}
   352 
   455 
       
   456 /**
       
   457  * Method to externalize the member variables
       
   458  * @param aStream The Write Stream to be filled.
       
   459  */
   353 void CSmfRsaKeyParameters::ExternalizeL( RWriteStream& aStream ) const
   460 void CSmfRsaKeyParameters::ExternalizeL( RWriteStream& aStream ) const
   354 	{
   461 	{
   355 	SmfUtils::ExternalizeDesL( iKeyName, aStream );
   462 	SmfUtils::ExternalizeDesL( iKeyName, aStream );
   356 	SmfUtils::ExternalizeDesL( iKeyData, aStream );
   463 	SmfUtils::ExternalizeDesL( iKeyData, aStream );
   357 	SmfUtils::ExternalizeInt64L( iStartDate.Int64(), aStream );
   464 	SmfUtils::ExternalizeInt64L( iStartDate.Int64(), aStream );
   358 	SmfUtils::ExternalizeInt64L( iEndDate.Int64(), aStream );		
   465 	SmfUtils::ExternalizeInt64L( iEndDate.Int64(), aStream );		
   359 	}
   466 	}
   360 
   467 
       
   468 /**
       
   469  * Method to get the key name
       
   470  * @return The key name 
       
   471  */
   361 const TDesC& CSmfRsaKeyParameters::KeyName() const
   472 const TDesC& CSmfRsaKeyParameters::KeyName() const
   362 	{
   473 	{
   363 	return iKeyName;
   474 	return iKeyName;
   364 	}
   475 	}
   365 
   476 
       
   477 /**
       
   478  * Method to get the key data
       
   479  * @return The key data
       
   480  */
   366 const TDesC8& CSmfRsaKeyParameters::KeyData() const
   481 const TDesC8& CSmfRsaKeyParameters::KeyData() const
   367 	{
   482 	{
   368 	return iKeyData;
   483 	return iKeyData;
   369 	}
   484 	}
   370 
   485 
       
   486 /**
       
   487  * Method to get the start date
       
   488  * @return The start date
       
   489  */
   371 const TTime& CSmfRsaKeyParameters::StartDate() const
   490 const TTime& CSmfRsaKeyParameters::StartDate() const
   372 	{
   491 	{
   373 	return iStartDate;
   492 	return iStartDate;
   374 	}
   493 	}
   375 
   494 
       
   495 /**
       
   496  * Method to get the end date
       
   497  * @return The end date
       
   498  */
   376 const TTime& CSmfRsaKeyParameters::EndDate() const
   499 const TTime& CSmfRsaKeyParameters::EndDate() const
   377 	{
   500 	{
   378 	return iEndDate;
   501 	return iEndDate;
   379 	}
   502 	}
   380 
   503 
   381 void CSmfRsaKeyParameters::ConstructL( 
   504 /**
   382 		const TDesC& aKeyName, const TTime& startDate,
   505  * Two phase constructor
   383 		const TTime& endDate, const TDesC8& aKeyData )
   506  * @param aKeyName
       
   507  * @param startDate
       
   508  * @param endDate
       
   509  * @param aKeydata
       
   510  */
       
   511 void CSmfRsaKeyParameters::ConstructL( const TDesC& aKeyName, 
       
   512 		const TTime& startDate,
       
   513 		const TTime& endDate, 
       
   514 		const TDesC8& aKeyData )
   384 	{
   515 	{
   385 	iKeyName.CreateL( aKeyName );
   516 	iKeyName.CreateL( aKeyName );
   386 	iKeyData.CreateL( aKeyData );
   517 	iKeyData.CreateL( aKeyData );
   387 	iStartDate = startDate;
   518 	iStartDate = startDate;
   388 	iEndDate = endDate;
   519 	iEndDate = endDate;
   389 	}
   520 	}
   390 
   521 
       
   522 /**
       
   523  * Two phase constructor
       
   524  * @param aData
       
   525  */
   391 void CSmfRsaKeyParameters::ConstructL( const TDesC8& aData )
   526 void CSmfRsaKeyParameters::ConstructL( const TDesC8& aData )
   392 	{
   527 	{
   393 	RDesReadStream stream( aData );
   528 	RDesReadStream stream( aData );
   394 	CleanupClosePushL( stream );
   529 	CleanupClosePushL( stream );
   395 	SmfUtils::InternalizeDesL( iKeyName, stream );
   530 	SmfUtils::InternalizeDesL( iKeyName, stream );
   396 	SmfUtils::InternalizeDesL( iKeyData, stream );
   531 	SmfUtils::InternalizeDesL( iKeyData, stream );
       
   532 	
   397 	TInt64 startDate;
   533 	TInt64 startDate;
   398 	TInt64 endDate;
   534 	TInt64 endDate;
   399 	SmfUtils::InternalizeInt64L( startDate, stream );
   535 	SmfUtils::InternalizeInt64L( startDate, stream );
   400 	SmfUtils::InternalizeInt64L( endDate, stream );
   536 	SmfUtils::InternalizeInt64L( endDate, stream );
       
   537 	
   401 	iStartDate = TTime( startDate );
   538 	iStartDate = TTime( startDate );
   402 	iEndDate = TTime( endDate );
   539 	iEndDate = TTime( endDate );
   403 	CleanupStack::PopAndDestroy( &stream );	
   540 	CleanupStack::PopAndDestroy( &stream );	
   404 	}
   541 	}