epoc32/include/remconaddress.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) 2004-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
/**
williamr@2
    17
 @file
williamr@2
    18
 @publishedAll
williamr@2
    19
 @released
williamr@2
    20
*/
williamr@2
    21
williamr@2
    22
#ifndef REMCONADDRESS_H
williamr@2
    23
#define REMCONADDRESS_H
williamr@2
    24
williamr@2
    25
#include <e32base.h>
williamr@2
    26
williamr@2
    27
/**
williamr@2
    28
Represents a single remote device address in terms of the bearer used to 
williamr@2
    29
connect to the device and some bearer-specific connection information.
williamr@2
    30
*/
williamr@2
    31
class TRemConAddress
williamr@2
    32
	{
williamr@2
    33
public:
williamr@2
    34
	/** This is maximum supported size for a bearer-specific remote device 
williamr@2
    35
	address (cf. TSockAddr). */
williamr@2
    36
	static const TUint KMaxAddrSize = 0x1c;
williamr@2
    37
williamr@2
    38
	/** Link between elements of this type in a TSglQue. */
williamr@2
    39
	TSglQueLink iLink;
williamr@2
    40
williamr@2
    41
public:
williamr@2
    42
	/** Constructor. */
williamr@2
    43
	IMPORT_C TRemConAddress();
williamr@2
    44
williamr@2
    45
	/** Destructor. */
williamr@2
    46
	IMPORT_C ~TRemConAddress();
williamr@2
    47
williamr@2
    48
public:
williamr@2
    49
	/**
williamr@2
    50
	The address is null if the bearer UID is the null UID.
williamr@2
    51
	@return ETrue if the address is invalid/null, EFalse otherwise.
williamr@2
    52
	*/
williamr@2
    53
	IMPORT_C TBool IsNull() const;
williamr@2
    54
williamr@2
    55
	/**
williamr@2
    56
	@return The bearer UID. Set this to null to make the address
williamr@2
    57
	null.
williamr@2
    58
	*/
williamr@2
    59
	IMPORT_C TUid& BearerUid();
williamr@2
    60
williamr@2
    61
	/**
williamr@2
    62
	@return The bearer UID.
williamr@2
    63
	*/
williamr@2
    64
	IMPORT_C TUid BearerUid() const;
williamr@2
    65
williamr@2
    66
	/**
williamr@2
    67
	@return The bearer-specific address information.
williamr@2
    68
	*/
williamr@2
    69
	IMPORT_C TBuf8<KMaxAddrSize>& Addr();
williamr@2
    70
williamr@2
    71
	/**
williamr@2
    72
	@return The bearer-specific address information.
williamr@2
    73
	*/
williamr@2
    74
	IMPORT_C const TBuf8<KMaxAddrSize>& Addr() const;
williamr@2
    75
williamr@2
    76
	/**
williamr@2
    77
	Equality operator.
williamr@2
    78
	@param An address to compare with.
williamr@2
    79
	@return ETrue if both bearer UIDs and sets of bearer-specific information 
williamr@2
    80
	match, EFalse otherwise.
williamr@2
    81
	*/
williamr@2
    82
	IMPORT_C TBool operator==(const TRemConAddress& aRhs) const;
williamr@2
    83
williamr@2
    84
private:
williamr@2
    85
	/** Implementation UID of bearer (ECOM) plugin. */
williamr@2
    86
	TUid iBearerUid;
williamr@2
    87
williamr@2
    88
	/** Buffer for bearer-specific connection address information. */
williamr@2
    89
	TBuf8<KMaxAddrSize> iAddr;
williamr@2
    90
williamr@2
    91
	/** 
williamr@2
    92
	Pad for BC-friendly future change.
williamr@2
    93
	*/
williamr@2
    94
	TUint32 iPad;
williamr@2
    95
	};
williamr@2
    96
williamr@2
    97
#endif // REMCONADDRESS_H