diff -r 000000000000 -r ff3b6d0fd310 cbs/CbsServer/ServerInc/CCbsScheduler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/CbsServer/ServerInc/CCbsScheduler.h Tue Feb 02 01:11:09 2010 +0200 @@ -0,0 +1,90 @@ +/* +* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "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: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file contains the header file of the CCbsScheduler class. +* +*/ + + +#ifndef CCBSSCHEDULER_H +#define CCBSSCHEDULER_H + +// INCLUDES +#include + +// FORWARD DECLARATIONS +class CCbsServer; + +// CLASS DECLARATION + +/** +* CbsServer includes a scheduler of it's own to simplify +* client request handling code. All active object leaves are +* handled in function Error(). The behaviour of Error() +* depends on whether there is an outstanding client request +* or not: it will tell the client the reason for inability +* to handle the client request. It will also panic the +* client if the descriptor passed to the server was malformed. +* Finally, a panic is raised if the error does not originate +* from the server itself. +* +* See Tasker: Professional Symbian Programming, Chapter 20 +* for details. +*/ +class CCbsScheduler : public CActiveScheduler + { +public: // new + + /** + * Default constructor + */ + CCbsScheduler(); + + /** + * Gives a pointer of the current CCbsServer instance + * to the scheduler. + * + * @param aServer The current server pointer + */ + void SetServer( CCbsServer* aServer ); + +public: // from CActiveScheduler + + /** + * Overridden to handle leaves in request functions and + * unexpected situations. + * + * @param aError Error code, + * see Symbian OS system documentation. + */ + void Error( TInt aError ) const; + +private: // prohibited operators and functions + + // Copy constructor + CCbsScheduler( const CCbsScheduler& ); + + // Assignment operator + CCbsScheduler& operator=( const CCbsScheduler& ); + +private: // data + + // Ref: server instance + CCbsServer* iServer; + }; + +#endif // CCBSSCHEDULER_H + +// End of File + +