examples/ForumNokia/TZLocalizer/inc/TZLocalizerEngine.h

00001 /*
00002  * Copyright © 2008 Nokia Corporation.
00003  */
00004 
00005 #ifndef CTZLOCALIZERENGINE_H
00006 #define CTZLOCALIZERENGINE_H
00007 
00008 #include <tz.h>
00009 #include <TzLocalizer.h>
00010 #include <TzLocalizationDataTypes.h>
00011 
00012 class CTZLocalizerEngine : public CBase  
00013     {
00014     public:
00015 
00016         static CTZLocalizerEngine* NewL();
00017         static CTZLocalizerEngine* NewLC();
00018 
00022         ~CTZLocalizerEngine();
00023 
00024     private:    // Constructors
00025         CTZLocalizerEngine();
00026         
00027 // ---------------------------------------------------------
00028 //  CTZLocalizerEngine::ConstructL()
00029 //  Connect to Time Zone server. 
00030 // ---------------------------------------------------------
00031         void ConstructL();
00032 
00033     public:     // Methods
00034 
00035 // ---------------------------------------------------------
00036 //  CTZLocalizerEngine::ListCitiesL()
00037 //  Fills aCityListReturn with the names of the cities of
00038 //  whose name match to aSearchPattern.
00039 // ---------------------------------------------------------
00040     void ListCitiesL( const TDesC& aSearchPattern, 
00041             CDesC16ArrayFlat* aCityListReturn );
00042 
00043 // ---------------------------------------------------------
00044 // CTZLocalizerEngine::RemoveCityL()
00045 // Removes a city from the user defined city collection 
00046 // ---------------------------------------------------------
00047     void RemoveCityL(const TDesC& aCityName );
00048 
00049 // ---------------------------------------------------------
00050 // TPtrC CTZLocalizerEngine::GetCityName(CTzLocalizedCity *aLocalizedCity)
00051 // Get current city name.
00052 // ---------------------------------------------------------
00053     TPtrC GetCityName(CTzLocalizedCity *aLocalizedCity);
00054 
00055 // ---------------------------------------------------------
00056 // CTZLocalizerEngine::GetCityTimeZoneId(CTzLocalizedCity *aLocalizedCity)
00057 // Get current city time zone id.
00058 // ---------------------------------------------------------    
00059     TUint16 GetCityTimeZoneId(CTzLocalizedCity *aLocalizedCity);
00060 
00061 // ---------------------------------------------------------
00062 // CTZLocalizerEngine::GetCityGroupId(CTzLocalizedCity *aLocalizedCity)
00063 // Get current city group id.
00064 // ---------------------------------------------------------
00065     TUint8 GetCityGroupId(CTzLocalizedCity *aLocalizedCity);
00066 
00067 // ---------------------------------------------------------
00068 // CTZLocalizerEngine::GetCityLocalTime()
00069 // Convert universal time to local time.
00070 // ---------------------------------------------------------    
00071     HBufC* GetCityLocalTimeL(CTzLocalizedCity *aLocalizedCity);
00072 
00073 // ---------------------------------------------------------
00074 // CTZLocalizerEngine::FindCitiesInGroupL()
00075 // Find the cities with same group id.
00076 // ---------------------------------------------------------
00077     CDesC16ArrayFlat* FindCitiesInGroupL( TInt aGroupID);
00078 
00079 // ---------------------------------------------------------
00080 //  CTZLocalizerEngine::AddCityL()
00081 //  Add a new city to the database.
00082 // ---------------------------------------------------------    
00083     CTzLocalizedCity* AddCityL(TInt aTimeZoneId, const TDesC &aCityName, TInt aGroupId=0);
00084 
00085 // ---------------------------------------------------------
00086 // CTZLocalizerEngine::FindCityL()
00087 // Find the specific city.
00088 // ---------------------------------------------------------    
00089     CTzLocalizedCity* FindCityL(const TDesC& aCityName);
00090     
00091 // ---------------------------------------------------------
00092 //  CTZLocalizerEngine::GetAllTimeZonesL()
00093 //  Fetch the localized time zone ID's
00094 // ---------------------------------------------------------
00095     CDesC16ArrayFlat* GetAllTimeZonesL();
00096 
00097 // ---------------------------------------------------------
00098 // CTZLocalizerEngine::GetAllGroupID()
00099 // Fetch the localized city group ID's
00100 // ---------------------------------------------------------    
00101     CDesC16ArrayFlat* GetAllGroupIDL();
00102     
00103 // ---------------------------------------------------------
00104 // CDesC16ArrayFlat* CTZLocalizerEngine::GetAllCitiesL()
00105 // Fetch the localized cities
00106 // ---------------------------------------------------------    
00107     CDesC16ArrayFlat* GetAllCitiesL();
00108 
00109     private:    // Data
00110 
00111 };
00112 
00113 #endif
00114 
00115 // End of File
00116 

Generated by  doxygen 1.6.2