epos_cposlandmarkdatabase.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : EPos_CPosLandmarkDatabase.h
00004 *  Part of     : Mobile Location Framework/Landmarks
00005 *  Interface   : SDK/S60, Landmarks API
00006 *  Description : CPosLandmarkDatabase class
00007 *  Version     : %version: 7 %
00008 *
00009 *  Copyright © 2005-2007 Nokia.  All rights reserved.
00010 *  This material, including documentation and any related computer
00011 *  programs, is protected by copyright controlled by Nokia.  All
00012 *  rights are reserved.  Copying, including reproducing, storing,
00013 *  adapting or translating, any or all of this material requires the
00014 *  prior written consent of Nokia.  This material also contains
00015 *  confidential information which may not be disclosed to others
00016 *  without the prior written consent of Nokia.
00017 * ============================================================================
00018 * Template version: 4.0
00019 */
00020 
00021 #ifndef CPOSLANDMARKDATABASE_H
00022 #define CPOSLANDMARKDATABASE_H
00023 
00024 #include <e32base.h>
00025 #include <s32strm.h>
00026 #include "epos_landmarks.h"
00027 #include "epos_cposlandmark.h"
00028 #include "epos_cposlmpartialreadparameters.h"
00029 #include "epos_cposlmitemiterator.h"
00030 #include "epos_tposlmsortpref.h"
00031 #include "epos_cposlmoperation.h"
00032 
00033 class CPosLandmarkParser;
00034 class CPosLandmarkEncoder;
00035 
00036 
00061 class CPosLandmarkDatabase : public CBase
00062     {
00063     public:
00064 
00069         typedef TUint TTransferOptions;
00070 
00074         enum _TTransferOptions
00075             {
00076             EDefaultOptions = 0                 ,
00078             EIncludeCategories = 0x01           ,
00080             EIncludeGlobalCategoryNames = 0x02  ,
00088             ESupressCategoryCreation = 0x04     
00094             };
00095 
00099         struct TSize
00100             {
00101             TInt iFileSize;   
00103             TReal32 iUsage;   
00106             };
00107 
00108     public:
00109 
00122         IMPORT_C static CPosLandmarkDatabase* OpenL();
00123 
00152         IMPORT_C static CPosLandmarkDatabase* OpenL(
00153                const TDesC&  aDatabaseUri
00154         );
00155 
00159         IMPORT_C virtual ~CPosLandmarkDatabase();
00160 
00161     public:
00162 
00177         virtual TBool IsInitializingNeeded() const = 0;
00178 
00209         virtual CPosLmOperation* InitializeL() = 0;
00210 
00227         virtual CPosLandmark* ReadLandmarkLC(
00228                TPosLmItemId  aLandmarkId
00229         ) = 0;
00230 
00247         virtual CPosLmItemIterator* LandmarkIteratorL() = 0;
00248 
00273         virtual CPosLmItemIterator* LandmarkIteratorL(
00274                const TPosLmSortPref&  aSortPref
00275         ) = 0;
00276 
00299         virtual TPosLmItemId AddLandmarkL(
00300             CPosLandmark&  aLandmark
00301         ) = 0;
00302 
00331         virtual void UpdateLandmarkL(
00332                const CPosLandmark&  aLandmark
00333         ) = 0;
00334 
00350         virtual void RemoveLandmarkL(
00351                TPosLmItemId  aLandmarkId
00352         ) = 0;
00353 
00384         virtual CPosLmOperation* RemoveLandmarksL(
00385                const RArray<TPosLmItemId>&  aLandmarkIdArray
00386         ) = 0;
00387 
00414         virtual CPosLmOperation* RemoveAllLandmarksL() = 0;
00415 
00426         virtual CPosLmPartialReadParameters* PartialReadParametersLC() = 0;
00427 
00436         virtual void SetPartialReadParametersL(
00437                const CPosLmPartialReadParameters&  aPartialSettings
00438         ) = 0;
00439 
00462         virtual CPosLandmark* ReadPartialLandmarkLC(
00463                TPosLmItemId  aLandmarkId
00464         ) = 0;
00465 
00499         virtual CPosLmOperation* PreparePartialLandmarksL(
00500                const RArray<TPosLmItemId>&  aLandmarkIdArray
00501         ) = 0;
00502 
00528         virtual CArrayPtr<CPosLandmark>* TakePreparedPartialLandmarksL(
00529                CPosLmOperation*  aPreparePartialLandmarkOperation
00530         ) = 0;
00531 
00542         virtual HBufC* DatabaseUriLC() = 0;
00543 
00551         virtual TSize SizeL() = 0;
00552 
00574         virtual CPosLmOperation* CompactL() = 0;
00575 
00596         virtual void NotifyDatabaseEvent(
00597            TPosLmEvent& aEvent,
00598            TRequestStatus& aStatus
00599         ) = 0;
00600 
00609         virtual TInt CancelNotifyDatabaseEvent() = 0;
00610 
00656         virtual CPosLmOperation* ExportLandmarksL(
00657                CPosLandmarkEncoder&  aLandmarkEncoder,
00658                const RArray<TPosLmItemId>&  aLandmarkIdArray,
00659                TTransferOptions  aTransferOptions
00660         ) = 0;
00661 
00706         virtual CPosLmOperation* ImportLandmarksL(
00707                CPosLandmarkParser&  aLandmarkParser,
00708                TTransferOptions  aTransferOptions
00709         ) = 0;
00710 
00769         virtual CPosLmOperation* ImportLandmarksL(
00770                CPosLandmarkParser&  aLandmarkParser,
00771                const RArray<TUint>&  aLandmarkSelection,
00772                TTransferOptions  aTransferOptions
00773         ) = 0;
00774 
00794         virtual CPosLmItemIterator* ImportedLandmarksIteratorL(
00795                CPosLmOperation*  aImportOperation
00796         ) = 0;
00797 
00800         /*
00801         * Returns the database access implementation ID.
00802         *
00803         * @returns The @ref CPosLandmarkDatabase implementation ID.
00804         */
00805         TUid ImplementationId() const;
00806 
00807     protected:
00808 
00809         // C++ constructor.
00810         IMPORT_C CPosLandmarkDatabase();
00811 
00812     private:
00813 
00814         // Prohibit copy constructor
00815         CPosLandmarkDatabase( const CPosLandmarkDatabase& );
00816         // Prohibit assigment operator
00817         CPosLandmarkDatabase& operator= ( const CPosLandmarkDatabase& );
00818 
00819     private:
00820 
00821         // Implementation Uid
00822         TUid iDtorIdKey;
00823     };
00824 
00825 // CPOSLANDMARKDATABASE_H
00826 #endif
00827 
00828 

Copyright © Nokia Corporation 2001-2008
Back to top