messagingappbase/obexmtms/TObexMTM/INC/obexsetpasswordstate.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 // Copyright (c) 2002-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 // $Workfile: obexsetpasswordstate.h $
       
    15 // $Author: Stevep $
       
    16 // $Revision: 3 $
       
    17 // $Date: 27/03/02 14:18 $
       
    18 // 
       
    19 //
       
    20 
       
    21 #ifndef __OBEXSETPASSWORDSTATE_H__
       
    22 #define __OBEXSETPASSWORDSTATE_H__
       
    23 
       
    24 #include "harness.h"        //MBaseTestState
       
    25 
       
    26 // forward declarations
       
    27 class CObexClientTest;
       
    28 
       
    29 class CObexSetPasswordState : public CBase, public MBaseTestState
       
    30 /**
       
    31 Sets the OBEX authentication password of the current MTM, stored in the service entry's message store. Any existing
       
    32 password will be overwritten. To suceed, a service entry must exist.
       
    33 */
       
    34 	{
       
    35 	public:
       
    36 		/**
       
    37 		Canonical two-phase constructor.
       
    38 
       
    39 		@param aClientTest parent CObexClientTest object
       
    40 		@param aPassword the new password to set
       
    41 		@leave KErrXXX system wide error codes
       
    42 		*/
       
    43 		static CObexSetPasswordState* NewL(CObexClientTest& aClientTest, const TDesC& aPassword);
       
    44 
       
    45 		/**
       
    46 		Called by the parent to invoke the state. As this function is synchronous, the aStatus member is completed as
       
    47 		the function returns. Will leave with KErrNotFound if the service entry does not exist.
       
    48 
       
    49 		@param aStatus status to be completed when the function returns.
       
    50 		@leave KErrXXX system wide error codes.
       
    51 		@leave KErrNotFound if the service entry does not exist
       
    52 		*/
       
    53 		void StartL(TRequestStatus& aStatus);
       
    54 
       
    55 		/**
       
    56 		Destructor
       
    57 		*/
       
    58 		~CObexSetPasswordState();
       
    59 	private:
       
    60 		/**
       
    61 		C++ constructor
       
    62 
       
    63 		@param aClientTest parent CObexClientTest object
       
    64 		*/
       
    65 		CObexSetPasswordState(CObexClientTest& aClientTest);
       
    66 
       
    67 		/**
       
    68 		Canonical second-phase constructor. 
       
    69 
       
    70 		@param aPassword the new password to set
       
    71 		@leave KErrXXX system wide error codes
       
    72 		*/
       
    73 		void ConstructL(const TDesC& aPassword);
       
    74 
       
    75 	private:
       
    76 		CObexClientTest&	iClientTest;	//<Reference to the parent CObexClientTest object
       
    77 		HBufC*				iPassword;		//<Local copy of the password
       
    78 	};
       
    79 
       
    80 #endif //__OBEXSETPASSWORDSTATE_H__