deviceencryption/DevEncUi/src/DevEncUiDocument.cpp
branchRCL_3
changeset 20 491b3ed49290
parent 19 95243422089a
child 21 65326cf895ed
equal deleted inserted replaced
19:95243422089a 20:491b3ed49290
     1 /*
       
     2 * Copyright (c) 2005 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:  Implementation of CDevEncUiDocument.
       
    15 *
       
    16 */
       
    17 
       
    18 // INCLUDE FILES
       
    19 #include "DevEncLog.h"
       
    20 #include "DevEncUiAppui.h"
       
    21 #include "DevEncUiDocument.h"
       
    22 
       
    23 // ============================ MEMBER FUNCTIONS ===============================
       
    24 
       
    25 // -----------------------------------------------------------------------------
       
    26 // CDevEncUiDocument::NewL()
       
    27 // Two-phased constructor.
       
    28 // -----------------------------------------------------------------------------
       
    29 //
       
    30 CDevEncUiDocument* CDevEncUiDocument::NewL( CEikApplication&
       
    31                                                           aApp )
       
    32     {
       
    33     CDevEncUiDocument* self = NewLC( aApp );
       
    34     CleanupStack::Pop( self );
       
    35     return self;
       
    36     }
       
    37 
       
    38 // -----------------------------------------------------------------------------
       
    39 // CDevEncUiDocument::NewLC()
       
    40 // Two-phased constructor.
       
    41 // -----------------------------------------------------------------------------
       
    42 //
       
    43 CDevEncUiDocument* CDevEncUiDocument::NewLC( CEikApplication&
       
    44                                                            aApp )
       
    45     {
       
    46     CDevEncUiDocument* self =
       
    47         new ( ELeave ) CDevEncUiDocument( aApp );
       
    48 
       
    49     CleanupStack::PushL( self );
       
    50     self->ConstructL();
       
    51     return self;
       
    52     }
       
    53 
       
    54 // -----------------------------------------------------------------------------
       
    55 // CDevEncUiDocument::ConstructL()
       
    56 // Symbian 2nd phase constructor can leave.
       
    57 // -----------------------------------------------------------------------------
       
    58 //
       
    59 void CDevEncUiDocument::ConstructL()
       
    60     {
       
    61     // No implementation required
       
    62     }
       
    63 
       
    64 // -----------------------------------------------------------------------------
       
    65 // CDevEncUiDocument::CDevEncUiDocument()
       
    66 // C++ default constructor can NOT contain any code, that might leave.
       
    67 // -----------------------------------------------------------------------------
       
    68 //
       
    69 CDevEncUiDocument::CDevEncUiDocument( CEikApplication& aApp )
       
    70     : CAknDocument( aApp )
       
    71     {
       
    72     // No implementation required
       
    73     }
       
    74 
       
    75 // ---------------------------------------------------------------------------
       
    76 // CDevEncUiDocument::~CDevEncUiDocument()
       
    77 // Destructor.
       
    78 // ---------------------------------------------------------------------------
       
    79 //
       
    80 CDevEncUiDocument::~CDevEncUiDocument()
       
    81     {
       
    82     // No implementation required
       
    83     }
       
    84 
       
    85 // ---------------------------------------------------------------------------
       
    86 // CDevEncUiDocument::CreateAppUiL()
       
    87 // Constructs CreateAppUi.
       
    88 // ---------------------------------------------------------------------------
       
    89 //
       
    90 CEikAppUi* CDevEncUiDocument::CreateAppUiL()
       
    91     {
       
    92     DFLOG( "CDevEncUiDocument::CreateAppUiL" );
       
    93     // Create the application user interface, and return a pointer to it
       
    94     // the framework takes ownership of this object
       
    95     return ( static_cast <CEikAppUi*> ( new ( ELeave )
       
    96                                         CDevEncUiAppUi ) );
       
    97     }
       
    98 
       
    99 // -----------------------------------------------------------------------------
       
   100 // CDevEncUiDocument::OpenFileL
       
   101 // -----------------------------------------------------------------------------
       
   102 //
       
   103 CFileStore* CDevEncUiDocument::OpenFileL(
       
   104     TBool /*aDoOpen*/, 
       
   105     const TDesC& aFilename,
       
   106     RFs& /*aFs*/)
       
   107     {
       
   108     iAppUi->OpenFileL(aFilename);
       
   109     return NULL;
       
   110     }
       
   111 
       
   112 // -----------------------------------------------------------------------------
       
   113 // void CDevEncUiDocument::OpenFileL()
       
   114 // -----------------------------------------------------------------------------
       
   115 //   
       
   116 void CDevEncUiDocument::OpenFileL(
       
   117 	CFileStore*& /*aFileStore*/,
       
   118 	RFile& aFile)
       
   119 	{
       
   120 	((CDevEncUiAppUi*) iAppUi)->OpenFileL(aFile);
       
   121 	}
       
   122 
       
   123 // End of File