CMPXCollectionPath Class Reference
class CMPXCollectionPath : public CBase
|
Encapsulates a 'bookmark' to a specific collection entry, i.e. encapsulates a specific path in a collection hierarchy; you can navigate through the items at this level.
mpxcommon.lib
Constructor & Destructor Documentation
CMPXCollectionPath()
CMPXCollectionPath
|
(
|
)
|
[private]
|
~CMPXCollectionPath()
IMPORT_C
|
~CMPXCollectionPath
|
(
|
)
|
[virtual]
|
Member Functions Documentation
AppendL(const TArray< TMPXItemId > &)
IMPORT_C void
|
AppendL
|
(
|
const
TArray
< TMPXItemId > &
|
aIds
|
)
|
|
Parameters
const
TArray
< TMPXItemId > & aIds
|
IDs of items at this level
|
AppendL(const TMPXItemId &)
IMPORT_C void
|
AppendL
|
(
|
const TMPXItemId &
|
aId
|
)
|
|
Append a level, where only single ID exists or is known.
Parameters
const TMPXItemId & aId
|
id of item at this level
|
Back()
Back a level.
-
Since
-
S60 3.2.3
-
panic
-
USER 0 if no more level in the path
ClearSelection()
IMPORT_C void
|
ClearSelection
|
(
|
)
|
|
ConstructL(const CMPXCollectionPath &)
ConstructL()
void
|
ConstructL
|
(
|
)
|
[private]
|
ConstructL(RReadStream &)
Count()
IMPORT_C
TInt
|
Count
|
(
|
)
|
const
|
Number of items at the top level.
Deselect(const TMPXItemId &)
IMPORT_C void
|
Deselect
|
(
|
const TMPXItemId &
|
aId
|
)
|
|
Deselects an item in the path.
-
Since
-
S60 3.2.3
-
panic
-
USER 0, if aId was not selected
Parameters
const TMPXItemId & aId
|
ID of the item
|
Deselect(TInt)
IMPORT_C void
|
Deselect
|
(
|
TInt
|
aIndex
|
)
|
|
Deselects an item in the path.
-
Since
-
S60 3.2.3
-
panic
-
USER 130, if aIndex is out of bound
-
panic
-
USER 0, if aIndex was not selected
Parameters
TInt
aIndex
|
index of the item
|
DeselectAll()
IMPORT_C void
|
DeselectAll
|
(
|
)
|
|
Deselect all of items at top level in the path.
ExternalizeL(RWriteStream &)
HandleChange(const TUid &, const TMPXItemId &, const TMPXItemId &, CMPXCollectionPath::TMPXCollectionPathChange, TInt &)
Handle collection change.
Id()
IMPORT_C const TMPXItemId &
|
Id
|
(
|
)
|
const
|
Id(TInt)
IMPORT_C const TMPXItemId &
|
Id
|
(
|
TInt
|
aLevel
|
)
|
const
|
Return item id at a specific level.
Parameters
TInt
aLevel
|
level of depth
|
IdOfIndex(TInt)
IMPORT_C const TMPXItemId &
|
IdOfIndex
|
(
|
TInt
|
aIndex
|
)
|
const
|
Return the item id for the item at aIndex at the top level.
Index()
IMPORT_C
TInt
|
Index
|
(
|
)
|
const
|
Index(TInt)
IMPORT_C
TInt
|
Index
|
(
|
TInt
|
aLevel
|
)
|
const
|
Return item index at a specific level.
Parameters
TInt
aLevel
|
level of depth
|
IndexOfId(const TMPXItemId &)
IMPORT_C
TInt
|
IndexOfId
|
(
|
const TMPXItemId &
|
aId
|
)
|
const
|
Index from item id at the top level.
Parameters
const TMPXItemId & aId
|
item id
|
InsertL(const TMPXItemId &, TInt)
IMPORT_C void
|
InsertL
|
(
|
const TMPXItemId &
|
aId,
|
|
TInt
|
aPos
|
|
)
|
|
Insert an id at top level.
-
Since
-
S60 3.2.3
-
leave
-
Leave with system errror code
-
panic
-
USER 131 if a pos is negative or is greater than the number of ids at top top level
Parameters
const TMPXItemId & aId
|
the id to be inserted
|
TInt
aPos
|
the position where the id to be inserted. The position is relative to zero.
|
InternalizeL(RReadStream &)
IsSelected(const TMPXItemId &)
IMPORT_C
TBool
|
IsSelected
|
(
|
const TMPXItemId &
|
aId
|
)
|
const
|
Queries if item is selected.
Parameters
const TMPXItemId & aId
|
ID of item
|
IsSelected(TInt)
IMPORT_C
TBool
|
IsSelected
|
(
|
TInt
|
aIndex
|
)
|
const
|
Queries if item is selected.
Parameters
TInt
aIndex
|
index of item
|
Items()
IMPORT_C const
TArray
< TMPXItemId >
|
Items
|
(
|
)
|
const
|
Retrieve a
TArray
of the top level items.
-
Since
-
S60 3.2.3
-
panic
-
USER 0 if no level in the path
Levels()
IMPORT_C
TInt
|
Levels
|
(
|
)
|
const
|
Number of levels into the collection.
NewL(const CMPXCollectionPath &)
OpenAttributes()
Open attributes for next level.
-
Since
-
S60 3.2.3
-
panic
-
USER 0 if no level in the path
OpenNextMode()
The open mode with which to navigate to the next level.
OpenPreviousMode()
The open mode with which to navigate to the previous level.
Remove(const TMPXItemId &)
IMPORT_C void
|
Remove
|
(
|
const TMPXItemId &
|
aId
|
)
|
|
Removes an item in the path and adjust selection indices accordingly.
-
Since
-
S60 3.2.3
-
panic
-
USER 0, if aId was not selected
Parameters
const TMPXItemId & aId
|
ID of the item
|
Remove(TInt)
IMPORT_C void
|
Remove
|
(
|
TInt
|
aIndex
|
)
|
|
Removes an item in the path and adjust selection indices accordingly.
-
Since
-
S60 3.2.3
-
panic
-
USER 0, if aIndex was not selected
Parameters
TInt
aIndex
|
index of the item
|
Reset()
Resets the collection path object. removes all node arrays. removes all top level ids. removes all selection ids.
SelectAllL()
IMPORT_C void
|
SelectAllL
|
(
|
)
|
|
Select all of items at top level in the path.
-
Since
-
S60 3.2.3
-
leave
-
The function leaves with one of the system wide error codes, if the operation fails
SelectL(const TMPXItemId &)
IMPORT_C void
|
SelectL
|
(
|
const TMPXItemId &
|
aId
|
)
|
|
Select an item with the id in the path. If the id appears more than once in the path, Select(TInt aIndex) can be used.
-
Since
-
S60 3.2.3
-
panic
-
USER 0 if aId is not found
Parameters
const TMPXItemId & aId
|
ID of the item
|
SelectL(TInt)
IMPORT_C void
|
SelectL
|
(
|
TInt
|
aIndex
|
)
|
|
Select an item in the path.
-
Since
-
S60 3.2.3
-
leave
-
The function leaves with one of the system wide error codes, if the operation fails
-
panic
-
USER 130, if aIndex is out of bound
Parameters
TInt
aIndex
|
index of the item
|
Selection()
Array of currently selected indices.
SelectionL(RArray< TMPXItemId > &)
IMPORT_C void
|
SelectionL
|
(
|
RArray
< TMPXItemId > &
|
aIds
|
)
|
const
|
Current selected ids.
-
Since
-
S60 3.2.3
-
leave
-
The function leaves with one of the system wide error codes, if the operation fails.
Parameters
RArray
< TMPXItemId > & aIds
|
array of ids returned, id may be duplicated. e.g. music playlist can contains an item more than once.
|
Set(TInt)
IMPORT_C void
|
Set
|
(
|
TInt
|
aIndex
|
)
|
|
Go to specific item at top level.
-
Since
-
S60 3.2.3
-
panic
-
USER 130, if aIndex is out of bound
-
panic
-
USER 0, if collection path is invalid(zero level)
Parameters
TInt
aIndex
|
index of the item
|
Set(const TMPXItemId &)
IMPORT_C void
|
Set
|
(
|
const TMPXItemId &
|
aId
|
)
|
|
Go to specific item at top level.
-
Since
-
S60 3.2.3
-
panic
-
USER 0, if aId is invalid or invalid collection path
Parameters
const TMPXItemId & aId
|
id of the item
|
Set(TMPXOpenMode)
Sets the open mode with which to navigate to the next level.
-
Since
-
S60 3.2.3
-
panic
-
USER 0, if collection path is invalid(zero level)
Set(const TArray< TMPXAttribute > &)
Sets the open attributes with which to navigate to the next level.
-
Since
-
S60 3.2.3
-
panic
-
USER 0, if collection path is invalid(zero level)
Use method
CMPXCollectionPath::SetL
( const TArray<TMPXAttribute>& aAttrs) instead.
SetL(const TArray< TMPXAttribute > &)
Sets the open attributes with which to navigate to the next level.
-
Since
-
S60 3.2.3
-
leave
-
system error code
-
panic
-
USER 0, if collection path is invalid(zero level)
SetToFirst()
IMPORT_C void
|
SetToFirst
|
(
|
)
|
|
SetToLast()
IMPORT_C void
|
SetToLast
|
(
|
)
|
|
TopLevel()
CMPXCollectionPathNode &
|
TopLevel
|
(
|
)
|
[private]
|
The top level node of the path.
-
Since
-
S60 3.2.3
-
panic
-
USER 0 if no level in the path
TopLevel()
const CMPXCollectionPathNode &
|
TopLevel
|
(
|
)
|
const [private]
|
The top level node of the path.
-
Since
-
S60 3.2.3
-
panic
-
USER 0 if no level in the path
Update(TInt, TMPXItemId &)
IMPORT_C void
|
Update
|
(
|
TInt
|
aIndex,
|
|
TMPXItemId &
|
aNewId
|
|
)
|
|
Update the item ID for a particular item.
Parameters
TInt
aIndex
|
index to update
|
TMPXItemId & aNewId
|
the item id to set to the index
|
operator++()
IMPORT_C
TBool
|
operator++
|
(
|
)
|
|
operator--()
IMPORT_C
TBool
|
operator--
|
(
|
)
|
|
Member Enumerations Documentation
Enum TMPXCollectionPathChange
Collection path change type.
Enumerators
EAdded
|
|
EDeleted
|
|
EModified
|
|
EGroupModified
|
|
Enum TMPXCollectionPathLevel
Convenience enumeration to identify levels within a collection path.
Enumerators
ECollectionUid = 0
|
|
ECollectionRoot = 0
|
|
Enum TMPXPathChangeResult
Enumerators
EPathUnchanged = 0
|
|
EPathModified
|
|
EPathClipped
|
|
Member Data Documentation
RArray< TMPXItemId > iIds
RArray
< TMPXItemId >
|
iIds
|
[private]
|
TMPXItemId iInvalidId
TMPXItemId
|
iInvalidId
|
[private]
|
RPointerArray< CMPXCollectionPathNode > iNodeArray
RArray< TInt > iSelection
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.