connectionutilities/ConnectionDialogs/src/ConnectionDialogsNotifBase.cpp
changeset 0 5a93021fdf25
child 17 0a9e01492035
equal deleted inserted replaced
-1:000000000000 0:5a93021fdf25
       
     1 /*
       
     2 * Copyright (c) 2004 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 base plugin.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 
       
    21 #include "ConnectionDialogsNotifBase.h"
       
    22 
       
    23 #include <bautils.h>
       
    24 #include <eikenv.h>
       
    25 #include <data_caging_path_literals.hrh>
       
    26 
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // ROM folder
       
    31 _LIT( KDriveZ, "z:" );
       
    32 
       
    33 
       
    34 // ================= MEMBER FUNCTIONS =======================
       
    35     
       
    36 
       
    37 // ---------------------------------------------------------
       
    38 // CConnectionDialogsNotifBase::TNotifierInfo 
       
    39 //                                  CConnectionDialogsNotifBase::Info() const
       
    40 // ---------------------------------------------------------
       
    41 //
       
    42 CConnectionDialogsNotifBase::TNotifierInfo 
       
    43                                     CConnectionDialogsNotifBase::Info() const
       
    44     {
       
    45     return iInfo;
       
    46     }
       
    47 
       
    48 
       
    49 // ---------------------------------------------------------
       
    50 // TPtrC8 CConnectionDialogsNotifBase::StartL()
       
    51 // ---------------------------------------------------------
       
    52 //
       
    53 TPtrC8 CConnectionDialogsNotifBase::StartL( const TDesC8& /*aBuffer*/ )
       
    54     {
       
    55     return KNullDesC8().Ptr();
       
    56     }
       
    57 
       
    58 // ---------------------------------------------------------
       
    59 // void CConnectionDialogsNotifBase::Cancel()
       
    60 // ---------------------------------------------------------
       
    61 //
       
    62 void CConnectionDialogsNotifBase::Cancel()
       
    63     {
       
    64     }
       
    65 
       
    66 // ---------------------------------------------------------
       
    67 // TPtrC8 CConnectionDialogsNotifBase::UpdateL()
       
    68 // ---------------------------------------------------------
       
    69 //
       
    70 TPtrC8 CConnectionDialogsNotifBase::UpdateL(const TDesC8& /*aBuffer*/)
       
    71     {
       
    72     return KNullDesC8().Ptr();
       
    73     }
       
    74 
       
    75 
       
    76 // ---------------------------------------------------------
       
    77 // void CConnectionDialogsNotifBase::Release()
       
    78 // ---------------------------------------------------------
       
    79 //
       
    80 void CConnectionDialogsNotifBase::Release()
       
    81     {
       
    82     delete this;
       
    83     }
       
    84 
       
    85 
       
    86 // ---------------------------------------------------------
       
    87 // CConnectionDialogsNotifBase::CConnectionDialogsNotifBase()
       
    88 // ---------------------------------------------------------
       
    89 //
       
    90 CConnectionDialogsNotifBase::CConnectionDialogsNotifBase()
       
    91 : iCancelled( EFalse ), 
       
    92   iResource( 0 )
       
    93     {
       
    94     }
       
    95 
       
    96 
       
    97 // ---------------------------------------------------------
       
    98 // void CConnectionDialogsNotifBase::ConstructL()
       
    99 // ---------------------------------------------------------
       
   100 //
       
   101 void CConnectionDialogsNotifBase::ConstructL( const TDesC& aResourceFileName,
       
   102                                          const TBool aResourceFileResponsible )
       
   103     {
       
   104     if ( aResourceFileResponsible )
       
   105         {
       
   106         // Since this is a .DLL, resource files that are to be used by the
       
   107         // notifier aren't added automatically so we do that here.
       
   108         TFileName fileName;
       
   109 
       
   110         fileName.Append( KDriveZ );
       
   111         fileName.Append( KDC_RESOURCE_FILES_DIR );   
       
   112         fileName.Append( aResourceFileName );
       
   113 
       
   114         BaflUtils::NearestLanguageFile( CCoeEnv::Static()->FsSession(),
       
   115                                         fileName );
       
   116         iResource = CCoeEnv::Static()->AddResourceFileL( fileName );
       
   117         }
       
   118     }
       
   119 
       
   120 
       
   121 // ---------------------------------------------------------
       
   122 // CConnectionDialogsNotifBase::~CConnectionDialogsNotifBase()
       
   123 // ---------------------------------------------------------
       
   124 //
       
   125 CConnectionDialogsNotifBase::~CConnectionDialogsNotifBase()
       
   126     {   
       
   127     if ( iResource )
       
   128         {
       
   129         CCoeEnv::Static()->DeleteResourceFile( iResource );        
       
   130         }
       
   131     }
       
   132 
       
   133 
       
   134 
       
   135 // End of File