epoc32/include/btextnotifiers.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@4
     4
// under the terms of "Eclipse Public License v1.0"
williamr@2
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
//
williamr@2
    15
williamr@2
    16
#ifndef BTEXTNOTIFIERS_H
williamr@2
    17
#define BTEXTNOTIFIERS_H
williamr@2
    18
williamr@4
    19
#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
williamr@4
    20
#include <btextnotifierspartner.h>
williamr@4
    21
#endif
williamr@4
    22
williamr@4
    23
#include <btextnotifiersconsts.h>
williamr@4
    24
williamr@2
    25
#include <e32std.h>
williamr@2
    26
#include <bttypes.h>
williamr@2
    27
#include <btdevice.h>
williamr@2
    28
williamr@2
    29
#define NOTIFIERS_SUPPORT_PASSKEY_MIN_LENGTH
williamr@2
    30
williamr@2
    31
/**
williamr@2
    32
@file
williamr@2
    33
@publishedAll
williamr@2
    34
@released
williamr@2
    35
**/
williamr@2
    36
williamr@2
    37
NONSHARABLE_CLASS(TBTDeviceSelectionParams)
williamr@2
    38
/**
williamr@2
    39
@publishedAll
williamr@2
    40
@released
williamr@2
    41
williamr@2
    42
Class to allow parameters to be sent to the device selection dialog via the RNotifier API.
williamr@2
    43
**/
williamr@2
    44
	{
williamr@2
    45
public:
williamr@2
    46
	IMPORT_C TBTDeviceSelectionParams();
williamr@2
    47
	IMPORT_C void SetUUID(const TUUID& aUUID);
williamr@2
    48
	IMPORT_C void SetDeviceClass(TBTDeviceClass aClass);
williamr@2
    49
	IMPORT_C const TUUID& UUID();
williamr@2
    50
	IMPORT_C TBTDeviceClass DeviceClass();
williamr@2
    51
	IMPORT_C TBool IsValidDeviceClass();
williamr@2
    52
	IMPORT_C TBool IsValidUUID();
williamr@2
    53
private:
williamr@2
    54
	TBTDeviceClass iDeviceClass; /*!< The device class */
williamr@2
    55
	TUUID iSdpUuid; /*!< The sdp uuid */
williamr@2
    56
	TBool iValidDeviceClass; /*!< ETrue if iDeviceClass has been set, EFalse if not */
williamr@2
    57
	TBool iValidUuid; /*!< ETrue if iSdpUuid has be set, EFalse if not */
williamr@2
    58
williamr@2
    59
	// This data padding has been added to help prevent future binary compatibility breaks	
williamr@2
    60
	// Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
williamr@2
    61
	TUint32     iPadding1; 
williamr@2
    62
	TUint32     iPadding2; 	
williamr@2
    63
	};
williamr@2
    64
williamr@2
    65
NONSHARABLE_CLASS(TBTDeviceResponseParams)
williamr@2
    66
