bluetoothmgmt/bluetoothclientlib/inc/btsockaddr.h
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 // Copyright (c) 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 #ifndef BTSOCKADDR_H
       
    17 #define BTSOCKADDR_H
       
    18 
       
    19 /**
       
    20 @file
       
    21 @publishedAll
       
    22 @released
       
    23 */
       
    24 
       
    25 #include <es_sock.h>
       
    26 #include <bttypes.h>
       
    27 #include <btsecurity.h>
       
    28 
       
    29 NONSHARABLE_CLASS(TBTSockAddr) : public TSockAddr
       
    30 /** Bluetooth socket address
       
    31 
       
    32 Stores bluetooth device address, and security - these are common to all Bluetooth addresses
       
    33 @publishedAll
       
    34 @released
       
    35 */
       
    36 	{
       
    37 struct SBTAddrSecurity
       
    38 	{		
       
    39 	TBTDevAddr iAddress;
       
    40 	TBTServiceSecurity iSecurity;
       
    41 	};
       
    42 	
       
    43 public:
       
    44 	IMPORT_C TBTSockAddr();
       
    45 	IMPORT_C TBTSockAddr(const TSockAddr& aAddr);
       
    46 	IMPORT_C TBTDevAddr BTAddr() const;
       
    47 	IMPORT_C void SetBTAddr(const TBTDevAddr& aRemote);
       
    48 	IMPORT_C void SetSecurity(const TBTServiceSecurity& aSecurity);
       
    49 	IMPORT_C TBTServiceSecurity BTSecurity() const;
       
    50 	IMPORT_C static TBTSockAddr& Cast(const TSockAddr& aAddr);
       
    51 	
       
    52 protected:
       
    53 	IMPORT_C TAny* EndBTSockAddrPtr() const;
       
    54 	
       
    55 private:
       
    56 	SBTAddrSecurity& BTAddrSecStruct() const;
       
    57 	TPtr8 AddressPtr() const;
       
    58 	};
       
    59 
       
    60 #endif // BTSOCKADDR_H