qtms/src/qtmsringtone.cpp
changeset 27 cbb1bfb7ebfb
child 50 762d760dcfdf
equal deleted inserted replaced
25:d881023c13eb 27:cbb1bfb7ebfb
       
     1 /*
       
     2  * Copyright (c) 2010 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: QT Bindings for TMS
       
    15  *
       
    16  */
       
    17 
       
    18 #include <tmsringtone.h>
       
    19 #include <qtmsringtone.h>
       
    20 #include "qtmsringtoneimpl.h"
       
    21 
       
    22 using namespace QTMS;
       
    23 
       
    24 QTMSRingTone::QTMSRingTone() :
       
    25     iRingTone(NULL)
       
    26     {
       
    27     }
       
    28 
       
    29 QTMSRingTone::~QTMSRingTone()
       
    30     {
       
    31     delete iRingTone;
       
    32     }
       
    33 
       
    34 gint QTMSRingTone::Init(const QTMSRingToneType type, GString* str, GString* tts)
       
    35     {
       
    36     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    37     if (iRingTone)
       
    38         {
       
    39         status = iRingTone->Init(type, str, tts);
       
    40         }
       
    41     return status;
       
    42     }
       
    43 
       
    44 gint QTMSRingTone::Deinit()
       
    45     {
       
    46     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    47     if (iRingTone)
       
    48         {
       
    49         status = iRingTone->Deinit();
       
    50         }
       
    51     return status;
       
    52     }
       
    53 
       
    54 gint QTMSRingTone::Play()
       
    55     {
       
    56     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    57     if (iRingTone)
       
    58         {
       
    59         status = iRingTone->Play();
       
    60         }
       
    61     return status;
       
    62     }
       
    63 
       
    64 gint QTMSRingTone::Stop()
       
    65     {
       
    66     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    67     if (iRingTone)
       
    68         {
       
    69         status = iRingTone->Stop();
       
    70         }
       
    71     return status;
       
    72     }
       
    73 
       
    74 gint QTMSRingTone::Pause()
       
    75     {
       
    76     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    77     if (iRingTone)
       
    78         {
       
    79         status = iRingTone->Pause();
       
    80         }
       
    81     return status;
       
    82     }
       
    83 
       
    84 gint QTMSRingTone::Mute()
       
    85     {
       
    86     gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
       
    87     if (iRingTone)
       
    88         {
       
    89         status = iRingTone->Mute();
       
    90         }
       
    91     return status;
       
    92     }
       
    93 
       
    94 // End of file