cmmanager/cmmgr/cmmserver/inc/cmmcache.h
changeset 20 9c97ad6591ae
child 23 7ec726f93df1
equal deleted inserted replaced
18:fcbbe021d614 20:9c97ad6591ae
       
     1 /*
       
     2 * Copyright (c) 2009-2010 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:
       
    15 * Database cache manager.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CMMCACHE_H_
       
    21 #define CMMCACHE_H_
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <metadatabase.h>
       
    25 #include <commsdattypesv1_1.h>
       
    26 #include <cmgenconnsettings.h>
       
    27 
       
    28 #include "cmmserverdefs.h"
       
    29 #include "cmmbearerpriority.h"
       
    30 #include "cmmconnmethodstruct.h"
       
    31 #include "cmmconnmethoditem.h"
       
    32 
       
    33 // Forward declarations.
       
    34 class CCmmDestinationStruct;
       
    35 class CCmPluginBaseEng;
       
    36 class CCmmListenerManager;
       
    37 class CCmmInstanceMapping;
       
    38 
       
    39 class CCmmDestinationInstance;
       
    40 class CCmmConnMethodInstance;
       
    41 
       
    42 class CCmmTransactionHandler;
       
    43 class CCmManagerImpl;
       
    44 class CCmmBearerPriorityCache;
       
    45 
       
    46 
       
    47 /**
       
    48  * A simple class to group a temporary ID and a database assigned valid ID
       
    49  * together as a single structure.
       
    50  * 
       
    51  * Used e.g. when updating a newly received real ID to datastructures
       
    52  * containing a certain temporary ID.
       
    53  */
       
    54 NONSHARABLE_CLASS( TCmmIdStruct )
       
    55     {
       
    56 public:
       
    57     inline TCmmIdStruct() : iRealId( 0 ), iTemporaryId( 0 )
       
    58         {
       
    59         }
       
    60     inline TCmmIdStruct( TUint32 aRealId, TUint32 aTemporaryId )
       
    61             :
       
    62             iRealId( aRealId ),
       
    63             iTemporaryId( aTemporaryId )
       
    64         {
       
    65         }
       
    66 public:
       
    67     TUint32 iRealId;
       
    68     TUint32 iTemporaryId;
       
    69     };
       
    70 
       
    71 
       
    72 /**
       
    73  * The CmmCache-class oversees all database operations.
       
    74  * 
       
    75  * It manages the cached database data and handles all interactions between
       
    76  * that data and the client sessions.
       
    77  * 
       
    78  * It provides access to the CCmmInstanceMapping-class, that keeps track of the
       
    79  * overall structure of destinations and connection methods in the database.
       
    80  * 
       
    81  * It also manages the database listeners that keep track of database changes
       
    82  * caused by outside sources.
       
    83  */
       
    84 NONSHARABLE_CLASS( CCmmCache ) : public CBase
       
    85     {
       
    86 public:
       
    87     /**
       
    88      * NewL.
       
    89      */
       
    90     static CCmmCache* NewL(
       
    91             CCmManagerImpl* aCmManagerImpl,
       
    92             CArrayPtrFlat<const CCmPluginBaseEng>* aPlugins );
       
    93 
       
    94     /**
       
    95      * NewLC.
       
    96      */
       
    97     static CCmmCache* NewLC(
       
    98             CCmManagerImpl* aCmManagerImpl,
       
    99             CArrayPtrFlat<const CCmPluginBaseEng>* aPlugins );
       
   100 
       
   101     /**
       
   102      * Destructor.
       
   103      */
       
   104     ~CCmmCache();
       
   105 
       
   106 private:
       
   107     /**
       
   108      * Constructor.
       
   109      *
       
   110      * @param aPlugins Reference to supported plugin array.
       
   111      */
       
   112     CCmmCache(
       
   113             CCmManagerImpl* aCmManagerImpl,
       
   114             CArrayPtrFlat<const CCmPluginBaseEng>* aPlugins );
       
   115 
       
   116     /**
       
   117      * Second phase constructor.
       
   118      */
       
   119     void ConstructL();
       
   120 
       
   121 public:
       
   122     void OpenDestinationL(
       
   123             CCmmDestinationInstance& aDestinationInstance,
       
   124             const TUint32& aId );
       
   125 
       
   126     /**
       
   127      * Refresh the data contained in aDestinationInstance. This means reloading
       
   128      * the data from database if necessary. After this call the contents of
       
   129      * aDestinationInstance will reflect the current state in the database. 
       
   130      */
       
   131     void RefreshDestinationL(
       
   132             CCmmDestinationInstance& aDestinationInstance );
       
   133 
       
   134     void CreateDestinationL(
       
   135             CCmmDestinationInstance& aDestinationInstance,
       
   136             const TDesC& aName,
       
   137             const TUint32& aId );
       
   138 
       
   139     void OpenConnMethodL(
       
   140             CCmmConnMethodInstance& aConnMethodInstance,
       
   141             CCmmDestinationInstance* aDestinationInstance,
       
   142             const TUint32& aId );
       
   143 
       
   144     /**
       
   145      * Refresh the data contained in aConnMethodInstance. This means reloading
       
   146      * the data from database if necessary. After this call the contents of
       
   147      * aConnMethodInstance will reflect the current state in the database. 
       
   148      */
       
   149     void RefreshConnMethodL(
       
   150             CCmmConnMethodInstance& aConnMethodInstance );
       
   151 
       
   152     void CreateConnMethodL(
       
   153             CCmmConnMethodInstance& aConnMethodInstance,
       
   154             CCmmDestinationInstance* aDestinationInstance,
       
   155             const TUint32& aBearerType,
       
   156             const TUint32& aConnMethodId );
       
   157 
       
   158     /**
       
   159      * Creates a copy of the given client instance (copy of the connection
       
   160      * method to the cache). The copy is created from the commsdat data
       
   161      * (changes not updated will not be shown in the copy).
       
   162      * @param aNewConnMethodInstance The copy instance to be created.
       
   163      * @param aConnMethodInstance The source instance to be copied.
       
   164      */
       
   165     void CreateCopyOfConnMethodL(
       
   166             CCmmConnMethodInstance& aNewConnMethodInstance,
       
   167             CCmmConnMethodInstance& aConnMethodInstance );
       
   168 
       
   169     /**
       
   170      * Re-loads a destination record if needed and copies the latest version to
       
   171      * the session instance given as parameter.
       
   172      */
       
   173     void LoadDestinationRecordL(
       
   174             CCmmDestinationInstance& aDestinationInstance,
       
   175             TCmmDbRecords aDestRecordType );
       
   176 
       
   177     /**
       
   178      * Saves the modifications in aDestinationInstance into the database. Also
       
   179      * all connection methods inside this destination are updated (including
       
   180      * any embedded destination).
       
   181      */
       
   182     void UpdateDestinationL( CCmmDestinationInstance& aDestinationInstance );
       
   183 
       
   184     /**
       
   185      * Saves the modifications in aConnMethodInstance into database. The second
       
   186      * attribute aTemporaryHandle must be true if the connection method
       
   187      * instance is only a temporary one created for the duration of this update
       
   188      * process only.
       
   189      */
       
   190     void UpdateConnMethodL(
       
   191             CCmmConnMethodInstance& aConnMethodInstance,
       
   192             TBool aTemporaryHandle );
       
   193 
       
   194     /**
       
   195      * Deletes the destination refered by aDestinationInstance from the
       
   196      * database. In case other sessions have open handles to the same
       
   197      * destination, the status is updated to deleted state, but it is not yet
       
   198      * removed from database. (ID must be kept reserved in commsdat until all
       
   199      * handles are closed).
       
   200      */
       
   201     void DeleteDestinationL(
       
   202             CCmmDestinationInstance& aDestinationInstance,
       
   203             TBool aForced = EFalse );
       
   204 
       
   205     /**
       
   206      * Deletes a connection method as part of destination update operation. It
       
   207      * is already checked that the connection method given as parameter can be
       
   208      * deleted and a transaction is already open.
       
   209      */
       
   210     void DeleteConnMethodAsPartOfDestinationUpdateL( const TUint32& aConnMethodId );
       
   211 
       
   212     /**
       
   213      * Deletes a connection method as part of destination delete operation. It
       
   214      * is already checked that the connection method given as parameter can be
       
   215      * deleted and a transaction is already open.
       
   216      */
       
   217     void DeleteConnMethodAsPartOfDestinationDeleteL( const TUint32& aConnMethodId );
       
   218 
       
   219     /**
       
   220      * Basic connection method delete. Removes a connection method from any
       
   221      * destination it might belong to, and then deletes it.
       
   222      */
       
   223     void DeleteConnMethodL( CCmmConnMethodInstance& aConnMethodInstance );
       
   224 
       
   225     TBool DestinationExistsWithId( const TUint32& aId );
       
   226     TBool DestinationExistsWithNameL( const TDesC& aName, const TUint32& aDestinationId );
       
   227     TBool DestinationOpenWithId( const TUint32& aId );
       
   228     TBool NotSavedDestinationOpenWithNameL( const TDesC& aName, const TUint32& aDestinationId );
       
   229 
       
   230     TBool ConnMethodExistsWithId( const TUint32& aConnMethodId );
       
   231     TBool ConnMethodOpenWithId( const TUint32& aConnMethodId );
       
   232 
       
   233     TBool DestinationExistsWithMetadataLocalizedL(
       
   234             CCmmDestinationInstance& aDestinationInstance,
       
   235             const TUint32& aValue );
       
   236     TBool DestinationExistsWithMetadataPurposeL(
       
   237             CCmmDestinationInstance& aDestinationInstance,
       
   238             const TUint32& aValue );
       
   239 
       
   240     void DbChangeDetected( const TUint32& aTableId );
       
   241     void DbChangeError( const TUint32& aTableId );
       
   242 
       
   243     void CloseDestination( CCmmDestinationInstance& aDestinationInstance );
       
   244     void CloseConnMethod( CCmmConnMethodInstance& aConnMethodInstance );
       
   245 
       
   246     /**
       
   247      * Returns a reference to the CommsDat session.
       
   248      */
       
   249     CommsDat::CMDBSession& Session() const;
       
   250 
       
   251     /**
       
   252      * Finds out the bearer type and priority of the service type from given
       
   253      * IAP record.
       
   254      */
       
   255     void BearerInfoFromIapRecordL(
       
   256             CommsDat::CCDIAPRecord* aIapRecord,
       
   257             TUint32& aBearerType,
       
   258             TUint& aBearerPriority ) const;
       
   259 
       
   260     /**
       
   261      * Finds out the priority of the service type in given IAP record.
       
   262      */
       
   263     void BearerPriorityFromIapRecordL(
       
   264             CommsDat::CCDIAPRecord* aIapRecord,
       
   265             TUint& aBearerPriority ) const;
       
   266 
       
   267     /**
       
   268      * Finds out the bearer type of a connection method from given IAP record.
       
   269      */
       
   270     void BearerTypeFromIapRecordL(
       
   271             CommsDat::CCDIAPRecord* aIapRecord,
       
   272             TUint32& aBearerType ) const;
       
   273 
       
   274     /**
       
   275      * Loads and initializes a connection method instance.
       
   276      * @param aConnMethodInstance Reference to connection method instance
       
   277      * beeing initialized.
       
   278      * @param aConnMethodId ID of the connection method beeing opened.
       
   279      */
       
   280     void OpenConnectionMethodInstanceL(
       
   281             CCmmConnMethodInstance& aConnMethodInstance,
       
   282             const TUint32& aConnMethodId );
       
   283 
       
   284     /**
       
   285      * Returns Connection Method specific integer value. CM is loaded(if not loaded already)
       
   286      * to get the value.
       
   287      * @param aCmId Identifier of the Connection Method.
       
   288      * @param aAttribute The identifier of the requested value.
       
   289      * @return Returns the requested integer value if found. Otherwise leaves with error code
       
   290      * KErrNotFound.
       
   291      */
       
   292     TUint32 GetConnectionMethodInfoIntL(
       
   293             const TUint32& aCmId,
       
   294             const TUint32& aAttribute );
       
   295 
       
   296     /**
       
   297      * Returns Connection Method specific boolean value. CM is loaded(if not loaded already)
       
   298      * to get the value.
       
   299      * @param aCmId Identifier of the Connection Method.
       
   300      * @param aAttribute The identifier of the requested value.
       
   301      * @return Returns the requested boolean value if found. Otherwise leaves with error code
       
   302      * KErrNotFound.
       
   303      */
       
   304     TBool GetConnectionMethodInfoBoolL(
       
   305             const TUint32& aCmId,
       
   306             const TUint32& aAttribute );
       
   307 
       
   308     /**
       
   309      * Returns Connection Method specific 16 bit string value.
       
   310      * CM is loaded(if not loaded already) to get the value.
       
   311      * @param aCmId Identifier of the Connection Method.
       
   312      * @param aAttribute The identifier of the requested value.
       
   313      * @return Returns the requested string value if found. Otherwise leaves with error code
       
   314      * KErrNotFound.
       
   315      */
       
   316     HBufC* GetConnectionMethodInfoStringL(
       
   317             const TUint32& aCmId,
       
   318             const TUint32& aAttribute );
       
   319 
       
   320     /**
       
   321      * Returns Connection Method specific 8 bit string value.
       
   322      * CM is loaded(if not loaded already) to get the value.
       
   323      * @param aCmId Identifier of the Connection Method.
       
   324      * @param aAttribute The identifier of the requested value.
       
   325      * @return Returns the requested string value if found. Otherwise leaves with error code
       
   326      * KErrNotFound.
       
   327      */
       
   328     HBufC8* GetConnectionMethodInfoString8L(
       
   329             const TUint32& aCmId,
       
   330             const TUint32& aAttribute );
       
   331 
       
   332     /**
       
   333      * Returns bearer specific integer value. IAP does not need to be loaded for this.
       
   334      * @param aBearerType The type of the plugin to be asked.
       
   335      * @param aAttribute The identifier of the requested value.
       
   336      * @return Returns the requested integer value if found. Otherwise leaves with error code
       
   337      * KErrNotFound.
       
   338      */
       
   339     TUint32 GetBearerInfoIntL(
       
   340             const TUint32& aBearerType,
       
   341             const TUint32& aAttribute );
       
   342 
       
   343     /**
       
   344      * Returns bearer specific boolean value. IAP does not need to be loaded for this.
       
   345      * @param aBearerType The type of the plugin to be asked.
       
   346      * @param aAttribute The identifier of the requested value.
       
   347      * @return Returns the requested boolean value if found. Otherwise leaves with error code
       
   348      * KErrNotFound.
       
   349      */
       
   350     TBool GetBearerInfoBoolL(
       
   351             const TUint32& aBearerType,
       
   352             const TUint32& aAttribute );
       
   353 
       
   354     /**
       
   355      * Returns bearer specific 16 bit string value. IAP does not need to be loaded for this.
       
   356      * @param aBearerType The type of the plugin to be asked.
       
   357      * @param aAttribute The identifier of the requested value.
       
   358      * @return Returns the requested string value if found. Otherwise leaves with error code
       
   359      * KErrNotFound.
       
   360      */
       
   361     HBufC* GetBearerInfoStringL(
       
   362             const TUint32& aBearerType,
       
   363             const TUint32& aAttribute );
       
   364 
       
   365     /**
       
   366      * Returns bearer specific 8 bit string value. IAP does not need to be loaded for this.
       
   367      * @param aBearerType The type of the plugin to be asked.
       
   368      * @param aAttribute The identifier of the requested value.
       
   369      * @return Returns the requested string value if found. Otherwise leaves with error code
       
   370      * KErrNotFound.
       
   371      */
       
   372     HBufC8* GetBearerInfoString8L(
       
   373             const TUint32& aBearerType,
       
   374             const TUint32& aAttribute );
       
   375 
       
   376     /**
       
   377      * Returns all conenction method IDs. Unsupported connection methods are
       
   378      * included if aCheckBearerType is set to EFalse.
       
   379      */
       
   380     void GetAllConnMethodsL(
       
   381             RArray<TUint32>& aConnMethodArray,
       
   382             TBool aCheckBearerType ) const;
       
   383 
       
   384     /**
       
   385      * Returns the number of destinations the provided connection method
       
   386      * belongs to.
       
   387      */
       
   388     TInt DestinationsContainingConnMethod( const TUint32& aConnMethodId ) const;
       
   389 
       
   390     /**
       
   391      * Return the EasyWLAN IAP ID, zero if not found or WLAN not supported.
       
   392      */
       
   393     TUint32 EasyWlanIdL() const;
       
   394 
       
   395     /**
       
   396      * Check if WLAN is supported on phone.
       
   397      */
       
   398     TBool WlanSupported() const;
       
   399 
       
   400     /**
       
   401      * Find out the internet destination ID. Set to 0 if not found.
       
   402      */
       
   403     void InternetDestinationIdL( TUint& aInternetDestinationId ) const;
       
   404 
       
   405     /**
       
   406      * Return the number of destinations in database.
       
   407      */
       
   408     TInt GetDestinationCount() const;
       
   409 
       
   410     /**
       
   411      * Returns all the valid Destinations
       
   412      */
       
   413     void GetDestinationsL( RArray<TUint32>& aDestinationArray ) const;
       
   414 
       
   415     /**
       
   416      * Returns all the valid connection methods under given destination.
       
   417      */
       
   418     void GetConnMethodsFromDestinationL(
       
   419             const TUint32& aDestinationId,
       
   420             RArray<TCmmConnMethodItem>& aConnMethodArray ) const;
       
   421 
       
   422     /**
       
   423      * Copies the bearer priority array's contents to aArray.
       
   424      */
       
   425     void CopyBearerPriorityArrayL( RPointerArray<CCmmBearerPriority>& aArray ) const;
       
   426 
       
   427     /**
       
   428      * Updates the bearer priority array with the contents of aArray.
       
   429      */
       
   430     void UpdateBearerPriorityArrayL( const RPointerArray<CCmmBearerPriority>& aArray );
       
   431 
       
   432     TBool ConnMethodInOtherDestination(
       
   433             const TUint32& aConnMethodId,
       
   434             const TUint32& aDestinationId );
       
   435     TUint32 NextFreeTemporaryId();
       
   436 
       
   437     /**
       
   438      * Read general connection settings from database.
       
   439      */
       
   440     void ReadGenConnSettingsL( TCmGenConnSettings& aGenConnSettings ) const;
       
   441 
       
   442     /**
       
   443      * Write general connection settings to database.
       
   444      */
       
   445     void WriteGenConnSettingsL( const TCmGenConnSettings& aGenConnSettings );
       
   446 
       
   447     /**
       
   448      * Enumerates connections and checks if the given connection method is
       
   449      * connected.
       
   450      * @param aCmId Id of the connection method to be checked.
       
   451      * @return Returns ETrue if the CM is connected and EFalse if it's not
       
   452      * connected.
       
   453      */
       
   454     TBool CheckIfCmConnected( const TUint32& aCmId ) const;
       
   455 
       
   456     /**
       
   457      * Enumerates connections and checks if any of the connection methods in
       
   458      * the given destination is connected.
       
   459      * //TODO, update comments with second parameter.
       
   460      */
       
   461     TBool DestinationConnectedL(
       
   462             const TUint32 aDestinationId,
       
   463             CCmmDestinationInstance* aDestinationInstance = NULL ) const;
       
   464 
       
   465     /**
       
   466      * Check from database if the given destination is an embedded destination
       
   467      * in any other destination.
       
   468      */
       
   469     TBool DestinationIsEmbedded( const TUint32& aDestinationId ) const;
       
   470 
       
   471     /**
       
   472      * Check from database if the given destination has an embedded destination.
       
   473      */
       
   474     TBool DestinationHasEmbedded( const TUint32& aDestinationId ) const;
       
   475 
       
   476     /**
       
   477      * Check from database if the given destination is pointed to by any
       
   478      * virtual IAP.
       
   479      */
       
   480     TBool DestinationPointedToByVirtualIap( const TUint32& aDestinationId ) const;
       
   481 
       
   482     /**
       
   483      * Check from database if the given connection method is pointed to by any
       
   484      * virtual IAP.
       
   485      */
       
   486     TBool ConnMethodPointedToByVirtualIap( const TUint32& aConnMethodId ) const;
       
   487 
       
   488     /**
       
   489      * Check if the given connection method is the only connection method in
       
   490      * the given destination and if a virtual IAP points to that destination.
       
   491      */
       
   492     TBool ConnMethodInDestinationButLocked(
       
   493             const TUint32& aConnMethodId,
       
   494             const TUint32& aDestinationId ) const;
       
   495 
       
   496     /**
       
   497      * Remove all references to the given connection method from the
       
   498      * datamobility selection policy records. Then update instance mapping to
       
   499      * reflect the current database state, and notify any possible client
       
   500      * handles for the changed destinations.
       
   501      */
       
   502     void RemoveAllReferencesToConnMethodL(
       
   503             CCmmConnMethodInstance& aConnMethodInstance );
       
   504 
       
   505     /**
       
   506      * Update the ID of a new destination from temporary ID to real ID after a
       
   507      * successful update to database.
       
   508      */
       
   509     void RefreshDestinationId( const TCmmIdStruct& aIdStruct );
       
   510 
       
   511     /**
       
   512      * Update the ID of a new connection method from temporary ID to real ID
       
   513      * after a successful update to database.
       
   514      */
       
   515     void RefreshConnMethodId( const TCmmIdStruct& aIdStruct );
       
   516 
       
   517     /**
       
   518      * During destination update, after updating connection methods inside the
       
   519      * destination, the database records containing the information of what
       
   520      * connection methods are inside the destination need to be updated with
       
   521      * real IDs for any newly created connection methods. These real IDs are
       
   522      * held in the temporary array iUpdatedConnMethods until successful commit
       
   523      * to database. This method is used to find out those real IDs before that.
       
   524      */
       
   525     void TranslateTemporaryId( const TUint32& aTemporaryId, TUint32& aRealId ) const;
       
   526 
       
   527     /**
       
   528      * Check if the given connection method can have all references removed and
       
   529      * made into an uncategorized connection method.
       
   530      */
       
   531     void CheckIfConnMethodReferencesCanBeRemovedL( const CCmmConnMethodInstance& aConnMethodInstance );
       
   532 
       
   533     /**
       
   534      * Check if the given connection method can be deleted.
       
   535      */
       
   536     void CheckIfConnMethodCanBeDeletedL( const CCmmConnMethodInstance& aConnMethodInstance );
       
   537 
       
   538     /**
       
   539      * Check if the given destination can be deleted.
       
   540      */
       
   541     void CheckIfDestinationCanBeDeletedL( const CCmmDestinationInstance& aDestinationInstance );
       
   542 
       
   543     /**
       
   544      * Return the requested table ID.
       
   545      */
       
   546     CommsDat::TMDBElementId TableId( TCmmDbRecords aRecord );
       
   547 
       
   548 private:
       
   549     TInt FindDestinationFromCache( const TUint32& aId );
       
   550     TInt FindNotSavedDestinationFromCacheL( const TDesC& aName, const TUint32& aDestinationId );
       
   551 
       
   552     TInt FindConnMethodFromCache( const TUint32& aConnMethodId );
       
   553 
       
   554     void ReplaceGenConnSettingsL( const TCmGenConnSettings& aGenConnSettings );
       
   555 
       
   556     /**
       
   557      * Opens a transaction and deletes the given connection method.
       
   558      */
       
   559     void DeletePluginL( CCmmConnMethodStruct& aConnMethodStruct );
       
   560 
       
   561     /**
       
   562      * TODO
       
   563      */
       
   564     void DeleteDestinationForcedL( CCmmDestinationInstance& aDestinationInstance );
       
   565 
       
   566 private:
       
   567     // Monitors changes in the database.
       
   568     CCmmListenerManager* iListenerManager; // Owned.
       
   569 
       
   570     // Contains the current destination/connection method structure.
       
   571     CCmmInstanceMapping* iInstanceMapping; // Owned.
       
   572 
       
   573     // Array of currently opened destinations.
       
   574     RPointerArray<CCmmDestinationStruct> iDestinationArray; // Owned.
       
   575 
       
   576     // Array of currently opened connection methods.
       
   577     RPointerArray<CCmmConnMethodStruct> iConnMethodArray; // Owned.
       
   578 
       
   579     // Temporary array to hold information about connection methods that are
       
   580     // deleted during a database transaction. This information is needed
       
   581     // immediately when the database transaction is successfully commited.
       
   582     RArray<TCmmIdStruct> iDeletedConnMethods; // Owned.
       
   583 
       
   584     // Temporary arrays to hold information about connection methods that are
       
   585     // updated during a database transaction. This information is needed
       
   586     // immediately when the database transaction is successfully commited.
       
   587     RArray<TCmmIdStruct> iUpdatedConnMethods; // Owned.
       
   588     RPointerArray<CCmmConnMethodInstance> iUpdatedConnMethods2; // Does not own contents.
       
   589 
       
   590     // Temporary arrays to hold information about destinations that are updated
       
   591     // during a database transaction. This information is needed immediately
       
   592     // when the database transaction is successfully commited.
       
   593     RArray<TCmmIdStruct> iUpdatedDestinations; // Owned.
       
   594     RPointerArray<CCmmDestinationInstance> iUpdatedDestinations2; // Does not own contents.
       
   595 
       
   596     // Transaction handler for CommsDat operations. Created and owned by
       
   597     // CCmManagerImpl.
       
   598     CCmmTransactionHandler* iTrans; // Not owned.
       
   599 
       
   600     // Pointer to bearer priority array.
       
   601     CCmmBearerPriorityCache* iBearerPriorityCache; // Owned.
       
   602 
       
   603     CArrayPtrFlat<const CCmPluginBaseEng>* iPlugins; // Not owned.
       
   604 
       
   605     // Connection method manager.
       
   606     CCmManagerImpl* iCmManagerImpl; // Not owned.
       
   607 
       
   608     // Counter to generate new unique IDs. These are used to link new objects
       
   609     // without valid IDs between session side and cache.
       
   610     TUint32 iCurrentTemporaryId;
       
   611     };
       
   612 
       
   613 #endif // CMMCACHE_H_
       
   614 
       
   615 // End of file