obex/obexprotocol/obextransport/src/obexconnector.cpp
changeset 54 4dc88a4ac6f4
parent 52 866b4af7ffbe
child 57 f6055a57ae18
equal deleted inserted replaced
52:866b4af7ffbe 54:4dc88a4ac6f4
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include <obex/transport/obexconnector.h>
       
    17 
       
    18 /**
       
    19 This function is a placeholder for future use. If iFuture1 variable is 
       
    20 used it will need this function for any allocation required.
       
    21 
       
    22 To prevent binary compatibility breaks if the iFuture1 variable is used, 
       
    23 this function must be called from the NewL of derived classes.
       
    24 */
       
    25 EXPORT_C void CObexConnector::BaseConstructL()
       
    26 	{
       
    27 	}
       
    28 
       
    29 /**
       
    30 This function is part of the extension pattern and must be implemented by 
       
    31 all derived instantiable classes.
       
    32 By default this returns null.  Any derived class that is required to 
       
    33 extend its interface and that of this base class returns its new interface 
       
    34 in the form of an M class, that it extends, if and only if  the 
       
    35 corresponding TUid, aUid, is received. Otherwise the function calls the 
       
    36 base class implementation, returning NULL.
       
    37 
       
    38 @return TAny* The M Class representing the extension to the interface 
       
    39 otherwise NULL
       
    40 @param  aUid The uid associated with the M Class that is being implemented
       
    41 @publishedPartner
       
    42 @released
       
    43 */		
       
    44 EXPORT_C TAny* CObexConnector::GetInterface(TUid /*aUid*/)
       
    45 	{
       
    46 	return NULL;
       
    47 	}
       
    48 
       
    49 /** Constructor.
       
    50 @param aObserver The MObexTransportNotify object to notify of 
       
    51 transport-related events. This object will typically be the concrete 
       
    52 CObexTransportControllerBase.
       
    53 */
       
    54 EXPORT_C CObexConnector::CObexConnector(MObexTransportNotify& aObserver)
       
    55 :	iObserver(aObserver)
       
    56 	{
       
    57 	}
       
    58 
       
    59 /**
       
    60 Destructor.
       
    61 Currently does no work (NB BaseConstructL currently does no work either). If 
       
    62 BaseConstructL ever allocates memory into iFuture1, we'll need to free it 
       
    63 here. But by then licensee connectors' vtables will already have been 
       
    64 built, *pointing at CBase's destructor*. We need this destructor here so 
       
    65 that iFuture1, if it's ever allocated, will be freed correctly.
       
    66 */
       
    67 EXPORT_C CObexConnector::~CObexConnector()
       
    68 	{
       
    69 	}
       
    70 
       
    71 /** Accessor for the observer (an MObexTransportNotify).
       
    72 @return The MObexTransportNotify to notify of transport-related events.
       
    73 */
       
    74 EXPORT_C MObexTransportNotify& CObexConnector::Observer()
       
    75 	{
       
    76 	return iObserver;
       
    77 	}
       
    78