browserplugins/browsersysteminfoplugin/inc/SystemInfoBeep.h
branchRCL_3
changeset 48 8e6fa1719340
parent 0 84ad3b177aa3
equal deleted inserted replaced
47:6385c4c93049 48:8e6fa1719340
       
     1 /*
       
     2 * Copyright (c) 2007 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 the License "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 
       
    19 #ifndef SYSTEMINFOBEEP_H
       
    20 #define SYSTEMINFOBEEP_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <MdaAudioTonePlayer.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30 *  CSystemInfoBeep.
       
    31 *  Interface to information about the radio network connection.
       
    32 *  @lib npSystemInfoPlugin.lib
       
    33 *  @since S60 v3.2
       
    34 */
       
    35 NONSHARABLE_CLASS(CSystemInfoBeep) : public CBase, public MMdaAudioToneObserver
       
    36     {
       
    37 public: // Constructors and destructor
       
    38 
       
    39     /**
       
    40      * Two-phased constructor.
       
    41      */
       
    42     static CSystemInfoBeep* NewL();
       
    43 
       
    44     /**
       
    45      * Destructor.
       
    46      */
       
    47     virtual ~CSystemInfoBeep();
       
    48 
       
    49 public:
       
    50     /**
       
    51      * Play a pure tone.
       
    52      * @since 3.2
       
    53      * @param frequency of tone in Hertz
       
    54      * @param duration of tone in microseconds
       
    55      * @return void
       
    56      */
       
    57     void Play( TInt aFrequency, TTimeIntervalMicroSeconds iDuration);
       
    58 
       
    59 private:
       
    60     /**
       
    61      * C++ default constructor.
       
    62      */
       
    63     CSystemInfoBeep();
       
    64 
       
    65     /**
       
    66      * By default Symbian 2nd phase constructor is private.
       
    67      * @param none
       
    68      * @return void
       
    69      */
       
    70     void ConstructL();
       
    71 
       
    72 public:
       
    73     // from MMdaAudioToneObserver
       
    74     void MatoPrepareComplete(TInt aError);
       
    75     void MatoPlayComplete(TInt aError);
       
    76 
       
    77 private:
       
    78     typedef enum TBeepState
       
    79         {
       
    80         EBeepIdle,
       
    81         EBeepPreparing,
       
    82         EBeepPlaying
       
    83         };
       
    84 
       
    85 private:
       
    86 
       
    87     CMdaAudioToneUtility* iToneUtil; // owned
       
    88     TBeepState iState;
       
    89     };
       
    90 
       
    91 #endif // SYSTEMINFOBEEP_H
       
    92 
       
    93 // End of File