/**
williamr@2
    67
@publishedAll
williamr@2
    68
@released
williamr@2
    69
williamr@2
    70
Class to allow parameters to be received from the device selection dialog via the RNotifier API.
williamr@2
    71
**/
williamr@2
    72
	{
williamr@2
    73
public:
williamr@2
    74
	IMPORT_C TBTDeviceResponseParams();
williamr@4
    75
	IMPORT_C void SetDeviceAddress(const TBTDevAddr& aBDAddr);	//< Set the address of the device
williamr@4
    76
	IMPORT_C void SetDeviceName(const TDesC& aName);	//< Set the name of the device
williamr@2
    77
	IMPORT_C void SetDeviceClass(TBTDeviceClass aClass);
williamr@4
    78
	IMPORT_C const TBTDevAddr& BDAddr() const;				//< Returns the address of the device
williamr@4
    79
	IMPORT_C const TDesC& DeviceName() const;		//< Returns the name of the device
williamr@2
    80
	IMPORT_C TBTDeviceClass DeviceClass();
williamr@4
    81
	IMPORT_C TBool IsValidBDAddr() const;			//< Has the address of the device been set?
williamr@4
    82
	IMPORT_C TBool IsValidDeviceName() const;		//< Has the name of the device been set?
williamr@2
    83
	IMPORT_C TBool IsValidDeviceClass();
williamr@2
    84
private:
williamr@2
    85
	TBTDevAddr iBDAddr; /*!< The BT address of the remote device */
williamr@2
    86
	TBuf<KMaxBluetoothNameLen> iDeviceName; /*!< The name given by the remote device */
williamr@2
    87
	TBTDeviceClass iDeviceClass; /*!< The device class */
williamr@2
    88
	TBool iValidBDAddr; /*!< ETrue if iBDAddr has been set, EFalse if not */
williamr@2
    89
	TBool iValidDeviceName; /*!< ETrue if iDeviceName has been set, EFalse if not */
williamr@2
    90
	TBool iValidDeviceClass; /*!< ETrue if iDeviceClass has been set, EFalse if not */
williamr@2
    91
	
williamr@2
    92
	// This data padding has been added to help prevent future binary compatibility breaks	
williamr@2
    93
	// Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used	
williamr@2
    94
	TUint32     iPadding1; 
williamr@2
    95
	TUint32     iPadding2; 	
williamr@2
    96
	};
williamr@2
    97
williamr@2
    98
/**
williamr@2
    99
@publishedAll
williamr@2
   100
@released
williamr@2
   101
williamr@2
   102
Typedef'ed pckgbuf to send paramaters to the device selection dialog via the notifier framework.
williamr@2
   103
**/
williamr@2
   104
typedef TPckgBuf<TBTDeviceSelectionParams> TBTDeviceSelectionParamsPckg;
williamr@2
   105
williamr@2
   106
/**
williamr@2
   107
@publishedAll
williamr@2
   108
@released
williamr@2
   109
williamr@2
   110
Typedef'ed pckgbuf to retrieve the response from the device selection dialog via the notifier framework.
williamr@2
   111
**/
williamr@2
   112
typedef TPckgBuf<TBTDeviceResponseParams> TBTDeviceResponseParamsPckg;
williamr@2
   113
williamr@2
   114
/**
williamr@2
   115
A remote device address, and a boolean indicating if the remote device has access
williamr@2
   116
to the uplink
williamr@4
   117
WARNING: For internal use ONLY. Compatibility is not guaranteed in future releases.
williamr@2
   118
@publishedPartner
williamr@2
   119
@released
williamr@2
   120
*/
williamr@2
   121
NONSHARABLE_CLASS(TPanConnection)
williamr@2
   122
	{
williamr@2
   123
public:
williamr@2
   124
	IMPORT_C TPanConnection(TBTDevAddr& aRemoteDeviceAddress,
williamr@2
   125
				   			TBool aUplinkAccessAllowed);
williamr@2
   126
				   
williamr@2
   127
	IMPORT_C const TBTDevAddr& RemoteDeviceAddress() const;
williamr@2
   128
	IMPORT_C TBool UplinkAccessAllowed() const;
williamr@2
   129
	IMPORT_C TBool IsValid() const;
williamr@2
   130
	
williamr@2
   131
	// Non-exported constructor.  Allows creation of default NULL instance
williamr@2
   132
	TPanConnection();
williamr@2
   133
	
williamr@2
   134
private:
williamr@2
   135
	TBTDevAddr iRemoteDeviceAddress;
williamr@2
   136
	TBool iUplinkAccessAllowed;
williamr@2
   137
williamr@2
   138
	// This data padding has been added to help prevent future binary compatibility breaks	
williamr@2
   139
	// Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
williamr@2
   140
	TUint32 iPadding1; 
williamr@2
   141
	TUint32 iPadding2; 	
williamr@2
   142
	};
williamr@2
   143
williamr@2
   144
