PathInfo Class Reference

Link against: PlatformEnv.lib

Capability Information

Required Capabilities

None


#include <
PathInfo.h>

Detailed Description

Class holds information of system paths.

Platform Environment API provides interface for quering system paths. Methods provided by the API should be used instead of hard coded path names. All paths have the trailing backslash included. The API consist of the PathInfo class and system paths are defined in PathConfiguration.hrh.

Usage:

  #include <PathInfo.h>

  // Get the root path of Phone Memory.
  TFileName path = PathInfo::PhoneMemoryRootPath();

  // Get the games path and append the path to the root path of Phone Memory.
  path.Append( PathInfo::GamesPath() );

  // 'path' contains now the games path in Phone Memory.

Error handling:

The panic mechanism is used to handle programming errors. GetPath(TInt aPath) method will panic if invalid parameter is given as input. The panic category is named PATHINFO and panic code is:

Dll PlatformEnv.dll
Since:
2.0

Public Types

enum  TSystemPaths {
  ERomRootPath = 0, EPhoneMemoryRootPath, EMemoryCardRootPath, EGamesPath,
  EInstallsPath, EOthersPath, EVideosPath, EImagesPath,
  EGsmPicturesPath, EMmsBackgroundImagesPath, EPresenceLogosPath, ESoundsPath,
  EDigitalSoundsPath, ESimpleSoundsPath, EImagesThumbnailPath, EMemoryCardContactsPath
}
 Enumeration System Paths to be used with GetPath() method. More...

Static Public Member Functions

static IMPORT_C const TDesC & RomRootPath ()
 This method returns the root path in ROM.
static IMPORT_C const TDesC & PhoneMemoryRootPath ()
 This method returns the root path in Phone Memory.
static IMPORT_C const TDesC & MemoryCardRootPath ()
 This method returns the root path in Memory Card.
static IMPORT_C const TDesC & GamesPath ()
 This method returns the games path to be appended to a root path.
static IMPORT_C const TDesC & InstallsPath ()
 This method returns the installs path to be appended to a root path.
static IMPORT_C const TDesC & OthersPath ()
 This method returns the others path to be appended to a root path.
static IMPORT_C const TDesC & VideosPath ()
 This method returns the videos path to be appended to a root path.
static IMPORT_C const TDesC & ImagesPath ()
 This method returns the images path to be appended to a root path.
static IMPORT_C const TDesC & PicturesPath ()
 This method returns the pictures path to be appended to a root path.
static IMPORT_C const TDesC & GmsPicturesPath ()
 This method returns the GMS pictures path to be appended to a root path.
static IMPORT_C const TDesC & MmsBackgroundImagesPath ()
 This method returns the MMS background images path to be appended to a root path.
static IMPORT_C const TDesC & PresenceLogosPath ()
 This method returns the presence logos path to be appended to a root path.
static IMPORT_C const TDesC & SoundsPath ()
 This method returns the sounds path to be appended to a root path.
static IMPORT_C const TDesC & DigitalSoundsPath ()
 This method returns the digital sounds path to be appended to a root path.
static IMPORT_C const TDesC & SimpleSoundsPath ()
 This method returns the simple sounds path to be appended to a root path.
static IMPORT_C const TDesC & ImagesThumbnailPath ()
 This method returns a thumbnail images path.
static IMPORT_C const TDesC & MemoryCardContactsPath ()
 This method returns the full path of the contacts folder in the memory card.
static IMPORT_C const TDesC & GetPath (TInt aPath)
 This method returns the requested system path.

Member Enumeration Documentation

enum PathInfo::TSystemPaths
 

Enumeration System Paths to be used with GetPath() method.

Since:
3.2
Enumerator:
ERomRootPath  To get the root path in ROM.
EPhoneMemoryRootPath  To get the root path in Phone Memory.
EMemoryCardRootPath  To get the root path in Memory Card.
EGamesPath  To get the games path to be appended to a root path.
EInstallsPath  To get the installs path to be appended to a root path.
EOthersPath  To get the others path to be appended to a root path.
EVideosPath  To get the videos path to be appended to a root path.
EImagesPath  To get the images path to be appended to a root path.
EGsmPicturesPath  To get the GSM pictures path to be appended to a root path.
EMmsBackgroundImagesPath  To get the MMS pictures path to be appended to a root path.
EPresenceLogosPath  To get the presence logos path to be appended to a root path.
ESoundsPath  To get the sounds path to be appended to a root path.
EDigitalSoundsPath  To get the digital sounds path to be appended to a root path.
ESimpleSoundsPath  To get the simple sounds path to be appended to a root path.
EImagesThumbnailPath  To get the images thumbnail path.

