equal
deleted
inserted
replaced
|
1 // Copyright (c) 2005-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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 #if !(defined __SS_CONNPREF_H__) |
|
23 #define __SS_CONNPREF_H__ |
|
24 |
|
25 #define TCommIdList TConnIdList |
|
26 #include <connpref.h> |
|
27 |
|
28 class TConnIdList : public TConnPref |
|
29 /** |
|
30 Class used to carry list of arbitrarry Ids stored as integer values. |
|
31 Class doesn't allow remove only append and overwrite |
|
32 @publishedPartner |
|
33 @released since v9.1 |
|
34 */ |
|
35 { |
|
36 public: |
|
37 IMPORT_C TConnIdList(); |
|
38 |
|
39 IMPORT_C TInt& operator[](TInt aIndex); |
|
40 IMPORT_C TInt Get(TInt aIndex) const; |
|
41 IMPORT_C void Append(TInt aId); |
|
42 IMPORT_C TInt Count() const; |
|
43 IMPORT_C static TInt MaxCount(); |
|
44 |
|
45 protected: |
|
46 TUint16& CountRef(); |
|
47 TInt* IdList(); |
|
48 }; |
|
49 |
|
50 inline TInt* TConnIdList::IdList() |
|
51 { |
|
52 return reinterpret_cast<TInt*>(UserPtr()); |
|
53 } |
|
54 |
|
55 inline TUint16& TConnIdList::CountRef() |
|
56 { |
|
57 return reinterpret_cast<TUint16&>(reinterpret_cast<SConnPref*>(iBuf)->iSpare); |
|
58 } |
|
59 |
|
60 #endif // __SS_CONNPREF_H__ |
|
61 |