diff -r e6e3e87d58b4 -r 4df3a095718c htiui/HtiCommPlugins/HtiBtCommPlugin/HtiBtCommServer/inc/HtiBtCommServer.h --- a/htiui/HtiCommPlugins/HtiBtCommPlugin/HtiBtCommServer/inc/HtiBtCommServer.h Fri Mar 19 09:29:26 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,136 +0,0 @@ -/* -* Copyright (c) 2009 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: CHtiBtCommServer declaration -* -*/ - - -#ifndef __HTIBTCOMMSERVER_H__ -#define __HTIBTCOMMSERVER_H__ - -// INCLUDES - -#include -#include - -// CONSTANTS - -// Reasons for BtCommServer panic -enum TBtCommServerPanic - { - EBadRequest, - EBadDescriptor, - EMainSchedulerError, - ESvrCreateServer, - ESvrStartServer, - ECreateTrapCleanup, - ENotImplementedYet, - EFailedToInitMessageBox, - EFailedToOpenBTconnection, - EFailedToOpenPhonetChannel, - EFailedToRecPhonetMsg, - EFailedToSendPhonetMsg, - ETooManyAsyncRequests - }; - -// FUNCTION PROTOTYPES - -// Function to panic the server -GLREF_C void PanicServer( TBtCommServerPanic aPanic ); - -// Thread function for server -GLREF_C TInt BtCommServerThread( TAny * ); - -// FORWARD DECLARATIONS -class CHtiBtCommServerSession; -class CHtiBtReaderWriter; - -// CLASS DECLARATION - -/** -* Server class for BT communication. -*/ -class CHtiBtCommServer : public CServer2 - { - - private: // Constructors and destructor - /** - * C++ default constructor. - */ - CHtiBtCommServer( TInt aPriority ); - - /** - * Second Phase constructor - */ - void ConstructL(); - - public: - /** - * Symbian Two-phased constructor. - */ - static CHtiBtCommServer* NewL(); - - /** - * Destructor. - */ - ~CHtiBtCommServer(); - - public: // callbacks from session - - /** - * Session was deleted notification. - * Session notifies server, when client is disconnecting - * and session is being deleted. Server will start shutdown. - */ - void SessionFreed(); - - /** - * Session was created notification. - * @param aSession Session, which is notifying server of its creation. - */ - void SessionCreated( CHtiBtCommServerSession* aSession ); - - public: - /** - * Creates a new client session - * @param aVersion Version of the server - * @param aMessage Client message - * @return Pointer to the client session - */ - virtual CSession2* NewSessionL( const TVersion& aVersion, - const RMessage2& aMessage ) const; - - /** - * Creates server thread - * @param aStarted semaphore - * @return Error code - */ - static TInt ThreadFunction( TAny* aStarted ); - -public: // Data - // Priority of the server - enum TBtServPriority - { - EBtCommServerPriority = 100 - }; - -private: - - CHtiBtCommServerSession* iSession; // Not owned. Only one session allowed! - - }; - -#endif // __HTIBTCOMMSERVER_H__ - -// End of file