1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mm_plat/g711_encoder_interface_api/inc/G711EncoderIntfc.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,114 @@
1.4 +/*
1.5 +* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: Used for interface to G711 encoder.
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +#ifndef CG711ENCODERINTFC_H
1.23 +#define CG711ENCODERINTFC_H
1.24 +
1.25 +// INCLUDES
1.26 +#include <e32base.h>
1.27 +
1.28 +// CONSTANTS
1.29 +const TUid KUidG711EncoderIntfc = {0x10207AFF};
1.30 +
1.31 +// MACROS
1.32 +
1.33 +// DATA TYPES
1.34 +
1.35 +// FUNCTION PROTOTYPES
1.36 +
1.37 +// FORWARD DECLARATIONS
1.38 +class CMMFDevSound;
1.39 +class CMdaAudioInputStream;
1.40 +
1.41 +// CLASS DECLARATION
1.42 +
1.43 +/**
1.44 +* Interface for G711 encoder.
1.45 +* This abstract class just provides the static NewL function for the creation
1.46 +* of the proxy, and also defines the custom interface to be implemented by the
1.47 +* proxy and the real custom interface implementation.
1.48 +*
1.49 +* @lib G711EncoderIntfc.lib
1.50 +* @since S60 3.0
1.51 +*/
1.52 +class CG711EncoderIntfc : public CBase
1.53 + {
1.54 + // DATA TYPES
1.55 + public:
1.56 + enum TEncodeMode
1.57 + {
1.58 + EEncALaw,
1.59 + EEncULaw
1.60 + };
1.61 +
1.62 + public: // Constructors and destructor
1.63 +
1.64 + /**
1.65 + * Creates the interface.
1.66 + */
1.67 + IMPORT_C static CG711EncoderIntfc* NewL(CMMFDevSound& aDevSound);
1.68 +
1.69 + /**
1.70 + * Creates the interface.
1.71 + */
1.72 + IMPORT_C static CG711EncoderIntfc* NewL(CMdaAudioInputStream& aUtility);
1.73 +
1.74 + public: // New functions
1.75 +
1.76 + /**
1.77 + * Used to change the encoding mode.
1.78 + * @since S60 3.0
1.79 + * @param aEncodeMode requested encode mode.
1.80 + * @return status
1.81 + */
1.82 + IMPORT_C virtual TInt SetEncoderMode(TEncodeMode aEncodeMode) = 0;
1.83 +
1.84 + /**
1.85 + * Enables and disables the voice activity (VAD) mode.
1.86 + * @since S60 3.0
1.87 + * @param aVadMode requested VAD mode.
1.88 + * @return status
1.89 + */
1.90 + IMPORT_C virtual TInt SetVadMode(TBool aVadMode) = 0;
1.91 +
1.92 + /**
1.93 + * Retrieves the current state of VAD mode.
1.94 + * @since S60 3.0
1.95 + * @param aVadMode returns current VAD mode.
1.96 + * @return status
1.97 + */
1.98 + IMPORT_C virtual TInt GetVadMode(TBool& aVadMode) = 0;
1.99 +
1.100 +
1.101 + public: // Functions from base classes
1.102 + protected: // New functions
1.103 + protected: // Functions from base classes
1.104 + private:
1.105 +
1.106 + public: // Data
1.107 + protected: // Data
1.108 + private: // Data
1.109 + public: // Friend classes
1.110 + protected: // Friend classes
1.111 + private: // Friend classes
1.112 +
1.113 + };
1.114 +
1.115 +#endif // CG711ENCODERINTFC_H
1.116 +
1.117 +// End of File