|
1 /* |
|
2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * ?description_line |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDES |
|
21 |
|
22 #include "FT_CPosTp139.h" |
|
23 #include <EPos_CPosLandmark.h> |
|
24 |
|
25 |
|
26 |
|
27 // ================= MEMBER FUNCTIONS ======================= |
|
28 |
|
29 // --------------------------------------------------------- |
|
30 // CPosTp139::GetSortAttribute |
|
31 // |
|
32 // (other items were commented in a header). |
|
33 // --------------------------------------------------------- |
|
34 // |
|
35 void CPosTp139::GetSortAttribute() |
|
36 { |
|
37 TPosLmSortPref sortPref(CPosLandmark::ELandmarkName, TPosLmSortPref::EAscending); |
|
38 |
|
39 CPosLandmark::TAttributes att; |
|
40 |
|
41 for (TInt i=0; i<6; i++) |
|
42 { |
|
43 if (i==0) |
|
44 { |
|
45 sortPref.SetSortByLandmarkAttribute(CPosLandmark::ELandmarkName, TPosLmSortPref::EDescending); |
|
46 att = sortPref.LandmarkAttributeToSortBy(); |
|
47 if(att == CPosLandmark::ELandmarkName) |
|
48 { |
|
49 iLog->Log(_L("The landmark attribute to sort by is :ELandmarkName")); |
|
50 } |
|
51 } |
|
52 else if (i==1) |
|
53 { |
|
54 sortPref.SetSortByLandmarkAttribute(CPosLandmark::EPosition, TPosLmSortPref::EDescending); |
|
55 att = sortPref.LandmarkAttributeToSortBy(); |
|
56 if(att == CPosLandmark::EPosition ) |
|
57 { |
|
58 iLog->Log(_L("The landmark attribute to sort by is :EPosition")); |
|
59 } |
|
60 } |
|
61 else if (i==2) |
|
62 { |
|
63 sortPref.SetSortByLandmarkAttribute(CPosLandmark::ECoverageRadius, TPosLmSortPref::EAscending); |
|
64 att = sortPref.LandmarkAttributeToSortBy(); |
|
65 if(att == CPosLandmark::ECoverageRadius) |
|
66 { |
|
67 iLog->Log(_L("The landmark attribute to sort by is :ECoverageRadius")); |
|
68 } |
|
69 } |
|
70 else if (i==3) |
|
71 { |
|
72 |
|
73 sortPref.SetSortByLandmarkAttribute(CPosLandmark::ECategoryInfo, TPosLmSortPref::EDescending); |
|
74 att = sortPref.LandmarkAttributeToSortBy(); |
|
75 if(att == CPosLandmark::ECategoryInfo) |
|
76 { |
|
77 iLog->Log(_L("The landmark attribute to sort by is :ECategoryInfo")); |
|
78 } |
|
79 } |
|
80 else if (i==4) |
|
81 { |
|
82 sortPref.SetSortByLandmarkAttribute(CPosLandmark::EIcon, TPosLmSortPref::EAscending); |
|
83 |
|
84 att = sortPref.LandmarkAttributeToSortBy(); |
|
85 if(att == CPosLandmark::EIcon) |
|
86 { |
|
87 iLog->Log(_L("The landmark attribute to sort by is :EIcon")); |
|
88 } |
|
89 } |
|
90 |
|
91 else if (i==5) |
|
92 { |
|
93 sortPref.SetSortByLandmarkAttribute(CPosLandmark::EDescription, TPosLmSortPref::EDescending); |
|
94 |
|
95 att = sortPref.LandmarkAttributeToSortBy(); |
|
96 if(att == CPosLandmark::EDescription) |
|
97 { |
|
98 iLog->Log(_L("The landmark attribute to sort by is :EDescription")); |
|
99 } |
|
100 } |
|
101 |
|
102 } |
|
103 } |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 // End of File |