mmmw_plat/voip_audio_services_api/inc/voiputilityfactory.h
changeset 0 71ca22bcf22a
child 3 4f62049db6ac
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Defines factory object for creating VoIP downlink and uplink
       
    15 *                streams as well as DTMF tone player.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __VOIPUTILITYFACTORY_H
       
    21 #define __VOIPUTILITYFACTORY_H
       
    22 
       
    23 #include <voipaudiocommon.h>
       
    24 #include <voipdatabuffer.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CVoIPUtilityFactoryImpl;
       
    28 class CVoIPAudioDownlinkStream;
       
    29 class CVoIPAudioUplinkStream;
       
    30 class CDTMFTonePlayer;
       
    31 class CVoIPJitterBufferIntfc;
       
    32 
       
    33 
       
    34 /**
       
    35  *  CVoIPUtilityFactory class
       
    36  *
       
    37  *  ?more_complete_description
       
    38  *
       
    39  *  @lib VoIPAudioIntfc.dll
       
    40  *  @since S60 v5.0
       
    41  */
       
    42 class CVoIPUtilityFactory
       
    43     {
       
    44 public:
       
    45     /**
       
    46      *  TVoIPCallType
       
    47      *  ?description
       
    48      *  @since S60 v5.0
       
    49      */
       
    50     enum TVoIPCallType
       
    51         {
       
    52         EVoIPCall,
       
    53         EPoCCall
       
    54         };
       
    55 
       
    56 public:
       
    57 
       
    58     /**
       
    59      * ?description
       
    60      *
       
    61      * @since S60 v5.0
       
    62      * @param CVoIPUtilityFactory*&
       
    63      * @return TInt
       
    64      */
       
    65     IMPORT_C static TInt CreateFactory(CVoIPUtilityFactory*& aFactory);
       
    66 
       
    67     /**
       
    68      * Destructor
       
    69      *
       
    70      * @since S60 v5.0
       
    71      * @param none
       
    72      * @return none
       
    73      */
       
    74     IMPORT_C ~CVoIPUtilityFactory();
       
    75 
       
    76     /**
       
    77      * ?description
       
    78      *
       
    79      * @since S60 v5.0
       
    80      * @param TVersion
       
    81      * @param TCallType
       
    82      * @param CVoIPAudioDownlinkStream*&
       
    83      * @return TInt
       
    84      */
       
    85     IMPORT_C TInt CreateDownlinkStream(const TVersion aVersion,
       
    86                                        const TVoIPCallType aCallType,
       
    87                                        CVoIPAudioDownlinkStream*& aDnLink);
       
    88 
       
    89     /**
       
    90      * ?description
       
    91      *
       
    92      * @since S60 v5.0
       
    93      * @param TVersion
       
    94      * @param CVoIPJitterBufferIntfc*&
       
    95      * @param CVoIPAudioDownlinkStream*&
       
    96      * @return TInt
       
    97      */
       
    98     IMPORT_C TInt CreateDownlinkStream(const TVersion aVersion,
       
    99                                        CVoIPJitterBufferIntfc*& aJBIntfc,
       
   100                                        CVoIPAudioDownlinkStream*& aDnLink);
       
   101 
       
   102     /**
       
   103      * ?description
       
   104      *
       
   105      * @since S60 v5.0
       
   106      * @param TVersion
       
   107      * @param TCallType
       
   108      * @param CVoIPAudioUplinkStream*&
       
   109      * @return TInt
       
   110      */
       
   111     IMPORT_C TInt CreateUplinkStream(const TVersion aVersion,
       
   112                                      const TVoIPCallType aCallType,
       
   113                                      CVoIPAudioUplinkStream*& aUpLink);
       
   114 
       
   115     /**
       
   116      * ?description
       
   117      *
       
   118      * @since S60 v5.0
       
   119      * @param CDTMFTonePlayer*&
       
   120      * @return TInt
       
   121      */
       
   122     IMPORT_C TInt CreateDTMFTonePlayer(CDTMFTonePlayer*& aDtmfPlayer);
       
   123 
       
   124     /**
       
   125      * ?description
       
   126      *
       
   127      * @since S60 v5.0
       
   128      * @param CVoIPDataBuffer*&
       
   129      * @param const CVoIPDataBuffer::TVoIPBufferType
       
   130      * @param const TVoIPCodecFormat aCodecFormat - default EG711 assumes
       
   131      *        request to create 162-byte buffer for G711 codec.
       
   132      * @return TInt
       
   133      */
       
   134     IMPORT_C TInt CreateBuffer(CVoIPDataBuffer*& aBuffer,
       
   135 		           			   const CVoIPDataBuffer::TVoIPBufferType aType,
       
   136         		   			   const TVoIPCodecFormat aCodecFormat = EG711);
       
   137 
       
   138     /**
       
   139      * ?description
       
   140      *
       
   141      * @since S60 v5.0
       
   142      * @param RArray<TVoIPCodecFormat>&
       
   143      * @return TInt -
       
   144      */
       
   145     IMPORT_C TInt GetSupportedDownlinkFormats(
       
   146                   RArray<TVoIPCodecFormat>& aFormats);
       
   147 
       
   148     /**
       
   149      * ?description
       
   150      *
       
   151      * @since S60 v5.0
       
   152      * @param RArray<TVoIPCodecFormat>&
       
   153      * @return TInt -
       
   154      */
       
   155     IMPORT_C TInt GetSupportedUplinkFormats(
       
   156                   RArray<TVoIPCodecFormat>& aFormats);
       
   157 
       
   158 private:
       
   159 
       
   160     /**
       
   161      * Constructor
       
   162      *
       
   163      * @since S60 v5.0
       
   164      * @param none
       
   165      * @return none
       
   166      */
       
   167     CVoIPUtilityFactory();
       
   168 
       
   169     /**
       
   170      * Symbian constructor
       
   171      *
       
   172      * @since S60 v5.0
       
   173      * @param none
       
   174      * @return void
       
   175      */
       
   176     void ConstructL();
       
   177 
       
   178 private:
       
   179 
       
   180     CVoIPUtilityFactoryImpl* iVoIPUtilityFactoryImpl;
       
   181 
       
   182     };
       
   183 
       
   184 #endif //__VOIPUTILITYFACTORY_H
       
   185 
       
   186 // End of file