uifw/AvKon/inc/aknsoundplayer.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2002 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 *
       
    16 */
       
    17 
       
    18 // AKNSOUNDPLAYER.H
       
    19 //
       
    20 // Copyright (c) 1997-2001 Symbian Ltd.  All rights reserved.
       
    21 //
       
    22 
       
    23 // Avkon KeySound Player
       
    24 
       
    25 
       
    26 #if !defined(__AKNSOUNDPLAYER_H__)
       
    27 #define __AKNSOUNDPLAYER_H__
       
    28 
       
    29 
       
    30 #include <e32base.h>
       
    31 #include <barsread.h>
       
    32 
       
    33 
       
    34 #include <aknSoundinfo.h>
       
    35 
       
    36 class RAknSoundServerSession : public RSessionBase
       
    37     {
       
    38 public:
       
    39     TInt Connect();
       
    40     TBool Init(TInt aUid);
       
    41     void AddSoundInfoResourceL(TInt aUid, TResourceReader aReader);
       
    42     void PlaySound(TInt aSid);
       
    43     void StopSound(TInt aSid);
       
    44     void PushContextL(TInt aUid, TResourceReader& aReader, TInt aResourceId);
       
    45     void PopContext();
       
    46     void BringToForeground();
       
    47     void KeyPressed(TInt aKey, TBool aRepeat);
       
    48     void LockContext();
       
    49     void ReleaseContext();
       
    50     TInt ServerRequest(TInt aFunction,const TIpcArgs& aArgs);
       
    51     TInt TopContext();
       
    52     
       
    53     void DisableNextKeySound( TInt aScanCode );
       
    54     
       
    55 private:
       
    56     TBool iKeySoundServerExists;
       
    57     };
       
    58 
       
    59 
       
    60 NONSHARABLE_CLASS(CAknSoundPlayer) : public CBase
       
    61     {
       
    62 public:
       
    63     static CAknSoundPlayer* NewL(TInt aUid);
       
    64     ~CAknSoundPlayer();
       
    65     void ConstructL();
       
    66     void Play(TInt aSid);
       
    67     void Stop(TInt aSid);
       
    68     void AddAppSoundInfoListL(TInt aResourceId);
       
    69     void PushContextL(TInt aResource);
       
    70     void PopContext();
       
    71     void BringToForeground();
       
    72     void PlaySound(TInt aScanCode, TInt aRepeat);
       
    73     void LockContext();
       
    74     void ReleaseContext();
       
    75     TInt RequestSoundInfoL(TInt aAvkonSid, CAknSoundInfo& aInfo);
       
    76     TInt TopContext();
       
    77     
       
    78     void DisableNextKeySound( TInt aScanCode );
       
    79 
       
    80 private:
       
    81     CAknSoundPlayer(TInt aUid);
       
    82     TInt Connect();
       
    83     void DoAddSoundInfoResourceL(TInt aUid, TInt aResourceId);
       
    84     void DoPushContextL(TInt aUid, TInt aResource);
       
    85 private:
       
    86     RAknSoundServerSession iSession;
       
    87     TInt iAppUid;
       
    88     TInt iSpare;
       
    89     };
       
    90 
       
    91 
       
    92 
       
    93 #endif