bluetoothengine/btsac/src/btsacStreamEndPoint.cpp
changeset 0 f63038272f30
equal deleted inserted replaced
-1:000000000000 0:f63038272f30
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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 *				 
       
    16 *				 
       
    17 *				 
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include <bluetoothav.h>
       
    24 
       
    25 #include "btsacSEPManager.h"   
       
    26 #include "debug.h"
       
    27 
       
    28 
       
    29 // -----------------------------------------------------------------------------
       
    30 // CBTSACStreamEndPoint::NewL
       
    31 // -----------------------------------------------------------------------------
       
    32 //
       
    33 CBTSACStreamEndPoint* CBTSACStreamEndPoint::NewL(const TAvdtpSEPInfo& aInfo)
       
    34 	{
       
    35 	CBTSACStreamEndPoint* sep = new(ELeave) CBTSACStreamEndPoint(aInfo);
       
    36 	return sep;
       
    37 	}
       
    38 
       
    39 // -----------------------------------------------------------------------------
       
    40 // CBTSACStreamEndPoint::CBTSACStreamEndPoint
       
    41 // C++ default constructor.
       
    42 // -----------------------------------------------------------------------------
       
    43 //
       
    44 CBTSACStreamEndPoint::CBTSACStreamEndPoint(const TAvdtpSEPInfo& aInfo)
       
    45 : iInfo(aInfo)
       
    46 	{
       
    47 	
       
    48 	}
       
    49 
       
    50 // -----------------------------------------------------------------------------
       
    51 // Destructor.
       
    52 // -----------------------------------------------------------------------------
       
    53 //
       
    54 CBTSACStreamEndPoint::~CBTSACStreamEndPoint()
       
    55 	{
       
    56 	iSEPCapabilities.ResetAndDestroy();
       
    57 	iSEPCapabilities.Close();
       
    58 	}
       
    59 
       
    60 	
       
    61 // -----------------------------------------------------------------------------
       
    62 // CBTSACStreamEndPoint::GetInfo
       
    63 // -----------------------------------------------------------------------------
       
    64 //
       
    65 void CBTSACStreamEndPoint::GetInfo(TAvdtpSEPInfo& aInfo)
       
    66 	{
       
    67 	TRACE_FUNC
       
    68 	aInfo = iInfo; 
       
    69 	}
       
    70 
       
    71 // -----------------------------------------------------------------------------
       
    72 // CBTSACStreamEndPoint::StoreCaps
       
    73 // -----------------------------------------------------------------------------
       
    74 //
       
    75 void CBTSACStreamEndPoint::StoreCaps(TAvdtpServiceCapability* aCaps)
       
    76 	{
       
    77 	TRACE_FUNC
       
    78 	iSEPCapabilities.Append(aCaps);
       
    79 	}
       
    80 	
       
    81 // -----------------------------------------------------------------------------
       
    82 // CBTSACStreamEndPoint::GetCaps
       
    83 // -----------------------------------------------------------------------------
       
    84 //
       
    85 void CBTSACStreamEndPoint::GetCaps(RPointerArray<TAvdtpServiceCapability>& aCaps)
       
    86 	{
       
    87 	TRACE_FUNC
       
    88 	TInt count = iSEPCapabilities.Count();
       
    89 	for (TInt i = 0; i < count; i++)
       
    90 		{
       
    91 		aCaps.Append(iSEPCapabilities[i]);
       
    92 		}
       
    93 	}
       
    94 	
       
    95 // -----------------------------------------------------------------------------
       
    96 // CBTSACStreamEndPoint::SetState
       
    97 // -----------------------------------------------------------------------------
       
    98 //
       
    99 void CBTSACStreamEndPoint::SetState(TSEPState aState, const TAny* /*aBlob=NULL*/)
       
   100 	{
       
   101 	TRACE_FUNC
       
   102 	switch (aState)
       
   103 		{
       
   104 		case EIdle:
       
   105 			{
       
   106 			TRACE_INFO((_L("CBTSACStreamEndPoint::SetState KSEPIdle")))
       
   107 			break;
       
   108 			}
       
   109 		case EDiscoveredRemote:
       
   110 		case ERegistered:
       
   111 		case ERemotelyBound:
       
   112 			{
       
   113 			// ERemotelyBound -> extra param is the remote to which we are bound
       
   114 			break;
       
   115 			}
       
   116 		case ELocallyConfigured:
       
   117 			{
       
   118 			TRACE_INFO((_L("CBTSACStreamEndPoint::SetState KSEPLocallyConfigured")))
       
   119 			break;
       
   120 			}
       
   121 		case EOpen:
       
   122 		case EStreaming:
       
   123 		case ESuspended:
       
   124 		case EAborted:
       
   125 			{
       
   126 			break;
       
   127 			}
       
   128 
       
   129 		default:
       
   130 			{
       
   131 			TRACE_INFO((_L("CBTSACStreamEndPoint::SetState ***UNKNOWN***")))
       
   132 			}
       
   133 		}
       
   134 	}
       
   135 
       
   136 // end of file