remotemgmt_plat/update_package_storage_plugin_api/inc/fotastorage.h
changeset 72 8ee66fcd0a7c
parent 68 415c00f1675d
equal deleted inserted replaced
68:415c00f1675d 72:8ee66fcd0a7c
     1 /*
       
     2 * Copyright (c) 2005 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:  Handles storing of update pkg
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __FOTASTORAGE_H_
       
    20 #define __FOTASTORAGE_H_
       
    21 
       
    22 #include <s32strm.h>
       
    23 
       
    24 
       
    25 /*
       
    26 * Handles all package storing and space reservation functionality.
       
    27 * This class is used by fotaserver and rfs.
       
    28 *
       
    29 */
       
    30 class CFotaStorage : public CBase
       
    31 {
       
    32 
       
    33     public:
       
    34 
       
    35     enum TFreeSpace
       
    36         {
       
    37         EFitsToReservation,     // fits to space reservation
       
    38         EFitsToFileSystem,      // doesn't fit to reservation,fits to FS
       
    39         EDoesntFitToFileSystem  // doesn't fit to fs
       
    40         };
       
    41 
       
    42         // This func is used to reserve storage space for future packages
       
    43         virtual TInt AdjustDummyStorageL() = 0;
       
    44 
       
    45         // This function is used to get the filestream pointer for writing the package.
       
    46         virtual TInt OpenUpdatePackageStoreL(const TInt aPkgId,TInt aNewDummySize
       
    47                                             , RWriteStream*& aPkgStore) = 0;
       
    48 
       
    49 		// This function is used to get the downloaded update package size.
       
    50 		virtual	void GetDownloadedUpdatePackageSizeL (const TInt aPkgId, TInt& aSize ) = 0;
       
    51         virtual void UpdatePackageDownloadCompleteL(const TInt aPkgId) = 0;
       
    52 
       
    53         // Get update package location. 
       
    54         virtual void GetUpdatePackageLocationL(const TInt aPkgId
       
    55                                                         , TDes8& aPath ) = 0;
       
    56 
       
    57         virtual void GetUpdatePackageIdsL(TDes16& aPackageIdList) = 0;
       
    58 
       
    59         // does the pkg fit to storage?
       
    60         virtual TFreeSpace IsPackageStoreSizeAvailableL (TInt& aSize) = 0;
       
    61 
       
    62         virtual void  DeleteUpdatePackageL ( const TInt aPkgId ) = 0;
       
    63 
       
    64     protected:
       
    65 
       
    66         
       
    67     public:
       
    68 
       
    69         // Bytes written to store, client must update
       
    70         TInt    iBytesWritten;
       
    71 
       
    72         TUid    iDtor_ID_Key;
       
    73 
       
    74 };
       
    75 #endif //__FOTASTORAGE_H_