mmserv/tms/tmsapi/src/tmsdtmf.cpp
changeset 12 5a06f39ad45b
equal deleted inserted replaced
0:71ca22bcf22a 12:5a06f39ad45b
       
     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 "tmsdtmfbody.h"
       
    19 #include "tmsdtmf.h"
       
    20 #include "tmsdtmfobsrvr.h"
       
    21 
       
    22 using namespace TMS;
       
    23 
       
    24 
       
    25 EXPORT_C TMSDTMF::TMSDTMF(void) :
       
    26     iBody(NULL)
       
    27     {
       
    28     }
       
    29 
       
    30 EXPORT_C TMSDTMF::~TMSDTMF(void)
       
    31     {
       
    32     delete iBody;
       
    33     }
       
    34 
       
    35 EXPORT_C gint TMSDTMF::AddObserver(TMSDTMFObserver& obsrvr, gpointer user_data)
       
    36     {
       
    37     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    38     if (iBody)
       
    39         {
       
    40         status = iBody->AddObserver(obsrvr, user_data);
       
    41         }
       
    42     return status;
       
    43     }
       
    44 
       
    45 EXPORT_C gint TMSDTMF::RemoveObserver(TMSDTMFObserver& obsrvr)
       
    46     {
       
    47     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    48     if (iBody)
       
    49         {
       
    50         status = iBody->RemoveObserver(obsrvr);
       
    51         }
       
    52     return status;
       
    53     }
       
    54 
       
    55 EXPORT_C gint TMSDTMF::Start()
       
    56     {
       
    57     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    58     if (iBody)
       
    59         {
       
    60         status = iBody->Start();
       
    61         }
       
    62     return status;
       
    63     }
       
    64 
       
    65 EXPORT_C gint TMSDTMF::Stop()
       
    66     {
       
    67     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    68     if (iBody)
       
    69         {
       
    70         status = iBody->Stop();
       
    71         }
       
    72     return status;
       
    73     }
       
    74 
       
    75 EXPORT_C gint TMSDTMF::SetTone(GString* string)
       
    76     {
       
    77     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    78     if (iBody)
       
    79         {
       
    80         status = iBody->SetTone(string);
       
    81         }
       
    82     return status;
       
    83     }
       
    84 
       
    85 EXPORT_C gint TMSDTMF::ContinueDTMFStringSending(gboolean aContinue)
       
    86     {
       
    87     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    88     if (iBody)
       
    89         {
       
    90         status = iBody->ContinueDTMFStringSending(aContinue);
       
    91         }
       
    92     return status;
       
    93     }