|
1 // Copyright (c) 2001-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 // MWspAliasAddress.h |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file MWspAliasAddress.h |
|
20 @warning : This file contains Rose Model ID comments - please do not delete |
|
21 */ |
|
22 |
|
23 #ifndef __MWSPALIASADDRESS_H__ |
|
24 #define __MWSPALIASADDRESS_H__ |
|
25 |
|
26 // System includes |
|
27 #include <e32base.h> |
|
28 #include <wsp/wsptypes.h> |
|
29 |
|
30 // Types used for arguments in this file (e.g. TWspBearer) are from the Wap namespace |
|
31 using namespace Wap; |
|
32 |
|
33 |
|
34 class MWspAliasAddresses |
|
35 /** |
|
36 @class MWspAliasAddress |
|
37 @since 7.0 |
|
38 The MWspAliasAddresses API provides an interface to a set of alias addresses |
|
39 as defined by the WSP Specification, July 2001. This is an informational |
|
40 capability that indicates alternate addresses that can be used to access the |
|
41 same entity instance in this current session. The addresses are listed in |
|
42 preferential order, with the most preferred at the start. |
|
43 |
|
44 The interface allows the set of addresses to be accessed one by one. The |
|
45 read function provides the caller with a copy of the alias address |
|
46 information. The set of alias addresses can be reset to the default value |
|
47 of the capability (as defined by the WSP Specification), which is an empty |
|
48 set. An alias address can be added to the set - the preferred addresses should |
|
49 be added first. |
|
50 @publishedAll |
|
51 @deprecated |
|
52 */ |
|
53 { |
|
54 public: // Methods |
|
55 |
|
56 /** @fn Start() const =0 |
|
57 Intended Usage : Ensures that the first alias address in the set is |
|
58 available for reading. |
|
59 @since 7.0 |
|
60 @return An error code. If there are no alias addresses, then the |
|
61 value returned is KErrNotFound. If there are alias addresses |
|
62 then the value KErrNone is returned. |
|
63 @post The subsequent call to GetNext() is applied to the first |
|
64 alias address in the set. |
|
65 */ |
|
66 virtual TInt Start() const =0; |
|
67 |
|
68 /** @fn GetNext(TWspBearer& aBearer, TUint16& aPort, TPtrC8& aAddress) const =0 |
|
69 Intended Usage : Gets the next alias address in the set. If there are no |
|
70 addresses left then KErrNotFound error code is returned. |
|
71 The addresses are listed in preferential order, with the |
|
72 most preferred at the start. |
|
73 @since 7.0 |
|
74 @param aBearer An output parameter reference for the type of |
|
75 bearer network which this address should be used |
|
76 with. |
|
77 @param aPort An output parameter reference for the destination |
|
78 port number. A value of zero indicates that no |
|
79 port number has been specified. |
|
80 @param aAddress An output parameter reference for a buffer with |
|
81 the bearer address to be used. The format of the |
|
82 address is bearer dependent. |
|
83 @return An error code. If there are no alias addresses left, then |
|
84 the value returned is KErrNotFound. If there are alias |
|
85 addresses left then the value KErrNone is returned. |
|
86 @post The next alias address in the set is available for reading. |
|
87 */ |
|
88 virtual TInt GetNext(TWspBearer& aBearer, TUint16& aPort, TPtrC8& aAddress) const =0; |
|
89 |
|
90 /** @fn Reset() =0 |
|
91 Intended Usage : Resets the capability to the default. The default is |
|
92 defined in the WSP Specification, July 2001, as being an |
|
93 empty set of addresses. |
|
94 @since 7.0 |
|
95 @post The set of alias addresses is empty. |
|
96 */ |
|
97 virtual void Reset() =0; |
|
98 |
|
99 /** @fn AddAddressL(TWspBearer aBearer, TUint16 aPort, const TDesC8& aAddress) =0 |
|
100 Intended Usage : Adds an alias address to the set. The addresses should |
|
101 be added in preferential order, with the most preferred |
|
102 at the start. |
|
103 @since 7.0 |
|
104 @leave Leave code KErrNoMemory if the address cannot be added to |
|
105 the set. |
|
106 @param aBearer The type of bearer network which this address |
|
107 should be used with. |
|
108 @param aPort The destination port number. A value of zero |
|
109 indicates that no port number has been specified. |
|
110 @param aAddress A buffer with the bearer address to be used. The |
|
111 format of the address is bearer dependent. |
|
112 @post If no error has occurred then the alias address has been added. |
|
113 */ |
|
114 virtual void AddAddressL(TWspBearer aBearer, TUint16 aPort, const TDesC8& aAddress) =0; |
|
115 |
|
116 }; |
|
117 |
|
118 #endif // __MWSPALIASADDRESS_H__ |