mpxmusicplayer/app/inc/mpxdocument.h
changeset 0 ff3acec5bc43
equal deleted inserted replaced
-1:000000000000 0:ff3acec5bc43
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Document class required by AVKON application framework.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CMPXDOCUMENT_H
       
    21 #define CMPXDOCUMENT_H
       
    22 
       
    23 
       
    24 // INCLUDES
       
    25 #include <GenericParamConsumer.h>
       
    26 
       
    27    
       
    28 // FORWARD DECLARATIONS
       
    29 class CEikAppUi;
       
    30 class MMPXViewUtility;
       
    31 
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36  *  CMPXDocument application class.
       
    37  *
       
    38  *  @lib mpx.exe
       
    39  *  @since S60 v3.1
       
    40  */
       
    41 class CMPXDocument : public CAiwGenericParamConsumer
       
    42     {
       
    43 public:
       
    44 
       
    45     /**
       
    46      * Two-phased constructor.
       
    47      *
       
    48      * @param aApp AppUi of musicplayer.
       
    49      * @return Pointer to newly created object.
       
    50      */
       
    51     static CMPXDocument* NewL( CEikApplication& aApp );
       
    52 
       
    53     /**
       
    54      * Destructor.
       
    55      */
       
    56     virtual ~CMPXDocument();
       
    57 
       
    58 private:
       
    59 
       
    60     /**
       
    61      * C++ constructor.
       
    62      *
       
    63      * @param aApp AppUi of musicplayer.
       
    64      */
       
    65     CMPXDocument( CEikApplication& aApp );
       
    66 
       
    67     /**
       
    68      * By default Symbian 2nd phase constructor is private.
       
    69      */  
       
    70     void ConstructL();
       
    71 
       
    72     /**
       
    73      * Parse input paramaters from AIW interface.
       
    74      * @return ETrue if open a file by framework is required. Otherwise, EFalse.
       
    75      */  
       
    76     TBool ParseInputParameters();
       
    77 
       
    78 // from base class CEikDocument
       
    79 
       
    80     /**
       
    81      * From CEikDocument.
       
    82      * Create CMPXAppUi "App UI" object.
       
    83      *
       
    84      * @return Pointer to newly created object.
       
    85      */
       
    86     CEikAppUi* CreateAppUiL();
       
    87 
       
    88     /**
       
    89      * From CEikDocument.
       
    90      * Called by the framework to open a file.
       
    91      *
       
    92      * @param aDoOpen ETrue to open an existing file, 
       
    93                       EFalse to create a new default file.
       
    94      * @param aFileName THe path and name of the file to open or create.
       
    95      * @param aFs FIle server session to use.
       
    96      * @return Pointer to newly created object.
       
    97      */
       
    98     CFileStore* OpenFileL( 
       
    99         TBool aDoOpen,
       
   100         const TDesC& aFilename,
       
   101         RFs& aFs );
       
   102 
       
   103     /**
       
   104      * From CEikDocument.
       
   105      * Called by the framework to open a file.
       
   106      *
       
   107      * @param aFileStore This is set by the function to the file 
       
   108                          store that stores the main document, 
       
   109                          if the file is a "native" Symbian OS file, 
       
   110                          otherwise it is set to NULL.
       
   111      * @param aFile The path and name of the file to read from
       
   112      */
       
   113     void OpenFileL(
       
   114         CFileStore*& aFileStore, 
       
   115         RFile& aFile );
       
   116 
       
   117 private:
       
   118 
       
   119     MMPXViewUtility* iViewUtility;
       
   120     };
       
   121 
       
   122 #endif  // CMPXDOCUMENT_H
       
   123 
       
   124 // End of File