libraries/iosrv/client/command_base.h
author Tom Sutcliffe <thomas.sutcliffe@accenture.com>
Sat, 31 Jul 2010 19:07:57 +0100
changeset 23 092bcc217d9d
parent 0 7f656887cf89
child 45 534b01198c2d
permissions -rw-r--r--
Tidied iocli exports, build macro tweaks. Removed 4 overloads of CCommandBase::RunCommand[L] that are no longer used at all, and changed one more to not be exported as it's only used internally to iocli.dll. fixed builds on platforms that don't support btrace or any form of tracing.

// command_base.h
// 
// Copyright (c) 2009 - 2010 Accenture. All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
// 
// Initial Contributors:
// Accenture - Initial contribution
//

#ifndef __COMMAND_BASE_H__
#define __COMMAND_BASE_H__

#include <e32base.h>

namespace IoUtils
	{

	NONSHARABLE_CLASS(CCommandCompleter) : public CActive
		{
	public:
		CCommandCompleter(IoUtils::CCommandBase& aCmd);
		~CCommandCompleter();
		void Complete(TInt aError);
		void Complete(TInt aError, const TDesC& aText, RIoWriteHandle& aWhere);
		void Complete(TInt aError, const CTextBuffer* aTextBuffer, RIoWriteHandle& aWhere);
	private:
		virtual void RunL();
		virtual void DoCancel();
	private:
		IoUtils::CCommandBase& iCmd;
		TInt iError;
		const CTextBuffer* iTextBuffer;
		TBuf<0x100> iBuf;
		};

	NONSHARABLE_CLASS(CReaderChangeNotifier) : public CActive
		{
	public:
		CReaderChangeNotifier(IoUtils::CCommandBase& aCmd, RIoReadHandle& aReadHandle);
		~CReaderChangeNotifier();
		void Notify();
	private:
		virtual void RunL();
		virtual void DoCancel();
	private:
		IoUtils::CCommandBase& iCmd;
		RIoReadHandle& iReadHandle;
		TPckgBuf<TUint> iChangeType;
		};

	void Panic(TCmdBasePanic aReason);
	}
	
#endif //__COMMAND_BASE_H__