contentstorage/srvinc/castorageproxy.h
changeset 86 e492551a0d54
parent 85 7feec50967db
child 93 82b66994846c
equal deleted inserted replaced
85:7feec50967db 86:e492551a0d54
    33  *
    33  *
    34  */
    34  */
    35 class CCaStorageProxy: public CBase
    35 class CCaStorageProxy: public CBase
    36     {
    36     {
    37 public:
    37 public:
    38     
    38 
    39     /**
    39     /**
    40      * Two-phased constructor.
    40      * Two-phased constructor.
    41      */
    41      */
    42     static CCaStorageProxy* NewL();
    42     static CCaStorageProxy* NewL();
    43 
    43 
    48 
    48 
    49     /**
    49     /**
    50      * Destructor.
    50      * Destructor.
    51      */
    51      */
    52     ~CCaStorageProxy();
    52     ~CCaStorageProxy();
    53     
    53 
    54     /**
    54     /**
    55      * Localizes one entry attribute
    55      * Localizes one entry attribute
    56      *
    56      *
    57      * @param aLocalization information about one localization row.
    57      * @param aLocalization information about one localization row.
    58      */
    58      */
    61     /**
    61     /**
    62      * Fetches localization data from database
    62      * Fetches localization data from database
    63      *
    63      *
    64      * @param aResultContainer Target for results.
    64      * @param aResultContainer Target for results.
    65      */
    65      */
    66     IMPORT_C void GetLocalizationsL( RPointerArray<CCaLocalizationEntry>& aResultContainer );
    66     IMPORT_C void GetLocalizationsL(
       
    67             RPointerArray<CCaLocalizationEntry>& aResultContainer );
    67 
    68 
    68     /**
    69     /**
    69      * Fetches data from storage.
    70      * Fetches data from storage.
    70      * @param aQuery Query filter for entries to be fetched.
    71      * @param aQuery Query filter for entries to be fetched.
    71      * @param aResult Result entry container.
    72      * @param aResult Result entry container.
    72      */
    73      */
    73     IMPORT_C void GetEntriesL( const CCaInnerQuery* aQuery, 
    74     IMPORT_C void GetEntriesL( const CCaInnerQuery* aQuery,
    74             RPointerArray<CCaInnerEntry>& aResultContainer );
    75             RPointerArray<CCaInnerEntry>& aResultContainer );
    75 
    76 
    76     /**
    77     /**
    77      * Fetches entry ids from storage.
    78      * Fetches entry ids from storage.
    78      * @param aQuery Query filter for entries' ids to be fetched.
    79      * @param aQuery Query filter for entries' ids to be fetched.
    81     IMPORT_C void GetEntriesIdsL( const CCaInnerQuery* aQuery,
    82     IMPORT_C void GetEntriesIdsL( const CCaInnerQuery* aQuery,
    82             RArray<TInt>& aResultIdArray );
    83             RArray<TInt>& aResultIdArray );
    83 
    84 
    84     /**
    85     /**
    85      * Adds or Updates data to storage.
    86      * Adds or Updates data to storage.
    86      * In case when data is added the input aEntry serves 
    87      * In case when data is added the input aEntry serves
    87      * also as an output entry.
    88      * also as an output entry.
    88      * @param aEntry Entry data.
    89      * @param aEntry Entry data.
    89      * @param aUpdate is entry updated by a client
    90      * @param aUpdate is entry updated by a client
    90      */
    91      */
    91     IMPORT_C void AddL( CCaInnerEntry* aEntry, TBool aUpdate = EFalse );
    92     IMPORT_C void AddL( CCaInnerEntry* aEntry, TBool aUpdate = EFalse );
    96      */
    97      */
    97     IMPORT_C void RemoveL( const RArray<TInt>& aEntryIds );
    98     IMPORT_C void RemoveL( const RArray<TInt>& aEntryIds );
    98 
    99 
    99     /**
   100     /**
   100      * Organizes entries in storage.
   101      * Organizes entries in storage.
   101      * @param aEntryIds Entry ids to be organized 
   102      * @param aEntryIds Entry ids to be organized
   102      * (insert, remove, append, prepend are possible).
   103      * (insert, remove, append, prepend are possible).
   103      * @param aParams Organize parameters.
   104      * @param aParams Organize parameters.
   104      */
   105      */
   105     IMPORT_C void OrganizeL( const RArray<TInt>& aEntryIds,
   106     IMPORT_C void OrganizeL( const RArray<TInt>& aEntryIds,
   106             TCaOperationParams aParams );
   107             TCaOperationParams aParams );
   107 
   108 
   108     /**
   109     /**
   109      * Executes touch specific actions on storage. 
   110      * Executes touch specific actions on storage.
   110      * Should be called when e.g. entry is clicked.
   111      * Should be called when e.g. entry is clicked.
   111      * @param aEntry entry to be touched
   112      * @param aEntry entry to be touched
   112      */
   113      */
   113     IMPORT_C void TouchL( CCaInnerEntry* aEntry );
   114     IMPORT_C void TouchL( CCaInnerEntry* aEntry );
   114     
   115 
   115     /**
   116     /**
   116      * Get database property on storage.
   117      * Get database property on storage.
   117      *
   118      *
   118      * @param aProperty The property to get.
   119      * @param aProperty The property to get.
   119      * @param aPropertyValue The value of property.
   120      * @param aPropertyValue The value of property.
   120      */
   121      */
   121     IMPORT_C void DbPropertyL( const TDesC& aProperty, TDes& aPropertyValue );
   122     IMPORT_C void DbPropertyL( const TDesC& aProperty, TDes& aPropertyValue );
   122     
   123 
   123     /**
   124     /**
   124      * Set property action on storage.
   125      * Set property action on storage.
   125      *
   126      *
   126      * @param aProperty The property to set.
   127      * @param aProperty The property to set.
   127      * @param aPropertyValue The value of property.
   128      * @param aPropertyValue The value of property.
   128      */
   129      */
   129     IMPORT_C void SetDBPropertyL( const TDesC& aProperty, const TDesC& aPropertyValue );
   130     IMPORT_C void SetDBPropertyL( const TDesC& aProperty,
   130     
   131             const TDesC& aPropertyValue );
       
   132 
   131     /**
   133     /**
   132      * Organizes data within a group in custom order in storage.
   134      * Organizes data within a group in custom order in storage.
   133      *
   135      *
   134      * @param aEntryIds Ids of entries in custom order.
   136      * @param aEntryIds Ids of entries in custom order.
   135      * @param aGroupId Group to sort.
   137      * @param aGroupId Group to sort.
   136      */
   138      */
   137     IMPORT_C void CustomSortL( const RArray<TInt>& aEntryIds, const TInt aGroupId );
   139     IMPORT_C void CustomSortL( const RArray<TInt>& aEntryIds,
   138     
   140             const TInt aGroupId );
       
   141 
       
   142     /**
       
   143      * Loads data base from rom.
       
   144      */
       
   145     IMPORT_C void LoadDataBaseFromRomL();
       
   146 
   139     /**
   147     /**
   140      * Add a session. Ownership not taken, this object only keeps a list of
   148      * Add a session. Ownership not taken, this object only keeps a list of
   141      * sessions that are dependent on its engine.
   149      * sessions that are dependent on its engine.
   142      * @param aSession Session.
   150      * @param aSession Session.
   143      */
   151      */
   144     void AddSessionL( MCaSessionNorifier* aHandlerNotifier );
   152     void AddSessionL( MCaSessionNorifier* aHandlerNotifier );
   145     
   153 
   146     /**
   154     /**
   147      * Remove a session. Safe to call if not added.
   155      * Remove a session. Safe to call if not added.
   148      * When no more sessions remain dependent on this object, timed
   156      * When no more sessions remain dependent on this object, timed
   149      * self-deletion is scheduled.
   157      * self-deletion is scheduled.
   150      */
   158      */
   171     CCaStorage* iStorage;
   179     CCaStorage* iStorage;
   172 
   180 
   173     /**
   181     /**
   174      * Sessions using this engine. Own.
   182      * Sessions using this engine. Own.
   175      */
   183      */
   176     RPointerArray<MCaSessionNorifier> iHandlerNotifier; 
   184     RPointerArray<MCaSessionNorifier> iHandlerNotifier;
   177     };
   185     };
   178 
   186 
   179 #endif //CASTORAGEPROXY_H
   187 #endif //CASTORAGEPROXY_H