CAknKeySoundSystem Class Reference

API published in: S60 1st Ed

Link against: avkon.lib

Capability Information

Required Capabilities

None


#include <
aknsoundsystem.h>

Detailed Description

This is an interface for controlling keysounds from Avkon.

Provides support for handling key sounds.


Public Member Functions

IMPORT_C ~CAknKeySoundSystem ()
 Destructor.
IMPORT_C void PushContextL (TInt aResourceId)
 Function reads resource data from resource file and push the context to the server session.
IMPORT_C void PopContext ()
 Pop the context from the server session object.
IMPORT_C void PlaySound (const TKeyEvent &aKeyEvent)
 This function plays key event sounds.
IMPORT_C void PlaySound (TInt aSid)
 This function plays sounds by sound ID.
IMPORT_C void AddAppSoundInfoListL (TInt aResourceId)
 Function reads resource data from resource file.
IMPORT_C void BringToForeground ()
 This function brings the sounds back to foreground.
IMPORT_C void StopSound (TInt aSid)
 Stops playing the sound with given ID.
IMPORT_C void LockContext ()
 Locks context.
IMPORT_C void ReleaseContext ()
 Releases context.
IMPORT_C TInt RequestSoundInfoL (TInt aAvkonSid, CAknSoundInfo &aInfo)
 Reads sound information from given Avkon sound ID.
IMPORT_C TInt TopContext ()
 Returns top context id from the session.

Static Public Member Functions

static IMPORT_C CAknKeySoundSystemNewL (TInt aUid)
 Base class default constructor.

Constructor & Destructor Documentation

IMPORT_C CAknKeySoundSystem::~CAknKeySoundSystem  ) 
 

Destructor.


Member Function Documentation

IMPORT_C void CAknKeySoundSystem::AddAppSoundInfoListL TInt  aResourceId  ) 
 

Function reads resource data from resource file.

And adds the application sound info list to the server session. If the leave occurs the framework generates a Symbian Leave code.

Parameters:
aResourceId Avkon resource ID.
IMPORT_C void CAknKeySoundSystem::BringToForeground  ) 
 

This function brings the sounds back to foreground.

This function should be called from HandleForegroundEventL(). HandleForegroundEventL() is implemented in CAknAppUi and it is reimplemented in CAknViewAppUi.

IMPORT_C void CAknKeySoundSystem::LockContext  ) 
 

Locks context.

static IMPORT_C CAknKeySoundSystem* CAknKeySoundSystem::NewL TInt  aUid  )  [static]
 

Base class default constructor.

Parameters:
aUid Application UID.
Returns:
A pointer to a new CAknKeySoundSystem object.
IMPORT_C void CAknKeySoundSystem::PlaySound TInt  aSid  ) 
 

This function plays sounds by sound ID.

Parameters:
aSid Sound ID. These SID numbers are specified in Avkon enum TAvkonSystemSID.
IMPORT_C void CAknKeySoundSystem::PlaySound const TKeyEvent &  aKeyEvent  ) 
 

This function plays key event sounds.

Parameters:
aKeyEvent The scan code of the key that caused the event.
IMPORT_C void CAknKeySoundSystem::PopContext  ) 
 

Pop the context from the server session object.

IMPORT_C void CAknKeySoundSystem::PushContextL TInt  aResourceId  ) 
 

Function reads resource data from resource file and push the context to the server session.

The most common Avkon resources in this case are R_AVKON_DEFAULT_SOUND_LIST, R_AVKON_DEFAULT_SKEY_LIST and R_AVKON_SILENT_SKEY_LIST. If a leave occurs the framework generates a Symbian Leave code.

Parameters:
aResourceId Avkon resource ID.
IMPORT_C void CAknKeySoundSystem::ReleaseContext  ) 
 

Releases context.

IMPORT_C TInt CAknKeySoundSystem::RequestSoundInfoL TInt  aAvkonSid,
CAknSoundInfo aInfo
 

Reads sound information from given Avkon sound ID.

Parameters:
aAvkonSid ID for Avkon sound whose information is requested.
aInfo Sound information will be put in this structure.
Returns:
KErrNone if succesful, KErrNotFound if requested sound ID is not found.
IMPORT_C void CAknKeySoundSystem::StopSound TInt  aSid  ) 
 

Stops playing the sound with given ID.

Parameters:
aSid Sound ID. Application defined SID's should be less than 1000.
IMPORT_C TInt CAknKeySoundSystem::TopContext  ) 
 

Returns top context id from the session.

Returns:
The resource id of the context that is at the top of the soundstack.

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

Copyright © Nokia Corporation 2001-2008
Back to top