videofeeds/server/IptvServiceManager/inc/CIptvServiceManager.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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 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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    header file for CIptvServiceManager class*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CIPTVSERVICEMANAGER_H
       
    22 #define CIPTVSERVICEMANAGER_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32std.h>
       
    26 #include <badesca.h>    // CDesCArrayFlat (cannot be forward declarated)
       
    27 #include <d32dbms.h>    // RDbStoreDatabase
       
    28 #include <f32file.h>    // RFs
       
    29 #include "CIptvUtil.h"
       
    30 
       
    31 #include "CIptvSmEvent.h"
       
    32 #include "CIptvServiceManagementClient.h"
       
    33 
       
    34 #if defined(__SERIES60_30__) || defined(__SERIES60_31__) || defined(__SERIES60_32__)
       
    35 class CActiveSpaceHelper;
       
    36 #endif // defined(__SERIES60_30__) || defined(__SERIES60_31__) || defined(__SERIES60_32__)
       
    37 
       
    38 // CONSTANTS
       
    39 
       
    40 const TInt KIptvSmCustomSqlMaxLength = 256;
       
    41 const TUint8 KIptvSmServiceDbCompactingFrequency = 3;
       
    42 const TInt KIptvSmMaxServices = 500;
       
    43 
       
    44 _LIT( KIptvSmCDiskPrefix, "c:");
       
    45 _LIT( KIptvSmZDiskPrefix, "z:");
       
    46 
       
    47 _LIT( KIptvSmServicesDbFileName, "services.dat");
       
    48 _LIT( KIptvSmPasswordsDbFileName, "pwd.dat");
       
    49 _LIT( KIptvSmServicesXmlFile, "services.xml");
       
    50 _LIT( KIptvSmServicesUpdateXmlFile, "updateservices.xml");
       
    51 _LIT( KSmDbVersionFileName, "SmDbVersion.dat");
       
    52 
       
    53 _LIT( KIptvSmServicesTable, "Services");
       
    54 
       
    55 _LIT( KIptvSmServicesDbIdCol, "ID" );                                     /* 1st column     */
       
    56 _LIT( KIptvSmServicesDbNameCol, "Name" );                                 /* 2nd column     */
       
    57 _LIT( KIptvSmServicesDbAddressCol, "Address" );                           /* 3rd column     */
       
    58 _LIT( KIptvSmServicesDbIconPathCol, "IconPath" );                         /* 4th column     */
       
    59 _LIT( KIptvSmServicesDbEpgPluginUidCol, "EpgPluginUid" );                 /* 5th column     */
       
    60 _LIT( KIptvSmServicesDbVodPluginUidCol, "VodEpgPluginUid" );              /* 6th column     */
       
    61 _LIT( KIptvSmServicesDbIptvPluginUidCol, "IptvEpgPluginUid" );            /* 7th column     */
       
    62 _LIT( KIptvSmServicesDbTypeCol, "Type" );                                 /* 8th column     */
       
    63 _LIT( KIptvSmServicesDbIapListCol, "Iap" );                               /* 9th column     */
       
    64 _LIT( KIptvSmServicesDbDescCol, "Desc" );                                 /* 10th column    */
       
    65 _LIT( KIptvSmServicesDbDateCol, "Date" );                                 /* 11th column    */
       
    66 _LIT( KIptvSmServicesDbFlagsCol, "Flags" );                               /* 12th column    */
       
    67 _LIT( KIptvSmServicesDbApplicationUidCol, "ApplicationUid" );             /* 13th column    */
       
    68 _LIT( KIptvSmServicesDbDisplayOrderCol, "DisplayOrder" );                 /* 14th column    */
       
    69 _LIT( KIptvSmServicesDbProviderIdCol, "ProviderId" );                     /* 15th column    */
       
    70 _LIT( KIptvSmServicesDbAccountManagementUrlCol, "AccountManagementUrl" ); /* 16th column    */
       
    71 _LIT( KIptvSmServicesDbEpgUpdateTimeCol, "EpgUpdateTime" );               /* 17th column    */ //added in db version 2
       
    72 _LIT( KIptvSmServicesDbIapNameCol, "IapName" );                           /* 18th column    */ //added in db version 2
       
    73 _LIT( KIptvSmServicesDbSearchUrlCol, "SearchUrl" );                       /* 19th column    */ //added in db version 2
       
    74 _LIT( KIptvSmServicesDbScheduledDlNetworkCol, "ScheduledDlNetwork" );     /* 20th column    */ //added in db version 2
       
    75 _LIT( KIptvSmServicesDbScheduledDlTimeCol, "ScheduledDlTime" );           /* 21th column    */ //added in db version 2
       
    76 _LIT( KIptvSmServicesDbScheduledDlTypeCol, "ScheduledDlType" );           /* 22th column    */ //added in db version 2
       
    77 _LIT( KIptvSmServicesDbLastScheduledDlTime, "LastScheduledDlTime" );      /* 23th column    */ //added in db version 2
       
    78 _LIT( KIptvSmServicesDbGroupIdCol, "GroupID" );                           /* 24th column    */ //added in db version 3
       
    79 _LIT( KIptvSmServicesDbUseCategoryCol, "UseCatecory" );                   /* 25th column    */ //added in db version 3
       
    80 _LIT( KIptvSmServicesDbUploadProviderCol, "UploadProvider" );             /* 26th column    */ //added in db version 3
       
    81 _LIT( KIptvSmServicesDbIconUrlCol, "IconUrl" );                           /* 27th column    */ //added in db version 3
       
    82 _LIT( KIptvSmServicesDbRecordUrlCol, "RecordUrl" );                       /* 28th column    */ //added in db version 3
       
    83 
       
    84 _LIT(KIptvSmServicesDbIndexName,"ServicesIndex");  /* Name of the ID index        */
       
    85 
       
    86 _LIT(KIptvSmPasswordsTable, "Passwords");
       
    87 _LIT(KIptvSmPasswordsDbIdCol, "ID");             /* 1st column     */
       
    88 _LIT(KIptvSmPasswordsDbUserNameCol, "UserName"); /* 2nd column     */
       
    89 _LIT(KIptvSmPasswordsDbPasswordCol, "Password"); /* 3rd column     */
       
    90 
       
    91 _LIT(KIptvSmPasswordsDbIndexName,"PasswordsIndex");  /* Name of the ID index */
       
    92 
       
    93 // MACROS
       
    94 
       
    95 // DATA TYPES
       
    96 
       
    97 // FUNCTION PROTOTYPES
       
    98 
       
    99 // FORWARD DECLARATIONS
       
   100 class CFileStore;
       
   101 class CIptvService;
       
   102 class MIptvServiceManagerObserver;
       
   103 class TIptvSmPassword;
       
   104 
       
   105 // CLASS DECLARATION
       
   106 
       
   107 /**
       
   108  * Class:       CIptvServiceManager
       
   109  *
       
   110  * Description: An instance of class CIptvServiceManager provides services
       
   111  *              database access. 
       
   112  *
       
   113  * Database definitions:
       
   114  *
       
   115  *              The Services database (services.dat) contains Services table:
       
   116  *
       
   117  *              Table name: Services\n
       
   118  *
       
   119  *                 Column:                     Type:          Length (bytes):                                In versions: \n
       
   120  *                 ------                      -----          ---------------                                ------------ \n
       
   121  *                 ID                          TUint32        4                                              vers 1, 2    \n
       
   122  *                 Name                        EDbColText     KIptvSmServicesDbNameMaxLength*2               vers 1, 2    \n     
       
   123  *                 Address                     EDbColText     KIptvSmServicesDbAddressMaxLength*2            vers 1, 2    \n
       
   124  *                 IconPath                    EDbColText     KIptvSmServicesDbIconPathMaxLength*2           vers 1, 2    \n
       
   125  *                 EpgPluginUid                TInt32         4                                              vers 1, 2    \n
       
   126  *                 VodPluginUid                TInt32         4                                              vers 1, 2    \n
       
   127  *                 IptvPluginUid               TInt32         4                                              vers 1, 2    \n
       
   128  *                 Type                        TUint8         1                                              vers 1, 2    \n
       
   129  *                 IAP List                    EDbColText8    KIptvSmServicesDbIapMaxLength                  vers 1, 2    \n
       
   130  *                 User name                   EDbColText     KIptvSmServicesDbPasswordMaxLength*2           vers 1, 2    \n
       
   131  *                 Password                    EDbColText     KIptvSmServicesDbPasswordMaxLength*2           vers 1, 2    \n
       
   132  *                 Desc                        EDbColText     KIptvSmServicesDbDescMaxLength*2               vers 1, 2    \n
       
   133  *                 Date                        TTime (TInt64) 8                                              vers 1, 2    \n
       
   134  *                 Flags                       TUint32        4                                              vers 1, 2    \n
       
   135  *                 ApplicationUid              TInt32         4                                              vers 1, 2    \n
       
   136  *                 DisplayOrder                TUint32        4                                              vers 1, 2    \n
       
   137  *                 ProviderId                  EDbColText     KIptvSmServicesDbProviderIdMaxLength           vers 1, 2    \n
       
   138  *                 AccountManagementUrl        EDbColText     KIptvSmServicesDbAccountManagementUrlMaxLength vers 1, 2    \n
       
   139  *                 EpgUpdateTime               TTime (TInt64) 8                                              vers 2       \n
       
   140  *                 IapName                     EDbColText     KIptvSmServicesDbIapNameMaxLength              vers 2       \n
       
   141  *                 SearchUrl                   EDbColText     KIptvSmServicesDbAddressMaxLength*2            vers 2       \n
       
   142  *                 ScheduledDlNetwork          TUint32        4                                              vers 2       \n
       
   143  *                 ScheduledDlTime             TUint32        4                                              vers 2       \n
       
   144  *                 ScheduledDlType             TUint32        4                                              vers 2       \n
       
   145  *                 LastScheduledDlTime         TTime (TInt64) 8                                              vers 2       \n
       
   146  *                 RecordUrl                   EDbColText     KIptvSmServicesDbAddressMaxLength*2            vers 3       \n
       
   147  *       
       
   148  *              There is also index for Services table with name "ServicesIndex". It's\n
       
   149  *              constructed from ID column.\n
       
   150  *
       
   151  *             The Passwords database (pwd.dat) contains Passwords table:\n
       
   152  *
       
   153  *              Table name: Passwords\n
       
   154  *
       
   155  *                 Column:              Type:          Length (bytes):                    Desc:  \n
       
   156  *                 ------               -----          -----------                        -----  \n
       
   157  *                 ID                   TUint32        4                                         \n
       
   158  *                 User name            EDbColText     KIptvSmPasswordsDbPasswordMaxLength*2     \n     
       
   159  *                 Password             EDbColText     KIptvSmPasswordsDbPasswordMaxLength*2     \n
       
   160  *
       
   161  */
       
   162 class CIptvServiceManager : public CBase
       
   163     {
       
   164     public:
       
   165     
       
   166         /**
       
   167          * These flags are used in AddOrUpdateServiceL() -method in aModeFlags argument. 
       
   168          */
       
   169         enum TAddServiceModeFlags
       
   170             {
       
   171             /**
       
   172             * If set, the mode is add, if not set the mode is update
       
   173             */
       
   174             EAddService = (1 << 0),
       
   175             
       
   176             /**
       
   177             * Used when doing nested calls, used by CIptvServiceManager itself
       
   178             */
       
   179             EDontOpen   = (1 << 1)
       
   180             };
       
   181     
       
   182     public:  // Constructors and destructor
       
   183 
       
   184         /**
       
   185          * NewL
       
   186          * Get instance of a CIptvServiceManager object.
       
   187          */
       
   188         static CIptvServiceManager* NewL();
       
   189 
       
   190         /**
       
   191          * ~CIptvServiceManager
       
   192          * Destroy the object.
       
   193          */
       
   194         ~CIptvServiceManager();
       
   195         
       
   196     public: // Public API for database operations
       
   197 
       
   198         /**
       
   199          * Removes Services and Passwords databases. Closes any open database,
       
   200          * before deleting files.
       
   201          */
       
   202         void RemoveDbL();
       
   203 
       
   204         /**
       
   205          * Retrieve services from databases.
       
   206          *
       
   207          * @param  aSeachLimitFlags See flags from CIptvServiceManagementClient::TSearchLimitFlag type.
       
   208          *                          If aSeachLimitFlags is 0, all services are returned. If aSeachLimitFlags != 0, then
       
   209          *                          only services which have the corresponding feature matching are returned.
       
   210          * @param  aOrder           The order in which the services are returned.
       
   211          * @param  aVersion         database version. If 0, then the latest possible version is used.
       
   212          * @return CIptvServices*   Pointer to class containing services found. 
       
   213          *                          User is responsible for freeing the returned pointer.
       
   214          */
       
   215         CIptvServices *GetServicesL(TUint32 aSearchLimitFlags,
       
   216                                     CIptvServiceManagementClient::TOrder aOrder,
       
   217                                     TInt aVersion);
       
   218 
       
   219         /**
       
   220          * Gets services which IDs are on the range of aStartId and aEndId.\n
       
   221          * Result might have gaps, ie every ID value might not contain service.\n
       
   222          * This method is not meant for searching service records, instead one should \n
       
   223          * use this when the service IDs are already known.\n
       
   224          *
       
   225          * @param  aStartId     The first ID to fetch.
       
   226          * @param  aEndId       The last ID to fetch.
       
   227          * @param  aDoOpenClose If ETrue, then the database is tried to open, and is closed at the end.
       
   228          *                      If EFalse, then the database is not opened at start and not closed at end.
       
   229          *                      This param can be used to remove unnecessary open/closes. 
       
   230          * @return              Pointer to class containing services.
       
   231          *                      User is responsible of freeing the returned pointer.
       
   232          */
       
   233         CIptvServices* GetServicesUsingIdL(TUint32 aStartId,
       
   234                                            TUint32 aEndId,
       
   235                                            TBool aDoOpenClose);
       
   236 
       
   237         /**
       
   238          * Gets service using ID.
       
   239          *
       
   240          * @param  aServiceId   Service ID in Services database.
       
   241          * @param  aDoOpenClose If ETrue, then the database is tried to open, and is closed at the end.
       
   242          *                      If EFalse, then the database is not opened at start and closed at end.
       
   243          *                      This param can be used to remove unnecessary open/closes. 
       
   244          * @return CIptvService* on success, NULL on fail.
       
   245          */
       
   246         CIptvService* GetServiceL(TUint32 aServiceId, TBool aDoOpenClose);
       
   247 
       
   248         /**
       
   249          * Gets services using provider ID.
       
   250          *
       
   251          * @param  aProviderId  Providerd ID in Services database.
       
   252          * @param  aDoOpenClose If ETrue, then the database is tried to open, and is closed at the end.
       
   253          *                      If EFalse, then the database is not opened at start and closed at end.
       
   254          *                      This param can be used to remove unnecessary open/closes. 
       
   255          * @return              CIptvServices* on success, NULL on fail.
       
   256          */
       
   257         CIptvServices* GetServicesL(const TDesC& aProviderId, TBool aDoOpenClose);
       
   258 
       
   259         /**
       
   260          * Deletes service from databases (Services DB and Passwords DB).
       
   261          *
       
   262          * @param aId The ID of the service to be deleted.
       
   263          * @return    KErrNone or one of the system-wide error codes.
       
   264          *            Returns KErrNone also if service with aId is not found.
       
   265          */
       
   266         TInt DeleteServiceL(TUint32 aId);
       
   267 
       
   268         /**
       
   269          * Registers observer. Ownership does not transfer.
       
   270          * Observers must inherit MIptvServiceManagerObserver
       
   271          * and implement virtual functions.
       
   272          *
       
   273          * @param aObserver Observer which will receive the events.
       
   274          * @return          System-wide error code.
       
   275          */
       
   276         TInt RegisterObserver(MIptvServiceManagerObserver* aObserver);
       
   277 
       
   278         /**
       
   279          * DeRegisters observer. Ownership does not transfer.
       
   280          *
       
   281          * @param aObserver Observer to be removed from observers list.
       
   282          */
       
   283         void DeRegisterObserver(MIptvServiceManagerObserver* aObserver);
       
   284 
       
   285         /**
       
   286          * Add service to database, if there is already a service with same
       
   287          * aService.iProviderId, then the existing service is updated with new values
       
   288          * and the new record is not created.
       
   289          *
       
   290          * @param aService     A Service to be added to database.
       
   291          * @param aDoOpenClose Used to optimize unnecessarry open/close calls.
       
   292          *                     Normal user uses ETrue always.
       
   293          */        
       
   294         void AddServiceL(CIptvService& aService, TBool aDoOpenClose);
       
   295 
       
   296 #if defined(__SERIES60_30__) || defined(__SERIES60_31__) || defined(__SERIES60_32__)
       
   297         /**
       
   298          * This method is used to update Video Store service to
       
   299          * active space database.
       
   300          *
       
   301          * @param aServive Service info.
       
   302          */
       
   303         void UpdateVideoStoreSpaceDbL( CIptvService& aServive );
       
   304 #endif // defined(__SERIES60_30__) || defined(__SERIES60_31__) || defined(__SERIES60_32__)
       
   305 
       
   306         /**
       
   307          * Update existing service in database. aService.iId is used as an identifier.
       
   308          *
       
   309          * @param aService New values to existing service in database.
       
   310          */        
       
   311         void UpdateServiceL(CIptvService& aService);
       
   312 
       
   313         /**
       
   314          * Closes Services and Passwords databases opened with OpenL.
       
   315          * Public since cleanupstack calls this.
       
   316          * It is safe to call this even if databases are already closed.
       
   317          */
       
   318         void Close();
       
   319             
       
   320     private:
       
   321 
       
   322         /**
       
   323          * Adds a new service to Services database or updates existing one.
       
   324          *
       
   325          * @param aService service to add, or update
       
   326          * @param aMode see values from TAddServiceModeFlags.
       
   327          */
       
   328         void AddOrUpdateServiceL(CIptvService& aService, TUint32 aModeFlags);
       
   329 
       
   330         /**
       
   331          * Creates index for Services DB. ID column is used as key.
       
   332          */
       
   333         void CreateServicesDbIndexL();
       
   334 
       
   335         /**
       
   336          * Creates index for Passwords DB. ID column is used as key.
       
   337          */        
       
   338         void CreatePasswordsDbIndexL();
       
   339 
       
   340         /**
       
   341          * Opens and creates databases if not done already. Can be called
       
   342          * even if already opened and created.
       
   343          */
       
   344         void OpenL();
       
   345 
       
   346         /**
       
   347          * Creates files if they are missing, executes provisioning if necessarry.
       
   348          *
       
   349          * @param aDoProvisioning If ETrue, then provisioning is done, if EFalse then it is
       
   350          *                        not performed.
       
   351          */
       
   352         void CreateFilesL(TBool aDoProvisioning);
       
   353 
       
   354         /**
       
   355          * Opens Services database.
       
   356          */
       
   357         void OpenServicesDbL();
       
   358 
       
   359         /**
       
   360          * Opens Passwords database.
       
   361          */
       
   362         void OpenPasswordsDbL();
       
   363 
       
   364         /**
       
   365          * Creates and opens a new Services database. Creates a
       
   366          * database file, table structure and an index constructed from ID column.
       
   367          * The database will be open in exclusive (non-shareable) mode. The
       
   368          * database must be closed, when not used any more. If the
       
   369          * database exists, it is replaced.
       
   370          * Leaves if the file cannot be created or database initialized.
       
   371          * Leaves with system wide error codes.
       
   372          */
       
   373         void CreateServicesDbL();
       
   374 
       
   375         /**
       
   376          * Creates and opens a new Passwords database. Creates a
       
   377          * database file and table structure. The database
       
   378          * will be open in exclusive (non-shareable) mode. The
       
   379          * database must be closed, when not used any more. If the
       
   380          * database exists, it is replaced.
       
   381          * Leaves if the file cannot be created or database initialized.
       
   382          * Leaves with system wide error codes.
       
   383          */
       
   384         void CreatePasswordsDbL();
       
   385 
       
   386         /**
       
   387          * Perform the first phase of two phase construction.
       
   388          */
       
   389         CIptvServiceManager();
       
   390 
       
   391         /**
       
   392          * Perform the second phase construction of a CIptvServiceManager
       
   393          * object
       
   394          */
       
   395         void ConstructL();
       
   396 
       
   397         /**
       
   398          * Sends event to all observers.
       
   399          *
       
   400          * @param aEvent     Event to send.
       
   401          * @param aServiceId Service which caused the event.
       
   402          * @param aService   Service data.
       
   403          */
       
   404         void InformObserversL( CIptvSmEvent::TEvent aEvent,
       
   405                                TUint32 aServiceId,
       
   406                                CIptvService* aService);
       
   407 
       
   408         /**
       
   409          * Get User name and password from Passwords DB.
       
   410          *
       
   411          * @param aId id of the service
       
   412          * @param aPassword username & password which will be filled from database.
       
   413          */      
       
   414         void GetPasswordL( TUint32 aId, TIptvSmPassword& aPassword );
       
   415 
       
   416     private:
       
   417 
       
   418         void CreateServicesTableL();
       
   419         void CreatePasswordsTableL();
       
   420         void CreateServicesIndexL();
       
   421         TBool IsServiceIncludedInSearch(TUint32 aSearchLimitFlags,
       
   422                                         CIptvService& aIptvService) const;
       
   423         TInt ExecuteSqlCmd(const TDesC& aSqlCmd, RDbStoreDatabase& aDb);
       
   424         void ExecuteProvisioningL();
       
   425         TBool IsServiceUpdateFoundL(TFileName& aServicesXmlFile);
       
   426         void DoProvisioningL(const TDesC& aServicesXmlFile);
       
   427         void CreateWritableRootDirL(TDriveNumber aDrive);
       
   428 
       
   429         /**
       
   430          * Reads SM DB version from SmDbVersion.dat. If version is found and it differs from
       
   431          * SW version, then services.dat and pwd.dat files are deleted. ConvertDatabaseL is run
       
   432          * if DB version is 1 and SW version is 2.
       
   433          */
       
   434         void CheckSmDbVersionL( void );
       
   435         
       
   436         /**
       
   437          * Saves sw version to SmDbVersion.dat.
       
   438          */ 
       
   439         void SaveSmDbVersion( void );
       
   440         
       
   441         /**
       
   442          * Converts SM DB to same version as SW.
       
   443          * Currently supports 1 -> 2 conversion.
       
   444          * @param aOldVersion Current DB version on the disk
       
   445          */         
       
   446         void ConvertDatabaseL( TInt aOldVersion );
       
   447 
       
   448         void CompactDatabases();
       
   449 
       
   450         /**
       
   451          * Returns highest DisplayOrder value from services DB
       
   452          * 
       
   453          * @return highest DisplayOrder value from services DB or zero.
       
   454          */
       
   455         TUint32 MaxDisplayOrderL();
       
   456 
       
   457     private:    // Data
       
   458 
       
   459         RArray<MIptvServiceManagerObserver*> iObservers; 
       
   460 
       
   461         /**
       
   462         * For use of iServicesFileStore / iPasswordsFileStore
       
   463         */
       
   464         RFs iFsSession;
       
   465     
       
   466         /**
       
   467         * For database operations
       
   468         */
       
   469         RDbStoreDatabase iServicesDb;
       
   470         RDbStoreDatabase iPasswordsDb;
       
   471     
       
   472         /**
       
   473         * For creating and opening services database file
       
   474         */
       
   475         CFileStore* iServicesFileStore;
       
   476 
       
   477         /**
       
   478         * For creating and opening passwords database file
       
   479         */
       
   480         CFileStore* iPasswordsFileStore;
       
   481 
       
   482         /**
       
   483         * Flag indicating iServicesDb open status
       
   484         */
       
   485         TBool iServicesDbOpen;
       
   486 
       
   487         /**
       
   488         * Flag indicating iPasswordsDb open status
       
   489         */
       
   490         TBool iPasswordsDbOpen;
       
   491     
       
   492         /**
       
   493         * Services database filename
       
   494         */
       
   495         TFileName iServicesFile;
       
   496 
       
   497         /**
       
   498         * Passwords database filename
       
   499         */
       
   500         TFileName iPasswordsFile;
       
   501 
       
   502         /**
       
   503         * The first and every 3rd delete/update/add operation causes database compacting
       
   504         */
       
   505         TUint8 iCompactCounter;
       
   506         
       
   507         /**
       
   508         * Private path
       
   509         */
       
   510         TFileName iPrivatePath;
       
   511 
       
   512         /**
       
   513         * Used to store search url temporarily in db operations.
       
   514         */
       
   515         HBufC* iSearchUrl;
       
   516         
       
   517         /**
       
   518         * Used to store record url temporarily in db operations.
       
   519         */
       
   520         HBufC* iRecordUrl;
       
   521 
       
   522 #if defined(__SERIES60_30__) || defined(__SERIES60_31__) || defined(__SERIES60_32__)	
       
   523         /**
       
   524          * ActiveSpace Helper class.
       
   525          * Own.
       
   526          */
       
   527 		CActiveSpaceHelper* iActiveSpaceHelper;
       
   528 #endif // defined(__SERIES60_30__) || defined(__SERIES60_31__) || defined(__SERIES60_32__)
       
   529 
       
   530     };
       
   531 
       
   532 #endif // CIPTVSERVICEMANAGER_H