diff -r 1f002146abb4 -r 8d5d7fcf9b59 cbs/cbsserver/ServerInc/CCbsObject.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsserver/ServerInc/CCbsObject.h Wed Jul 21 18:26:52 2010 +0300 @@ -0,0 +1,99 @@ +/* +* 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 class represents the base class for all server-side subsession +* classes. +* +*/ + + +#ifndef CCBSOBJECT_H +#define CCBSOBJECT_H + +// INCLUDES + +#include +#include "CbsCommon.h" + +// FORWARD DECLARATIONS +class CCbsSession; + +// CLASS DECLARATION + +/** +* CCbsSession is the base class for the classes that represent +* server-side subsessions. +* +* It provides some convience functions is remove redundancy of +* subsession classes. +*/ +class CCbsObject : public CObject + { + public: // New functions + /** + * Constructor. + * + * @param aSession Pointer to the session. + */ + CCbsObject( CCbsSession& aSession ); + + /** + * Destructor. + */ + ~CCbsObject(); + + /** + * Handles the requests for the object. + * + * Implemented in subsession classes. + * + * @param aMessage Request to be handled. + * @return Boolean value indicating whether + * the request was handled. + */ + virtual TBool HandleRequestsL( const RMessage2& aMessage ) = 0; + + /** + * Returns the message of current client request. + * + * @return The message object of the current + * client request. + */ + const RMessage2& Message(); + + /** + * Returns a reference to the session. + * + * @return Main session object. + */ + CCbsSession& Session(); + + /** + * Panics the client. + * + * @param aPanic Reason for panic. + */ + void PanicClient( TCbsSessionPanic aPanic ) const; + + private: // Data + + // The session to which this object belongs. + CCbsSession& iSession; + + }; + +#endif // CCBSOBJECT_H + +// End of File + +