Telephony/basebandabstraction/basebandchanneladaptor/inc/bca2.h
author Tom Pritchard <tomp@symbian.org>
Thu, 12 Aug 2010 13:20:01 +0100
changeset 21 ab1d0f4d2aa4
child 22 e3587ca0d5e1
permissions -rw-r--r--
Adding the "WishList" state Telephony APIs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     1
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     2
/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     3
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     4
* All rights reserved.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     5
* This component and the accompanying materials are made available
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     6
* under the terms of "Eclipse Public License v1.0"
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     7
* which accompanies this distribution, and is available
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     8
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     9
*
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    10
* Initial Contributors:
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    11
* Nokia Corporation - initial contribution.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    12
*
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    13
* Contributors:
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    14
*
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    15
* Description:
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    16
* Baseband Channel Adaptor(BCA) APIs.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    17
* This file contains all the APIs required to implement a BCA interface for Symbian OS.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    18
* 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    19
*
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    20
*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    21
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    22
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    23
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    24
/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    25
 @file
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    26
 @publishedPartner
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    27
 @prototype
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    28
 @released
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    29
*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    30
#ifndef BCA2_H
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    31
#define BCA2_H
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    32
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    33
/** This namespace includes the BCA component names.*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    34
namespace BasebandChannelAdaptation2
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    35
{
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    36
/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    37
 * The class implemented by an upper component to accept control signals from the lower component
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    38
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    39
 * @publishedPartner
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    40
 * @prototype
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    41
 */
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    42
class MUpperControl
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    43
	{
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    44
public:
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    45
	/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    46
	* Indicates to the layer above (link layer) that the Bca is ready to start 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    47
	* receiving packets from the upper layer (either after MBca start 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    48
	* completes or following congestion)
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    49
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    50
	* @param none
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    51
	* @return none.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    52
	*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    53
	virtual void StartSending()=0;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    54
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    55
	/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    56
	* Any fatal error which occurs during the send/receive session is reported 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    57
	* to the client by a call to this function. Fatal errors are errors which can’t 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    58
	* be recovered from (e.g.:  connection down) in which case MBca has become 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    59
	* defunct and can no longer be used to send and receive data
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    60
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    61
	* @param aErr TThe fatal error code from the session failures propagated 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    62
	* to the upper layer of the communications stack . Non fatal errors keep 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    63
	* the MBca2 functional which in the context of MBca2 implementation may 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    64
	* include KErrNoMemory, KErrCommsParity, KErrCommsOverrun, KErrCommsFrame. 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    65
	* @return none.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    66
	*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    67
	virtual void Error(TInt aErr)=0;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    68
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    69
	};
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    70
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    71
/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    72
 * The Class implemented by an upper component to accept inbound data travelling 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    73
 * upwards from the lower component
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    74
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    75
 * @publishedPartner
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    76
 * @prototype
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    77
 */ 	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    78
class MUpperDataReceiver
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    79
	{
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    80
public:
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    81
	/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    82
	* This function is called whenever data has been received by MBca which 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    83
	* should be processed by its client. The implementer takes ownership of the 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    84
	* buffer and is responsible for its deletion.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    85
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    86
	* @param aCommsBufChain - The list of comms buffers containing data to be processed. 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    87
         * Destination keeps the custody of the buffer.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    88
	* @return none.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    89
	*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    90
	virtual void Process(RCommsBufChain& aCommsBufChain)=0;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    91
	};
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    92
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    93
/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    94
 * The interface implemented by the lower component to accept data from the upper component
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    95
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    96
 * @publishedPartner
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    97
 * @prototype
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    98
 */
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    99
 	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   100
class MLowerDataSender
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   101
	{
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   102
	public:
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   103
	enum TSendResult
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   104
		{
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   105
			// data accepted, send no more until MUpperControl::StartSending() is called
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   106
			ESendBlocked,
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   107
			// data accepted, can send more.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   108
			ESendAccepted
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   109
		};
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   110
	/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   111
	* Sends the specified buffer data down to the base-band. The implementer takes 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   112
	* ownership of the buffer and is responsible for its deletion.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   113
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   114
	* @param aCommsBufChain the comms buffer list to be sent.The buffer ownership is passed 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   115
	* to the BCA
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   116
	* @return TTSendResult either ESendBlocked or SendAccepted. When the Bca 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   117
	* is congested and cannot send any data beyond the current packet (which is 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   118
	* always accepted), the implementation returns ESendBlocked. If BCA is not
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   119
	* congested then ESendAccepted is returned to continue sending. When congestion 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   120
	* passes, the Bca calls StartSending on the upper layer to resume sending. The
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   121
	* implementation is recommended to panic any attempts to call Send during congestion 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   122
	*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   123
	virtual	TSendResult Send(RCommsBufChain& aCommsBufChain)=0;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   124
	};
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   125
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   126
/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   127
 * The interface implemented by the lower component to accept control signals from the upper component
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   128
 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   129
 * @publishedPartner
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   130
 * @prototype
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   131
 */ 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   132