The thumbnail images directory exists under the same directory where the corresponding image is. Do not try to append this to a root directory.

EMemoryCardContactsPath  To get the full path of the contacts folder in the memory card.

The path also contains the drive letter. Do not try to append this to any root directory.


Member Function Documentation

static IMPORT_C const TDesC& PathInfo::DigitalSoundsPath  )  [static]
 

This method returns the digital sounds path to be appended to a root path.

Returns:
The digital sounds path.
static IMPORT_C const TDesC& PathInfo::GamesPath  )  [static]
 

This method returns the games path to be appended to a root path.

Returns:
The games path.
static IMPORT_C const TDesC& PathInfo::GetPath TInt  aPath  )  [static]
 

This method returns the requested system path.

Since:
3.2
Parameters:
aPath Defines the requested system path.
Returns:
The requested system path.
Panic:
EInvalidParameter Parameter aPath is invalid.
One small sample describing the usage of the method.
  #include <PathInfo.h>

  // Get the the full path of the contacts folder in the memory card.
  TFileName path = PathInfo::GetPath( PathInfo::EMemoryCardContactsPath );

  // 'path' contains now the full path of the contacts folder in the memory card..
See also:
TSystemPaths
static IMPORT_C const TDesC& PathInfo::GmsPicturesPath  )  [static]
 

This method returns the GMS pictures path to be appended to a root path.

Returns:
The GSM pictures path.
static IMPORT_C const TDesC& PathInfo::ImagesPath  )  [static]
 

This method returns the images path to be appended to a root path.

Returns:
The images path.
static IMPORT_C const TDesC& PathInfo::ImagesThumbnailPath  )  [static]
 

This method returns a thumbnail images path.

The thumbnail images directory exists under the same directory where the corresponding image is. Do not try to append this to a root directory.

Returns:
The thumbnail images path.
static IMPORT_C const TDesC& PathInfo::InstallsPath  )  [static]
 

This method returns the installs path to be appended to a root path.

Returns:
The installs path.
static IMPORT_C const TDesC& PathInfo::MemoryCardContactsPath  )  [static]
 

This method returns the full path of the contacts folder in the memory card.

The path also contains the drive letter. Do not try to append this to any root directory.

Returns:
The full path of the contacts folder in the memory card.
static IMPORT_C const TDesC& PathInfo::MemoryCardRootPath  )  [static]
 

This method returns the root path in Memory Card.

Returns:
The root path in Memory Card.
static IMPORT_C const TDesC& PathInfo::MmsBackgroundImagesPath  )  [static]
 

This method returns the MMS background images path to be appended to a root path.

Returns:
The MMS background images path.
static IMPORT_C const TDesC& PathInfo::OthersPath  )  [static]
 

This method returns the others path to be appended to a root path.

Returns:
The installs path.
static IMPORT_C const TDesC& PathInfo::PhoneMemoryRootPath  )  [static]
 

This method returns the root path in Phone Memory.

Returns:
The root path in Phone Memory.
static IMPORT_C const TDesC& PathInfo::PicturesPath  )  [static]
 

This method returns the pictures path to be appended to a root path.

Returns:
The pictures path.
Deprecated:
Use GmsPicturesPath() instead.
static IMPORT_C const TDesC& PathInfo::PresenceLogosPath  )  [static]
 

This method returns the presence logos path to be appended to a root path.

Returns:
The presence logos path.
static IMPORT_C const TDesC& PathInfo::RomRootPath  )  [static]
 

This method returns the root path in ROM.

Returns:
The root path in ROM.
static IMPORT_C const TDesC& PathInfo::SimpleSoundsPath  )  [static]
 

This method returns the simple sounds path to be appended to a root path.

Returns:
The simple sound path.
static IMPORT_C const TDesC& PathInfo::SoundsPath  )  [static]
 

This method returns the sounds path to be appended to a root path.

Returns:
The sounds path.
static IMPORT_C const TDesC& PathInfo::VideosPath  )  [static]
 

This method returns the videos path to be appended to a root path.

Returns:
The videos path.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2007
Back to top