/**
williamr@2
   145
A list of TPanConnection instances
williamr@4
   146
This is not intended for external use by application developers.
williamr@4
   147
williamr@2
   148
@see TPanConnection
williamr@4
   149
@publishedAll
williamr@2
   150
@released
williamr@2
   151
*/
williamr@2
   152
NONSHARABLE_CLASS(TPanConnectionList)
williamr@2
   153
	{
williamr@2
   154
public:
williamr@2
   155
	IMPORT_C TPanConnectionList();
williamr@2
   156
	
williamr@2
   157
	IMPORT_C void AddRemoteConnectionL(const TPanConnection& aRemoteConnection);
williamr@2
   158
	IMPORT_C const TPanConnection* GetFirstRemoteConnection();
williamr@2
   159
	IMPORT_C const TPanConnection* GetNextRemoteConnection();
williamr@2
   160
williamr@2
   161
	IMPORT_C void SetRequestedConnectionAddr(const TBTDevAddr& aRequestedConnectionAddr);
williamr@2
   162
	IMPORT_C const TBTDevAddr* RequestedConnectionAddr();
williamr@2
   163
williamr@2
   164
	IMPORT_C const TUUID& CurrentLocalRole() const;
williamr@2
   165
	IMPORT_C void SetCurrentLocalRole(const TUUID& aLocalRole);
williamr@2
   166
		
williamr@2
   167
	IMPORT_C TUint8 MaxNumberOfRemoteConnections();
williamr@2
   168
	
williamr@2
   169
private:
williamr@2
   170
	const static TUint8 KMaxRemoteConnections = 7;
williamr@2
   171
williamr@2
   172
private:
williamr@2
   173
	TUint8 iPosition;	// the position within the list for stateful reading
williamr@2
   174
	TFixedArray<TPanConnection, KMaxRemoteConnections> iRemoteConnections;
williamr@2
   175
williamr@2
   176
	TBTDevAddr iRequestedConnectionAddr;
williamr@2
   177
williamr@2
   178
	TUUID iCurrentLocalRole;
williamr@2
   179
	
williamr@2
   180
	// This data padding has been added to help prevent future binary compatibility breaks	
williamr@2
   181
	// Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
williamr@2
   182
	TUint32 iPadding1; 
williamr@2
   183
	TUint32 iPadding2; 	
williamr@2
   184
	};
williamr@2
   185
williamr@2
   186
/**
williamr@2
   187
@publishedAll
williamr@2
   188
@released
williamr@2
   189
williamr@2
   190
Typedef'ed pckgbuf for TPanConnectionList.
williamr@4
   191
This is not intended for external use by application developers.
williamr@2
   192
**/
williamr@2
   193
typedef TPckgBuf<TPanConnectionList> TPanConnectionListPckg;
williamr@2
   194
williamr@2
   195
williamr@2
   196
/**
williamr@2
   197
@publishedAll
williamr@2
   198
@released
williamr@2
   199
williamr@2
   200
The response from the incoming PAN NAP connection selection dialog.
williamr@4
   201
This is intended for internal sub-system use only.
williamr@2
   202
**/
williamr@2
   203
enum TNapConnectionResult
williamr@2
   204
	{
williamr@2
   205
	EDisallowNewNapConnection,
williamr@2
   206
	EAcceptNapConnectionAllowUplinkAccess,
williamr@2
   207
	EAcceptNapConnectionDisallowUplinkAccess,
williamr@2
   208
	};
williamr@2
   209
williamr@2
   210
/**
williamr@2
   211
@publishedAll
williamr@2
   212
@released
williamr@2
   213
williamr@2
   214
Typedef'ed pckgbuf to retrieve the response from the incoming PAN NAP connection 
williamr@2
   215
selection dialog via the notifier framework.
williamr@4
   216
This is intended for internal sub-system use only.
williamr@2
   217
**/
williamr@2
   218
typedef TPckgBuf<TNapConnectionResult> TNapConnectionResultPckg;		
williamr@2
   219
williamr@2
   220
#endif // BTEXTNOTIFIERS_H