brandingserver/bsserver/cbsstoragemanager.cpp
changeset 21 5872ac9a5671
parent 19 7e0cc21eb164
child 23 56a17d4c96b8
equal deleted inserted replaced
19:7e0cc21eb164 21:5872ac9a5671
     1 /*
     1 /*
     2 * Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     8 *
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  Stores element data and writes it to stream
    14 * Description:   Stores element data and writes it to stream
    15 *
    15 *
    16 */
    16 */
       
    17 
    17 
    18 
    18 
    19 
    19 #include <s32strm.h>
    20 #include <s32strm.h>
    20 #include <s32file.h>
    21 #include <s32file.h>
    21 #include <f32file.h>
    22 #include <f32file.h>
    32 #endif
    33 #endif
    33 #include "cbsserver.h"
    34 #include "cbsserver.h"
    34 #include "cbssession.h"
    35 #include "cbssession.h"
    35 #include "mbsupdater.h"
    36 #include "mbsupdater.h"
    36 //#include "importlogwriter.h"
    37 //#include "importlogwriter.h"
    37 #include "debugtrace.h"
    38 #include "DebugTrace.h"
    38 
    39 
    39 
    40 
    40 // ======== MEMBER FUNCTIONS ========
    41 // ======== MEMBER FUNCTIONS ========
    41 
    42 
    42 // ---------------------------------------------------------------------------
    43 // ---------------------------------------------------------------------------
   264     TInt length = aAppId.Length() + aBrandId.Length() +
   265     TInt length = aAppId.Length() + aBrandId.Length() +
   265                   KDefFileName().Length() + KDirSeparator().Length() * 2 +
   266                   KDefFileName().Length() + KDirSeparator().Length() * 2 +
   266                   langBuf.Length() + KDot().Length() * 3 + KMaxVersionLenght;
   267                   langBuf.Length() + KDot().Length() * 3 + KMaxVersionLenght;
   267 	fileName = HBufC::NewLC( length );
   268 	fileName = HBufC::NewLC( length );
   268     
   269     
       
   270     if(fileName){
   269     TPtr file( fileName->Des() );
   271     TPtr file( fileName->Des() );
   270 
   272 
   271     // [application_id]\[brand_id]\[def_filename][language_id]
   273     // [application_id]\[brand_id]\[def_filename][language_id]
   272     //
   274     //
   273     
   275     
   283 	    TBuf<KMaxVersionLenght> versionBuffer;
   285 	    TBuf<KMaxVersionLenght> versionBuffer;
   284 	    versionBuffer.AppendNum( aReserved );
   286 	    versionBuffer.AppendNum( aReserved );
   285 	    file.Append( KDot() );
   287 	    file.Append( KDot() );
   286     	file.Append( versionBuffer );
   288     	file.Append( versionBuffer );
   287     	}
   289     	}
   288 
   290     	
   289     if( fileName )
   291     	CleanupStack::Pop( fileName );      
   290     	{
   292     }
   291     	CleanupStack::Pop( fileName );
       
   292     	}
       
   293     return fileName;
   293     return fileName;
   294     }
   294     }
   295 
   295 
   296 // ---------------------------------------------------------------------------
   296 // ---------------------------------------------------------------------------
   297 // CBSStorageManager::CreateStorageL
   297 // CBSStorageManager::CreateStorageL