mmserv/tms/tmsapi/src/tmsilbc.cpp
changeset 0 71ca22bcf22a
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2  * Copyright (c) 2009 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: Telephony Multimedia Service
       
    15  *
       
    16  */
       
    17 
       
    18 #include <tmsilbcformat.h>
       
    19 #include "tmsilbcformatbody.h"
       
    20 #include "tmsutility.h"
       
    21 
       
    22 using namespace TMS;
       
    23 
       
    24 EXPORT_C TMSILBCFormat::TMSILBCFormat() :
       
    25     iBody(NULL)
       
    26     {
       
    27     }
       
    28 
       
    29 EXPORT_C TMSILBCFormat::~TMSILBCFormat()
       
    30     {
       
    31     // iBody is deleted with TMSFormat::iFormatBody
       
    32     }
       
    33 
       
    34 EXPORT_C gint TMSILBCFormat::SetMode(const TMSG711CodecMode aMode)
       
    35     {
       
    36     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    37     if (iBody)
       
    38         {
       
    39         status = iBody->SetMode(aMode);
       
    40         }
       
    41     return status;
       
    42     }
       
    43 
       
    44 EXPORT_C gint TMSILBCFormat::GetMode(TMSG711CodecMode& aMode)
       
    45     {
       
    46     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    47     if (iBody)
       
    48         {
       
    49         status = iBody->GetMode(aMode);
       
    50         }
       
    51     return status;
       
    52     }
       
    53 
       
    54 EXPORT_C gint TMSILBCFormat::SetCNG(const gboolean aCng)
       
    55     {
       
    56     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    57     if (iBody)
       
    58         {
       
    59         status = iBody->SetCNG(aCng);
       
    60         }
       
    61     return status;
       
    62     }
       
    63 
       
    64 EXPORT_C gint TMSILBCFormat::GetCNG(gboolean& aCng)
       
    65     {
       
    66     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    67     if (iBody)
       
    68         {
       
    69         status = iBody->GetCNG(aCng);
       
    70         }
       
    71     return status;
       
    72     }
       
    73 
       
    74 EXPORT_C gint TMSILBCFormat::SetVADMode(const gboolean aVad)
       
    75     {
       
    76     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    77     if (iBody)
       
    78         {
       
    79         status = iBody->SetVADMode(aVad);
       
    80         }
       
    81     return status;
       
    82     }
       
    83 
       
    84 EXPORT_C gint TMSILBCFormat::GetVADMode(gboolean& aVad)
       
    85     {
       
    86     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    87     if (iBody)
       
    88         {
       
    89         status = iBody->GetVADMode(aVad);
       
    90         }
       
    91     return status;
       
    92     }
       
    93 
       
    94 // End of file