williamr@2: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@2: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: /** williamr@2: @file williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: williamr@2: #ifndef REMCONADDRESS_H williamr@2: #define REMCONADDRESS_H williamr@2: williamr@2: #include williamr@2: williamr@2: /** williamr@2: Represents a single remote device address in terms of the bearer used to williamr@2: connect to the device and some bearer-specific connection information. williamr@2: */ williamr@2: class TRemConAddress williamr@2: { williamr@2: public: williamr@2: /** This is maximum supported size for a bearer-specific remote device williamr@2: address (cf. TSockAddr). */ williamr@2: static const TUint KMaxAddrSize = 0x1c; williamr@2: williamr@2: /** Link between elements of this type in a TSglQue. */ williamr@2: TSglQueLink iLink; williamr@2: williamr@2: public: williamr@2: /** Constructor. */ williamr@2: IMPORT_C TRemConAddress(); williamr@2: williamr@2: /** Destructor. */ williamr@2: IMPORT_C ~TRemConAddress(); williamr@2: williamr@2: public: williamr@2: /** williamr@2: The address is null if the bearer UID is the null UID. williamr@2: @return ETrue if the address is invalid/null, EFalse otherwise. williamr@2: */ williamr@2: IMPORT_C TBool IsNull() const; williamr@2: williamr@2: /** williamr@2: @return The bearer UID. Set this to null to make the address williamr@2: null. williamr@2: */ williamr@2: IMPORT_C TUid& BearerUid(); williamr@2: williamr@2: /** williamr@2: @return The bearer UID. williamr@2: */ williamr@2: IMPORT_C TUid BearerUid() const; williamr@2: williamr@2: /** williamr@2: @return The bearer-specific address information. williamr@2: */ williamr@2: IMPORT_C TBuf8& Addr(); williamr@2: williamr@2: /** williamr@2: @return The bearer-specific address information. williamr@2: */ williamr@2: IMPORT_C const TBuf8& Addr() const; williamr@2: williamr@2: /** williamr@2: Equality operator. williamr@2: @param An address to compare with. williamr@2: @return ETrue if both bearer UIDs and sets of bearer-specific information williamr@2: match, EFalse otherwise. williamr@2: */ williamr@2: IMPORT_C TBool operator==(const TRemConAddress& aRhs) const; williamr@2: williamr@2: private: williamr@2: /** Implementation UID of bearer (ECOM) plugin. */ williamr@2: TUid iBearerUid; williamr@2: williamr@2: /** Buffer for bearer-specific connection address information. */ williamr@2: TBuf8 iAddr; williamr@2: williamr@2: /** williamr@2: Pad for BC-friendly future change. williamr@2: */ williamr@2: TUint32 iPad; williamr@2: }; williamr@2: williamr@2: #endif // REMCONADDRESS_H