devsoundextensions/globalaudiosettings/src/GlobalAudioSettings.cpp
changeset 0 40261b775718
child 38 4269ca484c7b
child 43 98aa3ecc14d2
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 /*
       
     2 * Copyright (c) 2006 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:   Implementation of the Phone Profile Settings API
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include <e32std.h>
       
    23 #include <GlobalAudioSettings.h>
       
    24 #include "GlobalAudioSettingsImpl.h"
       
    25 #include <MGlobalAudioSettingsObserver.h>
       
    26 
       
    27 // ============================ MEMBER FUNCTIONS ===============================
       
    28 
       
    29 // -----------------------------------------------------------------------------
       
    30 // CGlobalAudioSettings::CGlobalAudioSettings();
       
    31 // 
       
    32 // -----------------------------------------------------------------------------
       
    33 //
       
    34 CGlobalAudioSettings::CGlobalAudioSettings()
       
    35 	{
       
    36 	}
       
    37 	
       
    38 // -----------------------------------------------------------------------------
       
    39 // CGlobalAudioSettings::NewL();
       
    40 // 
       
    41 // -----------------------------------------------------------------------------
       
    42 //
       
    43 EXPORT_C CGlobalAudioSettings* CGlobalAudioSettings::NewL(
       
    44                                MAudioSettingsObserver& aAudioSettingsObserver)
       
    45 	{
       
    46 	CGlobalAudioSettings* self = new (ELeave) CGlobalAudioSettings();
       
    47     CleanupStack::PushL( self );
       
    48     self->ConstructL( aAudioSettingsObserver );
       
    49     CleanupStack::Pop( self );
       
    50     return self;
       
    51 	}
       
    52 	
       
    53 // -----------------------------------------------------------------------------
       
    54 // CGlobalAudioSettings::ConstructL();
       
    55 // 
       
    56 // -----------------------------------------------------------------------------
       
    57 //
       
    58 void CGlobalAudioSettings::ConstructL( MAudioSettingsObserver& aAudioSettingsObserver )
       
    59 	{
       
    60 	iBody = CGlobalAudioSettingsImpl::NewL(*this, aAudioSettingsObserver );
       
    61 	}
       
    62 
       
    63 // Destructor
       
    64 EXPORT_C CGlobalAudioSettings::~CGlobalAudioSettings()
       
    65     {
       
    66     delete iBody;
       
    67     }
       
    68 
       
    69 // -----------------------------------------------------------------------------
       
    70 // CGlobalAudioSettings::NewL
       
    71 // Static function for creating an instance of the EnvironmentalReverb object.
       
    72 // -----------------------------------------------------------------------------
       
    73 //
       
    74 EXPORT_C TBool CGlobalAudioSettings::IsWarningTonesEnabled()
       
    75 	{
       
    76 	return (iBody->IsWarningTonesEnabled());
       
    77 	}
       
    78 
       
    79 // -----------------------------------------------------------------------------
       
    80 // CGlobalAudioSettings::IsMessageTonesEnabled
       
    81 // 
       
    82 // -----------------------------------------------------------------------------
       
    83 //
       
    84 EXPORT_C TBool CGlobalAudioSettings::IsMessageTonesEnabled()
       
    85 	{
       
    86 	return (iBody->IsMessageTonesEnabled());
       
    87 	}
       
    88 
       
    89 // -----------------------------------------------------------------------------
       
    90 // CGlobalAudioSettings::IsSilentProfileEnabled
       
    91 // 
       
    92 // -----------------------------------------------------------------------------
       
    93 //
       
    94 EXPORT_C TBool CGlobalAudioSettings::IsSilentProfileEnabled()
       
    95 	{
       
    96 	return (iBody->IsSilentProfileEnabled());
       
    97 	}
       
    98 
       
    99 // -----------------------------------------------------------------------------
       
   100 // CGlobalAudioSettings::IsVibraEnabled
       
   101 // 
       
   102 // -----------------------------------------------------------------------------
       
   103 //
       
   104 EXPORT_C TBool CGlobalAudioSettings::IsVibraEnabled()
       
   105 	{
       
   106 	return (iBody->IsVibraEnabled());
       
   107 	}
       
   108 	
       
   109 // -----------------------------------------------------------------------------
       
   110 // CGlobalAudioSettings::IsPublicSilenceEnabled
       
   111 // 
       
   112 // -----------------------------------------------------------------------------
       
   113 //
       
   114 EXPORT_C TBool CGlobalAudioSettings::IsPublicSilenceEnabled()
       
   115 	{
       
   116 	return (iBody->IsPublicSilenceEnabled());
       
   117 	}
       
   118 
       
   119 // -----------------------------------------------------------------------------
       
   120 // CGlobalAudioSettings::RegisterAudioClientsListObserver
       
   121 // 
       
   122 // -----------------------------------------------------------------------------
       
   123 //
       
   124 EXPORT_C TInt CGlobalAudioSettings::RegisterAudioClientsListObserver(
       
   125                             MAudioClientsListObserver& aObserver )
       
   126 	{
       
   127 	return (iBody->RegisterAudioClientsListObserver(aObserver));
       
   128 	}
       
   129         
       
   130 // -----------------------------------------------------------------------------
       
   131 // CGlobalAudioSettings::UnregisterAudioClientsListObserver
       
   132 // 
       
   133 // -----------------------------------------------------------------------------
       
   134 //
       
   135 EXPORT_C TInt CGlobalAudioSettings::UnregisterAudioClientsListObserver(
       
   136                             MAudioClientsListObserver& aObserver)
       
   137 	{
       
   138 	return (iBody->UnregisterAudioClientsListObserver(aObserver));
       
   139 	}
       
   140 
       
   141 // -----------------------------------------------------------------------------
       
   142 // CGlobalAudioSettings::GetAudioClientsList
       
   143 // 
       
   144 // -----------------------------------------------------------------------------
       
   145 //
       
   146 EXPORT_C TInt CGlobalAudioSettings::GetAudioClientsList(
       
   147                         TAudioClientListType aType,
       
   148                         RArray<TProcessId>& aList )
       
   149 	{
       
   150 	return (iBody->GetAudioClientsList(aType, aList));
       
   151 	}
       
   152 
       
   153 //End of file