bluetoothengine/btsac/inc/btsacGavdpObserver.h
changeset 0 f63038272f30
equal deleted inserted replaced
-1:000000000000 0:f63038272f30
       
     1 /*
       
     2 * Copyright (c) 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 #ifndef BTSAC_GAVDP_OBSERVER_H
       
    23 #define BTSAC_GAVDP_OBSERVER_H
       
    24 
       
    25 #include <bluetoothav.h>
       
    26 
       
    27 class MInternalGavdpUser
       
    28 /**
       
    29 Mixin class for GAVDP-related events.
       
    30 
       
    31 To enforce thinking about the sequence of GAVDP events, these are pure
       
    32 @publishedPartner
       
    33 @released
       
    34 */
       
    35 	{
       
    36 public:
       
    37 /**
       
    38 Callback when a signalling channel has successfully been created
       
    39 Note this can be called by GAVDP without the client having called RGavdp::Connect
       
    40 The reason being that as soon as a GAVDP session is created AVDTP begins listening
       
    41 Therefore a remote device can connect to us.
       
    42 The GAVDP client can check the address to confirm if the device is that they originally Connect()ed
       
    43 @param aDeviceAddr the Bluetooth device address for which a signalling channel has been created
       
    44 */
       
    45 	virtual void GAVDP_ConnectConfirm(const TBTDevAddr& aDeviceAddr) =0;
       
    46 /**
       
    47 Callback when a remote SEP has been discovered
       
    48 @param aSEP the details of the remote SEP
       
    49 @see TAvdtpSEPInfo
       
    50 */
       
    51 	virtual void GAVDP_SEPDiscovered(const TAvdtpSEPInfo& aSEP) =0;
       
    52 /**
       
    53 Callback when no more SEPs have been discovered on the remote device.
       
    54 This may be called without GAVDP_SEPDiscovered being called if the remote has no SEPs
       
    55 (such a remote would be in contravention of the specification however)
       
    56 */
       
    57 	virtual void GAVDP_SEPDiscoveryComplete() =0;	
       
    58 /**
       
    59 Callback when a capability from a remote SEP has been retrieved
       
    60 The client takes owenership of the capability given
       
    61 @param aCapability pointer to a capability. Ownership is transferred to the MGavdpUser implementor.
       
    62 @see TAvdtpServiceCapability
       
    63 */
       
    64 	virtual void GAVDP_SEPCapability(TAvdtpServiceCapability* aCapability) =0; // transfers ownership
       
    65 /**
       
    66 Callback when remote SEP has no more capabilities to be discovered
       
    67 */
       
    68 	virtual void GAVDP_SEPCapabilityComplete() =0;	
       
    69 /**
       
    70 Callback when the locally-initiated Abort stream has successfully completed
       
    71 */	
       
    72 	virtual void GAVDP_AbortStreamConfirm()=0;
       
    73 /**
       
    74 Callback when the locally-initiated Start stream has successfully completed
       
    75 */	
       
    76 	virtual void GAVDP_StartStreamsConfirm()=0;
       
    77 /**
       
    78 Callback when the locally-initiated Suspend stream has successfully completed
       
    79 */	
       
    80 	virtual void GAVDP_SuspendStreamsConfirm()=0;
       
    81 /**
       
    82 Callback when the locally-initiated Security Control message successfully completed
       
    83 @param aResponseData The data returned by the ACP - may be the same or different to that supplied by INT
       
    84 */	
       
    85 	virtual void GAVDP_SecurityControlConfirm(const TDesC8& aResponseData)=0;
       
    86 
       
    87 /**
       
    88 Callback when locally-initiated (re)configuration procedure successfully completes
       
    89 */	
       
    90 	virtual void GAVDP_ConfigurationConfirm()=0;	// configuration complete and SEP selected *AND* reconfigure confirm
       
    91 	
       
    92 /**
       
    93 Callback when remote is beginning to configure a local SEP
       
    94 This cannot be rejected by the client at this stage - it must examine each
       
    95 capability proposed by the GAVDP peer.
       
    96 @param aLocalSEID the SEID of the local SEP being configured
       
    97 @param aRemoteSEID the SEID of the remote SEP configuring us
       
    98 */
       
    99 	virtual void GAVDP_ConfigurationStartIndication(TSEID aLocalSEID, TSEID aRemoteSEID) =0;
       
   100 	
       
   101 /**
       
   102 Callback when each capability is being proposed by the peer during configuration
       
   103 Each capability can be refused, but doing so completes whole configure operation
       
   104 @return the client's result - eg whether it is accepting or rejecting the configuration
       
   105 @param aCapability The capability being proposed. Ownership transferred to client.
       
   106 */
       
   107 	virtual TInt GAVDP_ConfigurationIndication(TAvdtpServiceCapability* aCapability) =0;
       
   108 
       
   109 /**
       
   110 Callback when remotely initiated configuration of local SEP is completed	
       
   111 The client can still error, as the local side may have expected to see more capabilities proposed
       
   112 @return The client's acceptance or rejection of the whole configuration
       
   113 */	
       
   114 	virtual TInt GAVDP_ConfigurationEndIndication() =0;
       
   115 
       
   116 /**
       
   117 Callback when the remote is trying to Start a stream
       
   118 @param aSEID the SEID of the local SEP being started
       
   119 */
       
   120 	virtual TInt GAVDP_StartIndication(TSEID aSEID) =0;
       
   121 /**
       
   122 Callback when the remote is trying to Suspend a stream
       
   123 @param aSEID the SEID of the local SEP being suspended
       
   124 */
       
   125 	virtual TInt GAVDP_SuspendIndication(TSEID aSEID) =0;
       
   126 /**
       
   127 Callback when the remote is sending Security Control information
       
   128 @param aSEID the SEID of the local SEP for which security control is for
       
   129 @param aSecurityDataInOut Security Data inbound. The client may change this descriptor for the outbound response
       
   130 */
       
   131 	virtual TInt GAVDP_SecurityControlIndication(TSEID aSEID, TDes8& aSecurityDataInOut) =0;
       
   132 
       
   133 /**
       
   134 Callback when the remote has Aborted the stream
       
   135 @param aSEID the SEID of the local SEP which has been Aborted
       
   136 */
       
   137 	virtual void GAVDP_AbortIndication(TSEID aSEID) =0;
       
   138 	
       
   139 /**
       
   140 Callback when the remote end has Released a stream
       
   141 The user-plane bearers will subsequently error with KErrDisconnected.
       
   142 @param aSEID the SEID of the local SEP which was been released
       
   143 */
       
   144 	virtual void GAVDP_ReleaseIndication(TSEID aSEID) =0;
       
   145 /**
       
   146 Callback when a bearer has been created for a session in the stream.
       
   147 The session the bearer is for can be examined from the socket address given in the callback
       
   148 Each socket created in this way is created on the client's socket server session,
       
   149 and responsibility for socket closure is ceded to the client.
       
   150 @param aSocket the socket created on the client's socket server session.
       
   151 @param aAddress the socket address (containing SEID, Session type)
       
   152 @see TAvdtpSockAddr
       
   153 */
       
   154 	virtual void GAVDP_BearerReady(RSocket aSocket, const TAvdtpSockAddr& aAddress)=0;
       
   155 
       
   156 /**
       
   157 Callback when a GAVDP error occurs
       
   158 @param aError system-wide or GAVDP or AVDTP error code
       
   159 @param aErrorData extra data relating to the error - the client can deduce the nature based on their GAVDP state and the spec
       
   160 @see TAvdtpConfigRejectPckgBuf as an example of what may be passed back
       
   161 */
       
   162 	virtual void GAVDP_Error(TInt aError, const TDesC8& aErrorData) =0;
       
   163 	};
       
   164 	
       
   165 #endif // BTSAC_GAVDP_OBSERVER_H
       
   166