landmarksui/msgviewer/inc/CLmkMsgViewerDocument.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2002 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:    LandmarksUi Content File -    Landmark message viewer application document class definition.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 #ifndef CLMKMSGVIEWERDOCUMENT_H
       
    25 #define CLMKMSGVIEWERDOCUMENT_H
       
    26 
       
    27 // INCLUDES
       
    28 #include <eikdoc.h>
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CEikAppUi;
       
    32 class RFile;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 *  CLmkMsgViewerDocument application class.
       
    38 */
       
    39 class CLmkMsgViewerDocument : public CEikDocument
       
    40     {
       
    41     public: // Constructors and destructor
       
    42 
       
    43         /**
       
    44          * Two-phased constructor.
       
    45          */
       
    46         static CLmkMsgViewerDocument* NewL( CEikApplication& aApp );
       
    47 
       
    48         /**
       
    49          * Destructor.
       
    50          */
       
    51         virtual ~CLmkMsgViewerDocument();
       
    52 
       
    53     public: // New functions
       
    54 
       
    55        /* GetLandmarkContentFileHandle This function is a get function to
       
    56         * get the file-handle of the file content. This is used by AppUI
       
    57         * @since 3.0
       
    58         */
       
    59         RFile& GetLandmarkContentFileHandle();
       
    60 
       
    61         /**
       
    62         * IsFileHandleValid() This function is a get function to
       
    63         * get the flag whether File's handle is valid
       
    64         * AppUi uses this method.
       
    65         * @since 3.0
       
    66         */
       
    67         TBool IsFileHandleValid() const;
       
    68 
       
    69     public: // Methods from base class CEikDocument
       
    70 
       
    71         /**
       
    72         * Takes care of opening file.
       
    73         */
       
    74        CFileStore* OpenFileL( TBool aDoOpen,
       
    75                               const TDesC& aFilename,
       
    76                               RFs& aFs );
       
    77 
       
    78        void OpenFileL(CFileStore*& aFileStore,  RFile& aFile);
       
    79 
       
    80     private:
       
    81 
       
    82         /**
       
    83          * C++ default constructor.
       
    84          */
       
    85         CLmkMsgViewerDocument( CEikApplication& aApp );
       
    86 
       
    87         /**
       
    88          * By default Symbian 2nd phase constructor is private.
       
    89          */
       
    90         void ConstructL();
       
    91 
       
    92     private: // From CEikDocument
       
    93         /**
       
    94          * From CEikDocument, create CLocAppUi "App UI" object.
       
    95          */
       
    96         CEikAppUi* CreateAppUiL();
       
    97 
       
    98     private: // Data
       
    99 
       
   100     	// File handle to the Landmarks Package content
       
   101         RFile iLandmarkContentFileHandle;
       
   102 
       
   103         //File Path if the file launched with full filepath.
       
   104         HBufC* iFileFullPath;
       
   105 
       
   106         //Was file launched with full-path.
       
   107         TBool iIsFileFullPathValid;
       
   108 
       
   109         //OpenFileL updates this flag after getting the file handle.
       
   110         TBool iIsFileHandleValid;
       
   111     };
       
   112 
       
   113 #endif // CLMKMSGVIEWERDOCUMENT_H
       
   114 
       
   115 // End of File