class MBca2
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   133
	{
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   134
public:
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   135
	 struct TBcaParams 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   136
		{
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   137
		RCommsBufPond iCommsBufPond;	// Pond to be used by BCA implementation for creating, using pools and buffers
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   138
		const TDesC& iChannelId;				// port number or channel which BCA uses to communicate with its lower layers 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   139
		TBcaParams(RCommsBufPond aCommsBufPond,const TDesC& aChannelId)
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   140
		: iCommsBufPond(aCommsBufPond),
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   141
		iChannelId(aChannelId){}
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   142
	 	};
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   143
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   144
		
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   145
	/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   146
	* Opens the BCA instance and commences a BCA session (::Close() terminates the session). 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   147
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   148
	* @param aControl reference to a MUpperControl implementation, which will 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   149
	* serve as the call-back interface for incoming control calls
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   150
	* @param aData - reference to a MUpperDataReceiver implementation, which
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   151
	* will serve as the call-back interface for incoming data
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   152
	* @param aBcaParams A reference to the BCA start up params
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   153
	* @return KErrNone if successful, system-wide error code otherwise. All 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   154
	* other error codes reported are fatal denoting that MBca interface has 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   155
	* failed to open and MBca is not good for transferring data
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   156
	*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   157
	virtual TInt Open(MUpperControl& aControl, 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   158
					MUpperDataReceiver& aData, 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   159
					const TBcaParams& aBcaParams)=0;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   160
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   161
	/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   162
	 * The API starts the baseband connection asynchronously. The Start () request 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   163
	 * API’s successful completion is acknowledged with MUpperControl::StartSending(). 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   164
	 * The request failure is acknowledged with MUpperControl::Error(). Client should 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   165
	 * take care of scenarios when MUpperControl::StartSending() gets very delayed 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   166
	 * or not called at all
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   167
 	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   168
	* @param none
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   169
	* @return none
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   170
	*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   171
	virtual void Start()=0;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   172
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   173
	/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   174
	 * Returns a reference to the MLowerDataSender, This reference is used by 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   175
	 * upper components to send packets to the lower components. This API must be 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   176
	 * called only after Start() completes, otherwise the implementation should panic.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   177
 	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   178
	* @param none
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   179
	* @return reference to the MLowerDataSender. 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   180
	*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   181
	virtual MLowerDataSender& GetSender()=0;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   182
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   183
	/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   184
	* Synchronously closes the BCA immediately. Informs the BCA is no longer 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   185
	* required by the client and can release its resources. Close cancels all 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   186
	* pending asynchronous operations which can only be ::Start() or ::Control() .
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   187
	* To use the BCA instance it needs to be re-opened. Close operation must not fail.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   188
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   189
	* @param none
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   190
	* @return none.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   191
	*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   192
	virtual void Close()=0;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   193
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   194
	/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   195
	* Release/deletes the BCA instance. Derived classes will typically implement 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   196
	* this as ‘delete this’.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   197
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   198
	* @param none
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   199
	* @return none.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   200
	*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   201
	virtual void Release()=0;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   202
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   203
	enum TBlockOption
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   204
		{
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   205
			//stop sending [block] data on interface
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   206
			EBlockFlow, 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   207
			// start sending [unblock] data on interface
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   208
			EUnblockFlow
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   209
		};
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   210
	/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   211
	* Either blocks or unblocks the pushing of received data to the upper layers, 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   212
	* depending on TBlockOption. If the upper layers can’t process any more
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   213
	* data to stop receiving packets this API is called with EBlockFlow. 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   214
	* Later after the congestion eases, to start receiving packets again call 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   215
	* this API with EUnblockFlow
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   216
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   217
	* @param aOption either block or unblock receive flow
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   218
	* @return none.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   219
	*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   220
	virtual void SetFlowControl(TBlockOption aOption)=0;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   221
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   222
	/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   223
	* The BCA control function to get or set the options of the BCA in an 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   224
	* asynchronous manner.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   225
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   226
	* @param aStatus  asynchronous completion status, KErrNone if successful, 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   227
         * system-wide error code otherwise
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   228
	* @param aOptLevel option level to be used KBcaOptLevelGeneric 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   229
	* or KBcaOptLevelExtSerial
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   230
	* @param aOptName option name to be used.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   231
	* @param aOpt an optional parameter,holds the option value on return or the
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   232
	* option value to be set.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   233
	* @return none.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   234
	*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   235
	virtual void Control(TRequestStatus& aStatus,
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   236
							TUint aOptLevel,
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   237
							TUint aOptName,
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   238
							TDes8& aOpt)=0;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   239
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   240
	/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   241
	* Cancels the Control request in a synchronous way.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   242
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   243
	* @param none
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   244
	* @return none.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   245
	*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   246
	virtual void CancelControl()=0;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   247
	};
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   248
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   249
/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   250
* Control option level.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   251
*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   252
const TUint KBcaOptLevelGeneric 		= 0x0194;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   253
const TUint KBcaOptLevelExtSerial 		= 0x0195;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   254
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   255
/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   256
* C32 BCA capability
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   257
*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   258
const TUint KBcaCapSerial			= 0x01; //Serial port capability supported
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   259
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   260
/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   261
* Generic Control option name
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   262
*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   263
const TUint KBCAMru	                = 0x12;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   264
const TUint KBCAMtu	                = 0x13;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   265
const TUint KBCASpeedMetric	        = 0x14;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   266
const TUint KBCACaps	            = 0x15;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   267
const TUint KBCASetIapId	        = 0x16;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   268
const TUint KBCASetBcaStack	        = 0x1e;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   269
const TUint KVersionNumber	        = 0x1c;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   270
/** 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   271
Purges the buffers */
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   272
const TUint KBCAResetBuffers        = 0x1f;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   273
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   274
/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   275
* Serial Control option name
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   276
*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   277
const TUint KSerialCaps	            = 0x17;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   278
const TUint KSerialConfig	        = 0x18;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   279
const TUint KSerialSetConfig	    = 0x1a;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   280
const TUint KSerialPortName	        = 0x19;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   281
const TUint KSerialSetCsyName	    = 0x1b;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   282
const TUint KSerialSetCommRole	    = 0x1d;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   283
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   284
/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   285
Set the size of receive & transmit buffers.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   286
Provided for compatibility with C32 RComm */
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   287
const TUint KSerialSetTxRxBufferSize  = 0x2a;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   288
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   289
/** Retrieves the size of the receive & transmit buffers */
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   290
const TUint KSerialTxRxBufferSize     = 0x2b;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   291
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   292
/** Set and/or clear signal lines */
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   293
const TUint KSerialSetControlLines	  = 0x2c;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   294
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   295
struct TSerialSetControlLines {
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   296
/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   297
Structure associated with KSerialSetSignals control.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   298
Indicates which control lines to set/clear. 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   299
*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   300
	TUint	iSetMask;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   301
	TUint	iClearMask;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   302
};
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   303
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   304
//
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   305
// Bitmasks specifying which buffer to reset. Used with KBCaResetBuffers
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   306
//
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   307
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   308
/** Reset Rx buffer only */
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   309
const TUint KResetRxBuf = 0x01;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   310
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   311
/** Reset Tx buffer only */
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   312
const TUint KResetTxBuf = 0x02;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   313
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   314
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   315
/** Monitor EIA-232 control lines and take action specified. */
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   316
const TUint KSerialMonitorControlLines = 0x30;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   317
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   318
/** Turn control line monitoring off - do not fail on line change */
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   319
const TUint KMonitorOff = 0x0;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   320
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   321
/** Fail when BCA-specific lines go from high to low. 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   322
This is the "Default" option, where the BCA itself selects what lines to monitor 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   323
This mask must not be specified in conjunction with other masks, as the BCA will monitor
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   324
& fail on its specific lines ONLY. The other lines will be ignored.*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   325
const TUint KFailBcaSpecificOnly = 0xFFFFFFFF; 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   326
}
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   327
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
   328
#endif // BCA2_H