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