bluetooth/btexample/example/btsocket/inc/mconnectionobserver.h
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 /*
       
     2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Name     : mconnectionobserver.h
       
    16 * Part of  : ex_btsocket
       
    17 * Created  : 17/11/2004 by Shane Kearns
       
    18 * Interface class for client upcalls
       
    19 * Version  :
       
    20 * 
       
    21 *
       
    22 */
       
    23 
       
    24 
       
    25 
       
    26 #ifndef MCONNECTIONOBSERVER_H
       
    27 #define MCONNECTIONOBSERVER_H
       
    28 
       
    29 /**
       
    30 Interface class for owners of CBtService and CBtClient objects
       
    31 HandleConnectFailed() will be called if an error occured making an outgoing connection
       
    32 */
       
    33 class MConnectionObserver
       
    34 	{
       
    35 	public:
       
    36 		/**
       
    37 		This function is called when a new connection is successfully created (incoming or outgoing).
       
    38 		Ownership of aConnectedSocket is transferred, so a memory leak will occur if it is not stored or deleted
       
    39 		@param aConnectedSocket The socket which has been connected
       
    40 		*/
       
    41 		virtual void HandleNewConnection(CBluetoothSocket* aConnectedSocket)=0;
       
    42 		/**
       
    43 		This function is called on failure to create an outgoing connection
       
    44 
       
    45 		*/
       
    46 		virtual void HandleConnectFailed(TInt aError)=0;
       
    47 	};
       
    48 
       
    49 #endif // MCONNECTIONOBSERVER_H