Nokia N97 SDK
Example Applications Guide

CAudioStreamAppUi Class Reference

#include <AudioStreamAppUi.h>

Inheritance diagram for CAudioStreamAppUi:

List of all members.

Detailed Description

CAudioStreamAppUi Application UI class.

Definition at line 37 of file AudioStreamAppUi.h.


Public Member Functions

void  ConstructL ()
  ~CAudioStreamAppUi ()
CAudioStreamView *  GetView () const

Private Member Functions

void  DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane)
void  HandleCommandL (TInt aCommand)
virtual TKeyResponse  HandleKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)

Private Attributes

CAudioStreamView *  iView
CAudioStreamEngine *  iEngine


Constructor & Destructor Documentation

CAudioStreamAppUi::~CAudioStreamAppUi (   ) 
 

Destructor.

Definition at line 50 of file AudioStreamAppUi.cpp.

References iEngine, and iView.

00051         {
00052     // remove view from control stack
00053     RemoveFromStack( iView );
00054     delete iView;
00055         iView=NULL;
00056         
00057         delete iEngine;
00058         iEngine=NULL;
00059         }


Member Function Documentation

void CAudioStreamAppUi::ConstructL (   ) 
 

EPOC AudioStreamault constructor.

Definition at line 33 of file AudioStreamAppUi.cpp.

References iEngine, iView, CAudioStreamView::NewL(), and CAudioStreamEngine::NewL().

00034     {
00035         BaseConstructL(EAknEnableSkin);
00036         iEngine = CAudioStreamEngine::NewL( this );     
00037         // pass the handle of CAudioStreamEngine to CAudioStreamView so the 
00038         // view can use the engine
00039         iView = CAudioStreamView::NewL(ClientRect(), iEngine);
00040         iView->SetMopParent( this );
00041         // add view to control stack
00042         AddToStackL( iView );   
00043     }

void CAudioStreamAppUi::HandleCommandL (  TInt  aCommand  )  [private]
 

From CEikAppUi, takes care of command handling. param aCommand command to be handled

Definition at line 92 of file AudioStreamAppUi.cpp.

References iEngine, CAudioStreamEngine::LoadAudioFileL(), CAudioStreamEngine::Play(), CAudioStreamEngine::Record(), CAudioStreamEngine::SaveAudioFileL(), CAudioStreamEngine::SetEncodingL(), and CAudioStreamEngine::Stop().

00093     {
00094     switch ( aCommand )
00095         {
00096         case EAknSoftkeyBack:
00097         case EEikCmdExit:
00098             {
00099             Exit();
00100             break;
00101             }
00102         case EAudioStreamCmdPlay:
00103             {
00104             iEngine->Play();
00105             break;
00106             }
00107         case EAudioStreamCmdRecord:
00108             {
00109             iEngine->Record();
00110             break;
00111             }
00112         case EAudioStreamCmdStop:
00113             {
00114             iEngine->Stop();
00115             break;
00116             }
00117         case EAudioStreamCmdLoad:
00118             {
00119             iEngine->LoadAudioFileL();
00120             break;
00121             }
00122         case EAudioStreamCmdSave:
00123             {
00124             iEngine->SaveAudioFileL();
00125             break;
00126             }
00127         case EAudioStreamCmdPcm:
00128             {
00129             iEngine->SetEncodingL(EFalse);
00130             break;
00131             }
00132         case EAudioStreamCmdAmr:
00133             {
00134             iEngine->SetEncodingL(ETrue);
00135             break;
00136             }
00137         default:
00138             break;      
00139         }
00140     }

TKeyResponse CAudioStreamAppUi::HandleKeyEventL (  const TKeyEvent &  aKeyEvent,
TEventCode  aType
)  [private, virtual]
 

From CEikAppUi, handles key events. param aKeyEvent Event to handled. param aType Type of the key event. return Response code (EKeyWasConsumed, EKeyWasNotConsumed).

Definition at line 81 of file AudioStreamAppUi.cpp.

00083     {
00084     return EKeyWasNotConsumed;
00085     }


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

© Nokia 2009

Back to top