contentstorage/casrv/calocalizerscanner/inc/calocalizerscannerproxy.h
changeset 93 82b66994846c
parent 85 7feec50967db
child 80 397d00875918
equal deleted inserted replaced
92:782e3408c2ab 93:82b66994846c
    19 #define CALOCALSCANNERPROXY_H
    19 #define CALOCALSCANNERPROXY_H
    20 
    20 
    21 // INCLUDES
    21 // INCLUDES
    22 #include <e32std.h>
    22 #include <e32std.h>
    23 #include <e32base.h>
    23 #include <e32base.h>
    24 #include <driveinfo.h>
    24 #include "hbtextresolversymbian.h"
    25 #include <QObject>
       
    26 
    25 
    27 #include "castorage_global.h"
    26 #include "castorage_global.h"
    28 
    27 
    29 // FORWARD DECLARATIONS
    28 // FORWARD DECLARATIONS
    30 class CCaLocalizationEntry;
    29 class CCaLocalizationEntry;
    31 class QTranslator;
       
    32 class CCaStorageProxy;
    30 class CCaStorageProxy;
    33 
    31 class CCaInnerEntry;
    34 
    32 
    35 /**
    33 /**
    36  *  CCaLocalizerScannerProxy
    34  *  CCaLocalizerScannerProxy
    37  *
    35  *
    38  */
    36  */
    39 class CCaLocalizerScannerProxy : public CBase
    37 class CCaLocalizerScannerProxy : public CBase
    40     {
    38     {
    41     
    39     
    42 //CA_STORAGE_TEST_FRIEND_CLASS    (TestCaLocalizerScanner)
       
    43 
    40 
    44 public:
    41 public:
    45     
    42     
    46 
    43 
    47     /**
    44     /**
    57     /**
    54     /**
    58      * Destructor.
    55      * Destructor.
    59      */
    56      */
    60     ~CCaLocalizerScannerProxy( );
    57     ~CCaLocalizerScannerProxy( );
    61 
    58 
    62     /**
    59    
    63      * Performs whole localization of database, can be called at any moment
       
    64      */
       
    65     void PerformL( );
       
    66     
       
    67 private:
    60 private:
    68 
    61 
    69     /**
    62     /**
    70      * Constructor.
    63      * Constructor.
    71      */
    64      */
    81      * Get localization rows and updates database 
    74      * Get localization rows and updates database 
    82      */
    75      */
    83     void UpdateLocalNamesL( );
    76     void UpdateLocalNamesL( );
    84 
    77 
    85     /**
    78     /**
    86      * Load translations to mTranslator
       
    87      * @param aFilename file name with translations
       
    88      * @return success or failure
       
    89      */   
       
    90     TBool LoadTranslator( QString aFilename );
       
    91 
       
    92     /**
       
    93      * Gets localization rows from database as table of CCaLocalizationEntries
    79      * Gets localization rows from database as table of CCaLocalizationEntries
    94      * @param aLocals pointers to localization entries
    80      * @param aLocals pointers to localization entries
    95      */
    81      */
    96     void GetLocalizationRowsL( RPointerArray<CCaLocalizationEntry>& aLocals );
    82     void GetLocalizationRowsL( RPointerArray<CCaLocalizationEntry>& aLocals );
    97     
    83     
    98     /**
    84     const TDesC& GetEntryText(
    99      * Converts descriptor to const char*
    85             RPointerArray<CCaInnerEntry> aEntries, TInt aId );
   100      * @param aDescriptor descriptor with text to convert
       
   101      * @return pointer to const char containing text
       
   102      */
       
   103     const char* DescriptorToStringL( const TDesC& aDescriptor );
       
   104 
       
   105     /*
    86     /*
   106      * Not own
    87      * Not own
   107      */
    88      */
   108     CCaStorageProxy* iStorageProxy;
    89     CCaStorageProxy* iStorageProxy;
   109 
    90 
   110     /*
    91     /*
   111      * Own
    92      * Owned
   112      */    
    93      */
   113     QTranslator* iTranslator;
    94     HbTextResolverSymbian* iResolver;
   114 
    95 
   115     //CA_STORAGE_TEST_FRIEND_CLASS    (TestCaLocalizerScanner)
       
   116     };
    96     };
   117 
    97 
   118 #endif // CALOCALSCANNERPROXY_H
    98 #endif // CALOCALSCANNERPROXY_H