sysstatemgmt/systemstatemgr/cmd/src/ssmcustomcommand.cpp
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include <f32file.h>
       
    17 #include <ssm/ssmcustomcommand.h>
       
    18 
       
    19 /** 
       
    20 Constructor
       
    21 */
       
    22 CSsmCustomCommandEnv::CSsmCustomCommandEnv(RFs& aFs)
       
    23 	: iFs(aFs)
       
    24 	{
       
    25 	}
       
    26 
       
    27 /** 
       
    28 Destructor
       
    29 */
       
    30 CSsmCustomCommandEnv::~CSsmCustomCommandEnv()
       
    31 	{
       
    32 	}
       
    33 
       
    34 /** 
       
    35 Safe constructor
       
    36 */
       
    37 CSsmCustomCommandEnv* CSsmCustomCommandEnv::NewL(RFs& aRfs)
       
    38 	{
       
    39 	CSsmCustomCommandEnv* self = new (ELeave) CSsmCustomCommandEnv(aRfs);
       
    40 	return self;
       
    41 	}
       
    42 
       
    43 	
       
    44 /** 
       
    45 Provides a connected RFs session to custom commands.
       
    46 
       
    47 @return const reference to a filesystem object.
       
    48 
       
    49 @publishedPartner
       
    50 @released
       
    51 */
       
    52 EXPORT_C const RFs& CSsmCustomCommandEnv::Rfs() const
       
    53 	{
       
    54 	return iFs;
       
    55 	}
       
    56 
       
    57 /** 
       
    58 Copy constructor
       
    59 */
       
    60 CSsmCustomCommandEnv::CSsmCustomCommandEnv(const CSsmCustomCommandEnv& aEnv)
       
    61 	: iFs(aEnv.iFs)
       
    62 	{
       
    63 	}
       
    64 
       
    65 /** 
       
    66 Assignment operator
       
    67 */
       
    68 CSsmCustomCommandEnv& CSsmCustomCommandEnv::operator= (const CSsmCustomCommandEnv& aEnv)
       
    69 	{
       
    70 	// protect against self-assignment
       
    71  	if(&aEnv != this)
       
    72 	 	{
       
    73 		 iFs = aEnv.iFs;
       
    74 	 	}
       
    75 	 	
       
    76 	return (*this);
       
    77 	}