epoc32/include/remconaddress.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 remconaddress.h
     1 // Copyright (c) 2004-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 /**
       
    19  @file
       
    20  @publishedAll
       
    21  @released
       
    22 */
       
    23 
       
    24 #ifndef REMCONADDRESS_H
       
    25 #define REMCONADDRESS_H
       
    26 
       
    27 #include <e32base.h>
       
    28 
       
    29 /**
       
    30 Represents a single remote device address in terms of the bearer used to 
       
    31 connect to the device and some bearer-specific connection information.
       
    32 */
       
    33 class TRemConAddress
       
    34 	{
       
    35 public:
       
    36 	/** This is maximum supported size for a bearer-specific remote device 
       
    37 	address (cf. TSockAddr). */
       
    38 	static const TUint KMaxAddrSize = 0x1c;
       
    39 
       
    40 	/** Link between elements of this type in a TSglQue. */
       
    41 	TSglQueLink iLink;
       
    42 
       
    43 public:
       
    44 	/** Constructor. */
       
    45 	IMPORT_C TRemConAddress();
       
    46 
       
    47 	/** Destructor. */
       
    48 	IMPORT_C ~TRemConAddress();
       
    49 
       
    50 public:
       
    51 	/**
       
    52 	The address is null if the bearer UID is the null UID.
       
    53 	@return ETrue if the address is invalid/null, EFalse otherwise.
       
    54 	*/
       
    55 	IMPORT_C TBool IsNull() const;
       
    56 
       
    57 	/**
       
    58 	@return The bearer UID. Set this to null to make the address
       
    59 	null.
       
    60 	*/
       
    61 	IMPORT_C TUid& BearerUid();
       
    62 
       
    63 	/**
       
    64 	@return The bearer UID.
       
    65 	*/
       
    66 	IMPORT_C TUid BearerUid() const;
       
    67 
       
    68 	/**
       
    69 	@return The bearer-specific address information.
       
    70 	*/
       
    71 	IMPORT_C TBuf8<KMaxAddrSize>& Addr();
       
    72 
       
    73 	/**
       
    74 	@return The bearer-specific address information.
       
    75 	*/
       
    76 	IMPORT_C const TBuf8<KMaxAddrSize>& Addr() const;
       
    77 
       
    78 	/**
       
    79 	Equality operator.
       
    80 	@param An address to compare with.
       
    81 	@return ETrue if both bearer UIDs and sets of bearer-specific information 
       
    82 	match, EFalse otherwise.
       
    83 	*/
       
    84 	IMPORT_C TBool operator==(const TRemConAddress& aRhs) const;
       
    85 
       
    86 private:
       
    87 	/** Implementation UID of bearer (ECOM) plugin. */
       
    88 	TUid iBearerUid;
       
    89 
       
    90 	/** Buffer for bearer-specific connection address information. */
       
    91 	TBuf8<KMaxAddrSize> iAddr;
       
    92 
       
    93 	/** 
       
    94 	Pad for BC-friendly future change.
       
    95 	*/
       
    96 	TUint32 iPad;
       
    97 	};
       
    98 
       
    99 #endif // REMCONADDRESS_H