os/mm/devsoundextensions/restrictedaudiooutput/RestrictedAudioOutputBase/inc/RestrictedAudioOutputImpl.h
First public contribution.
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Restricted Audio Output Api Implementation
19 #ifndef RESTRICTEDAUDIOOUTPUTIMPL_H
20 #define RESTRICTEDAUDIOOUTPUTIMPL_H
23 #include "RestrictedAudioOutputImpl.h"
24 #include <RestrictedAudioOutput.h>
28 * CRestrictedAudioOutputImpl class documentation.
30 * @lib RestrictedAudioOutput.lib
34 class CRestrictedAudioOutputImpl : public CBase
39 // Constructors and destructor
42 * Constructs, and returns a pointer to, a new CBody object.
44 * @return CBody* A pointer to newly created object.
46 static CRestrictedAudioOutputImpl* NewL();
53 ~CRestrictedAudioOutputImpl();
56 * Appends an allowed output to the existing list.
58 * @param aOutput to be appended.
59 * @return KErrNone if successful. KErrAlreadyExists if aOutput is already
60 * appended before. KErrIncompleteInitialization if ConstructL is not called
61 * by the deriving class. Otherwise any systemwide error code.
63 TInt AppendAllowedOutput( CRestrictedAudioOutput::TAllowedOutputPreference aOutput );
66 * Removes an allowed output from the existing list.
68 * @param The position within the array from where the object is to be
69 * removed. The position is relative to zero, i.e. zero implies that an
70 * object at the beginning of the array is to be removed.
72 * @return KErrNone if successful. KErrNotFound if aOutput is not in the
73 * the list. KErrIncompleteInitialization if ConstructL is not called
74 * by the deriving class. Otherwise any systemwide error code.
76 TInt RemoveAllowedOutput( CRestrictedAudioOutput::TAllowedOutputPreference aOutput );
79 * Gets a reference to an allowed output located at a specified position
82 * @param The position within the array from where the object is to be
83 * removed. The position is relative to zero, i.e. zero implies that an
84 * object at the beginning of the array is to be removed.
86 * @param The position within the array from where the object is to be
87 * removed. The position is relative to zero, i.e. zero implies that an
88 * object at the beginning of the array is to be removed.
90 * @param A const reference to the object at position anIndex within the
93 * @return KErrNone if successful. KErrNotFound if index is not in the
94 * the list. KErrIncompleteInitialization if ConstructL is not called
95 * by the deriving class. Otherwise any systemwide error code.
97 TInt GetAllowedOutput( TInt aIndex, CRestrictedAudioOutput::TAllowedOutputPreference& aOutput );
100 * Gets the number of objects in the array.
102 * @param On successful return will contain the number of objects in
105 * @return KErrIncompleteInitialization if ConstructL is not called
106 * by the deriving class. Otherwise a system wide error code.
108 TInt GetAllowedOutputCount( TInt& aSize );
111 * Empties the list, so that it is ready to be reused.
114 * @return KErrNone if successful. KErrIncompleteInitialization if ConstructL
115 * is not called by the deriving class.
120 * Applies settings cached locally and commits.
122 * @return KErrNone if successful.
129 * C++ default constructor.
131 CRestrictedAudioOutputImpl();
134 * By default Symbian 2nd phase constructor is private.
136 static void ConstructL();
138 TBool ExistsInArray(CRestrictedAudioOutput::TAllowedOutputPreference& aOutput);
143 private: // Friend classes
144 friend class CRestrictedAudioOutput;
146 RArray<CRestrictedAudioOutput::TAllowedOutputPreference> iAllowedOutputPrefArray;
150 #endif // RESITRCTEDAUDIOOUTPUTIMPL_H